From 5da7ca5bc19ca68cd97b313dc6cc7ee3f131054a Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Thu, 2 Jun 2022 11:22:06 -0700 Subject: [PATCH 01/15] Initial setup --- package-lock.json | 2007 ++++++++++++++++++++--- package.json | 15 +- src/{index.js => index.ts} | 0 src/loading/{context.js => context.tsx} | 61 +- src/{map.js => map.tsx} | 29 +- src/{mapbox.js => mapbox.tsx} | 23 +- src/region/{context.js => context.tsx} | 2 +- src/{regl.js => regl.tsx} | 8 +- tsconfig.json | 13 + 9 files changed, 1840 insertions(+), 318 deletions(-) rename src/{index.js => index.ts} (100%) rename src/loading/{context.js => context.tsx} (77%) rename src/{map.js => map.tsx} (75%) rename src/{mapbox.js => mapbox.tsx} (79%) rename src/region/{context.js => context.tsx} (89%) rename src/{regl.js => regl.tsx} (86%) create mode 100644 tsconfig.json diff --git a/package-lock.json b/package-lock.json index 2220abd..cf22c6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,12 @@ "license": "MIT", "dependencies": { "@turf/turf": "^6.5.0", + "@types/d3-array": "^3.0.3", + "@types/d3-axis": "^3.0.1", + "@types/d3-geo": "^3.0.2", + "@types/d3-scale": "^4.0.2", + "@types/d3-selection": "^3.0.2", + "@types/mapbox-gl": "^2.7.2", "d3-array": "^2.12.1", "d3-axis": "^2.1.0", "d3-geo": "^2.0.2", @@ -29,7 +35,10 @@ "jest": "^27.3.1", "microbundle": "^0.13.0", "prettier": "^2.2.1", - "rimraf": "3.0.2" + "rimraf": "3.0.2", + "source-map-loader": "^3.0.1", + "ts-loader": "^9.3.0", + "typescript": "^4.7.2" }, "peerDependencies": { "react": "^16.14.0 || ^17.0.2", @@ -37,12 +46,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "dependencies": { - "@babel/highlight": "^7.16.0" + "@babel/highlight": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -88,26 +97,26 @@ } }, "node_modules/@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.18.2", + "@jridgewell/gen-mapping": "^0.3.0", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz", - "integrity": "sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -145,17 +154,18 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz", - "integrity": "sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz", + "integrity": "sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-member-expression-to-functions": "^7.17.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -199,63 +209,59 @@ "@babel/core": "^7.4.0-0" } }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz", - "integrity": "sha512-Hk2SLxC9ZbcOhLpg/yMznzJ11W++lg5GMbxt1ev6TXUiJB0N42KPC+7w8a+eWGuqDnUYuwStJoZHM7RgmIOaGQ==", + "node_modules/@babel/helper-environment-visitor": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", + "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", "dev": true, - "dependencies": { - "@babel/types": "^7.16.0" - }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-function-name": { + "node_modules/@babel/helper-explode-assignable-expression": { "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", - "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz", + "integrity": "sha512-Hk2SLxC9ZbcOhLpg/yMznzJ11W++lg5GMbxt1ev6TXUiJB0N42KPC+7w8a+eWGuqDnUYuwStJoZHM7RgmIOaGQ==", "dev": true, "dependencies": { - "@babel/helper-get-function-arity": "^7.16.0", - "@babel/template": "^7.16.0", "@babel/types": "^7.16.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", - "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", + "node_modules/@babel/helper-function-name": { + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", + "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/template": "^7.16.7", + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-hoist-variables": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", - "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", + "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.17.0" }, "engines": { "node": ">=6.9.0" @@ -293,21 +299,21 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz", - "integrity": "sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", + "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", "dev": true, "engines": { "node": ">=6.9.0" @@ -328,15 +334,16 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.2.tgz", + "integrity": "sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q==", "dev": true, "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.18.2", + "@babel/helper-member-expression-to-functions": "^7.17.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.18.2", + "@babel/types": "^7.18.2" }, "engines": { "node": ">=6.9.0" @@ -367,30 +374,30 @@ } }, "node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", - "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -426,12 +433,12 @@ } }, "node_modules/@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", + "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -440,9 +447,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", + "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -960,12 +967,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.0.tgz", - "integrity": "sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz", + "integrity": "sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.17.12" }, "engines": { "node": ">=6.9.0" @@ -1729,32 +1736,33 @@ } }, "node_modules/@babel/template": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", - "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", - "@babel/types": "^7.16.0", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", + "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.18.2", + "@babel/helper-environment-visitor": "^7.18.2", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.18.0", + "@babel/types": "^7.18.2", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -1763,12 +1771,12 @@ } }, "node_modules/@babel/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", - "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", + "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -2512,6 +2520,54 @@ "node": ">=8" } }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", + "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", + "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "node_modules/@mapbox/geojson-rewind": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.1.tgz", @@ -4344,6 +4400,67 @@ "@babel/types": "^7.3.0" } }, + "node_modules/@types/d3-array": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.3.tgz", + "integrity": "sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==" + }, + "node_modules/@types/d3-axis": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.1.tgz", + "integrity": "sha512-zji/iIbdd49g9WN0aIsGcwcTBUkgLsCSwB+uH+LPVDAiKWENMtI3cJEWt+7/YYwelMoZmbBfzA3qCdrZ2XFNnw==", + "dependencies": { + "@types/d3-selection": "*" + } + }, + "node_modules/@types/d3-geo": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.0.2.tgz", + "integrity": "sha512-DbqK7MLYA8LpyHQfv6Klz0426bQEf7bRTvhMy44sNGVyZoWn//B0c+Qbeg8Osi2Obdc9BLLXYAKpyWege2/7LQ==", + "dependencies": { + "@types/geojson": "*" + } + }, + "node_modules/@types/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA==", + "dependencies": { + "@types/d3-time": "*" + } + }, + "node_modules/@types/d3-selection": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.2.tgz", + "integrity": "sha512-d29EDd0iUBrRoKhPndhDY6U/PYxOWqgIZwKTooy2UkBfU7TNZNpRho0yLWPxlatQrFWk2mnTu71IZQ4+LRgKlQ==" + }, + "node_modules/@types/d3-time": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==" + }, + "node_modules/@types/eslint": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", + "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", + "dev": true, + "peer": true, + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -4388,6 +4505,21 @@ "@types/istanbul-lib-report": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true, + "peer": true + }, + "node_modules/@types/mapbox-gl": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-2.7.2.tgz", + "integrity": "sha512-2/qyLtiQxiTYEQuOxaqiNiZPvjND35rde/ZQpxx8D5bEcYK4PDXWv/DIxPsfxqyhiP1E6Wbni0SfjkbqcqOfCQ==", + "dependencies": { + "@types/geojson": "*" + } + }, "node_modules/@types/node": { "version": "16.9.1", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", @@ -4436,6 +4568,181 @@ "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", "dev": true }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true, + "peer": true + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true, + "peer": true + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true, + "peer": true + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true, + "peer": true + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "peer": true, + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "peer": true, + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true, + "peer": true + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "peer": true, + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "peer": true + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "peer": true + }, "node_modules/abab": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", @@ -4476,6 +4783,16 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "peer": true, + "peerDependencies": { + "acorn": "^8" + } + }, "node_modules/acorn-walk": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", @@ -4497,6 +4814,33 @@ "node": ">= 6.0.0" } }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "ajv": "^6.9.1" + } + }, "node_modules/alphanum-sort": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", @@ -5049,7 +5393,7 @@ "node_modules/chalk/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, "engines": { "node": ">=0.8.0" @@ -5064,6 +5408,16 @@ "node": ">=10" } }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6.0" + } + }, "node_modules/ci-info": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", @@ -5136,7 +5490,7 @@ "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "node_modules/colord": { @@ -5846,6 +6200,19 @@ "node": ">= 4" } }, + "node_modules/enhanced-resolve": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", + "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -5864,6 +6231,13 @@ "is-arrayish": "^0.2.1" } }, + "node_modules/es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true, + "peer": true + }, "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -5917,6 +6291,30 @@ "node": ">=0.10.0" } }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-scope/node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -5930,6 +6328,19 @@ "node": ">=4" } }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, "node_modules/estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -5960,6 +6371,16 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -6021,6 +6442,13 @@ "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "peer": true + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -6299,6 +6727,13 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + }, "node_modules/global": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", @@ -6330,9 +6765,9 @@ "dev": true }, "node_modules/graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "node_modules/grid-index": { @@ -6387,7 +6822,7 @@ "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, "engines": { "node": ">=4" @@ -8702,6 +9137,13 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, "node_modules/json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", @@ -8777,6 +9219,16 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "node_modules/loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6.11.5" + } + }, "node_modules/loader-utils": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", @@ -9226,6 +9678,13 @@ "typedarray-pool": "^1.0.2" } }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -10881,6 +11340,25 @@ "object-assign": "^4.1.1" } }, + "node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, "node_modules/semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -10993,6 +11471,48 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-3.0.1.tgz", + "integrity": "sha512-Vp1UsfyPvgujKQzi4pyDiTOnE3E4H+yHvkVRN3c/9PJmQS4CQJExvcDvaX/D+RV+xQben9HJ56jMJS3CgUeWyA==", + "dev": true, + "dependencies": { + "abab": "^2.0.5", + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.1" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/source-map-loader/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-loader/node_modules/source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.20", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", @@ -11272,6 +11792,15 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -11305,6 +11834,92 @@ "node": ">=10" } }, + "node_modules/terser-webpack-plugin": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "dev": true, + "peer": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.7.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "uglify-js": { + "optional": true + } + } + }, + "node_modules/terser-webpack-plugin/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/terser-webpack-plugin/node_modules/jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "peer": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "peer": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "peer": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/terser/node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", @@ -11456,6 +12071,110 @@ "node": ">=8" } }, + "node_modules/ts-loader": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.0.tgz", + "integrity": "sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "typescript": "*", + "webpack": "^5.0.0" + } + }, + "node_modules/ts-loader/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ts-loader/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ts-loader/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/ts-loader/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ts-loader/node_modules/semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ts-loader/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -11519,9 +12238,9 @@ } }, "node_modules/typescript": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", - "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -11591,6 +12310,16 @@ "node": ">= 4.0.0" } }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, "node_modules/url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", @@ -11683,6 +12412,20 @@ "makeerror": "1.0.12" } }, + "node_modules/watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "peer": true, + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", @@ -11692,6 +12435,71 @@ "node": ">=10.4" } }, + "node_modules/webpack": { + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", + "dev": true, + "peer": true, + "dependencies": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.9.3", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.3.1", + "webpack-sources": "^3.2.3" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack/node_modules/@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true, + "peer": true + }, "node_modules/whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", @@ -11966,12 +12774,12 @@ }, "dependencies": { "@babel/code-frame": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz", - "integrity": "sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz", + "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==", "dev": true, "requires": { - "@babel/highlight": "^7.16.0" + "@babel/highlight": "^7.16.7" } }, "@babel/compat-data": { @@ -12004,23 +12812,23 @@ } }, "@babel/generator": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.16.0.tgz", - "integrity": "sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.18.2.tgz", + "integrity": "sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw==", "dev": true, "requires": { - "@babel/types": "^7.16.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.18.2", + "@jridgewell/gen-mapping": "^0.3.0", + "jsesc": "^2.5.1" } }, "@babel/helper-annotate-as-pure": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz", - "integrity": "sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz", + "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { @@ -12046,17 +12854,18 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz", - "integrity": "sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.18.0.tgz", + "integrity": "sha512-Kh8zTGR9de3J63e5nS0rQUdRs/kbtwoeQQ0sriS0lItjC96u8XXZN6lKpuyWd2coKSU13py/y+LTmThLuVX0Pg==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.16.0", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/helper-replace-supers": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-environment-visitor": "^7.16.7", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-member-expression-to-functions": "^7.17.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/helper-replace-supers": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7" } }, "@babel/helper-create-regexp-features-plugin": { @@ -12085,6 +12894,12 @@ "semver": "^6.1.2" } }, + "@babel/helper-environment-visitor": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz", + "integrity": "sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ==", + "dev": true + }, "@babel/helper-explode-assignable-expression": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz", @@ -12095,41 +12910,31 @@ } }, "@babel/helper-function-name": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz", - "integrity": "sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog==", + "version": "7.17.9", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz", + "integrity": "sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg==", "dev": true, "requires": { - "@babel/helper-get-function-arity": "^7.16.0", - "@babel/template": "^7.16.0", - "@babel/types": "^7.16.0" - } - }, - "@babel/helper-get-function-arity": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz", - "integrity": "sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ==", - "dev": true, - "requires": { - "@babel/types": "^7.16.0" + "@babel/template": "^7.16.7", + "@babel/types": "^7.17.0" } }, "@babel/helper-hoist-variables": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz", - "integrity": "sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz", + "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz", - "integrity": "sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ==", + "version": "7.17.7", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz", + "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.17.0" } }, "@babel/helper-module-imports": { @@ -12158,18 +12963,18 @@ } }, "@babel/helper-optimise-call-expression": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz", - "integrity": "sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz", + "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz", + "integrity": "sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==", "dev": true }, "@babel/helper-remap-async-to-generator": { @@ -12184,15 +12989,16 @@ } }, "@babel/helper-replace-supers": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz", - "integrity": "sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA==", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.2.tgz", + "integrity": "sha512-XzAIyxx+vFnrOxiQrToSUOzUOn0e1J2Li40ntddek1Y69AXUTXoDJ40/D5RdjFu7s7qHiaeoTiempZcbuVXh2Q==", "dev": true, "requires": { - "@babel/helper-member-expression-to-functions": "^7.16.0", - "@babel/helper-optimise-call-expression": "^7.16.0", - "@babel/traverse": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/helper-environment-visitor": "^7.18.2", + "@babel/helper-member-expression-to-functions": "^7.17.7", + "@babel/helper-optimise-call-expression": "^7.16.7", + "@babel/traverse": "^7.18.2", + "@babel/types": "^7.18.2" } }, "@babel/helper-simple-access": { @@ -12214,24 +13020,24 @@ } }, "@babel/helper-split-export-declaration": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz", - "integrity": "sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz", + "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz", + "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==", "dev": true }, "@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz", + "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==", "dev": true }, "@babel/helper-wrap-function": { @@ -12258,20 +13064,20 @@ } }, "@babel/highlight": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz", - "integrity": "sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.17.12.tgz", + "integrity": "sha512-7yykMVF3hfZY2jsHZEEgLc+3x4o1O+fYyULu11GynEUQNwB6lua+IIQn1FiJxNucd5UlyJryrwsOh8PL9Sn8Qg==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.16.4", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.16.4.tgz", - "integrity": "sha512-6V0qdPUaiVHH3RtZeLIsc+6pDhbYzHR8ogA8w+f+Wc77DuXto19g2QUwveINoS34Uw+W8/hQDGJCx+i4n7xcng==", + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.18.4.tgz", + "integrity": "sha512-FDge0dFazETFcxGw/EXzOkN8uJp0PC7Qbm+Pe9T+av2zlBpOgunFHkQPPn+eRuClU73JF+98D531UgayY89tow==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -12615,12 +13421,12 @@ } }, "@babel/plugin-syntax-typescript": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.0.tgz", - "integrity": "sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.17.12.tgz", + "integrity": "sha512-TYY0SXFiO31YXtNg3HtFwNJHjLsAyIIhAhNWkQ5whPPS7HWUFlg9z0Ta4qAQNjQbP1wsSt/oKkmZ/4/WWdMUpw==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.17.12" } }, "@babel/plugin-transform-arrow-functions": { @@ -13128,40 +13934,41 @@ } }, "@babel/template": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.0.tgz", - "integrity": "sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz", + "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==", "dev": true, "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/parser": "^7.16.0", - "@babel/types": "^7.16.0" + "@babel/code-frame": "^7.16.7", + "@babel/parser": "^7.16.7", + "@babel/types": "^7.16.7" } }, "@babel/traverse": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.16.3.tgz", - "integrity": "sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.16.0", - "@babel/generator": "^7.16.0", - "@babel/helper-function-name": "^7.16.0", - "@babel/helper-hoist-variables": "^7.16.0", - "@babel/helper-split-export-declaration": "^7.16.0", - "@babel/parser": "^7.16.3", - "@babel/types": "^7.16.0", + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.18.2.tgz", + "integrity": "sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.16.7", + "@babel/generator": "^7.18.2", + "@babel/helper-environment-visitor": "^7.18.2", + "@babel/helper-function-name": "^7.17.9", + "@babel/helper-hoist-variables": "^7.16.7", + "@babel/helper-split-export-declaration": "^7.16.7", + "@babel/parser": "^7.18.0", + "@babel/types": "^7.18.2", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.16.0.tgz", - "integrity": "sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg==", + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.18.4.tgz", + "integrity": "sha512-ThN1mBcMq5pG/Vm2IcBmPPfyPXbd8S02rS+OBIDENdufvqC7Z/jHPCv9IcP01277aKtDI8g/2XysBN4hA8niiw==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.15.7", + "@babel/helper-validator-identifier": "^7.16.7", "to-fast-properties": "^2.0.0" } }, @@ -13725,6 +14532,45 @@ } } }, + "@jridgewell/gen-mapping": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz", + "integrity": "sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg==", + "dev": true, + "requires": { + "@jridgewell/set-array": "^1.0.0", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + } + }, + "@jridgewell/resolve-uri": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz", + "integrity": "sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==", + "dev": true + }, + "@jridgewell/set-array": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.1.tgz", + "integrity": "sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==", + "dev": true + }, + "@jridgewell/sourcemap-codec": { + "version": "1.4.13", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz", + "integrity": "sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==", + "dev": true + }, + "@jridgewell/trace-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz", + "integrity": "sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==", + "dev": true, + "requires": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, "@mapbox/geojson-rewind": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.1.tgz", @@ -15183,6 +16029,67 @@ "@babel/types": "^7.3.0" } }, + "@types/d3-array": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.0.3.tgz", + "integrity": "sha512-Reoy+pKnvsksN0lQUlcH6dOGjRZ/3WRwXR//m+/8lt1BXeI4xyaUZoqULNjyXXRuh0Mj4LNpkCvhUpQlY3X5xQ==" + }, + "@types/d3-axis": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.1.tgz", + "integrity": "sha512-zji/iIbdd49g9WN0aIsGcwcTBUkgLsCSwB+uH+LPVDAiKWENMtI3cJEWt+7/YYwelMoZmbBfzA3qCdrZ2XFNnw==", + "requires": { + "@types/d3-selection": "*" + } + }, + "@types/d3-geo": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.0.2.tgz", + "integrity": "sha512-DbqK7MLYA8LpyHQfv6Klz0426bQEf7bRTvhMy44sNGVyZoWn//B0c+Qbeg8Osi2Obdc9BLLXYAKpyWege2/7LQ==", + "requires": { + "@types/geojson": "*" + } + }, + "@types/d3-scale": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.2.tgz", + "integrity": "sha512-Yk4htunhPAwN0XGlIwArRomOjdoBFXC3+kCxK2Ubg7I9shQlVSJy/pG/Ht5ASN+gdMIalpk8TJ5xV74jFsetLA==", + "requires": { + "@types/d3-time": "*" + } + }, + "@types/d3-selection": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.2.tgz", + "integrity": "sha512-d29EDd0iUBrRoKhPndhDY6U/PYxOWqgIZwKTooy2UkBfU7TNZNpRho0yLWPxlatQrFWk2mnTu71IZQ4+LRgKlQ==" + }, + "@types/d3-time": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.0.tgz", + "integrity": "sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==" + }, + "@types/eslint": { + "version": "8.4.2", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.2.tgz", + "integrity": "sha512-Z1nseZON+GEnFjJc04sv4NSALGjhFwy6K0HXt7qsn5ArfAKtb63dXNJHf+1YW6IpOIYRBGUbu3GwJdj8DGnCjA==", + "dev": true, + "peer": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.3", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz", + "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==", + "dev": true, + "peer": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -15215,65 +16122,255 @@ "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", "dev": true, "requires": { - "@types/istanbul-lib-coverage": "*" + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/json-schema": { + "version": "7.0.11", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", + "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "dev": true, + "peer": true + }, + "@types/mapbox-gl": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/@types/mapbox-gl/-/mapbox-gl-2.7.2.tgz", + "integrity": "sha512-2/qyLtiQxiTYEQuOxaqiNiZPvjND35rde/ZQpxx8D5bEcYK4PDXWv/DIxPsfxqyhiP1E6Wbni0SfjkbqcqOfCQ==", + "requires": { + "@types/geojson": "*" + } + }, + "@types/node": { + "version": "16.9.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", + "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==", + "dev": true + }, + "@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "dev": true + }, + "@types/prettier": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", + "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", + "dev": true + }, + "@types/resolve": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", + "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true, + "peer": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "peer": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "peer": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true, + "peer": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" } }, - "@types/istanbul-reports": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", - "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", "dev": true, + "peer": true, "requires": { - "@types/istanbul-lib-report": "*" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" } }, - "@types/node": { - "version": "16.9.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.9.1.tgz", - "integrity": "sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==", - "dev": true - }, - "@types/parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", - "dev": true - }, - "@types/prettier": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.2.tgz", - "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", - "dev": true - }, - "@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", "dev": true, + "peer": true, "requires": { - "@types/node": "*" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" } }, - "@types/stack-utils": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", - "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", - "dev": true + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "peer": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } }, - "@types/yargs": { - "version": "16.0.4", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", - "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", "dev": true, + "peer": true, "requires": { - "@types/yargs-parser": "*" + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" } }, - "@types/yargs-parser": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", - "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", - "dev": true + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true, + "peer": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true, + "peer": true }, "abab": { "version": "2.0.5", @@ -15305,6 +16402,14 @@ } } }, + "acorn-import-assertions": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", + "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", + "dev": true, + "peer": true, + "requires": {} + }, "acorn-walk": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", @@ -15320,6 +16425,27 @@ "debug": "4" } }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true, + "peer": true, + "requires": {} + }, "alphanum-sort": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", @@ -15744,7 +16870,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true } } @@ -15755,6 +16881,13 @@ "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", "dev": true }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true, + "peer": true + }, "ci-info": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", @@ -15819,7 +16952,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", "dev": true }, "colord": { @@ -16396,6 +17529,16 @@ "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", "dev": true }, + "enhanced-resolve": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz", + "integrity": "sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, "entities": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", @@ -16411,6 +17554,13 @@ "is-arrayish": "^0.2.1" } }, + "es-module-lexer": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz", + "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==", + "dev": true, + "peer": true + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", @@ -16445,12 +17595,42 @@ } } }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "peer": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "dependencies": { + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "peer": true + } + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, + "requires": { + "estraverse": "^5.2.0" + } + }, "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", @@ -16475,6 +17655,13 @@ "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", "dev": true }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "peer": true + }, "execa": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", @@ -16520,6 +17707,13 @@ } } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "peer": true + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -16737,6 +17931,13 @@ "path-is-absolute": "^1.0.0" } }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true, + "peer": true + }, "global": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/global/-/global-4.4.0.tgz", @@ -16765,9 +17966,9 @@ "dev": true }, "graceful-fs": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", - "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", "dev": true }, "grid-index": { @@ -16812,7 +18013,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true }, "has-symbols": { @@ -18539,6 +19740,13 @@ "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", "dev": true }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, "json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", @@ -18596,6 +19804,13 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", "dev": true }, + "loader-runner": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", + "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", + "dev": true, + "peer": true + }, "loader-utils": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", @@ -18974,6 +20189,13 @@ "typedarray-pool": "^1.0.2" } }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "peer": true + }, "node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -20171,6 +21393,18 @@ "object-assign": "^4.1.1" } }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "peer": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", @@ -20251,6 +21485,34 @@ "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", "dev": true }, + "source-map-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-3.0.1.tgz", + "integrity": "sha512-Vp1UsfyPvgujKQzi4pyDiTOnE3E4H+yHvkVRN3c/9PJmQS4CQJExvcDvaX/D+RV+xQben9HJ56jMJS3CgUeWyA==", + "dev": true, + "requires": { + "abab": "^2.0.5", + "iconv-lite": "^0.6.3", + "source-map-js": "^1.0.1" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + }, + "source-map-js": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", + "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "dev": true + } + } + }, "source-map-support": { "version": "0.5.20", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.20.tgz", @@ -20477,6 +21739,12 @@ "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, "terminal-link": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", @@ -20512,6 +21780,61 @@ } } }, + "terser-webpack-plugin": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.3.tgz", + "integrity": "sha512-Fx60G5HNYknNTNQnzQ1VePRuu89ZVYWfjRAeT5rITuCY/1b08s49e5kSQwHDirKZWuoKOBRFS98EUUoZ9kLEwQ==", + "dev": true, + "peer": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "jest-worker": "^27.4.5", + "schema-utils": "^3.1.1", + "serialize-javascript": "^6.0.0", + "terser": "^5.7.2" + }, + "dependencies": { + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "peer": true + }, + "jest-worker": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", + "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", + "dev": true, + "peer": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "peer": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "peer": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "test-exclude": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", @@ -20626,6 +21949,78 @@ "punycode": "^2.1.1" } }, + "ts-loader": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-9.3.0.tgz", + "integrity": "sha512-2kLLAdAD+FCKijvGKi9sS0OzoqxLCF3CxHpok7rVgCZ5UldRzH0TkbwG9XECKjBzHsAewntC5oDaI/FwKzEUog==", + "dev": true, + "requires": { + "chalk": "^4.1.0", + "enhanced-resolve": "^5.0.0", + "micromatch": "^4.0.0", + "semver": "^7.3.4" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "semver": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz", + "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "tslib": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", @@ -20677,9 +22072,9 @@ } }, "typescript": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.4.3.tgz", - "integrity": "sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA==", + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.2.tgz", + "integrity": "sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A==", "dev": true }, "unicode-canonical-property-names-ecmascript": { @@ -20727,6 +22122,16 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "peer": true, + "requires": { + "punycode": "^2.1.0" + } + }, "url-set-query": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/url-set-query/-/url-set-query-1.0.0.tgz", @@ -20805,12 +22210,72 @@ "makeerror": "1.0.12" } }, + "watchpack": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", + "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "dev": true, + "peer": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, "webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", "dev": true }, + "webpack": { + "version": "5.73.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.73.0.tgz", + "integrity": "sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA==", + "dev": true, + "peer": true, + "requires": { + "@types/eslint-scope": "^3.7.3", + "@types/estree": "^0.0.51", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.9.3", + "es-module-lexer": "^0.9.0", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.9", + "json-parse-even-better-errors": "^2.3.1", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.3.1", + "webpack-sources": "^3.2.3" + }, + "dependencies": { + "@types/estree": { + "version": "0.0.51", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz", + "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==", + "dev": true, + "peer": true + } + } + }, + "webpack-sources": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", + "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", + "dev": true, + "peer": true + }, "whatwg-encoding": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", diff --git a/package.json b/package.json index cb3de5f..c3c10e0 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "main": "dst/index.js", "module": "dst/index.esm.js", "scripts": { - "build": "rimraf dst && microbundle src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment", - "watch": "microbundle watch src/index.js -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment", + "build": "rimraf dst && microbundle src/index.ts -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment", + "watch": "microbundle watch src/index.ts -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment", "test": "NODE_ENV=test jest --watch", "test:ci": "NODE_ENV=test jest --ci --reporters='default'", "format": "prettier --write 'src/**/*.js'" @@ -35,6 +35,12 @@ "homepage": "https://github.com/carbonplan/maps#readme", "dependencies": { "@turf/turf": "^6.5.0", + "@types/d3-array": "^3.0.3", + "@types/d3-axis": "^3.0.1", + "@types/d3-geo": "^3.0.2", + "@types/d3-scale": "^4.0.2", + "@types/d3-selection": "^3.0.2", + "@types/mapbox-gl": "^2.7.2", "d3-array": "^2.12.1", "d3-axis": "^2.1.0", "d3-geo": "^2.0.2", @@ -58,6 +64,9 @@ "jest": "^27.3.1", "microbundle": "^0.13.0", "prettier": "^2.2.1", - "rimraf": "3.0.2" + "rimraf": "3.0.2", + "source-map-loader": "^3.0.1", + "ts-loader": "^9.3.0", + "typescript": "^4.7.2" } } diff --git a/src/index.js b/src/index.ts similarity index 100% rename from src/index.js rename to src/index.ts diff --git a/src/loading/context.js b/src/loading/context.tsx similarity index 77% rename from src/loading/context.js rename to src/loading/context.tsx index 6c762b7..fe4fcc7 100644 --- a/src/loading/context.js +++ b/src/loading/context.tsx @@ -61,34 +61,37 @@ export const useSetLoading = () => { return id }, []) - const clearLoading = useCallback((id, { forceClear } = {}) => { - if (id) { - setMetadataIds((prevMetadata) => { - prevMetadata.delete(id) - return prevMetadata - }) - setChunkIds((prevChunk) => { - prevChunk.delete(id) - return prevChunk - }) - - dispatch({ - loaders: [ - { id, key: 'metadata' }, - { id, key: 'chunk' }, - ], - type: 'clear', - }) - } - - if (forceClear && loading.current) { - dispatch({ - loaders: [{ id: loadingId.current, key: 'loading' }], - type: 'clear', - }) - loading.current = false - } - }, []) + const clearLoading = useCallback( + (id, { forceClear } = { forceClear: false }) => { + if (id) { + setMetadataIds((prevMetadata) => { + prevMetadata.delete(id) + return prevMetadata + }) + setChunkIds((prevChunk) => { + prevChunk.delete(id) + return prevChunk + }) + + dispatch({ + loaders: [ + { id, key: 'metadata' }, + { id, key: 'chunk' }, + ], + type: 'clear', + }) + } + + if (forceClear && loading.current) { + dispatch({ + loaders: [{ id: loadingId.current, key: 'loading' }], + type: 'clear', + }) + loading.current = false + } + }, + [] + ) return { setLoading, @@ -118,7 +121,7 @@ const reducer = (state, action) => { } } -export const LoadingProvider = ({ children }) => { +export const LoadingProvider: React.FC<{}> = ({ children }) => { const [state, dispatch] = useReducer(reducer, { loading: new Set(), metadata: new Set(), diff --git a/src/map.js b/src/map.tsx similarity index 75% rename from src/map.js rename to src/map.tsx index 121d8a0..8b5a798 100644 --- a/src/map.js +++ b/src/map.tsx @@ -1,10 +1,30 @@ -import React from 'react' +import * as React from 'react' import Mapbox from './mapbox' import Regl from './regl' import { RegionProvider } from './region/context' import { LoadingProvider, LoadingUpdater } from './loading' +import type { LngLatLike, LngLatBoundsLike } from 'mapbox-gl' -const Map = ({ +type Props = { + id?: string + tabIndex?: number + className?: string + style?: { [key: string]: string } + zoom?: number + minZoom?: number + maxZoom?: number + maxBounds?: LngLatBoundsLike + center?: LngLatLike + debug?: boolean + glyphs?: string + /** Tracks *any* pending requests made by containing `Raster` layers */ + setLoading?: (loading: boolean) => void + /** Tracks any metadata and coordinate requests made on initialization by containing `Raster` layers */ + setMetadataLoading?: (loading: boolean) => void + /** Tracks any requests of new chunks by containing `Raster` layers */ + setChunkLoading?: (loading: boolean) => void +} +const Map: React.FC = ({ id, tabIndex, className, @@ -15,14 +35,10 @@ const Map = ({ maxBounds, center, debug, - extensions, glyphs, children, - /** Tracks *any* pending requests made by containing `Raster` layers */ setLoading, - /** Tracks any metadata and coordinate requests made on initialization by containing `Raster` layers */ setMetadataLoading, - /** Tracks any requests of new chunks by containing `Raster` layers */ setChunkLoading, }) => { return ( @@ -49,7 +65,6 @@ const Map = ({ style={{ position: 'absolute' }} > { return useContext(MapboxContext) } -const Mapbox = ({ +type Props = { + zoom?: number + minZoom?: number + maxZoom?: number + maxBounds?: LngLatBoundsLike + center?: LngLatLike + debug?: boolean + glyphs?: string +} + +const Mapbox: React.FC = ({ glyphs, style, center, @@ -29,9 +40,11 @@ const Mapbox = ({ const [ready, setReady] = useState() const ref = useCallback((node) => { - const mapboxStyle = { version: 8, sources: {}, layers: [] } - if (glyphs) { - mapboxStyle.glyphs = glyphs + const mapboxStyle = { + version: 8, + sources: {}, + layers: [], + ...(glyphs ? { glyphs } : {}), } if (node !== null) { map.current = new mapboxgl.Map({ diff --git a/src/region/context.js b/src/region/context.tsx similarity index 89% rename from src/region/context.js rename to src/region/context.tsx index 1625c67..d30cf2a 100644 --- a/src/region/context.js +++ b/src/region/context.tsx @@ -16,7 +16,7 @@ export const useRegion = () => { return { region } } -export const RegionProvider = ({ children }) => { +export const RegionProvider: React.FC<{}> = ({ children }) => { const [region, setRegion] = useState(null) return ( diff --git a/src/regl.js b/src/regl.tsx similarity index 86% rename from src/regl.js rename to src/regl.tsx index c90ad31..aa6de8f 100644 --- a/src/regl.js +++ b/src/regl.tsx @@ -6,7 +6,7 @@ import React, { useContext, useRef, } from 'react' -import _regl from 'regl' +import * as _regl from 'regl' export const ReglContext = createContext(null) @@ -14,7 +14,11 @@ export const useRegl = () => { return useContext(ReglContext) } -const Regl = ({ style, extensions, children }) => { +type Props = { + style?: { [key: string]: string } +} + +const Regl: React.FC = ({ style, children }) => { const regl = useRef() const [ready, setReady] = useState(false) diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1adb4cf --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,13 @@ +{ + "compilerOptions": { + "outDir": "./dist/", // path to output directory + "sourceMap": true, // allow sourcemap support + "strictNullChecks": true, // enable strict null checks as a best practice + "module": "ESNext", // specify module code generation + "jsx": "react", // use typescript to transpile jsx to js + "target": "ESNext", // specify ECMAScript target version + "allowJs": true, // allow a partial TypeScript and JavaScript codebase + "moduleResolution": "node" + }, + "include": ["./src/"] +} From f382e7e9d355fce45d7f46deda1329814ed46e10 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Thu, 2 Jun 2022 15:01:36 -0700 Subject: [PATCH 02/15] Test wiring some docs to react-docgen --- babel.config.js | 40 +- docs/components/component-props.json | 223 ++++++++++ docs/components/props-table.js | 59 +++ docs/pages/maps/map.md | 22 +- package-lock.json | 617 +++++++++++++++++++++++---- package.json | 4 + src/loading/context.tsx | 5 +- src/map.tsx | 20 +- src/mapbox.tsx | 6 +- src/region/context.tsx | 6 +- src/regl.tsx | 5 +- 11 files changed, 879 insertions(+), 128 deletions(-) create mode 100644 docs/components/component-props.json create mode 100644 docs/components/props-table.js diff --git a/babel.config.js b/babel.config.js index 9b51e11..4f7f8ea 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,15 +1,25 @@ -module.exports = - process.env.NODE_ENV === 'test' - ? { - presets: [ - [ - '@babel/preset-env', - { - targets: { - node: 'current', - }, - }, - ], - ], - } - : {} +var value = {} + +if (process.env.NODE_ENV === 'test') { + value = { + presets: [ + [ + '@babel/preset-env', + { + targets: { + node: 'current', + }, + }, + ], + ], + } +} else if (process.env.NODE_ENV === 'docs') { + value = { + presets: [ + '@babel/preset-env', + '@babel/preset-react', + '@babel/preset-typescript', + ], + } +} +module.exports = value diff --git a/docs/components/component-props.json b/docs/components/component-props.json new file mode 100644 index 0000000..b555642 --- /dev/null +++ b/docs/components/component-props.json @@ -0,0 +1,223 @@ +{ + "src/map.tsx": { + "description": "", + "displayName": "Map", + "methods": [], + "props": { + "id": { + "required": false, + "tsType": { "name": "string" }, + "description": "`id` used on `div` container node of `mapboxgl.Map`" + }, + "tabIndex": { + "required": false, + "tsType": { "name": "number" }, + "description": "`tabIndex` used on `div` container node of `mapboxgl.Map`" + }, + "className": { + "required": false, + "tsType": { "name": "string" }, + "description": "`className` used on `div` container node of `mapboxgl.Map`" + }, + "style": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: string | number }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { + "name": "union", + "raw": "string | number", + "elements": [{ "name": "string" }, { "name": "number" }], + "required": true + } + } + ] + } + }, + "description": "`style` object used on `div` container node of `mapboxgl.Map`" + }, + "zoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "`zoom` parameter passed to `mapboxgl.Map`" + }, + "minZoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "`minZoom` parameter passed to `mapboxgl.Map`" + }, + "maxZoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "`maxZoom` parameter passed to `mapboxgl.Map`" + }, + "maxBounds": { + "required": false, + "tsType": { "name": "LngLatBoundsLike" }, + "description": "`maxbounds` parameter passed to `mapboxgl.Map`" + }, + "center": { + "required": false, + "tsType": { "name": "LngLatLike" }, + "description": "`center` parameter passed to `mapboxgl.Map`" + }, + "debug": { + "required": false, + "tsType": { "name": "boolean" }, + "description": "`debug` parameter passed to `mapboxgl.Map`" + }, + "glyphs": { + "required": false, + "tsType": { "name": "string" }, + "description": "`glyphs` parameter passed to `mapboxgl.Map`" + }, + "children": { + "required": false, + "tsType": { "name": "ReactNode", "raw": "React.Node" }, + "description": "@carbonplan/maps JSX elements or regular components" + }, + "setLoading": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(loading: boolean) => void", + "signature": { + "arguments": [{ "name": "loading", "type": { "name": "boolean" } }], + "return": { "name": "void" } + } + }, + "description": "Tracks *any* pending requests made by containing `Raster` layers" + }, + "setMetadataLoading": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(loading: boolean) => void", + "signature": { + "arguments": [{ "name": "loading", "type": { "name": "boolean" } }], + "return": { "name": "void" } + } + }, + "description": "Tracks any metadata and coordinate requests made on initialization by containing `Raster` layers" + }, + "setChunkLoading": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(loading: boolean) => void", + "signature": { + "arguments": [{ "name": "loading", "type": { "name": "boolean" } }], + "return": { "name": "void" } + } + }, + "description": "Tracks any requests of new chunks by containing `Raster` layers" + } + } + }, + "src/mapbox.tsx": { + "description": "", + "displayName": "Mapbox", + "methods": [], + "props": { + "zoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "" + }, + "minZoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "" + }, + "maxZoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "" + }, + "maxBounds": { + "required": false, + "tsType": { "name": "LngLatBoundsLike" }, + "description": "" + }, + "center": { + "required": false, + "tsType": { "name": "LngLatLike" }, + "description": "" + }, + "debug": { + "required": false, + "tsType": { "name": "boolean" }, + "description": "" + }, + "glyphs": { + "required": false, + "tsType": { "name": "string" }, + "description": "" + }, + "children": { + "required": false, + "tsType": { "name": "ReactNode", "raw": "React.Node" }, + "description": "" + }, + "style": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: string }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { "name": "string", "required": true } + } + ] + } + }, + "description": "" + } + } + }, + "src/regl.tsx": { + "description": "", + "displayName": "Regl", + "methods": [], + "props": { + "style": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: string | number }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { + "name": "union", + "raw": "string | number", + "elements": [{ "name": "string" }, { "name": "number" }], + "required": true + } + } + ] + } + }, + "description": "" + }, + "children": { + "required": false, + "tsType": { "name": "ReactNode", "raw": "React.Node" }, + "description": "" + } + } + } +} diff --git a/docs/components/props-table.js b/docs/components/props-table.js new file mode 100644 index 0000000..26f5d6f --- /dev/null +++ b/docs/components/props-table.js @@ -0,0 +1,59 @@ +import { Box } from 'theme-ui' +import { Table } from '@carbonplan/components' +import componentProps from './component-props.json' + +const sx = { + heading: { + textTransform: 'uppercase', + letterSpacing: 'smallcaps', + fontFamily: 'heading', + fontSize: [2, 2, 2, 3], + }, +} + +const getRows = (keys, props) => { + return keys.map((key) => { + const { tsType, description } = props[key] + return [ + key, + description, + + {tsType.raw ?? tsType.name} + , + ] + }) +} + +const PropsTable = ({ name }) => { + const { props } = Object.values(componentProps).find( + (d) => d.displayName === name + ) + const propNames = Object.keys(props) + const requiredProps = propNames.filter((k) => props[k].required) + const optionalProps = propNames.filter((k) => !props[k].required) + + return ( + Prop, + Description, + Type, + ], + ...getRows(requiredProps, props), + [optional props], + ...getRows(optionalProps, props), + ]} + /> + ) +} + +export default PropsTable diff --git a/docs/pages/maps/map.md b/docs/pages/maps/map.md index e77893a..21c4a5d 100644 --- a/docs/pages/maps/map.md +++ b/docs/pages/maps/map.md @@ -1,6 +1,6 @@ import Section from '../../components/section' -import Table from '../../components/table' import LoadingDemo from '../../components/examples/loading-demo' +import PropsTable from '../../components/props-table' # Map @@ -8,25 +8,7 @@ The `Map` component is responsible for initializing the `mapbox-gl-js` instance ## Props -
- -| Prop | Description | -| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -| _optional props_ | | -| children | `@carbonplan/maps` JSX elements or regular components | -| style | `style` object used on `div` container node of `mapboxgl.Map` | -| zoom | `zoom` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map` | -| minZoom | `minZoom` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map` | -| maxZoom | `maxZoom` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map` | -| maxBounds | `maxBounds` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map` | -| center | `center` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map` | -| debug | `debug` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map`, controls whether tile grid lines are shown | -| glyphs | `glyphs` [parameter](https://docs.mapbox.com/mapbox-gl-js/api/map/#map-parameters) passed to `mapboxgl.Map` | -| setLoading | Tracks _any_ pending requests made by containing `Raster` layers | -| setMetadataLoading | Tracks any metadata and coordinate requests made on initialization by containing `Raster` layers | -| setChunkLoading | Tracks any requests of new chunks by containing `Raster` layers | - -
+ ## Loading diff --git a/package-lock.json b/package-lock.json index cf22c6a..87e8320 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,11 +30,14 @@ }, "devDependencies": { "@babel/preset-env": "^7.16.4", + "@babel/preset-react": "^7.17.12", + "@babel/preset-typescript": "^7.17.12", "@carbonplan/prettier": "^1.2.0", "babel-jest": "^27.3.1", "jest": "^27.3.1", "microbundle": "^0.13.0", "prettier": "^2.2.1", + "react-docgen": "^5.4.1", "rimraf": "3.0.2", "source-map-loader": "^3.0.1", "ts-loader": "^9.3.0", @@ -268,12 +271,12 @@ } }, "node_modules/@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "dependencies": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -850,12 +853,12 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", - "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz", + "integrity": "sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.17.12" }, "engines": { "node": ">=6.9.0" @@ -1365,12 +1368,12 @@ } }, "node_modules/@babel/plugin-transform-react-display-name": { - "version": "7.15.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", - "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", + "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1380,16 +1383,16 @@ } }, "node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", - "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz", + "integrity": "sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.14.5", - "@babel/types": "^7.14.9" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/plugin-syntax-jsx": "^7.17.12", + "@babel/types": "^7.17.12" }, "engines": { "node": ">=6.9.0" @@ -1399,12 +1402,12 @@ } }, "node_modules/@babel/plugin-transform-react-jsx-development": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz", - "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", + "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", "dev": true, "dependencies": { - "@babel/plugin-transform-react-jsx": "^7.14.5" + "@babel/plugin-transform-react-jsx": "^7.16.7" }, "engines": { "node": ">=6.9.0" @@ -1414,13 +1417,13 @@ } }, "node_modules/@babel/plugin-transform-react-pure-annotations": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz", - "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.0.tgz", + "integrity": "sha512-6+0IK6ouvqDn9bmEG7mEyF/pwlJXVj5lwydybpyyH3D0A7Hftk+NCTdYjnLNZksn261xaOV5ksmp20pQEmc2RQ==", "dev": true, "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-plugin-utils": "^7.17.12" }, "engines": { "node": ">=6.9.0" @@ -1535,6 +1538,23 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.4.tgz", + "integrity": "sha512-l4vHuSLUajptpHNEOUDEGsnpl9pfRLsN1XUoDQDD/YBuXTM+v37SHGS+c6n4jdcZy96QtuUuSvZYMLSSsjH8Mw==", + "dev": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.18.0", + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/plugin-syntax-typescript": "^7.17.12" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.0.tgz", @@ -1704,17 +1724,34 @@ } }, "node_modules/@babel/preset-react": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.14.5.tgz", - "integrity": "sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.17.12.tgz", + "integrity": "sha512-h5U+rwreXtZaRBEQhW1hOJLMq8XNJBQ/9oymXiCXTuT/0uOwpbT0gUt+sXeOqoXBgNuUKI7TaObVwoEyWkpFgA==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-react-display-name": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.14.5", - "@babel/plugin-transform-react-jsx-development": "^7.14.5", - "@babel/plugin-transform-react-pure-annotations": "^7.14.5" + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-react-display-name": "^7.16.7", + "@babel/plugin-transform-react-jsx": "^7.17.12", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-pure-annotations": "^7.16.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz", + "integrity": "sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-typescript": "^7.17.12" }, "engines": { "node": ">=6.9.0" @@ -4905,6 +4942,18 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/ast-types": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", + "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -5316,6 +5365,107 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/c8": { + "version": "7.11.3", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.11.3.tgz", + "integrity": "sha512-6YBmsaNmqRm9OS3ZbIiL2EZgi1+Xc4O24jL3vMYGE6idixYuGdy76rIfIdltSKDj9DpLNrcXSonUTR1miBD0wA==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.1.4", + "rimraf": "^3.0.2", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/c8/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/c8/node_modules/v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -6070,6 +6220,18 @@ "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-serializer": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", @@ -6350,6 +6512,20 @@ "node": ">=4.0" } }, + "node_modules/estree-to-babel": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/estree-to-babel/-/estree-to-babel-3.2.1.tgz", + "integrity": "sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.1.6", + "@babel/types": "^7.2.0", + "c8": "^7.6.0" + }, + "engines": { + "node": ">=8.3.0" + } + }, "node_modules/estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -6543,6 +6719,19 @@ "node": ">=8" } }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -7299,9 +7488,9 @@ } }, "node_modules/istanbul-reports": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz", - "integrity": "sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", "dev": true, "dependencies": { "html-escaper": "^2.0.0", @@ -9596,6 +9785,15 @@ "dom-walk": "^0.1.0" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -9682,8 +9880,19 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/node-dir": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", "dev": true, - "peer": true + "dependencies": { + "minimatch": "^3.0.2" + }, + "engines": { + "node": ">= 0.10.5" + } }, "node_modules/node-int64": { "version": "0.4.0", @@ -10847,6 +11056,36 @@ "node": ">=0.10.0" } }, + "node_modules/react-docgen": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-5.4.1.tgz", + "integrity": "sha512-TZqD1aApirw86NV6tHrmDoxUn8wlinkVyutFarzbdwuhEurAzDN0y5sSj64o+BrHLPqjwpH9tunpfwgy+3Uyww==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@babel/generator": "^7.12.11", + "@babel/runtime": "^7.7.6", + "ast-types": "^0.14.2", + "commander": "^2.19.0", + "doctrine": "^3.0.0", + "estree-to-babel": "^3.1.0", + "neo-async": "^2.6.1", + "node-dir": "^0.1.10", + "strip-indent": "^3.0.0" + }, + "bin": { + "react-docgen": "bin/react-docgen.js" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/react-docgen/node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, "node_modules/react-dom": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", @@ -11689,6 +11928,18 @@ "node": ">=6" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/style-inject": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz", @@ -12758,6 +13009,18 @@ "node": ">=10" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zarr-js": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/zarr-js/-/zarr-js-2.2.0.tgz", @@ -12938,12 +13201,12 @@ } }, "@babel/helper-module-imports": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz", - "integrity": "sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz", + "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==", "dev": true, "requires": { - "@babel/types": "^7.16.0" + "@babel/types": "^7.16.7" } }, "@babel/helper-module-transforms": { @@ -13340,12 +13603,12 @@ } }, "@babel/plugin-syntax-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", - "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz", + "integrity": "sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.17.12" } }, "@babel/plugin-syntax-logical-assignment-operators": { @@ -13669,44 +13932,44 @@ } }, "@babel/plugin-transform-react-display-name": { - "version": "7.15.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.15.1.tgz", - "integrity": "sha512-yQZ/i/pUCJAHI/LbtZr413S3VT26qNrEm0M5RRxQJA947/YNYwbZbBaXGDrq6CG5QsZycI1VIP6d7pQaBfP+8Q==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz", + "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.16.7" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.9.tgz", - "integrity": "sha512-30PeETvS+AeD1f58i1OVyoDlVYQhap/K20ZrMjLmmzmC2AYR/G43D4sdJAaDAqCD3MYpSWbmrz3kES158QSLjw==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.12.tgz", + "integrity": "sha512-Lcaw8bxd1DKht3thfD4A12dqo1X16he1Lm8rIv8sTwjAYNInRS1qHa9aJoqvzpscItXvftKDCfaEQzwoVyXpEQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-jsx": "^7.14.5", - "@babel/types": "^7.14.9" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-module-imports": "^7.16.7", + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/plugin-syntax-jsx": "^7.17.12", + "@babel/types": "^7.17.12" } }, "@babel/plugin-transform-react-jsx-development": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.14.5.tgz", - "integrity": "sha512-rdwG/9jC6QybWxVe2UVOa7q6cnTpw8JRRHOxntG/h6g/guAOe6AhtQHJuJh5FwmnXIT1bdm5vC2/5huV8ZOorQ==", + "version": "7.16.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz", + "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==", "dev": true, "requires": { - "@babel/plugin-transform-react-jsx": "^7.14.5" + "@babel/plugin-transform-react-jsx": "^7.16.7" } }, "@babel/plugin-transform-react-pure-annotations": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.14.5.tgz", - "integrity": "sha512-3X4HpBJimNxW4rhUy/SONPyNQHp5YRr0HhJdT2OH1BRp0of7u3Dkirc7x9FRJMKMqTBI079VZ1hzv7Ouuz///g==", + "version": "7.18.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.0.tgz", + "integrity": "sha512-6+0IK6ouvqDn9bmEG7mEyF/pwlJXVj5lwydybpyyH3D0A7Hftk+NCTdYjnLNZksn261xaOV5ksmp20pQEmc2RQ==", "dev": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-annotate-as-pure": "^7.16.7", + "@babel/helper-plugin-utils": "^7.17.12" } }, "@babel/plugin-transform-regenerator": { @@ -13773,6 +14036,17 @@ "@babel/helper-plugin-utils": "^7.14.5" } }, + "@babel/plugin-transform-typescript": { + "version": "7.18.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.18.4.tgz", + "integrity": "sha512-l4vHuSLUajptpHNEOUDEGsnpl9pfRLsN1XUoDQDD/YBuXTM+v37SHGS+c6n4jdcZy96QtuUuSvZYMLSSsjH8Mw==", + "dev": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.18.0", + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/plugin-syntax-typescript": "^7.17.12" + } + }, "@babel/plugin-transform-unicode-escapes": { "version": "7.16.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.0.tgz", @@ -13911,17 +14185,28 @@ } }, "@babel/preset-react": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.14.5.tgz", - "integrity": "sha512-XFxBkjyObLvBaAvkx1Ie95Iaq4S/GUEIrejyrntQ/VCMKUYvKLoyKxOBzJ2kjA3b6rC9/KL6KXfDC2GqvLiNqQ==", + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.17.12.tgz", + "integrity": "sha512-h5U+rwreXtZaRBEQhW1hOJLMq8XNJBQ/9oymXiCXTuT/0uOwpbT0gUt+sXeOqoXBgNuUKI7TaObVwoEyWkpFgA==", "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-transform-react-display-name": "^7.14.5", - "@babel/plugin-transform-react-jsx": "^7.14.5", - "@babel/plugin-transform-react-jsx-development": "^7.14.5", - "@babel/plugin-transform-react-pure-annotations": "^7.14.5" + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-react-display-name": "^7.16.7", + "@babel/plugin-transform-react-jsx": "^7.17.12", + "@babel/plugin-transform-react-jsx-development": "^7.16.7", + "@babel/plugin-transform-react-pure-annotations": "^7.16.7" + } + }, + "@babel/preset-typescript": { + "version": "7.17.12", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.17.12.tgz", + "integrity": "sha512-S1ViF8W2QwAKUGJXxP9NAfNaqGDdEBJKpYkxHf5Yy2C4NPPzXGeR3Lhk7G8xJaaLcFTRfNjVbtbVtm8Gb0mqvg==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.17.12", + "@babel/helper-validator-option": "^7.16.7", + "@babel/plugin-transform-typescript": "^7.17.12" } }, "@babel/runtime": { @@ -16495,6 +16780,15 @@ "sprintf-js": "~1.0.2" } }, + "ast-types": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", + "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "dev": true, + "requires": { + "tslib": "^2.0.1" + } + }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -16812,6 +17106,76 @@ "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", "dev": true }, + "c8": { + "version": "7.11.3", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.11.3.tgz", + "integrity": "sha512-6YBmsaNmqRm9OS3ZbIiL2EZgi1+Xc4O24jL3vMYGE6idixYuGdy76rIfIdltSKDj9DpLNrcXSonUTR1miBD0wA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.1.4", + "rimraf": "^3.0.2", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9" + }, + "dependencies": { + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "v8-to-istanbul": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.0.0.tgz", + "integrity": "sha512-HcvgY/xaRm7isYmyx+lFKA4uQmfUbN0J4M0nNItvzTvH/iQ9kW5j/t4YSR+Ge323/lrgDAWJoF46tzGQHwBHFw==", + "dev": true, + "requires": { + "@jridgewell/trace-mapping": "^0.3.7", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0" + } + } + } + }, "call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", @@ -17430,6 +17794,15 @@ "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-serializer": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", @@ -17637,6 +18010,17 @@ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true }, + "estree-to-babel": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/estree-to-babel/-/estree-to-babel-3.2.1.tgz", + "integrity": "sha512-YNF+mZ/Wu2FU/gvmzuWtYc8rloubL7wfXCTgouFrnjGVXPA/EeYYA7pupXWrb3Iv1cTBeSSxxJIbK23l4MRNqg==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.6", + "@babel/types": "^7.2.0", + "c8": "^7.6.0" + } + }, "estree-walker": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", @@ -17789,6 +18173,16 @@ "path-exists": "^4.0.0" } }, + "foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + } + }, "form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -18363,9 +18757,9 @@ } }, "istanbul-reports": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.5.tgz", - "integrity": "sha512-5+19PlhnGabNWB7kOFnuxT8H3T/iIyQzIbQMxXsURmmvKg86P2sbkrGOT77VnHw0Qr0gc2XzRaRfMZYYbSQCJQ==", + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz", + "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==", "dev": true, "requires": { "html-escaper": "^2.0.0", @@ -20119,6 +20513,12 @@ "dom-walk": "^0.1.0" } }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -20193,8 +20593,16 @@ "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node-dir": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha512-tmPX422rYgofd4epzrNoOXiE8XFZYOcCq1vD7MAXCDO+O+zndlA2ztdKKMa+EeuBG5tHETpr4ml4RGgpqDCCAg==", "dev": true, - "peer": true + "requires": { + "minimatch": "^3.0.2" + } }, "node-int64": { "version": "0.4.0", @@ -20994,6 +21402,32 @@ "object-assign": "^4.1.1" } }, + "react-docgen": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/react-docgen/-/react-docgen-5.4.1.tgz", + "integrity": "sha512-TZqD1aApirw86NV6tHrmDoxUn8wlinkVyutFarzbdwuhEurAzDN0y5sSj64o+BrHLPqjwpH9tunpfwgy+3Uyww==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@babel/generator": "^7.12.11", + "@babel/runtime": "^7.7.6", + "ast-types": "^0.14.2", + "commander": "^2.19.0", + "doctrine": "^3.0.0", + "estree-to-babel": "^3.1.0", + "neo-async": "^2.6.1", + "node-dir": "^0.1.10", + "strip-indent": "^3.0.0" + }, + "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + } + } + }, "react-dom": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", @@ -21658,6 +22092,15 @@ "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", "dev": true }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "style-inject": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz", @@ -22474,6 +22917,12 @@ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + }, "zarr-js": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/zarr-js/-/zarr-js-2.2.0.tgz", diff --git a/package.json b/package.json index c3c10e0..7724ef1 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "watch": "microbundle watch src/index.ts -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment", "test": "NODE_ENV=test jest --watch", "test:ci": "NODE_ENV=test jest --ci --reporters='default'", + "build-docs": "NODE_ENV=docs react-docgen src/*.tsx --out docs/components/component-props.json --resolver findExportedComponentDefinition && prettier --write docs/components/component-props.json", "format": "prettier --write 'src/**/*.js'" }, "repository": { @@ -59,11 +60,14 @@ }, "devDependencies": { "@babel/preset-env": "^7.16.4", + "@babel/preset-react": "^7.17.12", + "@babel/preset-typescript": "^7.17.12", "@carbonplan/prettier": "^1.2.0", "babel-jest": "^27.3.1", "jest": "^27.3.1", "microbundle": "^0.13.0", "prettier": "^2.2.1", + "react-docgen": "^5.4.1", "rimraf": "3.0.2", "source-map-loader": "^3.0.1", "ts-loader": "^9.3.0", diff --git a/src/loading/context.tsx b/src/loading/context.tsx index fe4fcc7..e10fb1b 100644 --- a/src/loading/context.tsx +++ b/src/loading/context.tsx @@ -121,7 +121,10 @@ const reducer = (state, action) => { } } -export const LoadingProvider: React.FC<{}> = ({ children }) => { +type Props = { + children?: React.Node +} +export const LoadingProvider = ({ children }: Props) => { const [state, dispatch] = useReducer(reducer, { loading: new Set(), metadata: new Set(), diff --git a/src/map.tsx b/src/map.tsx index 8b5a798..c10319c 100644 --- a/src/map.tsx +++ b/src/map.tsx @@ -6,17 +6,30 @@ import { LoadingProvider, LoadingUpdater } from './loading' import type { LngLatLike, LngLatBoundsLike } from 'mapbox-gl' type Props = { + /** `id` used on `div` container node of `mapboxgl.Map` */ id?: string + /** `tabIndex` used on `div` container node of `mapboxgl.Map` */ tabIndex?: number + /** `className` used on `div` container node of `mapboxgl.Map` */ className?: string - style?: { [key: string]: string } + /** `style` object used on `div` container node of `mapboxgl.Map` */ + style?: { [key: string]: string | number } + /** `zoom` parameter passed to `mapboxgl.Map` */ zoom?: number + /** `minZoom` parameter passed to `mapboxgl.Map` */ minZoom?: number + /** `maxZoom` parameter passed to `mapboxgl.Map` */ maxZoom?: number + /** `maxbounds` parameter passed to `mapboxgl.Map` */ maxBounds?: LngLatBoundsLike + /** `center` parameter passed to `mapboxgl.Map` */ center?: LngLatLike + /** `debug` parameter passed to `mapboxgl.Map` */ debug?: boolean + /** `glyphs` parameter passed to `mapboxgl.Map` */ glyphs?: string + /** @carbonplan/maps JSX elements or regular components */ + children?: React.Node /** Tracks *any* pending requests made by containing `Raster` layers */ setLoading?: (loading: boolean) => void /** Tracks any metadata and coordinate requests made on initialization by containing `Raster` layers */ @@ -24,7 +37,8 @@ type Props = { /** Tracks any requests of new chunks by containing `Raster` layers */ setChunkLoading?: (loading: boolean) => void } -const Map: React.FC = ({ + +const Map = ({ id, tabIndex, className, @@ -40,7 +54,7 @@ const Map: React.FC = ({ setLoading, setMetadataLoading, setChunkLoading, -}) => { +}: Props) => { return (
= ({ +const Mapbox = ({ glyphs, style, center, @@ -35,7 +37,7 @@ const Mapbox: React.FC = ({ maxBounds, debug, children, -}) => { +}: Props) => { const map = useRef() const [ready, setReady] = useState() diff --git a/src/region/context.tsx b/src/region/context.tsx index d30cf2a..f432063 100644 --- a/src/region/context.tsx +++ b/src/region/context.tsx @@ -16,7 +16,11 @@ export const useRegion = () => { return { region } } -export const RegionProvider: React.FC<{}> = ({ children }) => { +type Props = { + children?: React.Node +} + +export const RegionProvider = ({ children }: Props) => { const [region, setRegion] = useState(null) return ( diff --git a/src/regl.tsx b/src/regl.tsx index aa6de8f..757ab43 100644 --- a/src/regl.tsx +++ b/src/regl.tsx @@ -15,10 +15,11 @@ export const useRegl = () => { } type Props = { - style?: { [key: string]: string } + style?: { [key: string]: string | number } + children?: React.Node } -const Regl: React.FC = ({ style, children }) => { +const Regl = ({ style, children }: Props) => { const regl = useRef() const [ready, setReady] = useState(false) From 7d0fad745b356d627895f6e58ed1fff99afabd9d Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Thu, 2 Jun 2022 15:09:53 -0700 Subject: [PATCH 03/15] Add react types to peer deps --- package-lock.json | 78 +++++++++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ 2 files changed, 80 insertions(+) diff --git a/package-lock.json b/package-lock.json index 87e8320..12fb9b3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,6 +44,8 @@ "typescript": "^4.7.2" }, "peerDependencies": { + "@types/react": "^16.14.0 || ^17.0.2", + "@types/react-dom": "^16.14.0 || ^17.0.2", "react": "^16.14.0 || ^17.0.2", "react-dom": "^16.14.0 || ^17.0.2" } @@ -4575,6 +4577,32 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "peer": true + }, + "node_modules/@types/react": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz", + "integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==", + "peer": true, + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "17.0.17", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz", + "integrity": "sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg==", + "peer": true, + "dependencies": { + "@types/react": "^17" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -4584,6 +4612,12 @@ "@types/node": "*" } }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "peer": true + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -5991,6 +6025,12 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, + "node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "peer": true + }, "node_modules/cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", @@ -16452,6 +16492,32 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", + "peer": true + }, + "@types/react": { + "version": "17.0.45", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz", + "integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==", + "peer": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-dom": { + "version": "17.0.17", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz", + "integrity": "sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg==", + "peer": true, + "requires": { + "@types/react": "^17" + } + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -16461,6 +16527,12 @@ "@types/node": "*" } }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", + "peer": true + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -17598,6 +17670,12 @@ } } }, + "csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", + "peer": true + }, "cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", diff --git a/package.json b/package.json index 7724ef1..bdcb016 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,8 @@ "zarr-js": "^2.2.0" }, "peerDependencies": { + "@types/react": "^16.14.0 || ^17.0.2", + "@types/react-dom": "^16.14.0 || ^17.0.2", "react": "^16.14.0 || ^17.0.2", "react-dom": "^16.14.0 || ^17.0.2" }, From 4e940081aa45c2d32518f926b1ab66d9ae93ffb1 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Thu, 2 Jun 2022 15:20:38 -0700 Subject: [PATCH 04/15] Test adjusting babel config --- babel.config.js | 17 +++++------ package-lock.json | 78 ----------------------------------------------- package.json | 2 -- 3 files changed, 8 insertions(+), 89 deletions(-) diff --git a/babel.config.js b/babel.config.js index 4f7f8ea..f017502 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,4 +1,10 @@ -var value = {} +var value = { + presets: [ + '@babel/preset-env', + '@babel/preset-react', + '@babel/preset-typescript', + ], +} if (process.env.NODE_ENV === 'test') { value = { @@ -13,13 +19,6 @@ if (process.env.NODE_ENV === 'test') { ], ], } -} else if (process.env.NODE_ENV === 'docs') { - value = { - presets: [ - '@babel/preset-env', - '@babel/preset-react', - '@babel/preset-typescript', - ], - } } + module.exports = value diff --git a/package-lock.json b/package-lock.json index 12fb9b3..87e8320 100644 --- a/package-lock.json +++ b/package-lock.json @@ -44,8 +44,6 @@ "typescript": "^4.7.2" }, "peerDependencies": { - "@types/react": "^16.14.0 || ^17.0.2", - "@types/react-dom": "^16.14.0 || ^17.0.2", "react": "^16.14.0 || ^17.0.2", "react-dom": "^16.14.0 || ^17.0.2" } @@ -4577,32 +4575,6 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, - "node_modules/@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "peer": true - }, - "node_modules/@types/react": { - "version": "17.0.45", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz", - "integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==", - "peer": true, - "dependencies": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "node_modules/@types/react-dom": { - "version": "17.0.17", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz", - "integrity": "sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg==", - "peer": true, - "dependencies": { - "@types/react": "^17" - } - }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -4612,12 +4584,6 @@ "@types/node": "*" } }, - "node_modules/@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "peer": true - }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -6025,12 +5991,6 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, - "node_modules/csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "peer": true - }, "node_modules/cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", @@ -16492,32 +16452,6 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, - "@types/prop-types": { - "version": "15.7.5", - "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", - "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==", - "peer": true - }, - "@types/react": { - "version": "17.0.45", - "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.45.tgz", - "integrity": "sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==", - "peer": true, - "requires": { - "@types/prop-types": "*", - "@types/scheduler": "*", - "csstype": "^3.0.2" - } - }, - "@types/react-dom": { - "version": "17.0.17", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.17.tgz", - "integrity": "sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg==", - "peer": true, - "requires": { - "@types/react": "^17" - } - }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -16527,12 +16461,6 @@ "@types/node": "*" } }, - "@types/scheduler": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", - "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==", - "peer": true - }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -17670,12 +17598,6 @@ } } }, - "csstype": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", - "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==", - "peer": true - }, "cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", diff --git a/package.json b/package.json index bdcb016..7724ef1 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,6 @@ "zarr-js": "^2.2.0" }, "peerDependencies": { - "@types/react": "^16.14.0 || ^17.0.2", - "@types/react-dom": "^16.14.0 || ^17.0.2", "react": "^16.14.0 || ^17.0.2", "react-dom": "^16.14.0 || ^17.0.2" }, From 7eca5890381bdd44129928d091ce733ec123442f Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Thu, 2 Jun 2022 15:26:08 -0700 Subject: [PATCH 05/15] Undo changes --- babel.config.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/babel.config.js b/babel.config.js index f017502..4f7f8ea 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,10 +1,4 @@ -var value = { - presets: [ - '@babel/preset-env', - '@babel/preset-react', - '@babel/preset-typescript', - ], -} +var value = {} if (process.env.NODE_ENV === 'test') { value = { @@ -19,6 +13,13 @@ if (process.env.NODE_ENV === 'test') { ], ], } +} else if (process.env.NODE_ENV === 'docs') { + value = { + presets: [ + '@babel/preset-env', + '@babel/preset-react', + '@babel/preset-typescript', + ], + } } - module.exports = value From f0ba73f661eace06d56ead4d1f8f4e32bc565f84 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Thu, 2 Jun 2022 15:49:09 -0700 Subject: [PATCH 06/15] Set up Raster docs --- docs/components/component-props.json | 229 +++++++++++++++++++++++++++ docs/pages/maps/raster.md | 27 +--- src/{raster.js => raster.tsx} | 51 +++++- 3 files changed, 277 insertions(+), 30 deletions(-) rename src/{raster.js => raster.tsx} (60%) diff --git a/docs/components/component-props.json b/docs/components/component-props.json index b555642..82f0aff 100644 --- a/docs/components/component-props.json +++ b/docs/components/component-props.json @@ -186,6 +186,235 @@ } } }, + "src/raster.tsx": { + "description": "", + "displayName": "Raster", + "methods": [], + "props": { + "display": { + "required": false, + "tsType": { "name": "boolean" }, + "description": "Boolean expressing whether contents should be drawn to canvas or not" + }, + "opacity": { + "required": false, + "tsType": { "name": "number" }, + "description": "Number value for alpha value used when painting to canvas" + }, + "clim": { + "required": true, + "tsType": { + "name": "tuple", + "raw": "[number, number]", + "elements": [{ "name": "number" }, { "name": "number" }] + }, + "description": "Array of limits for the color range, `[min, max]`" + }, + "colormap": { + "required": true, + "tsType": { + "name": "Array", + "elements": [ + { + "name": "tuple", + "raw": "[number, number, number]", + "elements": [ + { "name": "number" }, + { "name": "number" }, + { "name": "number" } + ] + } + ], + "raw": "RGB[]" + }, + "description": "Array of vec3 arrays, each representing an RGB value to sample from" + }, + "index": { + "required": false, + "tsType": { "name": "any" }, + "description": "Index used to trigger redraws" + }, + "regionOptions": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{\n setData: ({ value: any }) => void\n selector?: { [key: string]: any }\n}", + "signature": { + "properties": [ + { + "key": "setData", + "value": { + "name": "signature", + "type": "function", + "raw": "({ value: any }) => void", + "signature": { + "arguments": [{ "name": "" }], + "return": { "name": "void" } + }, + "required": true + } + }, + { + "key": "selector", + "value": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: any }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { "name": "any", "required": true } + } + ] + }, + "required": false + } + } + ] + } + }, + "description": "Object containing a `setData` callback and an optional `selector` object (falls back to `Raster`-level selector if not provided)" + }, + "selector": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: any }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { "name": "any", "required": true } + } + ] + } + }, + "description": "_(N/A for 2D datasets)_ Object to index into non-spatial dimensions, maps variable name (string) to value (any) or array of values" + }, + "uniforms": { + "required": false, + "tsType": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: number }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { "name": "number", "required": true } + } + ] + } + }, + "description": "Object mapping custom uniform names (string) to values (float) for use in fragment shader" + }, + "source": { + "required": true, + "tsType": { "name": "string" }, + "description": "URL pointing to Zarr group" + }, + "variable": { + "required": true, + "tsType": { "name": "string" }, + "description": "Name of array containing variable to be mapped" + }, + "frag": { + "required": false, + "tsType": { "name": "string" }, + "description": "Fragment shader to use in place of default" + }, + "fillValue": { + "required": false, + "tsType": { "name": "number" }, + "description": "Value to map to null" + }, + "mode": { + "required": false, + "tsType": { + "name": "union", + "raw": "'grid' | 'dotgrid' | 'texture'", + "elements": [ + { "name": "literal", "value": "'grid'" }, + { "name": "literal", "value": "'dotgrid'" }, + { "name": "literal", "value": "'texture'" } + ] + }, + "description": "Display mode" + }, + "setMetadata": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(value: { [key: string]: any }) => void", + "signature": { + "arguments": [ + { + "name": "value", + "type": { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: any }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { "name": "any", "required": true } + } + ] + } + } + } + ], + "return": { "name": "void" } + } + }, + "description": "Callback that is invoked with `.zmetadata` value once fetched" + }, + "setLoading": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(loading: boolean) => void", + "signature": { + "arguments": [{ "name": "loading", "type": { "name": "boolean" } }], + "return": { "name": "void" } + } + }, + "description": "Callback to track *any* pending requests" + }, + "setMetadataLoading": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(loading: boolean) => void", + "signature": { + "arguments": [{ "name": "loading", "type": { "name": "boolean" } }], + "return": { "name": "void" } + } + }, + "description": "Callback to track any metadata and coordinate requests made on initialization" + }, + "setChunkLoading": { + "required": false, + "tsType": { + "name": "signature", + "type": "function", + "raw": "(loading: boolean) => void", + "signature": { + "arguments": [{ "name": "loading", "type": { "name": "boolean" } }], + "return": { "name": "void" } + } + }, + "description": "Callback to track any requests of new chunks" + } + } + }, "src/regl.tsx": { "description": "", "displayName": "Regl", diff --git a/docs/pages/maps/raster.md b/docs/pages/maps/raster.md index f31c3a4..ce2334b 100644 --- a/docs/pages/maps/raster.md +++ b/docs/pages/maps/raster.md @@ -1,6 +1,6 @@ import Section from '../../components/section' -import Table from '../../components/table' import LoadingDemo from '../../components/examples/loading-demo' +import PropsTable from '../../components/props-table' # Raster @@ -8,30 +8,7 @@ The `Raster` component is responsible for initializing the `mapbox-gl-js` instan ## Props - - -| Prop | Description | Default | -| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------- | --------- | -| source | URL pointing to Zarr group | | -| variable | Name of array containing variable to map | | -| clim | Array of limits for the color range, `[min, max]` | | -| colormap | Array of vec3 arrays, each representing an RGB value to sample from | | -| selector | _(N/A for 2D datasets)_ Object to index into non-spatial dimensions, maps variable name (string) to value (any) or array of values | | -| _optional props_ | | | -| mode | Display mode -- one of 'texture', 'grid', 'dotgrid' | 'texture' | -| fillValue | Value to map to null | -9999 | -| display | Boolean expressing whether contents should be drawn to canvas or not | `true` | -| opacity | Number value for alpha value used when painting to canvas | 1 | -| index | Value that, when changed, triggers a clear and redraw of the canvas | 0 | -| regionOptions | Object containing a `setData` callback and an optional `selector` object (falls back to `Raster`-level `selector` if not provided) | | -| frag | Fragment shader to use in place of default | | -| uniforms | Object mapping custom uniform names (string) to values (float) for use in fragment shader | | -| setLoading | Callback to track _any_ pending requests | | -| setMetadataLoading | Callback to track any metadata and coordinate requests made on initialization | | -| setChunkLoading | Callback to track any requests of new chunks | | -| setMetadata | Callback that is invoked with `.zmetadata` value once fetched | | - -
+ ## Selectors diff --git a/src/raster.js b/src/raster.tsx similarity index 60% rename from src/raster.js rename to src/raster.tsx index b0adb96..1d21acb 100644 --- a/src/raster.js +++ b/src/raster.tsx @@ -6,14 +6,55 @@ import { createTiles } from './tiles' import { useRegion } from './region/context' import { useSetLoading } from './loading' -const Raster = (props) => { +type RGB = [number, number, number] +type Props = { + /** Boolean expressing whether contents should be drawn to canvas or not */ + display?: boolean + /** Number value for alpha value used when painting to canvas */ + opacity?: number + /** Array of limits for the color range, `[min, max]` */ + clim: [number, number] + /** Array of vec3 arrays, each representing an RGB value to sample from */ + colormap: RGB[] + /** Index used to trigger redraws */ + index?: any + /** Object containing a `setData` callback and an optional `selector` object (falls back to `Raster`-level selector if not provided) */ + regionOptions?: { + setData: ({ value: any }) => void + selector?: { [key: string]: any } + } + /** _(N/A for 2D datasets)_ Object to index into non-spatial dimensions, maps variable name (string) to value (any) or array of values */ + selector?: { [key: string]: any } + /** Object mapping custom uniform names (string) to values (float) for use in fragment shader */ + uniforms?: { [key: string]: number } + /** URL pointing to Zarr group */ + source: string + /** Name of array containing variable to be mapped */ + variable: string + /** Fragment shader to use in place of default */ + frag?: string + /** Value to map to null */ + fillValue?: number + /** Display mode */ + mode?: 'grid' | 'dotgrid' | 'texture' + /** Callback that is invoked with `.zmetadata` value once fetched */ + setMetadata?: (value: { [key: string]: any }) => void + /** Callback to track *any* pending requests */ + setLoading?: (loading: boolean) => void + /** Callback to track any metadata and coordinate requests made on initialization */ + setMetadataLoading?: (loading: boolean) => void + /** Callback to track any requests of new chunks */ + setChunkLoading?: (loading: boolean) => void +} + +const Raster = (props: Props) => { const { display = true, opacity = 1, clim, colormap, index = 0, - regionOptions = {}, + regionOptions, selector = {}, uniforms = {}, } = props @@ -36,13 +77,13 @@ const Raster = (props) => { const queryStart = new Date().getTime() lastQueried.current = queryStart - regionOptions.setData({ value: null }) + regionOptions?.setData({ value: null }) const data = await tiles.current.queryRegion(r, s) // Invoke callback as long as a more recent query has not already been initiated if (lastQueried.current === queryStart) { - regionOptions.setData({ value: data }) + regionOptions?.setData({ value: data }) } } @@ -117,7 +158,7 @@ const Raster = (props) => { ...Object.values(selector), ]) - return null + return <> } export default Raster From c32cb9d93e6a73c676b3ce0c52ed7f2f610e7f86 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Mon, 6 Jun 2022 08:27:42 -0700 Subject: [PATCH 07/15] Require react types and fix errors --- package-lock.json | 68 +++++++++++++++++++++++++++++++++++++++++ package.json | 2 ++ src/loading/context.tsx | 29 +++++++++++++----- src/map.tsx | 2 +- src/mapbox.tsx | 27 ++++++++-------- src/raster.tsx | 10 ++++-- src/region/context.tsx | 11 +++++-- src/regl.tsx | 16 ++++++---- tsconfig.json | 17 ++++++----- 9 files changed, 142 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 87e8320..e2e898f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,8 @@ "@types/d3-scale": "^4.0.2", "@types/d3-selection": "^3.0.2", "@types/mapbox-gl": "^2.7.2", + "@types/react": "^18.0.10", + "@types/react-dom": "^18.0.5", "d3-array": "^2.12.1", "d3-axis": "^2.1.0", "d3-geo": "^2.0.2", @@ -4575,6 +4577,29 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, + "node_modules/@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + }, + "node_modules/@types/react": { + "version": "18.0.10", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.10.tgz", + "integrity": "sha512-dIugadZuIPrRzvIEevIu7A1smqOAjkSMv8qOfwPt9Ve6i6JT/FQcCHyk2qIAxwsQNKZt5/oGR0T4z9h2dXRAkg==", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/@types/react-dom": { + "version": "18.0.5", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.5.tgz", + "integrity": "sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -4584,6 +4609,11 @@ "@types/node": "*" } }, + "node_modules/@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, "node_modules/@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -5991,6 +6021,11 @@ "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", "dev": true }, + "node_modules/csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" + }, "node_modules/cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", @@ -16452,6 +16487,29 @@ "integrity": "sha512-ekoj4qOQYp7CvjX8ZDBgN86w3MqQhLE1hczEJbEIjgFEumDy+na/4AJAbLXfgEWFNB2pKadM5rPFtuSGMWK7xA==", "dev": true }, + "@types/prop-types": { + "version": "15.7.5", + "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz", + "integrity": "sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==" + }, + "@types/react": { + "version": "18.0.10", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.0.10.tgz", + "integrity": "sha512-dIugadZuIPrRzvIEevIu7A1smqOAjkSMv8qOfwPt9Ve6i6JT/FQcCHyk2qIAxwsQNKZt5/oGR0T4z9h2dXRAkg==", + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "@types/react-dom": { + "version": "18.0.5", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.0.5.tgz", + "integrity": "sha512-OWPWTUrY/NIrjsAPkAk1wW9LZeIjSvkXRhclsFO8CZcZGCOg2G0YZy4ft+rOyYxy8B7ui5iZzi9OkDebZ7/QSA==", + "requires": { + "@types/react": "*" + } + }, "@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -16461,6 +16519,11 @@ "@types/node": "*" } }, + "@types/scheduler": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz", + "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew==" + }, "@types/stack-utils": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", @@ -17598,6 +17661,11 @@ } } }, + "csstype": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.0.tgz", + "integrity": "sha512-uX1KG+x9h5hIJsaKR9xHUeUraxf8IODOwq9JLNPq6BwB04a/xgpq3rcx47l5BZu5zBPlgD342tdke3Hom/nJRA==" + }, "cwise-compiler": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/cwise-compiler/-/cwise-compiler-1.1.3.tgz", diff --git a/package.json b/package.json index 7724ef1..3db4dd7 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,8 @@ "@types/d3-scale": "^4.0.2", "@types/d3-selection": "^3.0.2", "@types/mapbox-gl": "^2.7.2", + "@types/react": "^18.0.10", + "@types/react-dom": "^18.0.5", "d3-array": "^2.12.1", "d3-axis": "^2.1.0", "d3-geo": "^2.0.2", diff --git a/src/loading/context.tsx b/src/loading/context.tsx index e10fb1b..9b23cec 100644 --- a/src/loading/context.tsx +++ b/src/loading/context.tsx @@ -9,7 +9,26 @@ import React, { } from 'react' import { v4 as uuidv4 } from 'uuid' -const LoadingContext = createContext({}) +type Loader = { + id: string + key: string +} +type Context = { + loading: Set + metadata: Set + chunk: Set + dispatch: (action: { loaders: Loader[]; type: 'set' | 'clear' }) => void +} + +const initialState = { + loading: new Set([]), + metadata: new Set([]), + chunk: new Set([]), +} +const LoadingContext = createContext({ + ...initialState, + dispatch: () => {}, +}) export const useSetLoading = () => { const loadingId = useRef(uuidv4()) @@ -122,14 +141,10 @@ const reducer = (state, action) => { } type Props = { - children?: React.Node + children?: React.ReactNode } export const LoadingProvider = ({ children }: Props) => { - const [state, dispatch] = useReducer(reducer, { - loading: new Set(), - metadata: new Set(), - chunk: new Set(), - }) + const [state, dispatch] = useReducer(reducer, initialState) return ( void /** Tracks any metadata and coordinate requests made on initialization by containing `Raster` layers */ diff --git a/src/mapbox.tsx b/src/mapbox.tsx index 31925d0..60b0494 100644 --- a/src/mapbox.tsx +++ b/src/mapbox.tsx @@ -9,10 +9,15 @@ import React, { import * as mapboxgl from 'mapbox-gl' import type { LngLatLike, LngLatBoundsLike } from 'mapbox-gl' -export const MapboxContext = createContext(null) +export const MapboxContext = createContext<{ map?: mapboxgl.Map } | null>(null) -export const useMapbox = () => { - return useContext(MapboxContext) +export const useMapbox = (): { map: mapboxgl.Map } => { + const value = useContext(MapboxContext) + + if (value && value.map) { + return { map: value.map } + } + throw new Error('Invoked useMapbox before initializing context') } type Props = { @@ -23,7 +28,7 @@ type Props = { center?: LngLatLike debug?: boolean glyphs?: string - children?: React.Node + children?: React.ReactNode style?: { [key: string]: string } } @@ -38,8 +43,8 @@ const Mapbox = ({ debug, children, }: Props) => { - const map = useRef() - const [ready, setReady] = useState() + const map = useRef() + const [ready, setReady] = useState(false) const ref = useCallback((node) => { const mapboxStyle = { @@ -79,15 +84,13 @@ const Mapbox = ({ }, []) useEffect(() => { - map.current.showTileBoundaries = debug + if (map.current) { + map.current.showTileBoundaries = !!debug + } }, [debug]) return ( - +
{ const { region } = useRegion() const { setLoading, clearLoading, loading, chunkLoading, metadataLoading } = useSetLoading() - const tiles = useRef() - const camera = useRef() - const lastQueried = useRef() + const tiles = useRef() + const camera = useRef<{ center?: [number, number]; zoom?: number }>() + const lastQueried = useRef() camera.current = { center: center, zoom: zoom } @@ -118,6 +118,10 @@ const Raster = (props: Props) => { }, [!!props.setChunkLoading, chunkLoading]) useEffect(() => { + if (!map) { + return + } + const callback = () => { tiles.current.updateCamera(camera.current) tiles.current.draw() diff --git a/src/region/context.tsx b/src/region/context.tsx index f432063..8c679b4 100644 --- a/src/region/context.tsx +++ b/src/region/context.tsx @@ -1,8 +1,13 @@ import React, { createContext, useContext, useState } from 'react' -const RegionContext = createContext({ +type Context = { + region: any + setRegion: (region: any) => void +} + +const RegionContext = createContext({ region: null, - onChange: () => { + setRegion: () => { throw new Error('Tried to set region before initializing context') }, }) @@ -17,7 +22,7 @@ export const useRegion = () => { } type Props = { - children?: React.Node + children?: React.ReactNode } export const RegionProvider = ({ children }: Props) => { diff --git a/src/regl.tsx b/src/regl.tsx index 757ab43..a615f44 100644 --- a/src/regl.tsx +++ b/src/regl.tsx @@ -8,19 +8,23 @@ import React, { } from 'react' import * as _regl from 'regl' -export const ReglContext = createContext(null) - -export const useRegl = () => { - return useContext(ReglContext) +export const ReglContext = createContext<{ regl?: _regl.Regl } | null>(null) + +export const useRegl = (): { regl: _regl.Regl } => { + const value = useContext(ReglContext) + if (value && value.regl) { + return { regl: value.regl } + } + throw new Error('Invoked useRegl before initializing context') } type Props = { style?: { [key: string]: string | number } - children?: React.Node + children?: React.ReactNode } const Regl = ({ style, children }: Props) => { - const regl = useRef() + const regl = useRef<_regl.Regl>() const [ready, setReady] = useState(false) const ref = useCallback((node) => { diff --git a/tsconfig.json b/tsconfig.json index 1adb4cf..4e31d37 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,13 +1,14 @@ { "compilerOptions": { - "outDir": "./dist/", // path to output directory - "sourceMap": true, // allow sourcemap support - "strictNullChecks": true, // enable strict null checks as a best practice - "module": "ESNext", // specify module code generation - "jsx": "react", // use typescript to transpile jsx to js - "target": "ESNext", // specify ECMAScript target version - "allowJs": true, // allow a partial TypeScript and JavaScript codebase - "moduleResolution": "node" + "outDir": "./dist/", + "sourceMap": true, + "strictNullChecks": true, + "module": "ESNext", + "jsx": "react", + "target": "ESNext", + "allowJs": true, + "moduleResolution": "node", + "allowSyntheticDefaultImports": true }, "include": ["./src/"] } From 4e41465ee3e02f2878fae807144419f9624bc440 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Mon, 6 Jun 2022 10:57:13 -0700 Subject: [PATCH 08/15] Use PropsTable for all component docs --- docs/components/component-props.json | 180 +++++++++++++++++- docs/pages/maps/fill.md | 16 +- docs/pages/maps/line.md | 18 +- docs/pages/maps/regionpicker.md | 18 +- package.json | 2 +- src/{fill.js => fill.tsx} | 36 +++- src/{line.js => line.tsx} | 29 ++- .../region-picker/{index.js => index.tsx} | 22 ++- 8 files changed, 257 insertions(+), 64 deletions(-) rename src/{fill.js => fill.tsx} (67%) rename src/{line.js => line.tsx} (74%) rename src/region/region-picker/{index.js => index.tsx} (76%) diff --git a/docs/components/component-props.json b/docs/components/component-props.json index 82f0aff..70b7e83 100644 --- a/docs/components/component-props.json +++ b/docs/components/component-props.json @@ -1,4 +1,106 @@ { + "src/fill.tsx": { + "description": "", + "displayName": "Fill", + "methods": [], + "props": { + "source": { + "required": true, + "tsType": { "name": "string" }, + "description": "URL pointing to vector tileset" + }, + "variable": { + "required": true, + "tsType": { "name": "string" }, + "description": "Name of `source-layer`" + }, + "color": { + "required": true, + "tsType": { "name": "string" }, + "description": "Fill color" + }, + "id": { + "required": false, + "tsType": { "name": "string" }, + "description": "Key that triggers addition of source to `mapbox-gl-js` map" + }, + "maxZoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "Maximum zoom for layer (defaults to 5)", + "defaultValue": { "value": "5", "computed": false } + }, + "opacity": { + "required": false, + "tsType": { "name": "number" }, + "description": "Fill opacity (defaults to 1)", + "defaultValue": { "value": "1", "computed": false } + } + } + }, + "src/line.tsx": { + "description": "", + "displayName": "Line", + "methods": [], + "props": { + "source": { + "required": true, + "tsType": { "name": "string" }, + "description": "URL pointing to vector tileset" + }, + "variable": { + "required": true, + "tsType": { "name": "string" }, + "description": "Name of `source-layer`" + }, + "color": { + "required": true, + "tsType": { "name": "string" }, + "description": "Line color" + }, + "id": { + "required": false, + "tsType": { "name": "string" }, + "description": "Key that triggers addition of source to `mapbox-gl-js` map" + }, + "maxZoom": { + "required": false, + "tsType": { "name": "number" }, + "description": "Maximum zoom for layer (defaults to 5)", + "defaultValue": { "value": "5", "computed": false } + }, + "width": { + "required": false, + "tsType": { "name": "number" }, + "description": "Line width (defaults to 0.5)", + "defaultValue": { "value": "0.5", "computed": false } + }, + "blur": { + "required": false, + "tsType": { "name": "number" }, + "description": "Line blur (defaults to 0.4)", + "defaultValue": { "value": "0.4", "computed": false } + }, + "opacity": { + "required": false, + "tsType": { "name": "number" }, + "description": "Line opacity (defaults to 1)", + "defaultValue": { "value": "1", "computed": false } + } + } + }, + "src/loading/context.tsx": { + "description": "", + "displayName": "LoadingProvider", + "methods": [], + "props": { + "children": { + "required": false, + "tsType": { "name": "ReactReactNode", "raw": "React.ReactNode" }, + "description": "" + } + } + }, "src/map.tsx": { "description": "", "displayName": "Map", @@ -78,7 +180,7 @@ }, "children": { "required": false, - "tsType": { "name": "ReactNode", "raw": "React.Node" }, + "tsType": { "name": "ReactReactNode", "raw": "React.ReactNode" }, "description": "@carbonplan/maps JSX elements or regular components" }, "setLoading": { @@ -164,7 +266,7 @@ }, "children": { "required": false, - "tsType": { "name": "ReactNode", "raw": "React.Node" }, + "tsType": { "name": "ReactReactNode", "raw": "React.ReactNode" }, "description": "" }, "style": { @@ -415,6 +517,78 @@ } } }, + "src/region/context.tsx": { + "description": "", + "displayName": "RegionProvider", + "methods": [], + "props": { + "children": { + "required": false, + "tsType": { "name": "ReactReactNode", "raw": "React.ReactNode" }, + "description": "" + } + } + }, + "src/region/region-picker/circle-picker/index.js": { + "description": "", + "displayName": "CirclePicker", + "methods": [] + }, + "src/region/region-picker/index.tsx": { + "description": "", + "displayName": "RegionPicker", + "methods": [], + "props": { + "color": { + "required": true, + "tsType": { "name": "string" }, + "description": "Color of circle border, radius guideline, and label" + }, + "backgroundColor": { + "required": true, + "tsType": { "name": "string" }, + "description": "Color rendered over area of map not covered by circle (with opacity 0.8)" + }, + "fontFamily": { + "required": true, + "tsType": { "name": "string" }, + "description": "Font family used to render circle radius label" + }, + "fontSize": { + "required": true, + "tsType": { "name": "string" }, + "description": "Font size used to render circle radius label" + }, + "units": { + "required": false, + "tsType": { + "name": "union", + "raw": "'meters' | 'kilometers'", + "elements": [ + { "name": "literal", "value": "'meters'" }, + { "name": "literal", "value": "'kilometers'" } + ] + }, + "description": "Units used to render circle radius label", + "defaultValue": { "value": "'kilometers'", "computed": false } + }, + "initialRadius": { + "required": false, + "tsType": { "name": "number" }, + "description": "Radius (in `units`) used to initialize circle" + }, + "minRadius": { + "required": false, + "tsType": { "name": "number" }, + "description": "Minimum radius (in `units`) allowed" + }, + "maxRadius": { + "required": false, + "tsType": { "name": "number" }, + "description": "Maximum radius (in `units`) allowed" + } + } + }, "src/regl.tsx": { "description": "", "displayName": "Regl", @@ -444,7 +618,7 @@ }, "children": { "required": false, - "tsType": { "name": "ReactNode", "raw": "React.Node" }, + "tsType": { "name": "ReactReactNode", "raw": "React.ReactNode" }, "description": "" } } diff --git a/docs/pages/maps/fill.md b/docs/pages/maps/fill.md index 060407c..c65d357 100644 --- a/docs/pages/maps/fill.md +++ b/docs/pages/maps/fill.md @@ -1,5 +1,5 @@ import Section from '../../components/section' -import Table from '../../components/table' +import PropsTable from '../../components/props-table' # Fill @@ -7,18 +7,6 @@ The `Fill` component renders a Mapbox map layer of `type: 'fill'` using vector t ## Props - - -| Prop | Description | Default | -| ---------------- | ---------------------------------------------------------- | ------- | -| source | URL pointing to vector tileset | | -| variable | Name of `source-layer` | | -| color | Fill color | | -| _optional props_ | | | -| opacity | Fill opacity | 1 | -| maxZoom | Maximum zoom for layer | 5 | -| id | Key that triggers addition of source to `mapbox-gl-js` map | | - -
+ export default ({ children }) =>
{children}
diff --git a/docs/pages/maps/line.md b/docs/pages/maps/line.md index b643c43..1039a59 100644 --- a/docs/pages/maps/line.md +++ b/docs/pages/maps/line.md @@ -1,5 +1,5 @@ import Section from '../../components/section' -import Table from '../../components/table' +import PropsTable from '../../components/props-table' # Line @@ -7,20 +7,6 @@ The `Line` component renders a Mapbox map layer of `type: 'line'` using vector t ## Props - - -| Prop | Description | Default | -| ---------------- | ---------------------------------------------------------- | ------- | -| source | URL pointing to vector tileset | | -| variable | Name of `source-layer` | | -| color | Line color | | -| _optional props_ | | | -| opacity | Line opacity | 1 | -| width | Line width | 0.5 | -| blur | Line blur | 0.4 | -| maxZoom | Maximum zoom for layer | 5 | -| id | Key that triggers addition of source to `mapbox-gl-js` map | | - -
+ export default ({ children }) =>
{children}
diff --git a/docs/pages/maps/regionpicker.md b/docs/pages/maps/regionpicker.md index b375679..46af7ad 100644 --- a/docs/pages/maps/regionpicker.md +++ b/docs/pages/maps/regionpicker.md @@ -1,5 +1,5 @@ import Section from '../../components/section' -import Table from '../../components/table' +import PropsTable from '../../components/props-table' import RegionDemo from '../../components/examples/region-demo' # RegionPicker @@ -8,21 +8,7 @@ The `RegionPicker` component renders a moveable and resizeable circle over the m ## Props - - -| Prop | Description | Default | -| ---------------- | -------------------------------------------------------------------------- | ------------ | -| color | Color of circle border, radius guideline, and label | | -| backgroundColor | Color rendered over area of map not covered by circle (with opacity `0.8`) | | -| fontFamily | Font family used to render circle radius label | | -| fontSize | Font size used to render circle radius label | | -| _optional props_ | | | -| units | Units used to render circle radius label, one of: 'meters', 'kilometers' | 'kilometers' | -| initialRadius | Radius used to initialize circle | | -| minRadius | Minimum radius allowed | | -| maxRadius | Maximum radius allowed | | - -
+ ## Basic rendering diff --git a/package.json b/package.json index 3db4dd7..b062792 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "watch": "microbundle watch src/index.ts -o dst/index.js --no-compress --jsx React.createElement -f modern,es,cjs --jsxFragment React.Fragment", "test": "NODE_ENV=test jest --watch", "test:ci": "NODE_ENV=test jest --ci --reporters='default'", - "build-docs": "NODE_ENV=docs react-docgen src/*.tsx --out docs/components/component-props.json --resolver findExportedComponentDefinition && prettier --write docs/components/component-props.json", + "build-docs": "NODE_ENV=docs react-docgen ./src/ --out docs/components/component-props.json --extension tsx --resolver findExportedComponentDefinition && prettier --write docs/components/component-props.json", "format": "prettier --write 'src/**/*.js'" }, "repository": { diff --git a/src/fill.js b/src/fill.tsx similarity index 67% rename from src/fill.js rename to src/fill.tsx index cc3c4de..e2bc01f 100644 --- a/src/fill.js +++ b/src/fill.tsx @@ -1,9 +1,31 @@ -import { useEffect, useRef } from 'react' +import React, { useEffect, useRef } from 'react' import { useMapbox } from './mapbox' import { updatePaintProperty } from './utils' import { v4 as uuidv4 } from 'uuid' -const Fill = ({ source, variable, color, id, maxZoom = 5, opacity = 1 }) => { +type Props = { + /** URL pointing to vector tileset */ + source: string + /** Name of `source-layer` */ + variable: string + /** Fill color */ + color: string + /** Key that triggers addition of source to `mapbox-gl-js` map */ + id?: string + /** Maximum zoom for layer (defaults to 5) */ + maxZoom?: number + /** Fill opacity (defaults to 1) */ + opacity?: number +} + +const Fill = ({ + source, + variable, + color, + id, + maxZoom = 5, + opacity = 1, +}: Props) => { const { map } = useMapbox() const removed = useRef(false) @@ -17,8 +39,8 @@ const Fill = ({ source, variable, color, id, maxZoom = 5, opacity = 1 }) => { }, []) useEffect(() => { - sourceIdRef.current = id || uuidv4() - const { current: sourceId } = sourceIdRef + const sourceId = id || uuidv4() + sourceIdRef.current = sourceId if (!map.getSource(sourceId)) { map.addSource(sourceId, { type: 'vector', @@ -31,8 +53,8 @@ const Fill = ({ source, variable, color, id, maxZoom = 5, opacity = 1 }) => { }, [id]) useEffect(() => { - layerIdRef.current = uuidv4() - const { current: layerId } = layerIdRef + const layerId = uuidv4() + layerIdRef.current = layerId const { current: sourceId } = sourceIdRef if (!map.getLayer(layerId)) { map.addLayer({ @@ -65,7 +87,7 @@ const Fill = ({ source, variable, color, id, maxZoom = 5, opacity = 1 }) => { updatePaintProperty(map, layerIdRef, 'fill-opacity', opacity) }, [opacity]) - return null + return <> } export default Fill diff --git a/src/line.js b/src/line.tsx similarity index 74% rename from src/line.js rename to src/line.tsx index bc7d7d3..2f7de41 100644 --- a/src/line.js +++ b/src/line.tsx @@ -1,8 +1,27 @@ -import { useEffect, useRef } from 'react' +import React, { useEffect, useRef } from 'react' import { useMapbox } from './mapbox' import { updatePaintProperty } from './utils' import { v4 as uuidv4 } from 'uuid' +type Props = { + /** URL pointing to vector tileset */ + source: string + /** Name of `source-layer` */ + variable: string + /** Line color */ + color: string + /** Key that triggers addition of source to `mapbox-gl-js` map */ + id?: string + /** Maximum zoom for layer (defaults to 5) */ + maxZoom?: number + /** Line width (defaults to 0.5) */ + width?: number + /** Line blur (defaults to 0.4) */ + blur?: number + /** Line opacity (defaults to 1) */ + opacity?: number +} + const Line = ({ source, variable, @@ -12,7 +31,7 @@ const Line = ({ opacity = 1, blur = 0.4, width = 0.5, -}) => { +}: Props) => { const { map } = useMapbox() const removed = useRef(false) @@ -26,8 +45,8 @@ const Line = ({ }, []) useEffect(() => { - sourceIdRef.current = id || uuidv4() - const { current: sourceId } = sourceIdRef + const sourceId = id || uuidv4() + sourceIdRef.current = sourceId if (!map.getSource(sourceId)) { map.addSource(sourceId, { type: 'vector', @@ -84,7 +103,7 @@ const Line = ({ updatePaintProperty(map, layerIdRef, 'line-blur', blur) }, [blur]) - return null + return <> } export default Line diff --git a/src/region/region-picker/index.js b/src/region/region-picker/index.tsx similarity index 76% rename from src/region/region-picker/index.js rename to src/region/region-picker/index.tsx index cb38daf..a4161ad 100644 --- a/src/region/region-picker/index.js +++ b/src/region/region-picker/index.tsx @@ -17,6 +17,25 @@ function getInitialRadius(map, units, minRadius, maxRadius) { return radius } +type Props = { + /** Color of circle border, radius guideline, and label */ + color: string + /** Color rendered over area of map not covered by circle (with opacity 0.8) */ + backgroundColor: string + /** Font family used to render circle radius label */ + fontFamily: string + /** Font size used to render circle radius label */ + fontSize: string + /** Units used to render circle radius label */ + units?: 'meters' | 'kilometers' + /** Radius (in `units`) used to initialize circle */ + initialRadius?: number + /** Minimum radius (in `units`) allowed */ + minRadius?: number + /** Maximum radius (in `units`) allowed */ + maxRadius?: number +} + // TODO: // - accept mode (only accept mode="circle" to start) function RegionPicker({ @@ -28,7 +47,7 @@ function RegionPicker({ initialRadius: initialRadiusProp, minRadius, maxRadius, -}) { +}: Props) { const { map } = useMapbox() const id = useRef(uuidv4()) const initialCenter = useRef(map.getCenter()) @@ -60,7 +79,6 @@ function RegionPicker({ return ( Date: Mon, 6 Jun 2022 11:44:16 -0700 Subject: [PATCH 09/15] Use markdown-to-jsx to hande prop table markdown --- docs/components/props-table.js | 7 +++---- docs/package-lock.json | 18 ++++++++++++++++++ docs/package.json | 1 + 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/docs/components/props-table.js b/docs/components/props-table.js index 26f5d6f..5ddd4ce 100644 --- a/docs/components/props-table.js +++ b/docs/components/props-table.js @@ -1,5 +1,6 @@ import { Box } from 'theme-ui' import { Table } from '@carbonplan/components' +import Markdown from 'markdown-to-jsx' import componentProps from './component-props.json' const sx = { @@ -16,10 +17,8 @@ const getRows = (keys, props) => { const { tsType, description } = props[key] return [ key, - description, - - {tsType.raw ?? tsType.name} - , + {description}, + {`\`${tsType.raw ?? tsType.name}\``}, ] }) } diff --git a/docs/package-lock.json b/docs/package-lock.json index 7318feb..dff5bae 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -23,6 +23,7 @@ "@mdx-js/react": "^1.6.22", "@next/mdx": "^11.1.2", "@theme-ui/color": "^0.13.1", + "markdown-to-jsx": "^7.1.7", "next": "^12.0.7", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -4140,6 +4141,17 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/markdown-to-jsx": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.1.7.tgz", + "integrity": "sha512-VI3TyyHlGkO8uFle0IOibzpO1c1iJDcXcS/zBrQrXQQvJ2tpdwVzVZ7XdKsyRz1NdRmre4dqQkMZzUHaKIG/1w==", + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "react": ">= 0.14.0" + } + }, "node_modules/mdast-squeeze-paragraphs": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz", @@ -8665,6 +8677,12 @@ "resolved": "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz", "integrity": "sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg==" }, + "markdown-to-jsx": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.1.7.tgz", + "integrity": "sha512-VI3TyyHlGkO8uFle0IOibzpO1c1iJDcXcS/zBrQrXQQvJ2tpdwVzVZ7XdKsyRz1NdRmre4dqQkMZzUHaKIG/1w==", + "requires": {} + }, "mdast-squeeze-paragraphs": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz", diff --git a/docs/package.json b/docs/package.json index 86980fd..f779b51 100644 --- a/docs/package.json +++ b/docs/package.json @@ -30,6 +30,7 @@ "@mdx-js/react": "^1.6.22", "@next/mdx": "^11.1.2", "@theme-ui/color": "^0.13.1", + "markdown-to-jsx": "^7.1.7", "next": "^12.0.7", "react": "^17.0.2", "react-dom": "^17.0.2", From 4955b5ffa66ec42c8b144d71427f6c52c960a7a5 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Mon, 6 Jun 2022 12:29:18 -0700 Subject: [PATCH 10/15] Fix error while retaining existing behavior Updates to maxZoom are not and (were not) picked up --- src/fill.tsx | 4 +--- src/line.tsx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/fill.tsx b/src/fill.tsx index e2bc01f..ee2a6e8 100644 --- a/src/fill.tsx +++ b/src/fill.tsx @@ -45,10 +45,8 @@ const Fill = ({ map.addSource(sourceId, { type: 'vector', tiles: [`${source}/{z}/{x}/{y}.pbf`], + maxzoom: maxZoom, }) - if (maxZoom) { - map.getSource(sourceId).maxzoom = maxZoom - } } }, [id]) diff --git a/src/line.tsx b/src/line.tsx index 2f7de41..675033e 100644 --- a/src/line.tsx +++ b/src/line.tsx @@ -51,10 +51,8 @@ const Line = ({ map.addSource(sourceId, { type: 'vector', tiles: [`${source}/{z}/{x}/{y}.pbf`], + maxzoom: maxZoom, }) - if (maxZoom) { - map.getSource(sourceId).maxzoom = maxZoom - } } }, [id]) From 061226b77f59e999892081b39bb3b63f0ea223e1 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Tue, 7 Jun 2022 11:28:53 -0700 Subject: [PATCH 11/15] Enable noImplicitAny in tsconfig --- docs/components/component-props.json | 51 ++++++++++++++++++++++++++-- package-lock.json | 11 ++++++ package.json | 1 + src/fill.tsx | 4 +-- src/line.tsx | 4 +-- src/loading/context.tsx | 30 ++++++++-------- src/mapbox.tsx | 2 +- src/raster.tsx | 7 ++-- src/region/region-picker/index.tsx | 11 ++++-- src/region/types.ts | 11 ++++++ src/regl.tsx | 2 +- tsconfig.json | 5 +-- 12 files changed, 110 insertions(+), 29 deletions(-) create mode 100644 src/region/types.ts diff --git a/docs/components/component-props.json b/docs/components/component-props.json index 70b7e83..d271dee 100644 --- a/docs/components/component-props.json +++ b/docs/components/component-props.json @@ -341,7 +341,7 @@ "tsType": { "name": "signature", "type": "object", - "raw": "{\n setData: ({ value: any }) => void\n selector?: { [key: string]: any }\n}", + "raw": "{\n setData: (result: {\n value: null | number[] | { [key: string]: any }\n }) => void\n selector?: { [key: string]: any }\n}", "signature": { "properties": [ { @@ -349,9 +349,54 @@ "value": { "name": "signature", "type": "function", - "raw": "({ value: any }) => void", + "raw": "(result: {\n value: null | number[] | { [key: string]: any }\n}) => void", "signature": { - "arguments": [{ "name": "" }], + "arguments": [ + { + "name": "result", + "type": { + "name": "signature", + "type": "object", + "raw": "{\n value: null | number[] | { [key: string]: any }\n}", + "signature": { + "properties": [ + { + "key": "value", + "value": { + "name": "union", + "raw": "null | number[] | { [key: string]: any }", + "elements": [ + { "name": "null" }, + { + "name": "Array", + "elements": [{ "name": "number" }], + "raw": "number[]" + }, + { + "name": "signature", + "type": "object", + "raw": "{ [key: string]: any }", + "signature": { + "properties": [ + { + "key": { "name": "string" }, + "value": { + "name": "any", + "required": true + } + } + ] + } + } + ], + "required": true + } + } + ] + } + } + } + ], "return": { "name": "void" } }, "required": true diff --git a/package-lock.json b/package-lock.json index e2e898f..9d18d74 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@types/mapbox-gl": "^2.7.2", "@types/react": "^18.0.10", "@types/react-dom": "^18.0.5", + "@types/uuid": "^8.3.4", "d3-array": "^2.12.1", "d3-axis": "^2.1.0", "d3-geo": "^2.0.2", @@ -4620,6 +4621,11 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "node_modules/@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" + }, "node_modules/@types/yargs": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", @@ -16530,6 +16536,11 @@ "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", "dev": true }, + "@types/uuid": { + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-8.3.4.tgz", + "integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==" + }, "@types/yargs": { "version": "16.0.4", "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", diff --git a/package.json b/package.json index b062792..77757fd 100644 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "@types/mapbox-gl": "^2.7.2", "@types/react": "^18.0.10", "@types/react-dom": "^18.0.5", + "@types/uuid": "^8.3.4", "d3-array": "^2.12.1", "d3-axis": "^2.1.0", "d3-geo": "^2.0.2", diff --git a/src/fill.tsx b/src/fill.tsx index ee2a6e8..2bb7199 100644 --- a/src/fill.tsx +++ b/src/fill.tsx @@ -29,8 +29,8 @@ const Fill = ({ const { map } = useMapbox() const removed = useRef(false) - const sourceIdRef = useRef() - const layerIdRef = useRef() + const sourceIdRef = useRef() + const layerIdRef = useRef() useEffect(() => { map.on('remove', () => { diff --git a/src/line.tsx b/src/line.tsx index 675033e..de20731 100644 --- a/src/line.tsx +++ b/src/line.tsx @@ -35,8 +35,8 @@ const Line = ({ const { map } = useMapbox() const removed = useRef(false) - const sourceIdRef = useRef() - const layerIdRef = useRef() + const sourceIdRef = useRef() + const layerIdRef = useRef() useEffect(() => { map.on('remove', () => { diff --git a/src/loading/context.tsx b/src/loading/context.tsx index 9b23cec..730e05f 100644 --- a/src/loading/context.tsx +++ b/src/loading/context.tsx @@ -9,15 +9,17 @@ import React, { } from 'react' import { v4 as uuidv4 } from 'uuid' -type Loader = { - id: string - key: string +type Key = 'metadata' | 'loading' | 'chunk' +type Loader = { id: string; key: Key } +type Action = { loaders: Loader[]; type: 'set' | 'clear' } +type State = { + loading: Set + metadata: Set + chunk: Set } -type Context = { - loading: Set - metadata: Set - chunk: Set - dispatch: (action: { loaders: Loader[]; type: 'set' | 'clear' }) => void + +type Context = State & { + dispatch: (action: Action) => State | void } const initialState = { @@ -34,12 +36,12 @@ export const useSetLoading = () => { const loadingId = useRef(uuidv4()) const loading = useRef(false) const { dispatch } = useContext(LoadingContext) - const [metadataIds, setMetadataIds] = useState(new Set()) - const [chunkIds, setChunkIds] = useState(new Set()) + const [metadataIds, setMetadataIds] = useState>(new Set([])) + const [chunkIds, setChunkIds] = useState>(new Set([])) useEffect(() => { return () => { - const loaders = [{ id: loadingId.current, key: 'loading' }] + const loaders: Loader[] = [{ id: loadingId.current, key: 'loading' }] metadataIds.forEach((id) => loaders.push({ id, key: 'metadata' })) chunkIds.forEach((id) => loaders.push({ id, key: 'chunk' })) dispatch({ loaders, type: 'clear' }) @@ -56,7 +58,7 @@ export const useSetLoading = () => { } }, [metadataIds.size, chunkIds.size, loading.current]) - const setLoading = useCallback((key = 'chunk') => { + const setLoading = useCallback((key: Key = 'chunk') => { if (!['chunk', 'metadata'].includes(key)) { throw new Error( `Unexpected loading key: ${key}. Expected one of: 'chunk', 'metadata'.` @@ -81,7 +83,7 @@ export const useSetLoading = () => { }, []) const clearLoading = useCallback( - (id, { forceClear } = { forceClear: false }) => { + (id: string, { forceClear } = { forceClear: false }) => { if (id) { setMetadataIds((prevMetadata) => { prevMetadata.delete(id) @@ -121,7 +123,7 @@ export const useSetLoading = () => { } } -const reducer = (state, action) => { +const reducer = (state: State, action: Action) => { switch (action.type) { case 'set': action.loaders.forEach(({ id, key }) => { diff --git a/src/mapbox.tsx b/src/mapbox.tsx index 60b0494..0a1c321 100644 --- a/src/mapbox.tsx +++ b/src/mapbox.tsx @@ -46,7 +46,7 @@ const Mapbox = ({ const map = useRef() const [ready, setReady] = useState(false) - const ref = useCallback((node) => { + const ref = useCallback((node: HTMLDivElement) => { const mapboxStyle = { version: 8, sources: {}, diff --git a/src/raster.tsx b/src/raster.tsx index cead52b..7b6de64 100644 --- a/src/raster.tsx +++ b/src/raster.tsx @@ -5,6 +5,7 @@ import { useControls } from './use-controls' import { createTiles } from './tiles' import { useRegion } from './region/context' import { useSetLoading } from './loading' +import type { Circle } from './region/types' type RGB = [number, number, number] type Props = { @@ -20,7 +21,9 @@ type Props = { index?: any /** Object containing a `setData` callback and an optional `selector` object (falls back to `Raster`-level selector if not provided) */ regionOptions?: { - setData: ({ value: any }) => void + setData: (result: { + value: null | number[] | { [key: string]: any } + }) => void selector?: { [key: string]: any } } /** _(N/A for 2D datasets)_ Object to index into non-spatial dimensions, maps variable name (string) to value (any) or array of values */ @@ -73,7 +76,7 @@ const Raster = (props: Props) => { camera.current = { center: center, zoom: zoom } - const queryRegion = async (r, s) => { + const queryRegion = async (r: Circle, s: { [key: string]: any }) => { const queryStart = new Date().getTime() lastQueried.current = queryStart diff --git a/src/region/region-picker/index.tsx b/src/region/region-picker/index.tsx index a4161ad..f76db31 100644 --- a/src/region/region-picker/index.tsx +++ b/src/region/region-picker/index.tsx @@ -3,11 +3,18 @@ import CirclePicker from './circle-picker' import { UPDATE_STATS_ON_DRAG } from './constants' import { distance } from '@turf/turf' import { v4 as uuidv4 } from 'uuid' +import type { Circle } from '../types' +import type { Map } from 'mapbox-gl' import { useRegionContext } from '../context' import { useMapbox } from '../../mapbox' -function getInitialRadius(map, units, minRadius, maxRadius) { +function getInitialRadius( + map: Map, + units: 'meters' | 'kilometers', + minRadius?: number, + maxRadius?: number +) { const bounds = map.getBounds().toArray() const dist = distance(bounds[0], bounds[1], { units }) let radius = Math.round(dist / 15) @@ -65,7 +72,7 @@ function RegionPicker({ } }, []) - const handleCircle = useCallback((circle) => { + const handleCircle = useCallback((circle: Circle) => { if (!circle) return setRegion(circle) setCenter(circle.properties.center) diff --git a/src/region/types.ts b/src/region/types.ts new file mode 100644 index 0000000..e6ff8d0 --- /dev/null +++ b/src/region/types.ts @@ -0,0 +1,11 @@ +import type { Feature, Polygon } from '@turf/turf' +import type { LngLat } from 'mapbox-gl' + +export type Circle = Feature< + Polygon, + { + center: LngLat + radius: number + units: string + } +> diff --git a/src/regl.tsx b/src/regl.tsx index a615f44..950132e 100644 --- a/src/regl.tsx +++ b/src/regl.tsx @@ -27,7 +27,7 @@ const Regl = ({ style, children }: Props) => { const regl = useRef<_regl.Regl>() const [ready, setReady] = useState(false) - const ref = useCallback((node) => { + const ref = useCallback((node: HTMLDivElement) => { if (node !== null) { regl.current = _regl({ container: node, diff --git a/tsconfig.json b/tsconfig.json index 4e31d37..a1d68b1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "outDir": "./dist/", + "outDir": "./dst/", "sourceMap": true, "strictNullChecks": true, "module": "ESNext", @@ -8,7 +8,8 @@ "target": "ESNext", "allowJs": true, "moduleResolution": "node", - "allowSyntheticDefaultImports": true + "allowSyntheticDefaultImports": true, + "noImplicitAny": true }, "include": ["./src/"] } From e719cbaf1fecde92cbc5b99ce91d79aa731fe54a Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Tue, 7 Jun 2022 11:45:03 -0700 Subject: [PATCH 12/15] Add README for docs site --- docs/README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 docs/README.md diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..2d50deb --- /dev/null +++ b/docs/README.md @@ -0,0 +1,29 @@ +# carbonplan / maps / docs + +**docs site for `@carbonplan/maps` — [live](https://maps.docs.carbonplan.org/maps)** + +## development + +Assuming you already have `Node.js` installed, you can install the build dependencies as: + +```shell +npm install . +``` + +To start a development version of the site, simply run: + +```shell +npm run dev +``` + +and then visit `http://localhost:3001/maps` in your browser. + +### prop types + +The docs site uses the automatically generated prop definitions in `components/component-props.json` to render `PropsTable`s typed components. To regenerate these prop definitions in the main `maps` project, you can run: + +```shell +npm run build-docs +``` + +and check in the updates to `component-props.json`. From 4fa5ced4080db999e6636956db7e44f937aa3003 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Fri, 17 Jun 2022 13:51:14 -0700 Subject: [PATCH 13/15] Add typing to basic exported hooks --- src/{use-controls.js => use-controls.ts} | 5 +++-- src/{use-recenter-region.js => use-recenter-region.ts} | 0 2 files changed, 3 insertions(+), 2 deletions(-) rename src/{use-controls.js => use-controls.ts} (78%) rename src/{use-recenter-region.js => use-recenter-region.ts} (100%) diff --git a/src/use-controls.js b/src/use-controls.ts similarity index 78% rename from src/use-controls.js rename to src/use-controls.ts index 6105039..214f27b 100644 --- a/src/use-controls.js +++ b/src/use-controls.ts @@ -1,9 +1,10 @@ import React, { useState, useEffect } from 'react' import { useMapbox } from './mapbox' +import type { LngLat } from 'mapbox-gl' export const useControls = () => { - const [zoom, setZoom] = useState() - const [center, setCenter] = useState() + const [zoom, setZoom] = useState() + const [center, setCenter] = useState() const { map } = useMapbox() useEffect(() => { diff --git a/src/use-recenter-region.js b/src/use-recenter-region.ts similarity index 100% rename from src/use-recenter-region.js rename to src/use-recenter-region.ts From 3674d307c0c1145de7c14c7f6be7b79a635b8b34 Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Fri, 17 Jun 2022 14:40:52 -0700 Subject: [PATCH 14/15] Consistently use LngLat --- src/raster.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/raster.tsx b/src/raster.tsx index 7b6de64..c1a62b4 100644 --- a/src/raster.tsx +++ b/src/raster.tsx @@ -6,6 +6,7 @@ import { createTiles } from './tiles' import { useRegion } from './region/context' import { useSetLoading } from './loading' import type { Circle } from './region/types' +import type { LngLat } from 'mapbox-gl' type RGB = [number, number, number] type Props = { @@ -71,7 +72,7 @@ const Raster = (props: Props) => { const { setLoading, clearLoading, loading, chunkLoading, metadataLoading } = useSetLoading() const tiles = useRef() - const camera = useRef<{ center?: [number, number]; zoom?: number }>() + const camera = useRef<{ center?: LngLat; zoom?: number }>() const lastQueried = useRef() camera.current = { center: center, zoom: zoom } From 1f3148319db3a8362ff675e3e56137ddae065d3f Mon Sep 17 00:00:00 2001 From: Kata Martin Date: Fri, 17 Jun 2022 15:22:19 -0700 Subject: [PATCH 15/15] Add crude types to useRuler --- src/{use-ruler.js => use-ruler.ts} | 49 +++++++++++++++++++----------- 1 file changed, 31 insertions(+), 18 deletions(-) rename src/{use-ruler.js => use-ruler.ts} (78%) diff --git a/src/use-ruler.js b/src/use-ruler.ts similarity index 78% rename from src/use-ruler.js rename to src/use-ruler.ts index 9a13e23..98c2297 100644 --- a/src/use-ruler.js +++ b/src/use-ruler.ts @@ -4,17 +4,28 @@ import { axisBottom, axisLeft } from 'd3-axis' import { scaleOrdinal } from 'd3-scale' import { select } from 'd3-selection' +import type { AxisScale } from 'd3-axis' +import type { Selection } from 'd3-selection' + import { useMapbox } from './mapbox' const TICK_SEPARATION = 150 // target distance between ticks const TICK_SIZE = 6 // tick length const TICK_MARGIN = 2 // distance between gridlines and tick text +type S = Selection +type A = AxisScale + function useRuler({ showAxes = true, showGrid = false, fontFamily, gridColor, +}: { + showAxes: boolean + showGrid: boolean + fontFamily: string + gridColor: string }) { const { map } = useMapbox() @@ -23,8 +34,8 @@ function useRuler({ return } - let rulerContainer = null - let setRulerTicks = null + let rulerContainer: S + let setRulerTicks: () => void function addRuler() { const mapContainer = map.getContainer() @@ -50,13 +61,13 @@ function useRuler({ .style('font-size', '14px') .style('font-family', fontFamily) - const xAxis = (g, x) => + const xAxis = (g: S, x: A) => g .call( axisBottom(x) .tickValues(x.domain()) .tickFormat((d) => `${d}°`) - .tickSize(TICK_SIZE) + .tickSize(TICK_SIZE) as any ) .call((g) => g.select('.domain').remove()) @@ -68,13 +79,13 @@ function useRuler({ .style('font-size', '14px') .style('font-family', fontFamily) - const yAxis = (g, y) => + const yAxis = (g: S, y: A) => g .call( axisLeft(y) .tickValues(y.domain()) .tickFormat((d) => `${d}°`) - .tickSize(TICK_SIZE) + .tickSize(TICK_SIZE) as any ) .call((g) => g.select('.domain').remove()) @@ -88,8 +99,8 @@ function useRuler({ .style('stroke-dasharray', '3,2') .style('stroke-opacity', 0.8), - grid: (g, x, y) => { - const xTickHeight = gx.node().getBoundingClientRect().height + grid: (g: S, x: A, y: A) => { + const xTickHeight = gx.node()?.getBoundingClientRect().height ?? 0 const yTickNodes = gy.selectAll('.tick').nodes() return g .call((g) => @@ -106,10 +117,10 @@ function useRuler({ (update) => update, (exit) => exit.remove() ) - .attr('x1', (d) => 0.5 + x(d)) - .attr('x2', (d) => 0.5 + x(d)) + .attr('x1', (d) => 0.5 + (x(d) as number)) + .attr('x2', (d) => 0.5 + (x(d) as number)) ) - .call((g) => + .call((g: S) => g .selectAll('.y') .data(y.domain()) @@ -118,11 +129,12 @@ function useRuler({ (update) => update, (exit) => exit.remove() ) - .attr('y1', (d) => 0.5 + y(d)) - .attr('y2', (d) => 0.5 + y(d)) + .attr('y1', (d) => 0.5 + (y(d) as number)) + .attr('y2', (d) => 0.5 + (y(d) as number)) .attr('x2', (d, i) => { - const yTickWidth = yTickNodes[i] - ? yTickNodes[i].getBoundingClientRect().width + const node = yTickNodes[i] as Element + const yTickWidth = node + ? node.getBoundingClientRect().width : 0 return width - yTickWidth - TICK_MARGIN }) @@ -140,17 +152,18 @@ function useRuler({ const xDomain = ticks(b.getWest(), b.getEast(), numXTicks) const xRange = xDomain.map((lng) => map.project([lng, 0]).x) - const x = scaleOrdinal().domain(xDomain).range(xRange) + const x = scaleOrdinal().domain(xDomain.map(String)).range(xRange) const yDomain = ticks(b.getNorth(), b.getSouth(), numYTicks) const yRange = yDomain.map((lat) => map.project([0, lat]).y) - const y = scaleOrdinal().domain(yDomain).range(yRange) + const y = scaleOrdinal().domain(yDomain.map(String)).range(yRange) if (showAxes) { gx.call(xAxis, x) gy.call(yAxis, y) } - if (showGrid) { + + if (showGrid && gGrid) { gGrid.call(grid, x, y) } }