From 5b363b0dcb3e53fcab1b7c16324eb52cd1537f8c Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Thu, 22 Apr 2021 01:04:24 +0800 Subject: [PATCH 01/36] docs(website): Implement playground --- pnpm-lock.yaml | 190 +++++++++++++++++- website/.eslintrc.js | 1 + website/babel.config.js | 3 +- website/docusaurus.config.js | 6 +- website/package.json | 13 +- .../plugins/lodash-webpack-plugin/index.js | 15 ++ .../components/Playground/Container/index.tsx | 24 +++ .../Playground/Container/styles.module.scss | 9 + .../components/Playground/Editor/index.tsx | 29 +++ .../Playground/Editor/styles.module.scss | 3 + .../Playground/MonacoEditor/index.tsx | 25 +++ .../Playground/Preview/executeModule.ts | 10 + .../Playground/Preview/generateBundle.ts | 145 +++++++++++++ .../components/Playground/Preview/index.tsx | 61 ++++++ .../Playground/Preview/styles.module.scss | 3 + .../components/Playground/Sidebar/Tree.tsx | 36 ++++ .../components/Playground/Sidebar/index.tsx | 19 ++ .../Playground/Sidebar/styles.module.scss | 7 + .../components/Playground/Toolbar/index.tsx | 8 + .../Playground/Toolbar/styles.module.scss | 3 + website/src/components/Playground/context.tsx | 62 ++++++ .../components/Playground/fixtures/.eslintrc | 6 + .../Playground/fixtures/components/nginx.js | 52 +++++ .../fixtures/environments/dev/index.js | 3 + .../fixtures/environments/dev/nginx.js | 4 + .../fixtures/environments/prod/index.js | 3 + .../fixtures/environments/prod/nginx.js | 4 + .../components/Playground/hooks/useRollup.ts | 12 ++ website/src/components/Playground/index.tsx | 38 ++++ .../components/Playground/styles.module.scss | 5 + website/src/hooks/useScript.ts | 86 ++++++++ website/src/pages/play.tsx | 3 + website/src/utils/path.ts | 56 ++++++ 33 files changed, 931 insertions(+), 13 deletions(-) create mode 100644 website/plugins/lodash-webpack-plugin/index.js create mode 100644 website/src/components/Playground/Container/index.tsx create mode 100644 website/src/components/Playground/Container/styles.module.scss create mode 100644 website/src/components/Playground/Editor/index.tsx create mode 100644 website/src/components/Playground/Editor/styles.module.scss create mode 100644 website/src/components/Playground/MonacoEditor/index.tsx create mode 100644 website/src/components/Playground/Preview/executeModule.ts create mode 100644 website/src/components/Playground/Preview/generateBundle.ts create mode 100644 website/src/components/Playground/Preview/index.tsx create mode 100644 website/src/components/Playground/Preview/styles.module.scss create mode 100644 website/src/components/Playground/Sidebar/Tree.tsx create mode 100644 website/src/components/Playground/Sidebar/index.tsx create mode 100644 website/src/components/Playground/Sidebar/styles.module.scss create mode 100644 website/src/components/Playground/Toolbar/index.tsx create mode 100644 website/src/components/Playground/Toolbar/styles.module.scss create mode 100644 website/src/components/Playground/context.tsx create mode 100644 website/src/components/Playground/fixtures/.eslintrc create mode 100644 website/src/components/Playground/fixtures/components/nginx.js create mode 100644 website/src/components/Playground/fixtures/environments/dev/index.js create mode 100644 website/src/components/Playground/fixtures/environments/dev/nginx.js create mode 100644 website/src/components/Playground/fixtures/environments/prod/index.js create mode 100644 website/src/components/Playground/fixtures/environments/prod/nginx.js create mode 100644 website/src/components/Playground/hooks/useRollup.ts create mode 100644 website/src/components/Playground/index.tsx create mode 100644 website/src/components/Playground/styles.module.scss create mode 100644 website/src/hooks/useScript.ts create mode 100644 website/src/pages/play.tsx create mode 100644 website/src/utils/path.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0662f334e..693ef7862 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -179,8 +179,8 @@ importers: typescript: ^4.0.3 examples/web-parcel-1: dependencies: - '@kosko/env': link:../../packages/env - '@kosko/generate': link:../../packages/generate + '@kosko/env': 2.0.1 + '@kosko/generate': 1.2.1 kubernetes-models: 1.5.2 devDependencies: parcel-bundler: 1.12.5 @@ -196,8 +196,8 @@ importers: serve: ^11.3.2 examples/web-webpack-5: dependencies: - '@kosko/env': link:../../packages/env - '@kosko/generate': link:../../packages/generate + '@kosko/env': 2.0.1 + '@kosko/generate': 1.2.1 kubernetes-models: 1.5.2 devDependencies: html-webpack-plugin: 5.3.1_webpack@5.31.2 @@ -450,16 +450,23 @@ importers: dependencies: '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 '@docusaurus/preset-classic': 2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831 + '@kosko/env': link:../packages/env + '@kosko/generate': link:../packages/generate '@mdx-js/react': 1.6.22_react@17.0.1 + '@monaco-editor/react': 4.1.1_f093545f51687bd95e04fbf414b6aba1 clsx: 1.1.1 docusaurus-plugin-sass: 0.1.12_@docusaurus+core@2.0.0-alpha.71 + es-module-lexer: 0.4.1 fs-extra: 9.1.0 globby: 11.0.2 + immer: 9.0.1 lodash: 4.17.21 + monaco-editor: 0.23.0 prism-react-renderer: 1.2.0_react@17.0.1 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 react-icons: 4.2.0_react@17.0.1 + use-immer: 0.5.1_immer@9.0.1+react@17.0.1 devDependencies: '@docusaurus/module-type-aliases': 2.0.0-alpha.71 '@tsconfig/docusaurus': 1.0.2 @@ -467,9 +474,13 @@ importers: '@types/react': 17.0.3 '@types/react-helmet': 6.1.0 '@types/react-router-dom': 5.1.7 + '@types/systemjs': 6.1.0 + babel-plugin-lodash: 3.3.4 + lodash-webpack-plugin: 0.11.6 raw-loader: 4.0.2 read-pkg: 5.2.0 resolve-pkg: 2.0.0 + rollup: 2.45.2 sass-loader: 10.1.1 typedoc: 0.20.30_typescript@4.2.3 typedoc-plugin-markdown: 3.5.0_typedoc@0.20.30 @@ -478,17 +489,26 @@ importers: '@docusaurus/core': 2.0.0-alpha.71 '@docusaurus/module-type-aliases': 2.0.0-alpha.71 '@docusaurus/preset-classic': 2.0.0-alpha.71 + '@kosko/env': workspace:* + '@kosko/generate': workspace:* '@mdx-js/react': ^1.6.22 + '@monaco-editor/react': ^4.1.1 '@tsconfig/docusaurus': ^1.0.2 '@types/lodash': ^4.14.167 '@types/react': ^17.0.0 '@types/react-helmet': ^6.1.0 '@types/react-router-dom': ^5.1.7 + '@types/systemjs': ^6.1.0 + babel-plugin-lodash: ^3.3.4 clsx: ^1.1.1 docusaurus-plugin-sass: ^0.1.12 + es-module-lexer: ^0.4.1 fs-extra: ^9.1.0 globby: ^11.0.2 + immer: ^9.0.1 lodash: ^4.17.20 + lodash-webpack-plugin: ^0.11.6 + monaco-editor: ^0.23.0 prism-react-renderer: ^1.1.1 raw-loader: ^4.0.2 react: ^17.0.1 @@ -496,10 +516,12 @@ importers: react-icons: ^4.1.0 read-pkg: ^5.2.0 resolve-pkg: ^2.0.0 + rollup: ^2.45.2 sass-loader: ^10.0.2 typedoc: ^0.20.28 typedoc-plugin-markdown: ~3.5.0 typescript: ^4.1.3 + use-immer: ^0.5.1 lockfileVersion: 5.2 packages: /@algolia/autocomplete-core/1.0.0-alpha.44: @@ -775,6 +797,12 @@ packages: '@babel/types': 7.13.0 resolution: integrity: sha512-NGmfvRp9Rqxy0uHSSVP+SRIW1q31a7Ji10cLBcqSDUngGentY4FRiHOFZFE1CLU5eiL0oE8reH7Tg1y99TDM/g== + /@babel/helper-module-imports/7.13.12: + dependencies: + '@babel/types': 7.13.14 + dev: true + resolution: + integrity: sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== /@babel/helper-module-transforms/7.13.0: dependencies: '@babel/helper-module-imports': 7.12.13 @@ -1693,6 +1721,14 @@ packages: to-fast-properties: 2.0.0 resolution: integrity: sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA== + /@babel/types/7.13.14: + dependencies: + '@babel/helper-validator-identifier': 7.12.11 + lodash: 4.17.21 + to-fast-properties: 2.0.0 + dev: true + resolution: + integrity: sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ== /@bcoe/v8-coverage/0.2.3: dev: true resolution: @@ -2681,6 +2717,39 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-fC6QCp7Sc5sX6g8Tvbmj4XUTbyrik0akgRy03yjXbQaBWWNWGE7SGtJk98m0N8nzegD/7SggrUlivxo5ax4KWQ== + /@kosko/env/2.0.1: + dependencies: + '@kosko/require': 2.0.2 + debug: 4.3.1 + deepmerge: 4.2.2 + is-plain-object: 5.0.0 + tslib: 2.2.0 + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-4XsKXKppgyrM35HwD1nAUWbb3wxCc89Aec6s+onSbiL4B7jesDI8n/pSQZEBbn5MePJh5O0DTEjCnIBEjzdCaQ== + /@kosko/generate/1.2.1: + dependencies: + '@kosko/require': 2.0.2 + debug: 4.3.1 + fast-glob: 3.2.5 + fs-extra: 9.1.0 + js-yaml: 4.1.0 + tslib: 2.2.0 + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-sblRjvJP6vDfFT1wq8bvt6Az1ZpKnLC+Gs+tjM7fPuxoCpu7nS7LyDFyTRhMM4O7h6aR/VDhOSDVNJ0oLw1qLw== + /@kosko/require/2.0.2: + dependencies: + resolve: 1.20.0 + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-pewGQxNtaj/piJYHbiV4jXXRVS+Hcz9wv0bVNwOL1lz1IqlKS20tsjvkuzENQG2MMX2cJq3JDQ3RYNPrN32Q3Q== /@kubernetes-models/base/1.5.2: dependencies: '@kubernetes-models/validate': 1.4.2 @@ -2753,6 +2822,30 @@ packages: dev: false resolution: integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== + /@monaco-editor/loader/1.0.1_monaco-editor@0.23.0: + dependencies: + monaco-editor: 0.23.0 + state-local: 1.0.7 + dev: false + peerDependencies: + monaco-editor: '>= 0.21.0 < 1' + resolution: + integrity: sha512-hycGOhLqLYjnD0A/FHs56covEQWnDFrSnm/qLKkB/yoeayQ7ju+Vaj4SdTojGrXeY6jhMDx59map0+Jqwquh1Q== + /@monaco-editor/react/4.1.1_f093545f51687bd95e04fbf414b6aba1: + dependencies: + '@monaco-editor/loader': 1.0.1_monaco-editor@0.23.0 + monaco-editor: 0.23.0 + prop-types: 15.7.2 + react: 17.0.1 + react-dom: 17.0.1_react@17.0.1 + state-local: 1.0.7 + dev: false + peerDependencies: + monaco-editor: ^0.21.2 + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + resolution: + integrity: sha512-A9aZAb4fa81unRfwo63dHJpX5hgppYdMTdQVk2RAT7viiFwdfSfxz+k4WHiFdAdhFWYH/99VSec0vpZbQd0yng== /@mrmlnc/readdir-enhanced/2.2.1: dependencies: call-me-maybe: 1.0.1 @@ -3304,6 +3397,10 @@ packages: dev: true resolution: integrity: sha512-RJJrrySY7A8havqpGObOB4W92QXKJo63/jFLLgpvOtsGUqbQZ9Sbgl35KMm1DjC6j7AvmmU2bIno+3IyEaemaw== + /@types/systemjs/6.1.0: + dev: true + resolution: + integrity: sha512-akhlviqwowzRNiz3ooAbkjvyMO8cikBqap9z/0yfvMAb6vIsp91Rfox67qtgIhZosWP01MVSTwsgSFYWo4SWQA== /@types/tapable/1.0.6: dev: false resolution: @@ -4411,6 +4508,16 @@ packages: node: '>= 10.14.2' resolution: integrity: sha512-PO9t0697lNTmcEHH69mdtYiOIkkOlj9fySqfO3K1eCcdISevLAE0xY59VLLUj0SoiPiTX/JU2CYFpILydUa5Lw== + /babel-plugin-lodash/3.3.4: + dependencies: + '@babel/helper-module-imports': 7.13.12 + '@babel/types': 7.13.14 + glob: 7.1.6 + lodash: 4.17.21 + require-package-name: 2.0.1 + dev: true + resolution: + integrity: sha512-yDZLjK7TCkWl1gpBeBGmuaDIFhZKmkoL+Cu2MUUjv5VxUZx/z7tBGBCBcQs5RI1Bkz5LLmNdjx7paOyQtMovyg== /babel-plugin-polyfill-corejs2/0.1.10_@babel+core@7.13.8: dependencies: '@babel/compat-data': 7.13.8 @@ -6787,7 +6894,6 @@ packages: resolution: integrity: sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== /es-module-lexer/0.4.1: - dev: true resolution: integrity: sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== /es-to-primitive/1.2.1: @@ -7419,8 +7525,8 @@ packages: '@nodelib/fs.walk': 1.2.6 glob-parent: 5.1.2 merge2: 1.4.1 - micromatch: 4.0.2 - picomatch: 2.2.2 + micromatch: 4.0.4 + picomatch: 2.2.3 engines: node: '>=8' resolution: @@ -8806,6 +8912,10 @@ packages: dev: false resolution: integrity: sha512-aqXhGP7//Gui2+UrEtvxZxSquQVXTpZ7KDxfCcKAF3Vysvw0CViVaW9RZ1j1xlIYqaaaipBoqdqeibkc18PNvA== + /immer/9.0.1: + dev: false + resolution: + integrity: sha512-7CCw1DSgr8kKYXTYOI1qMM/f5qxT5vIVMeGLDCDX8CSxsggr1Sjdoha4OhsP0AZ1UvWbyZlILHvLjaynuu02Mg== /import-fresh/2.0.0: dependencies: caller-path: 2.0.0 @@ -10046,6 +10156,13 @@ packages: hasBin: true resolution: integrity: sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + /js-yaml/4.1.0: + dependencies: + argparse: 2.0.1 + dev: false + hasBin: true + resolution: + integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== /jsbn/0.1.1: resolution: integrity: sha1-peZUwuWi3rXyAdls77yoDA7y9RM= @@ -10462,6 +10579,14 @@ packages: node: '>=10' resolution: integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + /lodash-webpack-plugin/0.11.6: + dependencies: + lodash: 4.17.21 + dev: true + peerDependencies: + webpack: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.1.0 + resolution: + integrity: sha512-nsHN/+IxZK/C425vGC8pAxkKJ8KQH2+NJnhDul14zYNWr6HJcA95w+oRR7Cp0oZpOdMplDZXmjVROp8prPk7ig== /lodash._reinterpolate/3.0.0: dev: false resolution: @@ -10892,10 +11017,19 @@ packages: dependencies: braces: 3.0.2 picomatch: 2.2.2 + dev: true engines: node: '>=8' resolution: integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== + /micromatch/4.0.4: + dependencies: + braces: 3.0.2 + picomatch: 2.2.3 + engines: + node: '>=8.6' + resolution: + integrity: sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== /miller-rabin/4.0.1: dependencies: bn.js: 4.12.0 @@ -11127,6 +11261,10 @@ packages: dev: false resolution: integrity: sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q== + /monaco-editor/0.23.0: + dev: false + resolution: + integrity: sha512-q+CP5zMR/aFiMTE9QlIavGyGicKnG2v/H8qVvybLzeFsARM8f6G9fL0sMST2tyVYCwDKkGamZUI6647A0jR/Lg== /move-concurrently/1.0.1: dependencies: aproba: 1.2.0 @@ -12120,6 +12258,11 @@ packages: node: '>=8.6' resolution: integrity: sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== + /picomatch/2.2.3: + engines: + node: '>=8.6' + resolution: + integrity: sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== /pidtree/0.3.1: dev: true engines: @@ -13367,9 +13510,9 @@ packages: /querystringify/2.2.0: resolution: integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== - /queue-microtask/1.2.2: + /queue-microtask/1.2.3: resolution: - integrity: sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg== + integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== /quick-lru/4.0.1: dev: true engines: @@ -14065,6 +14208,10 @@ packages: /require-main-filename/2.0.0: resolution: integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + /require-package-name/2.0.1: + dev: true + resolution: + integrity: sha1-wR6XJ2tluOKSP3Xav1+y7ww4Qbk= /requires-port/1.0.0: resolution: integrity: sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= @@ -14192,6 +14339,15 @@ packages: inherits: 2.0.4 resolution: integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + /rollup/2.45.2: + dev: true + engines: + node: '>=10.0.0' + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + resolution: + integrity: sha512-kRRU7wXzFHUzBIv0GfoFFIN3m9oteY4uAsKllIpQDId5cfnkWF2J130l+27dzDju0E6MScKiV0ZM5Bw8m4blYQ== /rsvp/4.8.5: dev: true engines: @@ -14211,7 +14367,7 @@ packages: integrity: sha512-06LFAr+GAPo+BvaynsXRfoYTJvSaWRyOhURCQ7aeI1MKph9meM222F+Zkt3bDamyHHJuGi3VPtiRkpyswmQbGA== /run-parallel/1.2.0: dependencies: - queue-microtask: 1.2.2 + queue-microtask: 1.2.3 resolution: integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== /run-queue/1.0.3: @@ -14963,6 +15119,10 @@ packages: node: '>=10' resolution: integrity: sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== + /state-local/1.0.7: + dev: false + resolution: + integrity: sha512-HTEHMNieakEnoe33shBYcZ7NX83ACUjCu8c40iOGEZsngj9zRnkqS9j1pqQPXwobB0ZcVTk27REb7COQ0UR59w== /state-toggle/1.0.3: dev: false resolution: @@ -16327,6 +16487,16 @@ packages: react: ^16.8.0 || ^17.0.0 resolution: integrity: sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg== + /use-immer/0.5.1_immer@9.0.1+react@17.0.1: + dependencies: + immer: 9.0.1 + react: 17.0.1 + dev: false + peerDependencies: + immer: '>=2.0.0' + react: ^16.8.0 || ^17.0.1 + resolution: + integrity: sha512-Orb7PokM+jiLQfA1oJ3B3P7Guq0c2IxUHHmBpLeEMnJiz4ZOMlj9mkqq6D7iXJsnurRX0EOB134annf3RjEWHw== /use-isomorphic-layout-effect/1.1.1_@types+react@17.0.3+react@17.0.1: dependencies: '@types/react': 17.0.3 diff --git a/website/.eslintrc.js b/website/.eslintrc.js index 1d9438372..5d1ccfb3f 100644 --- a/website/.eslintrc.js +++ b/website/.eslintrc.js @@ -17,6 +17,7 @@ module.exports = { "@theme/Layout", "@theme/CodeBlock", "@theme/hooks/usePrismTheme", + "@theme/hooks/useThemeContext", "@docusaurus/Link", "@docusaurus/useDocusaurusContext", "@docusaurus/useBaseUrl" diff --git a/website/babel.config.js b/website/babel.config.js index df99bdba1..10827a3d5 100644 --- a/website/babel.config.js +++ b/website/babel.config.js @@ -1,3 +1,4 @@ module.exports = { - presets: [require.resolve("@docusaurus/core/lib/babel/preset")] + presets: [require.resolve("@docusaurus/core/lib/babel/preset")], + plugins: ["lodash"] }; diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index aa3a50219..eb6a0c736 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -34,6 +34,7 @@ module.exports = { docId: "api/modules" }, { to: "blog", label: "Blog", position: "left" }, + { to: "play", label: "Playground", position: "left" }, { href: githubUrl, label: "GitHub", @@ -77,5 +78,8 @@ module.exports = { } ] ], - plugins: ["docusaurus-plugin-sass"] + plugins: [ + "docusaurus-plugin-sass", + require.resolve("./plugins/lodash-webpack-plugin") + ] }; diff --git a/website/package.json b/website/package.json index 9155aaf88..deeb723c5 100644 --- a/website/package.json +++ b/website/package.json @@ -29,16 +29,23 @@ "dependencies": { "@docusaurus/core": "2.0.0-alpha.71", "@docusaurus/preset-classic": "2.0.0-alpha.71", + "@kosko/env": "workspace:*", + "@kosko/generate": "workspace:*", "@mdx-js/react": "^1.6.22", + "@monaco-editor/react": "^4.1.1", "clsx": "^1.1.1", "docusaurus-plugin-sass": "^0.1.12", + "es-module-lexer": "^0.4.1", "fs-extra": "^9.1.0", "globby": "^11.0.2", + "immer": "^9.0.1", "lodash": "^4.17.20", + "monaco-editor": "^0.23.0", "prism-react-renderer": "^1.1.1", "react": "^17.0.1", "react-dom": "^17.0.1", - "react-icons": "^4.1.0" + "react-icons": "^4.1.0", + "use-immer": "^0.5.1" }, "devDependencies": { "@docusaurus/module-type-aliases": "2.0.0-alpha.71", @@ -47,9 +54,13 @@ "@types/react": "^17.0.0", "@types/react-helmet": "^6.1.0", "@types/react-router-dom": "^5.1.7", + "@types/systemjs": "^6.1.0", + "babel-plugin-lodash": "^3.3.4", + "lodash-webpack-plugin": "^0.11.6", "raw-loader": "^4.0.2", "read-pkg": "^5.2.0", "resolve-pkg": "^2.0.0", + "rollup": "^2.45.2", "sass-loader": "^10.0.2", "typedoc": "^0.20.28", "typedoc-plugin-markdown": "~3.5.0", diff --git a/website/plugins/lodash-webpack-plugin/index.js b/website/plugins/lodash-webpack-plugin/index.js new file mode 100644 index 000000000..2ac00214f --- /dev/null +++ b/website/plugins/lodash-webpack-plugin/index.js @@ -0,0 +1,15 @@ +/* eslint-disable node/no-unpublished-require */ +"use strict"; + +const LodashModuleReplacementPlugin = require("lodash-webpack-plugin"); + +module.exports = function () { + return { + name: "lodash-webpack-plugin", + configureWebpack() { + return { + plugins: [new LodashModuleReplacementPlugin()] + }; + } + }; +}; diff --git a/website/src/components/Playground/Container/index.tsx b/website/src/components/Playground/Container/index.tsx new file mode 100644 index 000000000..f7127b71f --- /dev/null +++ b/website/src/components/Playground/Container/index.tsx @@ -0,0 +1,24 @@ +import React, { FunctionComponent, useLayoutEffect, useRef } from "react"; +import styles from "./styles.module.scss"; + +const Container: FunctionComponent = ({ children }) => { + const ref = useRef(); + + useLayoutEffect(() => { + if (!ref.current) return; + + ref.current.parentElement.classList.add(styles.wrapper); + + return () => { + ref.current.parentElement.classList.remove(styles.wrapper); + }; + }, [ref]); + + return ( +
+ {children} +
+ ); +}; + +export default Container; diff --git a/website/src/components/Playground/Container/styles.module.scss b/website/src/components/Playground/Container/styles.module.scss new file mode 100644 index 000000000..ce3c073cb --- /dev/null +++ b/website/src/components/Playground/Container/styles.module.scss @@ -0,0 +1,9 @@ +.wrapper { + display: flex; +} + +.main { + flex: 1; + display: flex; + flex-direction: column; +} diff --git a/website/src/components/Playground/Editor/index.tsx b/website/src/components/Playground/Editor/index.tsx new file mode 100644 index 000000000..5d45502b3 --- /dev/null +++ b/website/src/components/Playground/Editor/index.tsx @@ -0,0 +1,29 @@ +import React, { FunctionComponent, useMemo } from "react"; +import styles from "./styles.module.scss"; +import { usePlayground } from "../context"; +import MonacoEditor from "../MonacoEditor"; + +const Editor: FunctionComponent = () => { + const { + value: { activePath, files }, + updateValue + } = usePlayground(); + const value = useMemo(() => files[activePath], [activePath, files]); + + return ( +
+ { + updateValue((draft) => { + draft.files[activePath] = value; + }); + }} + /> +
+ ); +}; + +export default Editor; diff --git a/website/src/components/Playground/Editor/styles.module.scss b/website/src/components/Playground/Editor/styles.module.scss new file mode 100644 index 000000000..a8e2242b1 --- /dev/null +++ b/website/src/components/Playground/Editor/styles.module.scss @@ -0,0 +1,3 @@ +.container { + flex: 1; +} diff --git a/website/src/components/Playground/MonacoEditor/index.tsx b/website/src/components/Playground/MonacoEditor/index.tsx new file mode 100644 index 000000000..629a35704 --- /dev/null +++ b/website/src/components/Playground/MonacoEditor/index.tsx @@ -0,0 +1,25 @@ +import React, { FunctionComponent } from "react"; +import Editor, { EditorProps } from "@monaco-editor/react"; +// eslint-disable-next-line node/no-missing-import +import useThemeContext from "@theme/hooks/useThemeContext"; + +const MonacoEditor: FunctionComponent = ({ + options, + ...props +}) => { + const { isDarkTheme } = useThemeContext(); + + return ( + + ); +}; + +export default MonacoEditor; diff --git a/website/src/components/Playground/Preview/executeModule.ts b/website/src/components/Playground/Preview/executeModule.ts new file mode 100644 index 000000000..8a66e6a8f --- /dev/null +++ b/website/src/components/Playground/Preview/executeModule.ts @@ -0,0 +1,10 @@ +export default function executeModule(code: string): HTMLScriptElement { + const script = document.createElement("script"); + + script.type = "module"; + script.innerHTML = code; + + document.body.appendChild(script); + + return script; +} diff --git a/website/src/components/Playground/Preview/generateBundle.ts b/website/src/components/Playground/Preview/generateBundle.ts new file mode 100644 index 000000000..98cf00225 --- /dev/null +++ b/website/src/components/Playground/Preview/generateBundle.ts @@ -0,0 +1,145 @@ +import type { Plugin } from "rollup"; +import { init, parse } from "es-module-lexer"; +import { + basename, + dirname, + extname, + isAbsolute, + isRelative, + relative +} from "../../../utils/path"; + +const SYSTEM_DIR = "/.kosko"; +const ENTRY_ID = `${SYSTEM_DIR}/entry.js`; + +function isURL(url: string): boolean { + return url.includes(":"); +} + +function generateEntry({ + files, + component, + environment, + callbackId +}: Omit): string { + return ` +import env, { createAsyncLoaderReducers } from "@kosko/env"; +import { resolve, print, PrintFormat } from "@kosko/generate"; + +env.setReducers(() => createAsyncLoaderReducers({ + global: () => import("/environments/${environment}/index.js").then(mod => mod.default), + component: (name) => { + switch (name) { + ${Object.keys(files) + .filter((path) => path.startsWith(`/environments/${environment}/`)) + .map((path) => { + const name = basename(path, extname(path)); + return `case "${name}": return import("${path}").then(mod => mod.default);`; + }) + .join("\n")} + } + } +})); + +const manifests = await resolve(import("./components/${component}.js").then(mod => mod.default)); +const result = []; + +print({ manifests }, { + format: PrintFormat.YAML, + writer: { + write(data) { + result.push(data); + } + } +}); + +if (typeof window.${callbackId} === "function") { + window.${callbackId}(result.join("")); +} +`; +} + +function createResolveImportPlugin(files: Record): Plugin { + return { + name: "resolve-import", + resolveId(source, importer) { + if (isAbsolute(source)) { + return source; + } + + if (isRelative(source)) { + const path = "/" + relative(dirname(importer), source); + return path; + } + + if (isURL(source)) { + return false; + } + + return { + id: `https://cdn.skypack.dev/${source}`, + external: true + }; + }, + load(id) { + if (files[id] != null) { + return files[id]; + } + } + }; +} + +function createWrapChunkPlugin(): Plugin { + return { + name: "wrap-chunk", + renderChunk(code) { + const [imports] = parse(code); + if (!imports.length) return code; + + const lastImport = imports[imports.length - 1]; + const endOfImportStatement = lastImport.se; + const importStatements = code.substring(0, endOfImportStatement); + const wrapperContent = code.substring(endOfImportStatement + 1); + + return `${importStatements};(async () => {${wrapperContent}})();`; + } + }; +} + +interface BundleOptions { + rollup: typeof import("rollup"); + files: Record; + component: string; + environment: string; + callbackId: string; +} + +export default async function generateBundle({ + rollup, + files, + component, + environment, + callbackId +}: BundleOptions) { + await init; + + const build = await rollup.rollup({ + input: ENTRY_ID, + plugins: [ + createResolveImportPlugin({ + ...files, + [ENTRY_ID]: generateEntry({ files, component, environment, callbackId }) + }) + ], + onwarn(warning) { + console.warn(warning); + } + }); + + const result = await build.generate({ + inlineDynamicImports: true, + plugins: [createWrapChunkPlugin()] + }); + + return result.output[0].code; +} diff --git a/website/src/components/Playground/Preview/index.tsx b/website/src/components/Playground/Preview/index.tsx new file mode 100644 index 000000000..cc01ac5cf --- /dev/null +++ b/website/src/components/Playground/Preview/index.tsx @@ -0,0 +1,61 @@ +import React, { FunctionComponent, useEffect, useState } from "react"; +import { usePlayground } from "../context"; +import styles from "./styles.module.scss"; +import useRollup from "../hooks/useRollup"; +import generateBundle from "./generateBundle"; +import executeModule from "./executeModule"; +import MonacoEditor from "../MonacoEditor"; + +let CALLBACK_ID = 0; + +const Preview: FunctionComponent = () => { + const rollup = useRollup(); + const [code, setCode] = useState(""); + const { + value: { component, environment, files } + } = usePlayground(); + + useEffect(() => { + if (!rollup) return; + + const callbackId = `__koskoPreview${CALLBACK_ID++}`; + let scriptElement: HTMLScriptElement | undefined; + let canceled = false; + + (window as any)[callbackId] = (result) => { + if (canceled) return; + setCode(result); + }; + + (async () => { + const result = await generateBundle({ + rollup, + files, + component, + environment, + callbackId + }); + + scriptElement = executeModule(result); + scriptElement.id = callbackId; + })(); + + return () => { + canceled = true; + + delete (window as any)[callbackId]; + + if (scriptElement) { + scriptElement.remove(); + } + }; + }, [rollup, files, component, environment]); + + return ( +
+ +
+ ); +}; + +export default Preview; diff --git a/website/src/components/Playground/Preview/styles.module.scss b/website/src/components/Playground/Preview/styles.module.scss new file mode 100644 index 000000000..a8e2242b1 --- /dev/null +++ b/website/src/components/Playground/Preview/styles.module.scss @@ -0,0 +1,3 @@ +.container { + flex: 1; +} diff --git a/website/src/components/Playground/Sidebar/Tree.tsx b/website/src/components/Playground/Sidebar/Tree.tsx new file mode 100644 index 000000000..e3e776047 --- /dev/null +++ b/website/src/components/Playground/Sidebar/Tree.tsx @@ -0,0 +1,36 @@ +import React, { FunctionComponent } from "react"; +import cx from "clsx"; +import { usePlayground } from "../context"; +import styles from "./styles.module.scss"; + +const Tree: FunctionComponent<{ + files: string[]; +}> = ({ files }) => { + const { + value: { activePath }, + updateValue + } = usePlayground(); + + return ( +
+ {files.map((file) => ( + + ))} +
+ ); +}; + +export default Tree; diff --git a/website/src/components/Playground/Sidebar/index.tsx b/website/src/components/Playground/Sidebar/index.tsx new file mode 100644 index 000000000..4290e64a7 --- /dev/null +++ b/website/src/components/Playground/Sidebar/index.tsx @@ -0,0 +1,19 @@ +import React, { FunctionComponent, useMemo } from "react"; +import { usePlayground } from "../context"; +import styles from "./styles.module.scss"; +import Tree from "./Tree"; + +const Sidebar: FunctionComponent = () => { + const { + value: { files } + } = usePlayground(); + const fileNames = useMemo(() => Object.keys(files), [files]); + + return ( + + ); +}; + +export default Sidebar; diff --git a/website/src/components/Playground/Sidebar/styles.module.scss b/website/src/components/Playground/Sidebar/styles.module.scss new file mode 100644 index 000000000..fb85f1775 --- /dev/null +++ b/website/src/components/Playground/Sidebar/styles.module.scss @@ -0,0 +1,7 @@ +.container { + width: 250px; +} + +.activeFile { + font-weight: bold; +} diff --git a/website/src/components/Playground/Toolbar/index.tsx b/website/src/components/Playground/Toolbar/index.tsx new file mode 100644 index 000000000..43b7e1735 --- /dev/null +++ b/website/src/components/Playground/Toolbar/index.tsx @@ -0,0 +1,8 @@ +import React, { FunctionComponent } from "react"; +import styles from "./styles.module.scss"; + +const Toolbar: FunctionComponent = () => { + return ; +}; + +export default Toolbar; diff --git a/website/src/components/Playground/Toolbar/styles.module.scss b/website/src/components/Playground/Toolbar/styles.module.scss new file mode 100644 index 000000000..35f649a8d --- /dev/null +++ b/website/src/components/Playground/Toolbar/styles.module.scss @@ -0,0 +1,3 @@ +.container { + height: 40px; +} diff --git a/website/src/components/Playground/context.tsx b/website/src/components/Playground/context.tsx new file mode 100644 index 000000000..920ec3b50 --- /dev/null +++ b/website/src/components/Playground/context.tsx @@ -0,0 +1,62 @@ +import React, { + createContext, + FunctionComponent, + useContext, + useMemo +} from "react"; +import { noop } from "lodash"; +import { Draft } from "immer"; +import { useImmer } from "use-immer"; + +interface ContextValue { + activePath: string; + files: Record; + component: string; + environment: string; +} + +const PlaygroundContext = createContext<{ + value: ContextValue; + updateValue(callback: (draft: Draft) => void): void; +}>({ + value: { + activePath: "", + files: {}, + component: "", + environment: "" + }, + updateValue: noop +}); + +export function usePlayground() { + return useContext(PlaygroundContext); +} + +export const PlaygroundProvider: FunctionComponent = ({ children }) => { + const [value, updateValue] = useImmer(() => ({ + activePath: "/components/nginx.js", + files: { + /* eslint-disable @typescript-eslint/no-var-requires */ + "/components/nginx.js": require("!!raw-loader!./fixtures/components/nginx.js") + .default, + "/environments/dev/index.js": require("!!raw-loader!./fixtures/environments/dev/index.js") + .default, + "/environments/dev/nginx.js": require("!!raw-loader!./fixtures/environments/dev/nginx.js") + .default, + "/environments/prod/index.js": require("!!raw-loader!./fixtures/environments/prod/index.js") + .default, + "/environments/prod/nginx.js": require("!!raw-loader!./fixtures/environments/prod/nginx.js") + .default + /* eslint-enable @typescript-eslint/no-var-requires */ + }, + component: "nginx", + environment: "dev" + })); + const ctx = useMemo(() => ({ value, updateValue }), [value, updateValue]); + + return ( + + {children} + + ); +}; diff --git a/website/src/components/Playground/fixtures/.eslintrc b/website/src/components/Playground/fixtures/.eslintrc new file mode 100644 index 000000000..f34cb12b0 --- /dev/null +++ b/website/src/components/Playground/fixtures/.eslintrc @@ -0,0 +1,6 @@ +{ + "extends": "../../../../.eslintrc", + "rules": { + "node/no-extraneous-import": "off" + } +} diff --git a/website/src/components/Playground/fixtures/components/nginx.js b/website/src/components/Playground/fixtures/components/nginx.js new file mode 100644 index 000000000..aa0141e7f --- /dev/null +++ b/website/src/components/Playground/fixtures/components/nginx.js @@ -0,0 +1,52 @@ +import { Deployment } from "kubernetes-models/apps/v1/Deployment"; +import { Service } from "kubernetes-models/v1/Service"; +import env from "@kosko/env"; + +const params = await env.component("nginx"); + +const metadata = { name: "nginx" }; +const labels = { app: "nginx" }; + +const deployment = new Deployment({ + metadata, + spec: { + replicas: params.replicas, + selector: { + matchLabels: labels + }, + template: { + metadata: { + labels + }, + spec: { + containers: [ + { + image: `${params.imageRegistry}/nginx:${params.imageTag}`, + name: "nginx", + ports: [ + { + containerPort: 80 + } + ] + } + ] + } + } + } +}); + +const service = new Service({ + metadata, + spec: { + selector: labels, + type: "ClusterIP", + ports: [ + { + port: 80, + targetPort: 80 + } + ] + } +}); + +export default [deployment, service]; diff --git a/website/src/components/Playground/fixtures/environments/dev/index.js b/website/src/components/Playground/fixtures/environments/dev/index.js new file mode 100644 index 000000000..6c4aecf9e --- /dev/null +++ b/website/src/components/Playground/fixtures/environments/dev/index.js @@ -0,0 +1,3 @@ +export default { + imageRegistry: "gcr.io/image-dev" +}; diff --git a/website/src/components/Playground/fixtures/environments/dev/nginx.js b/website/src/components/Playground/fixtures/environments/dev/nginx.js new file mode 100644 index 000000000..1f8bc294b --- /dev/null +++ b/website/src/components/Playground/fixtures/environments/dev/nginx.js @@ -0,0 +1,4 @@ +export default { + replicas: 1, + imageTag: "latest" +}; diff --git a/website/src/components/Playground/fixtures/environments/prod/index.js b/website/src/components/Playground/fixtures/environments/prod/index.js new file mode 100644 index 000000000..71fbe9377 --- /dev/null +++ b/website/src/components/Playground/fixtures/environments/prod/index.js @@ -0,0 +1,3 @@ +export default { + imageRegistry: "gcr.io/image-prod" +}; diff --git a/website/src/components/Playground/fixtures/environments/prod/nginx.js b/website/src/components/Playground/fixtures/environments/prod/nginx.js new file mode 100644 index 000000000..9f50b4ffe --- /dev/null +++ b/website/src/components/Playground/fixtures/environments/prod/nginx.js @@ -0,0 +1,4 @@ +export default { + replicas: 3, + imageTag: "stable" +}; diff --git a/website/src/components/Playground/hooks/useRollup.ts b/website/src/components/Playground/hooks/useRollup.ts new file mode 100644 index 000000000..67d665b17 --- /dev/null +++ b/website/src/components/Playground/hooks/useRollup.ts @@ -0,0 +1,12 @@ +import type * as rollup from "rollup"; +import useScript, { ScriptLoadStatus } from "../../../hooks/useScript"; + +export default function useRollup(): typeof rollup | undefined { + const status = useScript( + "https://unpkg.com/rollup@2.45.2/dist/rollup.browser.js" + ); + + if (status !== ScriptLoadStatus.Ready) return; + + return (window as any).rollup; +} diff --git a/website/src/components/Playground/index.tsx b/website/src/components/Playground/index.tsx new file mode 100644 index 000000000..883101118 --- /dev/null +++ b/website/src/components/Playground/index.tsx @@ -0,0 +1,38 @@ +import React, { FunctionComponent } from "react"; +import Layout from "@theme/Layout"; +import Container from "./Container"; +import Toolbar from "./Toolbar"; +import Sidebar from "./Sidebar"; +import Editor from "./Editor"; +import Preview from "./Preview"; +import { PlaygroundProvider } from "./context"; +import styles from "./styles.module.scss"; +import useRollup from "./hooks/useRollup"; + +const Content: FunctionComponent = () => { + return ( + + +
+ + + +
+
+ ); +}; + +const Playground: FunctionComponent = () => { + // Load rollup before loading other components in order to make sure + // rollup will be injected into `window.rollup`. Because monaco may set + // `window.require` which makes rollup feels it is a CommonJS environment. + const rollup = useRollup(); + + return ( + + {rollup && } + + ); +}; + +export default Playground; diff --git a/website/src/components/Playground/styles.module.scss b/website/src/components/Playground/styles.module.scss new file mode 100644 index 000000000..4f5d6b2e2 --- /dev/null +++ b/website/src/components/Playground/styles.module.scss @@ -0,0 +1,5 @@ +.main { + flex: 1; + display: flex; + overflow: hidden; +} diff --git a/website/src/hooks/useScript.ts b/website/src/hooks/useScript.ts new file mode 100644 index 000000000..bd84f75e2 --- /dev/null +++ b/website/src/hooks/useScript.ts @@ -0,0 +1,86 @@ +import { useState, useEffect } from "react"; + +export enum ScriptLoadStatus { + Idle = "idle", + Loading = "loading", + Ready = "ready", + Error = "error" +} + +// Source: https://usehooks.com/useScript/ +export default function useScript(src: string): ScriptLoadStatus { + // Keep track of script status ("idle", "loading", "ready", "error") + const [status, setStatus] = useState( + src ? ScriptLoadStatus.Loading : ScriptLoadStatus.Idle + ); + + useEffect( + () => { + // Allow falsy src value if waiting on other data needed for + // constructing the script URL passed to this hook. + if (!src) { + setStatus(ScriptLoadStatus.Idle); + return; + } + + // Fetch existing script element by src + // It may have been added by another intance of this hook + let script: HTMLScriptElement = document.querySelector( + `script[src="${src}"]` + ); + + if (!script) { + // Create script + script = document.createElement("script"); + script.src = src; + script.async = true; + script.setAttribute("data-status", ScriptLoadStatus.Loading); + // Add script to document body + document.body.appendChild(script); + + // Store status in attribute on script + // This can be read by other instances of this hook + const setAttributeFromEvent = (event) => { + script.setAttribute( + "data-status", + event.type === "load" + ? ScriptLoadStatus.Ready + : ScriptLoadStatus.Error + ); + }; + + script.addEventListener("load", setAttributeFromEvent); + script.addEventListener("error", setAttributeFromEvent); + } else { + // Grab existing script status from attribute and set to state. + setStatus(script.getAttribute("data-status") as ScriptLoadStatus); + } + + // Script event handler to update status in state + // Note: Even if the script already exists we still need to add + // event handlers to update the state for *this* hook instance. + const setStateFromEvent = (event) => { + setStatus( + event.type === "load" + ? ScriptLoadStatus.Ready + : ScriptLoadStatus.Error + ); + }; + + // Add event listeners + script.addEventListener("load", setStateFromEvent); + script.addEventListener("error", setStateFromEvent); + + // Remove event listeners on cleanup + return () => { + if (script) { + script.removeEventListener("load", setStateFromEvent); + script.removeEventListener("error", setStateFromEvent); + } + }; + }, + [src] // Only re-run effect if script src changes + ); + + return status; +} diff --git a/website/src/pages/play.tsx b/website/src/pages/play.tsx new file mode 100644 index 000000000..161591eca --- /dev/null +++ b/website/src/pages/play.tsx @@ -0,0 +1,3 @@ +import Playground from "../components/Playground"; + +export default Playground; diff --git a/website/src/utils/path.ts b/website/src/utils/path.ts new file mode 100644 index 000000000..5d988a3db --- /dev/null +++ b/website/src/utils/path.ts @@ -0,0 +1,56 @@ +export function isAbsolute(path: string): boolean { + return path.startsWith("/"); +} + +export function isRelative(path: string): boolean { + return path.startsWith("./") || path.startsWith("../"); +} + +export function dirname(path: string): string { + const index = path.lastIndexOf("/"); + if (index === -1) return path; + return path.substring(0, index - 1) || "/"; +} + +export function extname(path: string): string { + const index = path.lastIndexOf("."); + if (index === -1) return ""; + return path.substring(index); +} + +export function basename(path: string, ext?: string): string { + const index = path.lastIndexOf("/"); + if (index === -1) return ""; + + const base = path.substring(index + 1); + + if (base.endsWith(ext)) { + return base.substring(0, base.length - ext.length); + } + + return base; +} + +export function relative(from: string, to: string): string { + const fromParts = from.split("/").filter(Boolean); + const toParts = to.split("/").filter(Boolean); + + while (fromParts[0] && toParts[0]) { + fromParts.shift(); + toParts.shift(); + } + + while (toParts[0] === "." || toParts[0] === "..") { + const toPart = toParts.shift(); + + if (toPart === "..") { + fromParts.pop(); + } + } + + while (fromParts.pop()) { + toParts.unshift(".."); + } + + return toParts.join("/"); +} From e4c2f13fa20226ecd840fec9e21097d2203585ac Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Thu, 22 Apr 2021 23:25:50 +0800 Subject: [PATCH 02/36] docs(website): Use sync environment --- pnpm-lock.yaml | 3 +- website/package.json | 1 - .../Playground/Preview/generateBundle.ts | 162 ++++++++++-------- .../Playground/fixtures/components/nginx.js | 2 +- 4 files changed, 96 insertions(+), 72 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 693ef7862..6670b8799 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -456,7 +456,6 @@ importers: '@monaco-editor/react': 4.1.1_f093545f51687bd95e04fbf414b6aba1 clsx: 1.1.1 docusaurus-plugin-sass: 0.1.12_@docusaurus+core@2.0.0-alpha.71 - es-module-lexer: 0.4.1 fs-extra: 9.1.0 globby: 11.0.2 immer: 9.0.1 @@ -502,7 +501,6 @@ importers: babel-plugin-lodash: ^3.3.4 clsx: ^1.1.1 docusaurus-plugin-sass: ^0.1.12 - es-module-lexer: ^0.4.1 fs-extra: ^9.1.0 globby: ^11.0.2 immer: ^9.0.1 @@ -6894,6 +6892,7 @@ packages: resolution: integrity: sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== /es-module-lexer/0.4.1: + dev: true resolution: integrity: sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== /es-to-primitive/1.2.1: diff --git a/website/package.json b/website/package.json index deeb723c5..f707635fa 100644 --- a/website/package.json +++ b/website/package.json @@ -35,7 +35,6 @@ "@monaco-editor/react": "^4.1.1", "clsx": "^1.1.1", "docusaurus-plugin-sass": "^0.1.12", - "es-module-lexer": "^0.4.1", "fs-extra": "^9.1.0", "globby": "^11.0.2", "immer": "^9.0.1", diff --git a/website/src/components/Playground/Preview/generateBundle.ts b/website/src/components/Playground/Preview/generateBundle.ts index 98cf00225..8d3cccccf 100644 --- a/website/src/components/Playground/Preview/generateBundle.ts +++ b/website/src/components/Playground/Preview/generateBundle.ts @@ -1,5 +1,4 @@ import type { Plugin } from "rollup"; -import { init, parse } from "es-module-lexer"; import { basename, dirname, @@ -10,58 +9,89 @@ import { } from "../../../utils/path"; const SYSTEM_DIR = "/.kosko"; -const ENTRY_ID = `${SYSTEM_DIR}/entry.js`; +const SYSTEM_ENTRY_ID = `${SYSTEM_DIR}/entry.js`; +const SYSTEM_ENV_ID = `${SYSTEM_DIR}/env.js`; +const KOSKO_ENV_BARE_SPECIFIER = "@kosko/env"; + +interface BundleOptions { + rollup: typeof import("rollup"); + files: Record; + component: string; + environment: string; + callbackId: string; +} function isURL(url: string): boolean { return url.includes(":"); } +function getModuleURLForCDN(module: string) { + return `https://cdn.skypack.dev/${module}`; +} + function generateEntry({ - files, component, - environment, callbackId -}: Omit): string { +}: Pick): string { return ` -import env, { createAsyncLoaderReducers } from "@kosko/env"; +import "${SYSTEM_ENV_ID}"; import { resolve, print, PrintFormat } from "@kosko/generate"; +import component from "/components/${component}.js"; + +(async () => { + const manifests = await resolve(component); + const result = []; -env.setReducers(() => createAsyncLoaderReducers({ - global: () => import("/environments/${environment}/index.js").then(mod => mod.default), - component: (name) => { - switch (name) { - ${Object.keys(files) - .filter((path) => path.startsWith(`/environments/${environment}/`)) - .map((path) => { - const name = basename(path, extname(path)); - return `case "${name}": return import("${path}").then(mod => mod.default);`; - }) - .join("\n")} + print({ manifests }, { + format: PrintFormat.YAML, + writer: { + write(data) { + result.push(data); + } } + }); + + if (typeof window[${JSON.stringify(callbackId)}] === "function") { + window[${JSON.stringify(callbackId)}](result.join("")); } -})); +})(); +`; +} -const manifests = await resolve(import("./components/${component}.js").then(mod => mod.default)); -const result = []; +function generateEnvModule({ + files, + environment +}: Pick): string { + const koskoEnv = getModuleURLForCDN(KOSKO_ENV_BARE_SPECIFIER); + const envs = Object.keys(files) + .filter( + (path) => + path.startsWith(`/environments/${environment}/`) && + extname(path) === ".js" + ) + .map((path) => [basename(path, extname(path)), path] as const); -print({ manifests }, { - format: PrintFormat.YAML, - writer: { - write(data) { - result.push(data); - } - } -}); + return ` +import { createSyncEnvironment, createSyncLoaderReducers } from "${koskoEnv}"; +${envs.map(([, path], i) => `import env${i} from "${path}";`).join("\n")} -if (typeof window.${callbackId} === "function") { - window.${callbackId}(result.join("")); -} +const envMap = { + ${envs.map(([name], i) => `"${name}": env${i}`).join(",\n")} +}; +const env = createSyncEnvironment(); + +env.setReducers(reducers => reducers.concat(createSyncLoaderReducers({ + global: () => envMap.index || {}, + component: (name) => envMap[name] || {}, +}))); + +export default env; `; } -function createResolveImportPlugin(files: Record): Plugin { +function createVirtualFSPlugin(files: Record): Plugin { return { - name: "resolve-import", + name: "virtual-fs", resolveId(source, importer) { if (isAbsolute(source)) { return source; @@ -71,15 +101,6 @@ function createResolveImportPlugin(files: Record): Plugin { const path = "/" + relative(dirname(importer), source); return path; } - - if (isURL(source)) { - return false; - } - - return { - id: `https://cdn.skypack.dev/${source}`, - external: true - }; }, load(id) { if (files[id] != null) { @@ -89,29 +110,34 @@ function createResolveImportPlugin(files: Record): Plugin { }; } -function createWrapChunkPlugin(): Plugin { +function createCDNResolvePlugin(): Plugin { return { - name: "wrap-chunk", - renderChunk(code) { - const [imports] = parse(code); - if (!imports.length) return code; + name: "cdn-resolve", + resolveId(source) { + if (isRelative(source) || isAbsolute(source)) { + return; + } - const lastImport = imports[imports.length - 1]; - const endOfImportStatement = lastImport.se; - const importStatements = code.substring(0, endOfImportStatement); - const wrapperContent = code.substring(endOfImportStatement + 1); + if (isURL(source)) { + return false; + } - return `${importStatements};(async () => {${wrapperContent}})();`; + return { + id: getModuleURLForCDN(source), + external: true + }; } }; } -interface BundleOptions { - rollup: typeof import("rollup"); - files: Record; - component: string; - environment: string; - callbackId: string; +function createAliasResolvePlugin(aliases: Record): Plugin { + return { + name: "alias-resolve", + resolveId(source) { + const alias = aliases[source]; + if (alias) return alias; + } + }; } export default async function generateBundle({ @@ -121,25 +147,25 @@ export default async function generateBundle({ environment, callbackId }: BundleOptions) { - await init; - const build = await rollup.rollup({ - input: ENTRY_ID, + input: SYSTEM_ENTRY_ID, plugins: [ - createResolveImportPlugin({ + createAliasResolvePlugin({ + [KOSKO_ENV_BARE_SPECIFIER]: SYSTEM_ENV_ID + }), + createVirtualFSPlugin({ ...files, - [ENTRY_ID]: generateEntry({ files, component, environment, callbackId }) - }) + [SYSTEM_ENTRY_ID]: generateEntry({ component, callbackId }), + [SYSTEM_ENV_ID]: generateEnvModule({ files, environment }) + }), + createCDNResolvePlugin() ], onwarn(warning) { console.warn(warning); } }); - const result = await build.generate({ - inlineDynamicImports: true, - plugins: [createWrapChunkPlugin()] - }); + const result = await build.generate({}); return result.output[0].code; } diff --git a/website/src/components/Playground/fixtures/components/nginx.js b/website/src/components/Playground/fixtures/components/nginx.js index aa0141e7f..ab2f6a62a 100644 --- a/website/src/components/Playground/fixtures/components/nginx.js +++ b/website/src/components/Playground/fixtures/components/nginx.js @@ -2,7 +2,7 @@ import { Deployment } from "kubernetes-models/apps/v1/Deployment"; import { Service } from "kubernetes-models/v1/Service"; import env from "@kosko/env"; -const params = await env.component("nginx"); +const params = env.component("nginx"); const metadata = { name: "nginx" }; const labels = { app: "nginx" }; From a717d127b47c908009448e79d85f6ed137a53942 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Thu, 22 Apr 2021 23:56:25 +0800 Subject: [PATCH 03/36] docs(website): Load Rollup with Webpack --- pnpm-lock.yaml | 197 ++++++++++++++++++ website/package.json | 1 + .../components/Playground/Editor/index.tsx | 5 + .../components/Playground/Preview/alias.ts | 13 ++ .../Playground/Preview/cdnResolve.ts | 30 +++ .../Playground/Preview/generateBundle.ts | 81 +------ .../components/Playground/Preview/index.tsx | 25 ++- .../Playground/Preview/virtualFS.ts | 25 +++ website/src/components/Playground/context.tsx | 7 +- .../components/Playground/hooks/useRollup.ts | 12 -- website/src/components/Playground/index.tsx | 30 +-- 11 files changed, 312 insertions(+), 114 deletions(-) create mode 100644 website/src/components/Playground/Preview/alias.ts create mode 100644 website/src/components/Playground/Preview/cdnResolve.ts create mode 100644 website/src/components/Playground/Preview/virtualFS.ts delete mode 100644 website/src/components/Playground/hooks/useRollup.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6670b8799..b1c204a61 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -465,6 +465,7 @@ importers: react: 17.0.1 react-dom: 17.0.1_react@17.0.1 react-icons: 4.2.0_react@17.0.1 + react-use: 17.2.3_react-dom@17.0.1+react@17.0.1 use-immer: 0.5.1_immer@9.0.1+react@17.0.1 devDependencies: '@docusaurus/module-type-aliases': 2.0.0-alpha.71 @@ -512,6 +513,7 @@ importers: react: ^17.0.1 react-dom: ^17.0.1 react-icons: ^4.1.0 + react-use: ^17.2.3 read-pkg: ^5.2.0 resolve-pkg: ^2.0.0 rollup: ^2.45.2 @@ -1687,6 +1689,12 @@ packages: dev: false resolution: integrity: sha512-p6WSr71+5u/VBf1KDS/Y4dK3ZwbV+DD6wQO3X2EbUVluEOiyXUk09DzcwSaUH4WomYXrEPC+i2rqzuthhZhOJw== + /@babel/runtime/7.13.17: + dependencies: + regenerator-runtime: 0.13.7 + dev: false + resolution: + integrity: sha512-NCdgJEelPTSh+FEFylhnP1ylq848l1z9t9N0j1Lfbcw0+KXGjsTvUmkxy+voLLXB5SOKMbLLx4jxYliGrYQseA== /@babel/runtime/7.13.9: dependencies: regenerator-runtime: 0.13.7 @@ -3258,6 +3266,10 @@ packages: dev: true resolution: integrity: sha512-eeWwWjlqxvBxc4oQdkueW5OF/gtfSceKk4OnOAGlUSwS/liBRtZppbJuz1YkgbrbfGOoeBHun9fOvXnjNwrSOw== + /@types/js-cookie/2.2.6: + dev: false + resolution: + integrity: sha512-+oY0FDTO2GYKEV0YPvSshGq9t7YozVkgvXLty7zogQNuCxBhT9/3INX9Q7H1aRZ4SUDRXAKlJuA4EA5nTt7SNw== /@types/js-yaml/4.0.0: dev: true resolution: @@ -3908,6 +3920,10 @@ packages: optional: true resolution: integrity: sha512-0qXvpeYO6vaNoRBI52/UsbcaBydJCggoBBnIo/ovQQdn6fug0BgwsjorV1hVS7fMqGVTZGcVxv8334gjmbj5hw== + /@xobotyi/scrollbar-width/1.9.5: + dev: false + resolution: + integrity: sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ== /@xtuc/ieee754/1.2.0: resolution: integrity: sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== @@ -5736,6 +5752,12 @@ packages: node: '>=12' resolution: integrity: sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q== + /copy-to-clipboard/3.3.1: + dependencies: + toggle-selection: 1.0.6 + dev: false + resolution: + integrity: sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== /copy-webpack-plugin/6.4.1_webpack@4.46.0: dependencies: cacache: 15.0.5 @@ -5933,6 +5955,13 @@ packages: hasBin: true resolution: integrity: sha512-Z8hnfsZu4o/kt+AuFzeGpLVhFOGO9mluyHBaA2bA8aCGTwah5sT3WV/fTHH8UNZUytOIImuGPrl/prlb4oX4qQ== + /css-in-js-utils/2.0.1: + dependencies: + hyphenate-style-name: 1.0.4 + isobject: 3.0.1 + dev: false + resolution: + integrity: sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA== /css-loader/5.1.1_webpack@4.46.0: dependencies: camelcase: 6.2.0 @@ -6018,6 +6047,15 @@ packages: node: '>=8.0.0' resolution: integrity: sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ== + /css-tree/1.1.3: + dependencies: + mdn-data: 2.0.14 + source-map: 0.6.1 + dev: false + engines: + node: '>=8.0.0' + resolution: + integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== /css-what/2.1.3: dev: false resolution: @@ -6207,6 +6245,10 @@ packages: /csstype/3.0.7: resolution: integrity: sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g== + /csstype/3.0.8: + dev: false + resolution: + integrity: sha512-jXKhWqXPmlUeoQnF/EhTtTl4C9SnrxSH/jZUih3jmO6lBKr99rP3/+FmrMj4EFpOXzMtXHAZkd3x0E6h6Fgflw== /csv-generate/3.3.0: dev: true resolution: @@ -6869,6 +6911,12 @@ packages: is-arrayish: 0.2.1 resolution: integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + /error-stack-parser/2.0.6: + dependencies: + stackframe: 1.2.0 + dev: false + resolution: + integrity: sha512-d51brTeqC+BHlwF0BhPtcYgF5nlzf9ZZ0ZIUQNZpc9ZB9qw5IJ2diTrBY9jlCJkTLITYPjmiX6OWCwH+fuyNgQ== /es-abstract/1.18.0: dependencies: call-bind: 1.0.2 @@ -7536,6 +7584,10 @@ packages: /fast-levenshtein/2.0.6: resolution: integrity: sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + /fast-shallow-equal/1.0.0: + dev: false + resolution: + integrity: sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw== /fast-url-parser/1.1.3: dependencies: punycode: 1.4.1 @@ -7546,6 +7598,10 @@ packages: dev: true resolution: integrity: sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow== + /fastest-stable-stringify/2.0.2: + dev: false + resolution: + integrity: sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q== /fastparse/1.1.2: dev: true resolution: @@ -8868,6 +8924,10 @@ packages: requiresBuild: true resolution: integrity: sha512-LCqqsB0PzJQ/AlCgfrfzRe3e3+NvmefAdKQhRYpxS4u6clblBoDdzzvHi8fmxKRzvMxPY/1WZWzomPZww0Anow== + /hyphenate-style-name/1.0.4: + dev: false + resolution: + integrity: sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ== /iconv-lite/0.4.24: dependencies: safer-buffer: 2.1.2 @@ -9019,6 +9079,12 @@ packages: dev: false resolution: integrity: sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== + /inline-style-prefixer/6.0.0: + dependencies: + css-in-js-utils: 2.0.1 + dev: false + resolution: + integrity: sha512-XTHvRUS4ZJNzC1GixJRmOlWSS45fSt+DJoyQC9ytj0WxQfcgofQtDtyKKYxHUqEsWCs+LIWftPF1ie7+i012Fg== /internal-ip/4.3.0: dependencies: default-gateway: 4.2.0 @@ -10138,6 +10204,10 @@ packages: dev: false resolution: integrity: sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ== + /js-cookie/2.2.1: + dev: false + resolution: + integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== /js-tokens/4.0.0: resolution: integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== @@ -11300,6 +11370,24 @@ packages: /nan/2.14.2: resolution: integrity: sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ== + /nano-css/5.3.1_react-dom@17.0.1+react@17.0.1: + dependencies: + css-tree: 1.1.3 + csstype: 3.0.8 + fastest-stable-stringify: 2.0.2 + inline-style-prefixer: 6.0.0 + react: 17.0.1 + react-dom: 17.0.1_react@17.0.1 + rtl-css-js: 1.14.1 + sourcemap-codec: 1.4.8 + stacktrace-js: 2.0.2 + stylis: 4.0.10 + dev: false + peerDependencies: + react: '*' + react-dom: '*' + resolution: + integrity: sha512-ENPIyNzANQRyYVvb62ajDd7PAyIgS2LIUnT9ewih4yrXSZX4hKoUwssy8WjUH++kEOA5wUTMgNnV7ko5n34kUA== /nanoid/3.1.20: dev: false engines: @@ -13786,6 +13874,40 @@ packages: react-dom: ^15.3.0 || ^16.0.0 resolution: integrity: sha512-+wXlMcSpg8SmnIXauMaZiKpR+r2wp2gMUteroejp2UTSqGTVvZLN+m9EhMzFARBKEw7KpQOwzCyfzeHeAndQGw== + /react-universal-interface/0.6.2_react@17.0.1+tslib@2.2.0: + dependencies: + react: 17.0.1 + tslib: 2.2.0 + dev: false + peerDependencies: + react: '*' + tslib: '*' + resolution: + integrity: sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw== + /react-use/17.2.3_react-dom@17.0.1+react@17.0.1: + dependencies: + '@types/js-cookie': 2.2.6 + '@xobotyi/scrollbar-width': 1.9.5 + copy-to-clipboard: 3.3.1 + fast-deep-equal: 3.1.3 + fast-shallow-equal: 1.0.0 + js-cookie: 2.2.1 + nano-css: 5.3.1_react-dom@17.0.1+react@17.0.1 + react: 17.0.1 + react-dom: 17.0.1_react@17.0.1 + react-universal-interface: 0.6.2_react@17.0.1+tslib@2.2.0 + resize-observer-polyfill: 1.5.1 + screenfull: 5.1.0 + set-harmonic-interval: 1.0.1 + throttle-debounce: 3.0.1 + ts-easing: 0.2.0 + tslib: 2.2.0 + dev: false + peerDependencies: + react: ^16.8.0 || ^17.0.0 + react-dom: ^16.8.0 || ^17.0.0 + resolution: + integrity: sha512-cHLG5mwv9NSkydhlY3J1B/Z5gGzRF43QXzFaMisSaFClg0o1VeWJaYj2d9HJIiTGC+imt47FY4TpnZNRhbOyaQ== /react/17.0.1: dependencies: loose-envify: 1.4.0 @@ -14214,6 +14336,10 @@ packages: /requires-port/1.0.0: resolution: integrity: sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= + /resize-observer-polyfill/1.5.1: + dev: false + resolution: + integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg== /resolve-cwd/2.0.0: dependencies: resolve-from: 3.0.0 @@ -14353,6 +14479,12 @@ packages: node: 6.* || >= 7.* resolution: integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== + /rtl-css-js/1.14.1: + dependencies: + '@babel/runtime': 7.13.17 + dev: false + resolution: + integrity: sha512-G9N1s/6329FpJr8k9e1U/Lg0IDWThv99sb7k0IrXHjSnubxe01h52/ajsPRafJK1/2Vqrhz3VKLe3E1dx6jS9Q== /rtlcss/2.6.2: dependencies: '@choojs/findup': 0.2.1 @@ -14530,6 +14662,12 @@ packages: node: '>= 10.13.0' resolution: integrity: sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA== + /screenfull/5.1.0: + dev: false + engines: + node: '>=0.10.0' + resolution: + integrity: sha512-dYaNuOdzr+kc6J6CFcBrzkLCfyGcMg+gWkJ8us93IQ7y1cevhQAugFsaCdMHb6lw8KV3xPzSxzH7zM1dQap9mA== /scss-tokenizer/0.2.3: dependencies: js-base64: 2.6.4 @@ -14692,6 +14830,12 @@ packages: /set-blocking/2.0.0: resolution: integrity: sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + /set-harmonic-interval/1.0.1: + dev: false + engines: + node: '>=6.9' + resolution: + integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g== /set-value/2.0.1: dependencies: extend-shallow: 2.0.1 @@ -14975,6 +15119,12 @@ packages: node: '>=0.8.0' resolution: integrity: sha1-66T12pwNyZneaAMti092FzZSA2s= + /source-map/0.5.6: + dev: false + engines: + node: '>=0.10.0' + resolution: + integrity: sha1-dc449SvwczxafwwRjYEzSiu19BI= /source-map/0.5.7: engines: node: '>=0.10.0' @@ -14990,6 +15140,10 @@ packages: node: '>= 8' resolution: integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ== + /sourcemap-codec/1.4.8: + dev: false + resolution: + integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== /space-separated-tokens/1.1.5: dev: false resolution: @@ -15102,6 +15256,12 @@ packages: /stable/0.1.8: resolution: integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== + /stack-generator/2.0.5: + dependencies: + stackframe: 1.2.0 + dev: false + resolution: + integrity: sha512-/t1ebrbHkrLrDuNMdeAcsvynWgoH/i4o8EGGfX7dEYDoTXOYVAkEpFdtshlvabzc6JlJ8Kf9YdFEoz7JkzGN9Q== /stack-utils/1.0.4: dependencies: escape-string-regexp: 2.0.0 @@ -15118,6 +15278,25 @@ packages: node: '>=10' resolution: integrity: sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw== + /stackframe/1.2.0: + dev: false + resolution: + integrity: sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA== + /stacktrace-gps/3.0.4: + dependencies: + source-map: 0.5.6 + stackframe: 1.2.0 + dev: false + resolution: + integrity: sha512-qIr8x41yZVSldqdqe6jciXEaSCKw1U8XTXpjDuy0ki/apyTn/r3w9hDAAQOhZdxvsC93H+WwwEu5cq5VemzYeg== + /stacktrace-js/2.0.2: + dependencies: + error-stack-parser: 2.0.6 + stack-generator: 2.0.5 + stacktrace-gps: 3.0.4 + dev: false + resolution: + integrity: sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg== /state-local/1.0.7: dev: false resolution: @@ -15436,6 +15615,10 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== + /stylis/4.0.10: + dev: false + resolution: + integrity: sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg== /superstruct/0.14.2: resolution: integrity: sha512-nPewA6m9mR3d6k7WkZ8N8zpTWfenFH3q9pA2PkuiZxINr9DKB2+40wEQf0ixn8VaGuJ78AB6iWOtStI+/4FKZQ== @@ -15725,6 +15908,12 @@ packages: dev: true resolution: integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA== + /throttle-debounce/3.0.1: + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg== /through/2.3.8: dev: true resolution: @@ -15841,6 +16030,10 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== + /toggle-selection/1.0.6: + dev: false + resolution: + integrity: sha1-bkWxJj8gF/oKzH2J14sVuL932jI= /toidentifier/1.0.0: engines: node: '>=0.6' @@ -15919,6 +16112,10 @@ packages: dev: false resolution: integrity: sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew== + /ts-easing/0.2.0: + dev: false + resolution: + integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ== /ts-essentials/2.0.12: dev: false resolution: diff --git a/website/package.json b/website/package.json index f707635fa..20b64bc5e 100644 --- a/website/package.json +++ b/website/package.json @@ -44,6 +44,7 @@ "react": "^17.0.1", "react-dom": "^17.0.1", "react-icons": "^4.1.0", + "react-use": "^17.2.3", "use-immer": "^0.5.1" }, "devDependencies": { diff --git a/website/src/components/Playground/Editor/index.tsx b/website/src/components/Playground/Editor/index.tsx index 5d45502b3..fde2b4425 100644 --- a/website/src/components/Playground/Editor/index.tsx +++ b/website/src/components/Playground/Editor/index.tsx @@ -16,6 +16,11 @@ const Editor: FunctionComponent = () => { language="javascript" path={activePath} value={value} + onMount={() => { + updateValue((draft) => { + draft.editorMounted = true; + }); + }} onChange={(value) => { updateValue((draft) => { draft.files[activePath] = value; diff --git a/website/src/components/Playground/Preview/alias.ts b/website/src/components/Playground/Preview/alias.ts new file mode 100644 index 000000000..c738d6962 --- /dev/null +++ b/website/src/components/Playground/Preview/alias.ts @@ -0,0 +1,13 @@ +import type { Plugin } from "rollup"; + +export default function createAliasPlugin( + aliases: Record +): Plugin { + return { + name: "alias", + resolveId(source) { + const alias = aliases[source]; + if (alias) return alias; + } + }; +} diff --git a/website/src/components/Playground/Preview/cdnResolve.ts b/website/src/components/Playground/Preview/cdnResolve.ts new file mode 100644 index 000000000..2eeabe17c --- /dev/null +++ b/website/src/components/Playground/Preview/cdnResolve.ts @@ -0,0 +1,30 @@ +import type { Plugin } from "rollup"; +import { isAbsolute, isRelative } from "../../../utils/path"; + +export function getModuleURLForCDN(module: string) { + return `https://cdn.skypack.dev/${module}`; +} + +function isURL(url: string): boolean { + return url.includes(":"); +} + +export default function createCDNResolvePlugin(): Plugin { + return { + name: "cdn-resolve", + resolveId(source) { + if (isRelative(source) || isAbsolute(source)) { + return; + } + + if (isURL(source)) { + return false; + } + + return { + id: getModuleURLForCDN(source), + external: true + }; + } + }; +} diff --git a/website/src/components/Playground/Preview/generateBundle.ts b/website/src/components/Playground/Preview/generateBundle.ts index 8d3cccccf..b19258129 100644 --- a/website/src/components/Playground/Preview/generateBundle.ts +++ b/website/src/components/Playground/Preview/generateBundle.ts @@ -1,12 +1,8 @@ -import type { Plugin } from "rollup"; -import { - basename, - dirname, - extname, - isAbsolute, - isRelative, - relative -} from "../../../utils/path"; +import type rollupType from "rollup"; +import { basename, extname } from "../../../utils/path"; +import createVirtualFSPlugin from "./virtualFS"; +import createCDNResolvePlugin, { getModuleURLForCDN } from "./cdnResolve"; +import createAliasPlugin from "./alias"; const SYSTEM_DIR = "/.kosko"; const SYSTEM_ENTRY_ID = `${SYSTEM_DIR}/entry.js`; @@ -14,21 +10,12 @@ const SYSTEM_ENV_ID = `${SYSTEM_DIR}/env.js`; const KOSKO_ENV_BARE_SPECIFIER = "@kosko/env"; interface BundleOptions { - rollup: typeof import("rollup"); files: Record; component: string; environment: string; callbackId: string; } -function isURL(url: string): boolean { - return url.includes(":"); -} - -function getModuleURLForCDN(module: string) { - return `https://cdn.skypack.dev/${module}`; -} - function generateEntry({ component, callbackId @@ -89,68 +76,20 @@ export default env; `; } -function createVirtualFSPlugin(files: Record): Plugin { - return { - name: "virtual-fs", - resolveId(source, importer) { - if (isAbsolute(source)) { - return source; - } - - if (isRelative(source)) { - const path = "/" + relative(dirname(importer), source); - return path; - } - }, - load(id) { - if (files[id] != null) { - return files[id]; - } - } - }; -} - -function createCDNResolvePlugin(): Plugin { - return { - name: "cdn-resolve", - resolveId(source) { - if (isRelative(source) || isAbsolute(source)) { - return; - } - - if (isURL(source)) { - return false; - } - - return { - id: getModuleURLForCDN(source), - external: true - }; - } - }; -} - -function createAliasResolvePlugin(aliases: Record): Plugin { - return { - name: "alias-resolve", - resolveId(source) { - const alias = aliases[source]; - if (alias) return alias; - } - }; -} - export default async function generateBundle({ - rollup, files, component, environment, callbackId }: BundleOptions) { + const rollup: typeof rollupType = await import( + /* webpackChunkName: "rollup" */ "rollup/dist/rollup.browser" + ); + const build = await rollup.rollup({ input: SYSTEM_ENTRY_ID, plugins: [ - createAliasResolvePlugin({ + createAliasPlugin({ [KOSKO_ENV_BARE_SPECIFIER]: SYSTEM_ENV_ID }), createVirtualFSPlugin({ diff --git a/website/src/components/Playground/Preview/index.tsx b/website/src/components/Playground/Preview/index.tsx index cc01ac5cf..949650a75 100644 --- a/website/src/components/Playground/Preview/index.tsx +++ b/website/src/components/Playground/Preview/index.tsx @@ -1,23 +1,21 @@ import React, { FunctionComponent, useEffect, useState } from "react"; import { usePlayground } from "../context"; import styles from "./styles.module.scss"; -import useRollup from "../hooks/useRollup"; import generateBundle from "./generateBundle"; import executeModule from "./executeModule"; import MonacoEditor from "../MonacoEditor"; +import { useThrottle } from "react-use"; let CALLBACK_ID = 0; -const Preview: FunctionComponent = () => { - const rollup = useRollup(); +const PreviewContent: FunctionComponent = () => { const [code, setCode] = useState(""); const { - value: { component, environment, files } + value: { component, environment, files: filesValue } } = usePlayground(); + const files = useThrottle(filesValue, 500); useEffect(() => { - if (!rollup) return; - const callbackId = `__koskoPreview${CALLBACK_ID++}`; let scriptElement: HTMLScriptElement | undefined; let canceled = false; @@ -29,7 +27,6 @@ const Preview: FunctionComponent = () => { (async () => { const result = await generateBundle({ - rollup, files, component, environment, @@ -49,11 +46,21 @@ const Preview: FunctionComponent = () => { scriptElement.remove(); } }; - }, [rollup, files, component, environment]); + }, [files, component, environment]); + + return ( + + ); +}; + +const Preview: FunctionComponent = () => { + const { + value: { editorMounted } + } = usePlayground(); return (
- + {editorMounted && }
); }; diff --git a/website/src/components/Playground/Preview/virtualFS.ts b/website/src/components/Playground/Preview/virtualFS.ts new file mode 100644 index 000000000..7bf0344e2 --- /dev/null +++ b/website/src/components/Playground/Preview/virtualFS.ts @@ -0,0 +1,25 @@ +import type { Plugin } from "rollup"; +import { isAbsolute, isRelative, relative, dirname } from "../../../utils/path"; + +export default function createVirtualFSPlugin( + files: Record +): Plugin { + return { + name: "virtual-fs", + resolveId(source, importer) { + if (isAbsolute(source)) { + return source; + } + + if (isRelative(source)) { + const path = "/" + relative(dirname(importer), source); + return path; + } + }, + load(id) { + if (files[id] != null) { + return files[id]; + } + } + }; +} diff --git a/website/src/components/Playground/context.tsx b/website/src/components/Playground/context.tsx index 920ec3b50..950d195ff 100644 --- a/website/src/components/Playground/context.tsx +++ b/website/src/components/Playground/context.tsx @@ -13,6 +13,7 @@ interface ContextValue { files: Record; component: string; environment: string; + editorMounted: boolean; } const PlaygroundContext = createContext<{ @@ -23,7 +24,8 @@ const PlaygroundContext = createContext<{ activePath: "", files: {}, component: "", - environment: "" + environment: "", + editorMounted: false }, updateValue: noop }); @@ -50,7 +52,8 @@ export const PlaygroundProvider: FunctionComponent = ({ children }) => { /* eslint-enable @typescript-eslint/no-var-requires */ }, component: "nginx", - environment: "dev" + environment: "dev", + editorMounted: false })); const ctx = useMemo(() => ({ value, updateValue }), [value, updateValue]); diff --git a/website/src/components/Playground/hooks/useRollup.ts b/website/src/components/Playground/hooks/useRollup.ts deleted file mode 100644 index 67d665b17..000000000 --- a/website/src/components/Playground/hooks/useRollup.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type * as rollup from "rollup"; -import useScript, { ScriptLoadStatus } from "../../../hooks/useScript"; - -export default function useRollup(): typeof rollup | undefined { - const status = useScript( - "https://unpkg.com/rollup@2.45.2/dist/rollup.browser.js" - ); - - if (status !== ScriptLoadStatus.Ready) return; - - return (window as any).rollup; -} diff --git a/website/src/components/Playground/index.tsx b/website/src/components/Playground/index.tsx index 883101118..aedab4707 100644 --- a/website/src/components/Playground/index.tsx +++ b/website/src/components/Playground/index.tsx @@ -7,30 +7,20 @@ import Editor from "./Editor"; import Preview from "./Preview"; import { PlaygroundProvider } from "./context"; import styles from "./styles.module.scss"; -import useRollup from "./hooks/useRollup"; - -const Content: FunctionComponent = () => { - return ( - - -
- - - -
-
- ); -}; const Playground: FunctionComponent = () => { - // Load rollup before loading other components in order to make sure - // rollup will be injected into `window.rollup`. Because monaco may set - // `window.require` which makes rollup feels it is a CommonJS environment. - const rollup = useRollup(); - return ( - {rollup && } + + + +
+ + + +
+
+
); }; From d9c3e7710540c1d667c484bfc32b5c4ec6580fcc Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sat, 24 Apr 2021 01:05:05 +0800 Subject: [PATCH 04/36] docs(website): Update playground layout --- pnpm-lock.yaml | 21 +++++ website/package.json | 1 + .../components/Playground/Container/index.tsx | 42 ++++++++- .../Playground/Container/styles.module.scss | 32 +++++++ .../components/Playground/Editor/index.tsx | 37 ++++---- .../Playground/Editor/styles.module.scss | 15 ++++ .../components/Playground/Preview/Content.tsx | 58 ++++++++++++ .../components/Playground/Preview/Select.tsx | 29 ++++++ .../components/Playground/Preview/index.tsx | 89 ++++++++++--------- .../Playground/Preview/styles.module.scss | 18 ++++ .../components/Playground/Sidebar/Tree.tsx | 88 ++++++++++++++---- .../Playground/Sidebar/generateEntries.ts | 76 ++++++++++++++++ .../components/Playground/Sidebar/index.tsx | 11 ++- .../Playground/Sidebar/styles.module.scss | 41 ++++++++- .../components/Playground/Toolbar/index.tsx | 8 +- .../Playground/Toolbar/styles.module.scss | 9 ++ .../Playground/hooks/useComponentList.ts | 18 ++++ .../Playground/hooks/useEnvironmentList.ts | 18 ++++ website/src/components/Playground/index.tsx | 15 ++-- .../components/Playground/styles.module.scss | 5 -- website/src/utils/path.ts | 4 +- 21 files changed, 531 insertions(+), 104 deletions(-) create mode 100644 website/src/components/Playground/Preview/Content.tsx create mode 100644 website/src/components/Playground/Preview/Select.tsx create mode 100644 website/src/components/Playground/Sidebar/generateEntries.ts create mode 100644 website/src/components/Playground/hooks/useComponentList.ts create mode 100644 website/src/components/Playground/hooks/useEnvironmentList.ts delete mode 100644 website/src/components/Playground/styles.module.scss diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b1c204a61..55f800060 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -465,6 +465,7 @@ importers: react: 17.0.1 react-dom: 17.0.1_react@17.0.1 react-icons: 4.2.0_react@17.0.1 + react-simple-resizer: 2.1.0_react-dom@17.0.1+react@17.0.1 react-use: 17.2.3_react-dom@17.0.1+react@17.0.1 use-immer: 0.5.1_immer@9.0.1+react@17.0.1 devDependencies: @@ -513,6 +514,7 @@ importers: react: ^17.0.1 react-dom: ^17.0.1 react-icons: ^4.1.0 + react-simple-resizer: ^2.1.0 react-use: ^17.2.3 read-pkg: ^5.2.0 resolve-pkg: ^2.0.0 @@ -13847,6 +13849,17 @@ packages: react: ^16.3.0 || ^17.0.0 resolution: integrity: sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ== + /react-simple-resizer/2.1.0_react-dom@17.0.1+react@17.0.1: + dependencies: + react: 17.0.1 + react-dom: 17.0.1_react@17.0.1 + rxjs: 6.6.7 + dev: false + peerDependencies: + react: ^16.3.0 + react-dom: ^16.4.2 + resolution: + integrity: sha512-iiPER+vuKsW5+6+HroNnahc2Cah6UpO4w9SeuGw1pf/6p/F/vAD4+4288yJS5fLY4xJpDNEiOiRBk2kLUui6nw== /react-textarea-autosize/8.3.2_@types+react@17.0.3+react@17.0.1: dependencies: '@babel/runtime': 7.13.9 @@ -14518,6 +14531,14 @@ packages: npm: '>=2.0.0' resolution: integrity: sha512-/oTwee4N4iWzAMAL9xdGKjkEHmIwupR3oXbQjCKywF1BeFohswF3vZdogbmEF6pZkOsXTzWkrZszrWpQTByYVg== + /rxjs/6.6.7: + dependencies: + tslib: 1.14.1 + dev: false + engines: + npm: '>=2.0.0' + resolution: + integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== /safe-buffer/5.1.2: resolution: integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== diff --git a/website/package.json b/website/package.json index 20b64bc5e..0940b1b67 100644 --- a/website/package.json +++ b/website/package.json @@ -44,6 +44,7 @@ "react": "^17.0.1", "react-dom": "^17.0.1", "react-icons": "^4.1.0", + "react-simple-resizer": "^2.1.0", "react-use": "^17.2.3", "use-immer": "^0.5.1" }, diff --git a/website/src/components/Playground/Container/index.tsx b/website/src/components/Playground/Container/index.tsx index f7127b71f..8a96a0611 100644 --- a/website/src/components/Playground/Container/index.tsx +++ b/website/src/components/Playground/Container/index.tsx @@ -1,7 +1,19 @@ -import React, { FunctionComponent, useLayoutEffect, useRef } from "react"; +import React, { + FunctionComponent, + useLayoutEffect, + useRef, + useState +} from "react"; import styles from "./styles.module.scss"; +import { + Container as ResizerContainer, + Bar as ResizerBar, + Section as ResizerSection, + ChildProps +} from "react-simple-resizer"; +import cx from "clsx"; -const Container: FunctionComponent = ({ children }) => { +export const Container: FunctionComponent = ({ children }) => { const ref = useRef(); useLayoutEffect(() => { @@ -16,9 +28,31 @@ const Container: FunctionComponent = ({ children }) => { return (
- {children} + + {children} +
); }; -export default Container; +export const Section: FunctionComponent> = ( + props +) => { + return ; +}; + +export const Bar: FunctionComponent = (props) => { + const [active, setActive] = useState(false); + + return ( + + ); +}; diff --git a/website/src/components/Playground/Container/styles.module.scss b/website/src/components/Playground/Container/styles.module.scss index ce3c073cb..71ece26fb 100644 --- a/website/src/components/Playground/Container/styles.module.scss +++ b/website/src/components/Playground/Container/styles.module.scss @@ -4,6 +4,38 @@ .main { flex: 1; + overflow: hidden; +} + +.container { + height: 100%; + user-select: none; +} + +.section { display: flex; flex-direction: column; } + +.bar { + background: var(--ifm-color-emphasis-200); + z-index: 1; + + > * { + background: var(--ifm-color-primary-light); + opacity: 0; + transition: opacity 0.2s; + } + + &:hover { + > * { + opacity: 1; + } + } +} + +.barActive { + > * { + opacity: 1; + } +} diff --git a/website/src/components/Playground/Editor/index.tsx b/website/src/components/Playground/Editor/index.tsx index fde2b4425..077fd4867 100644 --- a/website/src/components/Playground/Editor/index.tsx +++ b/website/src/components/Playground/Editor/index.tsx @@ -2,6 +2,7 @@ import React, { FunctionComponent, useMemo } from "react"; import styles from "./styles.module.scss"; import { usePlayground } from "../context"; import MonacoEditor from "../MonacoEditor"; +import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; const Editor: FunctionComponent = () => { const { @@ -12,21 +13,27 @@ const Editor: FunctionComponent = () => { return (
- { - updateValue((draft) => { - draft.editorMounted = true; - }); - }} - onChange={(value) => { - updateValue((draft) => { - draft.files[activePath] = value; - }); - }} - /> + + Editor +
{activePath}
+
+
+ { + updateValue((draft) => { + draft.editorMounted = true; + }); + }} + onChange={(value) => { + updateValue((draft) => { + draft.files[activePath] = value; + }); + }} + /> +
); }; diff --git a/website/src/components/Playground/Editor/styles.module.scss b/website/src/components/Playground/Editor/styles.module.scss index a8e2242b1..8d1cc39b3 100644 --- a/website/src/components/Playground/Editor/styles.module.scss +++ b/website/src/components/Playground/Editor/styles.module.scss @@ -1,3 +1,18 @@ .container { + display: flex; + flex-direction: column; + height: 100%; + overflow: hidden; +} + +.editor { flex: 1; } + +.activePath { + overflow: hidden; + font-size: 0.875rem; + text-overflow: ellipsis; + white-space: nowrap; + padding-left: 0.75rem; +} diff --git a/website/src/components/Playground/Preview/Content.tsx b/website/src/components/Playground/Preview/Content.tsx new file mode 100644 index 000000000..ae8190da9 --- /dev/null +++ b/website/src/components/Playground/Preview/Content.tsx @@ -0,0 +1,58 @@ +import React, { FunctionComponent, useEffect, useState } from "react"; +import { usePlayground } from "../context"; +import styles from "./styles.module.scss"; +import generateBundle from "./generateBundle"; +import executeModule from "./executeModule"; +import MonacoEditor from "../MonacoEditor"; +import { useThrottle } from "react-use"; + +let CALLBACK_ID = 0; + +const Content: FunctionComponent = () => { + const [code, setCode] = useState(""); + const { + value: { component, environment, files: filesValue } + } = usePlayground(); + const files = useThrottle(filesValue, 500); + + useEffect(() => { + const callbackId = `__koskoPreview${CALLBACK_ID++}`; + let scriptElement: HTMLScriptElement | undefined; + let canceled = false; + + (window as any)[callbackId] = (result) => { + if (canceled) return; + setCode(result); + }; + + (async () => { + const result = await generateBundle({ + files, + component, + environment, + callbackId + }); + + scriptElement = executeModule(result); + scriptElement.id = callbackId; + })(); + + return () => { + canceled = true; + + delete (window as any)[callbackId]; + + if (scriptElement) { + scriptElement.remove(); + } + }; + }, [files, component, environment]); + + return ( +
+ +
+ ); +}; + +export default Content; diff --git a/website/src/components/Playground/Preview/Select.tsx b/website/src/components/Playground/Preview/Select.tsx new file mode 100644 index 000000000..cf36aaf9c --- /dev/null +++ b/website/src/components/Playground/Preview/Select.tsx @@ -0,0 +1,29 @@ +import React, { FunctionComponent } from "react"; +import styles from "./styles.module.scss"; + +const Select: FunctionComponent<{ + label: string; + options: readonly string[]; + value: string; + onChange(value: string): void; +}> = ({ label, options, value, onChange }) => { + return ( + + ); +}; + +export default Select; diff --git a/website/src/components/Playground/Preview/index.tsx b/website/src/components/Playground/Preview/index.tsx index 949650a75..17455b94e 100644 --- a/website/src/components/Playground/Preview/index.tsx +++ b/website/src/components/Playground/Preview/index.tsx @@ -1,55 +1,51 @@ -import React, { FunctionComponent, useEffect, useState } from "react"; +import React, { FunctionComponent } from "react"; import { usePlayground } from "../context"; import styles from "./styles.module.scss"; -import generateBundle from "./generateBundle"; -import executeModule from "./executeModule"; -import MonacoEditor from "../MonacoEditor"; -import { useThrottle } from "react-use"; +import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; +import Content from "./Content"; +import useComponentList from "../hooks/useComponentList"; +import useEnvironmentList from "../hooks/useEnvironmentList"; +import Select from "./Select"; -let CALLBACK_ID = 0; - -const PreviewContent: FunctionComponent = () => { - const [code, setCode] = useState(""); +const ComponentSelect: FunctionComponent = () => { + const components = useComponentList(); const { - value: { component, environment, files: filesValue } + value: { component }, + updateValue } = usePlayground(); - const files = useThrottle(filesValue, 500); - - useEffect(() => { - const callbackId = `__koskoPreview${CALLBACK_ID++}`; - let scriptElement: HTMLScriptElement | undefined; - let canceled = false; - - (window as any)[callbackId] = (result) => { - if (canceled) return; - setCode(result); - }; - - (async () => { - const result = await generateBundle({ - files, - component, - environment, - callbackId - }); - - scriptElement = executeModule(result); - scriptElement.id = callbackId; - })(); - - return () => { - canceled = true; - delete (window as any)[callbackId]; + return ( + { + updateValue((draft) => { + draft.environment = value; + }); + }} + /> ); }; @@ -60,7 +56,12 @@ const Preview: FunctionComponent = () => { return (
- {editorMounted && } + + Preview + + + + {editorMounted && }
); }; diff --git a/website/src/components/Playground/Preview/styles.module.scss b/website/src/components/Playground/Preview/styles.module.scss index a8e2242b1..0b3af5285 100644 --- a/website/src/components/Playground/Preview/styles.module.scss +++ b/website/src/components/Playground/Preview/styles.module.scss @@ -1,3 +1,21 @@ .container { + height: 100%; + display: flex; + flex-direction: column; + overflow: hidden; +} + +.editor { flex: 1; } + +.selectContainer { + display: flex; + align-items: center; + padding-left: 0.75rem; +} + +.selectLabel { + font-size: 0.875rem; + padding-right: 0.5rem; +} diff --git a/website/src/components/Playground/Sidebar/Tree.tsx b/website/src/components/Playground/Sidebar/Tree.tsx index e3e776047..bb6bd5cfc 100644 --- a/website/src/components/Playground/Sidebar/Tree.tsx +++ b/website/src/components/Playground/Sidebar/Tree.tsx @@ -1,33 +1,83 @@ -import React, { FunctionComponent } from "react"; +import React, { FunctionComponent, ReactNode } from "react"; import cx from "clsx"; import { usePlayground } from "../context"; import styles from "./styles.module.scss"; +import { Directory, File, Entry, EntryType } from "./generateEntries"; +import { FcFolder, FcFile } from "react-icons/fc"; -const Tree: FunctionComponent<{ - files: string[]; -}> = ({ files }) => { +const Cell: FunctionComponent<{ + entry: Entry; + icon: ReactNode; + depth: number; + onClick?(): void; + className?: string; +}> = ({ children, entry, icon, depth, onClick, className }) => { + return ( +
+ + {children} +
+ ); +}; + +const FileCell: FunctionComponent<{ entry: File; depth: number }> = ({ + entry, + depth +}) => { const { value: { activePath }, updateValue } = usePlayground(); + return ( + } + depth={depth} + className={cx({ + [styles.cellButtonActive]: activePath === entry.path + })} + onClick={() => { + updateValue((draft) => { + draft.activePath = entry.path; + }); + }} + /> + ); +}; + +const DirectoryCell: FunctionComponent<{ entry: Directory; depth: number }> = ({ + entry, + depth +}) => { + return ( + } depth={depth}> + + + ); +}; + +const Tree: FunctionComponent<{ + entries: readonly Entry[]; + depth?: number; +}> = ({ entries, depth = 0 }) => { return (
- {files.map((file) => ( - + {entries.map((entry) => ( + + {entry.type === EntryType.Directory ? ( + + ) : ( + + )} + ))}
); diff --git a/website/src/components/Playground/Sidebar/generateEntries.ts b/website/src/components/Playground/Sidebar/generateEntries.ts new file mode 100644 index 000000000..7f67fa2b5 --- /dev/null +++ b/website/src/components/Playground/Sidebar/generateEntries.ts @@ -0,0 +1,76 @@ +import { groupBy } from "lodash"; + +export enum EntryType { + File, + Directory +} + +interface BaseEntry { + type: EntryType; + name: string; + path: string; +} + +export interface File extends BaseEntry { + type: EntryType.File; +} + +export interface Directory extends BaseEntry { + type: EntryType.Directory; + children: readonly Entry[]; +} + +export type Entry = File | Directory; + +function doGenerateEntries( + paths: readonly string[], + prefix: string +): readonly Entry[] { + const { "": files = [], ...dirs } = groupBy(paths, (path) => { + const index = path.indexOf("/"); + return index === -1 ? "" : path.substring(0, index); + }); + + return [ + ...Object.entries(dirs).map( + ([name, children]): Directory => { + return { + type: EntryType.Directory, + name, + path: prefix + name, + children: doGenerateEntries( + children.map((v) => v.substring(name.length + 1)), + prefix + name + "/" + ) + }; + } + ), + ...files.map( + (name): File => ({ + type: EntryType.File, + name, + path: prefix + name + }) + ) + ].sort((a, b) => { + // Move directories to the front + if (a.type !== b.type) { + if (a.type === EntryType.Directory) return -1; + if (b.type === EntryType.Directory) return 1; + } + + // Sort by name + if (a.name > b.name) return 1; + if (a.name < b.name) return -1; + return 0; + }); +} + +export default function generateEntries( + paths: readonly string[] +): readonly Entry[] { + return doGenerateEntries( + paths.map((path) => path.substring(1)), + "/" + ); +} diff --git a/website/src/components/Playground/Sidebar/index.tsx b/website/src/components/Playground/Sidebar/index.tsx index 4290e64a7..fe8b4c16d 100644 --- a/website/src/components/Playground/Sidebar/index.tsx +++ b/website/src/components/Playground/Sidebar/index.tsx @@ -1,17 +1,24 @@ import React, { FunctionComponent, useMemo } from "react"; import { usePlayground } from "../context"; +import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; import styles from "./styles.module.scss"; +import generateEntries from "./generateEntries"; import Tree from "./Tree"; const Sidebar: FunctionComponent = () => { const { value: { files } } = usePlayground(); - const fileNames = useMemo(() => Object.keys(files), [files]); + const entries = useMemo(() => generateEntries(Object.keys(files)), [files]); return ( ); }; diff --git a/website/src/components/Playground/Sidebar/styles.module.scss b/website/src/components/Playground/Sidebar/styles.module.scss index fb85f1775..e33877afb 100644 --- a/website/src/components/Playground/Sidebar/styles.module.scss +++ b/website/src/components/Playground/Sidebar/styles.module.scss @@ -1,7 +1,42 @@ .container { - width: 250px; + display: flex; + flex-direction: column; + overflow: hidden; } -.activeFile { - font-weight: bold; +.treeContainer { + flex: 1; + overflow: auto; +} + +.cellButton { + width: 100%; + display: flex; + align-items: center; + background: none; + border: none; + cursor: pointer; + color: var(--ifm-font-color-base); + padding: 0; + font: inherit; + appearance: none; + vertical-align: middle; + font-size: 0.875rem; +} + +.cellButtonActive { + background: var(--ifm-color-emphasis-200); +} + +.cellIcon { + padding-top: 0.25rem; + padding-right: 0.375rem; +} + +.cellLabel { + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + text-align: left; } diff --git a/website/src/components/Playground/Toolbar/index.tsx b/website/src/components/Playground/Toolbar/index.tsx index 43b7e1735..7f3a8f18a 100644 --- a/website/src/components/Playground/Toolbar/index.tsx +++ b/website/src/components/Playground/Toolbar/index.tsx @@ -1,8 +1,10 @@ import React, { FunctionComponent } from "react"; import styles from "./styles.module.scss"; -const Toolbar: FunctionComponent = () => { - return ; +export const ToolbarContainer: FunctionComponent = ({ children }) => { + return
{children}
; }; -export default Toolbar; +export const ToolbarTitle: FunctionComponent = ({ children }) => { + return
{children}
; +}; diff --git a/website/src/components/Playground/Toolbar/styles.module.scss b/website/src/components/Playground/Toolbar/styles.module.scss index 35f649a8d..d8ad3f845 100644 --- a/website/src/components/Playground/Toolbar/styles.module.scss +++ b/website/src/components/Playground/Toolbar/styles.module.scss @@ -1,3 +1,12 @@ .container { height: 40px; + flex-shrink: 0; + display: flex; + align-items: center; + padding: 0 0.75rem; +} + +.title { + font-size: 1rem; + font-weight: bold; } diff --git a/website/src/components/Playground/hooks/useComponentList.ts b/website/src/components/Playground/hooks/useComponentList.ts new file mode 100644 index 000000000..8cc698f5a --- /dev/null +++ b/website/src/components/Playground/hooks/useComponentList.ts @@ -0,0 +1,18 @@ +import { useMemo } from "react"; +import { basename, extname } from "../../../utils/path"; +import { usePlayground } from "../context"; + +export default function useComponentList(): readonly string[] { + const { + value: { files } + } = usePlayground(); + + return useMemo( + () => + Object.keys(files) + .map((path) => path.substring(1).split("/")) + .filter(([dir, name]) => dir === "components" && name.endsWith(".js")) + .map(([, name]) => basename(name, extname(name))), + [files] + ); +} diff --git a/website/src/components/Playground/hooks/useEnvironmentList.ts b/website/src/components/Playground/hooks/useEnvironmentList.ts new file mode 100644 index 000000000..9f3eec81b --- /dev/null +++ b/website/src/components/Playground/hooks/useEnvironmentList.ts @@ -0,0 +1,18 @@ +import { useMemo } from "react"; +import { uniq } from "lodash"; +import { usePlayground } from "../context"; + +export default function useEnvironmentList(): readonly string[] { + const { + value: { files } + } = usePlayground(); + + return useMemo(() => { + const keys = Object.keys(files) + .map((path) => path.substring(1).split("/")) + .filter(([dir, name]) => dir === "environments" && !name.endsWith(".js")) + .map(([, name]) => name); + + return uniq(keys); + }, [files]); +} diff --git a/website/src/components/Playground/index.tsx b/website/src/components/Playground/index.tsx index aedab4707..fca25f479 100644 --- a/website/src/components/Playground/index.tsx +++ b/website/src/components/Playground/index.tsx @@ -1,24 +1,27 @@ import React, { FunctionComponent } from "react"; import Layout from "@theme/Layout"; -import Container from "./Container"; -import Toolbar from "./Toolbar"; +import { Container, Section, Bar } from "./Container"; import Sidebar from "./Sidebar"; import Editor from "./Editor"; import Preview from "./Preview"; import { PlaygroundProvider } from "./context"; -import styles from "./styles.module.scss"; const Playground: FunctionComponent = () => { return ( - -
+
+
+ +
+
+ +
-
+
diff --git a/website/src/components/Playground/styles.module.scss b/website/src/components/Playground/styles.module.scss deleted file mode 100644 index 4f5d6b2e2..000000000 --- a/website/src/components/Playground/styles.module.scss +++ /dev/null @@ -1,5 +0,0 @@ -.main { - flex: 1; - display: flex; - overflow: hidden; -} diff --git a/website/src/utils/path.ts b/website/src/utils/path.ts index 5d988a3db..7f6f3fb16 100644 --- a/website/src/utils/path.ts +++ b/website/src/utils/path.ts @@ -20,9 +20,7 @@ export function extname(path: string): string { export function basename(path: string, ext?: string): string { const index = path.lastIndexOf("/"); - if (index === -1) return ""; - - const base = path.substring(index + 1); + const base = index === -1 ? path : path.substring(index + 1); if (base.endsWith(ext)) { return base.substring(0, base.length - ext.length); From 4ab32ac78745ed504f8e228739ac50c22988b166 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sun, 25 Apr 2021 12:45:59 +0800 Subject: [PATCH 05/36] docs(website): Refactor structure --- pnpm-lock.yaml | 2031 +++++++---------- website/.eslintrc.js | 12 +- website/package.json | 9 +- website/plugins/comlink-loader/index.js | 28 + .../components/Playground/Container/index.tsx | 58 - .../components/Playground/Preview/Content.tsx | 58 - .../components/Playground/Preview/Select.tsx | 29 - .../Playground/Preview/executeModule.ts | 10 - .../Playground/Preview/generateBundle.ts | 110 - .../components/Playground/Preview/index.tsx | 69 - .../Playground/Preview/styles.module.scss | 21 - .../Playground/Preview/virtualFS.ts | 25 - website/src/components/Playground/context.tsx | 65 - .../Playground/hooks/useComponentList.ts | 18 - .../Playground/hooks/useEnvironmentList.ts | 18 - website/src/components/Playground/index.tsx | 31 - website/src/hooks/useScript.ts | 86 - .../common}/components/CodeBlock/index.tsx | 1 - .../components/CodeBlock/styles.module.scss | 0 .../common}/components/LinkButton/index.tsx | 8 +- .../examples/components/nginx.js | 0 .../examples/environments/prod.js | 0 .../examples/environments/stage.js | 0 .../examples/results/prod.yml | 0 .../examples/results/stage.yml | 0 .../components}/DeployEverywhere/index.tsx | 5 +- .../DeployEverywhere/styles.module.scss | 0 .../home/components}/Feature/index.tsx | 0 .../components}/Feature/styles.module.scss | 0 .../home/components}/Header/index.tsx | 2 +- .../components}/Header/styles.module.scss | 0 .../home}/components/HomePage/index.tsx | 8 +- .../TypeSafe/examples/component.js | 0 .../home/components}/TypeSafe/index.tsx | 2 +- .../components}/TypeSafe/styles.module.scss | 0 .../WriteLess/examples/deployment.yml | 0 .../WriteLess/examples/service.yml | 0 .../home/components}/WriteLess/index.tsx | 2 +- .../components}/WriteLess/styles.module.scss | 0 .../playground/components}/Editor/index.tsx | 9 +- .../components}/Editor/styles.module.scss | 0 .../components}/MonacoEditor/index.tsx | 15 +- .../playground/components/Playground/Bar.tsx | 22 + .../components/Playground/Provider.tsx | 42 + .../components/Playground/index.tsx | 51 + .../components/Playground}/styles.module.scss | 15 +- .../playground/components/Preview/Content.tsx | 72 + .../playground/components/Preview/index.tsx | 17 + .../components/Preview/styles.module.scss | 10 + .../playground/components}/Sidebar/Tree.tsx | 10 +- .../components}/Sidebar/generateEntries.ts | 7 +- .../playground/components}/Sidebar/index.tsx | 4 +- .../components}/Sidebar/styles.module.scss | 0 .../playground/components}/Toolbar/index.tsx | 0 .../components}/Toolbar/styles.module.scss | 0 website/src/modules/playground/constants.ts | 4 + website/src/modules/playground/context.ts | 23 + .../playground}/fixtures/.eslintrc | 0 .../playground}/fixtures/components/nginx.js | 0 .../fixtures/environments/dev/index.js | 0 .../fixtures/environments/dev/nginx.js | 0 .../fixtures/environments/prod/index.js | 0 .../fixtures/environments/prod/nginx.js | 0 .../playground/hooks/useComponentList.ts | 31 + .../playground/hooks/useEnvironmentList.ts | 28 + .../playground/hooks/usePlaygroundContext.ts | 6 + .../src/modules/playground/worker/execute.ts | 23 + .../src/modules/playground/worker/index.ts | 10 + .../modules/playground/worker/rollup/index.ts | 23 + .../worker/rollup/plugins}/alias.ts | 6 +- .../playground/worker/rollup/plugins/cdn.ts} | 13 +- .../playground/worker/rollup/plugins/entry.ts | 109 + .../worker/rollup/plugins/virtualFS.ts | 36 + .../modules/playground/worker/rollup/utils.ts | 3 + .../src/modules/playground/worker/types.ts | 17 + .../src/modules/playground/worker/worker.ts | 9 + website/src/pages/index.tsx | 2 +- website/src/pages/play.tsx | 2 +- website/src/types.d.ts | 4 + website/src/utils/path.ts | 20 +- website/tsconfig.json | 11 +- 81 files changed, 1496 insertions(+), 1864 deletions(-) create mode 100644 website/plugins/comlink-loader/index.js delete mode 100644 website/src/components/Playground/Container/index.tsx delete mode 100644 website/src/components/Playground/Preview/Content.tsx delete mode 100644 website/src/components/Playground/Preview/Select.tsx delete mode 100644 website/src/components/Playground/Preview/executeModule.ts delete mode 100644 website/src/components/Playground/Preview/generateBundle.ts delete mode 100644 website/src/components/Playground/Preview/index.tsx delete mode 100644 website/src/components/Playground/Preview/styles.module.scss delete mode 100644 website/src/components/Playground/Preview/virtualFS.ts delete mode 100644 website/src/components/Playground/context.tsx delete mode 100644 website/src/components/Playground/hooks/useComponentList.ts delete mode 100644 website/src/components/Playground/hooks/useEnvironmentList.ts delete mode 100644 website/src/components/Playground/index.tsx delete mode 100644 website/src/hooks/useScript.ts rename website/src/{ => modules/common}/components/CodeBlock/index.tsx (98%) rename website/src/{ => modules/common}/components/CodeBlock/styles.module.scss (100%) rename website/src/{ => modules/common}/components/LinkButton/index.tsx (85%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/examples/components/nginx.js (100%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/examples/environments/prod.js (100%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/examples/environments/stage.js (100%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/examples/results/prod.yml (100%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/examples/results/stage.yml (100%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/index.tsx (96%) rename website/src/{components/HomePage => modules/home/components}/DeployEverywhere/styles.module.scss (100%) rename website/src/{components/HomePage => modules/home/components}/Feature/index.tsx (100%) rename website/src/{components/HomePage => modules/home/components}/Feature/styles.module.scss (100%) rename website/src/{components/HomePage => modules/home/components}/Header/index.tsx (90%) rename website/src/{components/HomePage => modules/home/components}/Header/styles.module.scss (100%) rename website/src/{ => modules/home}/components/HomePage/index.tsx (70%) rename website/src/{components/HomePage => modules/home/components}/TypeSafe/examples/component.js (100%) rename website/src/{components/HomePage => modules/home/components}/TypeSafe/index.tsx (97%) rename website/src/{components/HomePage => modules/home/components}/TypeSafe/styles.module.scss (100%) rename website/src/{components/HomePage => modules/home/components}/WriteLess/examples/deployment.yml (100%) rename website/src/{components/HomePage => modules/home/components}/WriteLess/examples/service.yml (100%) rename website/src/{components/HomePage => modules/home/components}/WriteLess/index.tsx (95%) rename website/src/{components/HomePage => modules/home/components}/WriteLess/styles.module.scss (100%) rename website/src/{components/Playground => modules/playground/components}/Editor/index.tsx (82%) rename website/src/{components/Playground => modules/playground/components}/Editor/styles.module.scss (100%) rename website/src/{components/Playground => modules/playground/components}/MonacoEditor/index.tsx (61%) create mode 100644 website/src/modules/playground/components/Playground/Bar.tsx create mode 100644 website/src/modules/playground/components/Playground/Provider.tsx create mode 100644 website/src/modules/playground/components/Playground/index.tsx rename website/src/{components/Playground/Container => modules/playground/components/Playground}/styles.module.scss (81%) create mode 100644 website/src/modules/playground/components/Preview/Content.tsx create mode 100644 website/src/modules/playground/components/Preview/index.tsx create mode 100644 website/src/modules/playground/components/Preview/styles.module.scss rename website/src/{components/Playground => modules/playground/components}/Sidebar/Tree.tsx (90%) rename website/src/{components/Playground => modules/playground/components}/Sidebar/generateEntries.ts (92%) rename website/src/{components/Playground => modules/playground/components}/Sidebar/index.tsx (87%) rename website/src/{components/Playground => modules/playground/components}/Sidebar/styles.module.scss (100%) rename website/src/{components/Playground => modules/playground/components}/Toolbar/index.tsx (100%) rename website/src/{components/Playground => modules/playground/components}/Toolbar/styles.module.scss (100%) create mode 100644 website/src/modules/playground/constants.ts create mode 100644 website/src/modules/playground/context.ts rename website/src/{components/Playground => modules/playground}/fixtures/.eslintrc (100%) rename website/src/{components/Playground => modules/playground}/fixtures/components/nginx.js (100%) rename website/src/{components/Playground => modules/playground}/fixtures/environments/dev/index.js (100%) rename website/src/{components/Playground => modules/playground}/fixtures/environments/dev/nginx.js (100%) rename website/src/{components/Playground => modules/playground}/fixtures/environments/prod/index.js (100%) rename website/src/{components/Playground => modules/playground}/fixtures/environments/prod/nginx.js (100%) create mode 100644 website/src/modules/playground/hooks/useComponentList.ts create mode 100644 website/src/modules/playground/hooks/useEnvironmentList.ts create mode 100644 website/src/modules/playground/hooks/usePlaygroundContext.ts create mode 100644 website/src/modules/playground/worker/execute.ts create mode 100644 website/src/modules/playground/worker/index.ts create mode 100644 website/src/modules/playground/worker/rollup/index.ts rename website/src/{components/Playground/Preview => modules/playground/worker/rollup/plugins}/alias.ts (51%) rename website/src/{components/Playground/Preview/cdnResolve.ts => modules/playground/worker/rollup/plugins/cdn.ts} (54%) create mode 100644 website/src/modules/playground/worker/rollup/plugins/entry.ts create mode 100644 website/src/modules/playground/worker/rollup/plugins/virtualFS.ts create mode 100644 website/src/modules/playground/worker/rollup/utils.ts create mode 100644 website/src/modules/playground/worker/types.ts create mode 100644 website/src/modules/playground/worker/worker.ts diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55f800060..f29a010f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -448,14 +448,13 @@ importers: tslib: ^2.1.0 website: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/preset-classic': 2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831 - '@kosko/env': link:../packages/env - '@kosko/generate': link:../packages/generate + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/preset-classic': 2.0.0-alpha.b305145da9_a43930547da206c2a3d03fba663f3d7b '@mdx-js/react': 1.6.22_react@17.0.1 '@monaco-editor/react': 4.1.1_f093545f51687bd95e04fbf414b6aba1 clsx: 1.1.1 - docusaurus-plugin-sass: 0.1.12_@docusaurus+core@2.0.0-alpha.71 + comlink: 4.3.0 + docusaurus-plugin-sass: 0.1.12_fbfe03ce431717eca61618b6732e25d5 fs-extra: 9.1.0 globby: 11.0.2 immer: 9.0.1 @@ -469,7 +468,7 @@ importers: react-use: 17.2.3_react-dom@17.0.1+react@17.0.1 use-immer: 0.5.1_immer@9.0.1+react@17.0.1 devDependencies: - '@docusaurus/module-type-aliases': 2.0.0-alpha.71 + '@docusaurus/module-type-aliases': 2.0.0-alpha.b305145da9 '@tsconfig/docusaurus': 1.0.2 '@types/lodash': 4.14.168 '@types/react': 17.0.3 @@ -487,11 +486,9 @@ importers: typedoc-plugin-markdown: 3.5.0_typedoc@0.20.30 typescript: 4.2.3 specifiers: - '@docusaurus/core': 2.0.0-alpha.71 - '@docusaurus/module-type-aliases': 2.0.0-alpha.71 - '@docusaurus/preset-classic': 2.0.0-alpha.71 - '@kosko/env': workspace:* - '@kosko/generate': workspace:* + '@docusaurus/core': 2.0.0-alpha.b305145da9 + '@docusaurus/module-type-aliases': 2.0.0-alpha.b305145da9 + '@docusaurus/preset-classic': 2.0.0-alpha.b305145da9 '@mdx-js/react': ^1.6.22 '@monaco-editor/react': ^4.1.1 '@tsconfig/docusaurus': ^1.0.2 @@ -502,6 +499,7 @@ importers: '@types/systemjs': ^6.1.0 babel-plugin-lodash: ^3.3.4 clsx: ^1.1.1 + comlink: ^4.3.0 docusaurus-plugin-sass: ^0.1.12 fs-extra: ^9.1.0 globby: ^11.0.2 @@ -665,7 +663,7 @@ packages: '@babel/parser': 7.13.9 '@babel/template': 7.12.13 '@babel/traverse': 7.13.0 - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 convert-source-map: 1.7.0 debug: 4.3.1 gensync: 1.0.0-beta.2 @@ -703,7 +701,7 @@ packages: integrity: sha512-oYapIySGw1zGhEFRd6lzWNLWFX2s5dA/jm+Pw/+59ZdXtjyIuwlXbrId22Md0rgZVop+aVoqow2riXhBLNyuQg== /@babel/generator/7.13.9: dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 jsesc: 2.5.2 source-map: 0.5.7 resolution: @@ -755,7 +753,7 @@ packages: dependencies: '@babel/core': 7.13.8 '@babel/helper-compilation-targets': 7.13.8_@babel+core@7.13.8 - '@babel/helper-module-imports': 7.12.13 + '@babel/helper-module-imports': 7.13.12 '@babel/helper-plugin-utils': 7.13.0 '@babel/traverse': 7.13.0 debug: 4.3.1 @@ -775,12 +773,12 @@ packages: dependencies: '@babel/helper-get-function-arity': 7.12.13 '@babel/template': 7.12.13 - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 resolution: integrity: sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA== /@babel/helper-get-function-arity/7.12.13: dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 resolution: integrity: sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg== /@babel/helper-hoist-variables/7.13.0: @@ -802,7 +800,6 @@ packages: /@babel/helper-module-imports/7.13.12: dependencies: '@babel/types': 7.13.14 - dev: true resolution: integrity: sha512-4cVvR2/1B693IuOvSI20xqqa/+bl7lqAMR59R4iu39R9aOX8/JoYY1sFaNvUMyMBGnHdwvJgUrzNLoUZxXypxA== /@babel/helper-module-transforms/7.13.0: @@ -852,12 +849,12 @@ packages: integrity: sha512-0ski5dyYIHEfwpWGx5GPWhH35j342JaflmCeQmsPWcrOQDtCN6C1zKAVRFVbK53lPW2c9TsuLLSUDf0tIGJ5hA== /@babel/helper-skip-transparent-expression-wrappers/7.12.1: dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 resolution: integrity: sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA== /@babel/helper-split-export-declaration/7.12.13: dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 resolution: integrity: sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg== /@babel/helper-validator-identifier/7.12.11: @@ -1443,10 +1440,10 @@ packages: dependencies: '@babel/core': 7.13.8 '@babel/helper-annotate-as-pure': 7.12.13 - '@babel/helper-module-imports': 7.12.13 + '@babel/helper-module-imports': 7.13.12 '@babel/helper-plugin-utils': 7.13.0 '@babel/plugin-syntax-jsx': 7.12.13_@babel+core@7.13.8 - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 peerDependencies: '@babel/core': ^7.0.0-0 resolution: @@ -1480,7 +1477,7 @@ packages: /@babel/plugin-transform-runtime/7.13.9_@babel+core@7.13.8: dependencies: '@babel/core': 7.13.8 - '@babel/helper-module-imports': 7.12.13 + '@babel/helper-module-imports': 7.13.12 '@babel/helper-plugin-utils': 7.13.0 babel-plugin-polyfill-corejs2: 0.1.10_@babel+core@7.13.8 babel-plugin-polyfill-corejs3: 0.1.7_@babel+core@7.13.8 @@ -1716,7 +1713,7 @@ packages: '@babel/helper-function-name': 7.12.13 '@babel/helper-split-export-declaration': 7.12.13 '@babel/parser': 7.13.9 - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 debug: 4.3.1 globals: 11.12.0 lodash: 4.17.21 @@ -1734,7 +1731,6 @@ packages: '@babel/helper-validator-identifier': 7.12.11 lodash: 4.17.21 to-fast-properties: 2.0.0 - dev: true resolution: integrity: sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ== /@bcoe/v8-coverage/0.2.3: @@ -1975,88 +1971,87 @@ packages: react-dom: '>= 16.8.0 < 18.0.0' resolution: integrity: sha512-XOhaUsxiq62umpGMfgzey45H6Id7qOa2DyJJOIpZHEeo5uFVkxc7Qamng+ETdUIn9ql8tWRPzjTh5OAtjJAgxw== - /@docusaurus/core/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + /@docusaurus/core/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: '@babel/core': 7.13.8 '@babel/generator': 7.13.9 - '@babel/plugin-proposal-nullish-coalescing-operator': 7.13.8_@babel+core@7.13.8 - '@babel/plugin-proposal-optional-chaining': 7.13.8_@babel+core@7.13.8 '@babel/plugin-syntax-dynamic-import': 7.8.3_@babel+core@7.13.8 '@babel/plugin-transform-runtime': 7.13.9_@babel+core@7.13.8 '@babel/preset-env': 7.13.9_@babel+core@7.13.8 '@babel/preset-react': 7.12.13_@babel+core@7.13.8 '@babel/preset-typescript': 7.13.0_@babel+core@7.13.8 - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 '@babel/runtime-corejs3': 7.13.9 '@babel/traverse': 7.13.0 - '@docusaurus/cssnano-preset': 2.0.0-alpha.71 + '@docusaurus/cssnano-preset': 2.0.0-alpha.b305145da9 '@docusaurus/react-loadable': 5.5.0_react@17.0.1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 - '@docusaurus/utils-validation': 2.0.0-alpha.71 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 '@endiliey/static-site-generator-webpack-plugin': 4.0.0 '@svgr/webpack': 5.5.0 autoprefixer: 10.2.5_postcss@8.2.8 - babel-loader: 8.2.2_10cd6a7d04848c96a6e299bf325db7c9 + babel-loader: 8.2.2_e0e9ddbddd54b6aecd5a57e1ae14969b babel-plugin-dynamic-import-node: 2.3.0 boxen: 5.0.0 - cache-loader: 4.1.0_webpack@4.46.0 chalk: 4.1.0 chokidar: 3.5.1 clean-css: 5.1.1 commander: 5.1.0 - copy-webpack-plugin: 6.4.1_webpack@4.46.0 + copy-webpack-plugin: 8.1.1_webpack@5.31.2 core-js: 3.9.1 - css-loader: 5.1.1_webpack@4.46.0 + css-loader: 5.1.1_webpack@5.31.2 + css-minimizer-webpack-plugin: 2.0.0_clean-css@5.1.1+webpack@5.31.2 + cssnano: 4.1.11 del: 6.0.0 detect-port: 1.3.0 eta: 1.12.1 express: 4.17.1 - file-loader: 6.2.0_webpack@4.46.0 + file-loader: 6.2.0_webpack@5.31.2 fs-extra: 9.1.0 github-slugger: 1.3.0 globby: 11.0.2 html-minifier-terser: 5.1.1 html-tags: 3.1.0 - html-webpack-plugin: 4.5.2_webpack@4.46.0 + html-webpack-plugin: 5.3.1_webpack@5.31.2 import-fresh: 3.3.0 is-root: 2.1.0 - joi: 17.4.0 leven: 3.1.0 lodash: 4.17.21 - mini-css-extract-plugin: 0.8.2_webpack@4.46.0 + mini-css-extract-plugin: 1.5.0_webpack@5.31.2 module-alias: 2.2.2 nprogress: 0.2.0 - null-loader: 4.0.1_webpack@4.46.0 - optimize-css-assets-webpack-plugin: 5.0.4_webpack@4.46.0 - pnp-webpack-plugin: 1.6.4_typescript@4.2.3 postcss: 8.2.8 - postcss-loader: 4.2.0_postcss@8.2.8+webpack@4.46.0 + postcss-loader: 5.2.0_postcss@8.2.8+webpack@5.31.2 postcss-preset-env: 6.7.0 - prompts: 2.4.0 + prompts: 2.4.1 react: 17.0.1 react-dev-utils: 11.0.4 react-dom: 17.0.1_react@17.0.1 + react-error-overlay: 6.0.9 react-helmet: 6.1.0_react@17.0.1 react-loadable: 5.5.0_react@17.0.1 - react-loadable-ssr-addon: 0.3.0_a36ef9e00c6a4042d75d363eaf7d686c + react-loadable-ssr-addon-v5-slorber: 1.0.1_0535cba41aad84857b1eb4d2e14c69d1 react-router: 5.2.0_react@17.0.1 react-router-config: 5.1.1_react-router@5.2.0+react@17.0.1 react-router-dom: 5.2.0_react@17.0.1 resolve-pathname: 3.0.0 + rtl-detect: 1.0.2 semver: 7.3.4 serve-handler: 6.1.3 shelljs: 0.8.4 std-env: 2.3.0 - terser-webpack-plugin: 4.2.3_webpack@4.46.0 + strip-ansi: 6.0.0 + terser-webpack-plugin: 5.1.1_webpack@5.31.2 + tslib: 2.2.0 update-notifier: 5.1.0 - url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 + url-loader: 4.1.1_file-loader@6.2.0+webpack@5.31.2 wait-on: 5.2.1 - webpack: 4.46.0 + webpack: 5.31.2 webpack-bundle-analyzer: 4.4.0 - webpack-dev-server: 3.11.2_webpack@4.46.0 - webpack-merge: 4.2.2 - webpackbar: 5.0.0-3_webpack@4.46.0 + webpack-dev-server: 3.11.2_webpack@5.31.2 + webpack-merge: 5.7.3 + webpackbar: 5.0.0-3_webpack@5.31.2 dev: false engines: node: '>=12.13.0' @@ -2064,144 +2059,140 @@ packages: peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-/NgI/asRz69KZ11juSpOzITeOxgNH4Tuyti5xha0wz12MPgB76fPjefcgEURrWGYBW3lvVhY36jK1pPgdbI9Qg== - /@docusaurus/cssnano-preset/2.0.0-alpha.71: + integrity: sha512-0PDAjSUhp+y6GOfOzPni3IPmm1Anzni80zlIOEY2PCq3cvh/8vazeEHpkxQ8H36VSAdJ2OmE0VFIKPnM+2ARLw== + /@docusaurus/cssnano-preset/2.0.0-alpha.b305145da9: dependencies: cssnano-preset-advanced: 4.0.7 postcss: 7.0.35 postcss-sort-media-queries: 1.31.21 dev: false resolution: - integrity: sha512-MAoCfubVuNFpPW878j6nXlhSfV+BYS0Z8gxLKqSsZvaURoXiCF3dFzO2KAOqEqw1lKESuKoLL+Odvb8jfPgjWg== - /@docusaurus/mdx-loader/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-KBRLiNk+lqvtp+EQ4sKLFJOrYmuumfd98Yak36iRpNpvzt8xyLJPO2ZdT5Sa0h0yYWTwXS4nxS//DTbwtxHzPg== + /@docusaurus/mdx-loader/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: '@babel/parser': 7.13.9 '@babel/traverse': 7.13.0 - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/utils': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 '@mdx-js/mdx': 1.6.22 '@mdx-js/react': 1.6.22_react@17.0.1 escape-html: 1.0.3 - file-loader: 6.2.0_webpack@4.46.0 + file-loader: 6.2.0_webpack@5.31.2 fs-extra: 9.1.0 github-slugger: 1.3.0 gray-matter: 4.0.2 - loader-utils: 2.0.0 mdast-util-to-string: 2.0.0 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 remark-emoji: 2.1.0 stringify-object: 3.3.0 unist-util-visit: 2.0.3 - url-loader: 4.1.1_file-loader@6.2.0+webpack@4.46.0 - webpack: 4.46.0 + url-loader: 4.1.1_file-loader@6.2.0+webpack@5.31.2 + webpack: 5.31.2 dev: false engines: node: '>=12.13.0' peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-4Zp+T0IpuyX+If/Z1lhzwWd2aMkAkjUn8CNiqHU7IIf3lbyjWDVJvYAgJhmoVojvxdxGB0c5gc4uGROhZOJmng== - /@docusaurus/module-type-aliases/2.0.0-alpha.71: + integrity: sha512-fROOXThndnKc07Ksx3LoYmw9MEB4ExFh7ChtbUPbuTmF9PwvHCR5BU8NXxJmlFbtwmqydCjBnXXOZXF6h67Rfg== + /@docusaurus/module-type-aliases/2.0.0-alpha.b305145da9: dev: true resolution: - integrity: sha512-7f38VZ1z6rD3SuSOjovCxlLa1ZiAEbcArSf022ga8QQJmlS1dAP1o23MLE1wvurfaGiluQomzjwVAsafgHKUFw== - /@docusaurus/plugin-content-blog/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-1ev9ARrHxBkK4+jW8qhV0fWHGS6/8ASeZlu3iQcHPk6s4RFSfjd4PDy753RLmcVaUE2PcOnzoeHyWwsNZqSaRg== + /@docusaurus/plugin-content-blog/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/mdx-loader': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 - '@docusaurus/utils-validation': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/mdx-loader': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 chalk: 4.1.0 feed: 4.2.2 fs-extra: 9.1.0 globby: 11.0.2 - joi: 17.4.0 - loader-utils: 1.4.0 + loader-utils: 2.0.0 lodash: 4.17.21 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 reading-time: 1.3.0 remark-admonitions: 1.2.1 - webpack: 4.46.0 + tslib: 2.2.0 + webpack: 5.31.2 dev: false engines: node: '>=12.13.0' peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-/hLuKZliHnpC4fSiEfg5Wai1UyOwjgiHj4ZN2Mv9Su9wLQuDR33rhiJUXKOiVYHeBtlaSacdEPbovrUV+CO4gw== - /@docusaurus/plugin-content-docs/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-YJvs6UTgTd19dHN+g+Nr1jXRRo8ocTagvd4RuGVRut6fT4ssBTBcf4/m7GFzCcx4FDBHtf6G1g3cIPJSl/WqUg== + /@docusaurus/plugin-content-docs/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/mdx-loader': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 - '@docusaurus/utils-validation': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/mdx-loader': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 chalk: 4.1.0 + combine-promises: 1.1.0 execa: 5.0.0 fs-extra: 9.1.0 globby: 11.0.2 import-fresh: 3.3.0 - joi: 17.4.0 + js-yaml: 4.1.0 loader-utils: 1.4.0 lodash: 4.17.21 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 remark-admonitions: 1.2.1 shelljs: 0.8.4 + tslib: 2.2.0 utility-types: 3.10.0 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: node: '>=12.13.0' peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-27VvmeZh43vy9VIjA7BO84vZ8R+hwB/3iltvCqxw0cp2TQrJIBabbhGEitP5XxbWsRJErbaComCUsp25GU96vw== - /@docusaurus/plugin-content-pages/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-FFngXwDuCgSsGibHDvhxCe1oVR+ziE4pInugw4OwbT+pJ74RkCukCUMBuBYfRDT+Rnfsu3uSxy/+LmcAuYfVZw== + /@docusaurus/plugin-content-pages/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/mdx-loader': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 - '@docusaurus/utils-validation': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/mdx-loader': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 globby: 11.0.2 - joi: 17.4.0 - loader-utils: 1.4.0 lodash: 4.17.21 minimatch: 3.0.4 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 remark-admonitions: 1.2.1 slash: 3.0.0 - webpack: 4.46.0 + tslib: 2.2.0 + webpack: 5.31.2 dev: false engines: node: '>=12.13.0' peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-JnZQDMh2YLvY+CsGACGYlLrUeaIWky8yrBHlLsfWXj6mVZ4GjqEDVg2Ci2VuVGtPV83rwp+udIFteUdCNUV9hg== - /@docusaurus/plugin-debug/2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831: + integrity: sha512-6MLed4Mj12AbBUIij/CQSZkhwpPV52YOgI+/irV+JDafrcVQPwlf9vwtRag51XbSTIvKQctf8Ji+jBQl7OFYAg== + /@docusaurus/plugin-debug/2.0.0-alpha.b305145da9_e342ee84aa4c58264377ee43e7695221: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 react-json-view: 1.21.2_e342ee84aa4c58264377ee43e7695221 + tslib: 2.2.0 dev: false engines: node: '>=12.13.0' @@ -2209,12 +2200,11 @@ packages: '@types/react': '*' react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-MnLQao7nZQ2riQUfYU1iyRZQJUPumGMTkaB2H61lJhGnTn70KSVGG+f8rIShCt7pCkJjk/5yk3hjoBIP1qA42Q== - /@docusaurus/plugin-google-analytics/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-PpHmedpnUEJQ3C0lneYILpPg/6dm9/MB0bzq8Db/fBN9DcB5XDRmG4VQFDkypU8xQPsyMeyne/YWtxwTif6p3g== + /@docusaurus/plugin-google-analytics/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 dev: false @@ -2223,12 +2213,11 @@ packages: peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-rMU6VYQPeJjt2Xa47WEQq69cdXVaKzV3IOeBsAJyLPcsZ1yEABMgBXsus2UYGszyp7b96BYm02jHl+skaqaPNA== - /@docusaurus/plugin-google-gtag/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-ILOxThJEGb7BaHE+vIOgVr9vk0meA5JXJc5sLff+YuciTW00UJhWaScOsCw+TvIfcloLtwif5kOqoCH4RndrXQ== + /@docusaurus/plugin-google-gtag/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 dev: false @@ -2237,40 +2226,39 @@ packages: peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-cXUWKqHxYN84is56VxLzX7Ik32iKP2D19E9Rrbl+JigpN7/+m4hZwx3h5X11xHF3QMWv0Ok/dw0yIruBrhr3YA== - /@docusaurus/plugin-sitemap/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-6mmMo61Q1tfGCggDsIXeRTTzj5pSY0wO9PPm1ZA36ynnhh+/9mN5lE3kIEAh+WN9i7VZLWUyX84Hbn1HdZgz6w== + /@docusaurus/plugin-sitemap/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 fs-extra: 9.1.0 - joi: 17.4.0 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 sitemap: 6.4.0 + tslib: 2.2.0 dev: false engines: node: '>=12.13.0' peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-G6g31/mzOuQxN50ErOjDx0KTC4WqayOuk4jFVmRLfuNU0WW6hsCZevAVJppdvi3BzDlGVCVaYafF0G9QnbaeoA== - /@docusaurus/preset-classic/2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831: - dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-blog': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-docs': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-pages': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-debug': 2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831 - '@docusaurus/plugin-google-analytics': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-google-gtag': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-sitemap': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/theme-classic': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/theme-search-algolia': 2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831 + integrity: sha512-yRbq7lbuAYbwfbQo5lIY86FwzOoDWAaarzUUHLuBzPLTsoBlwx1pMaSRcZsTtAj03xuVWC0DOALOPJgXAcq0aQ== + /@docusaurus/preset-classic/2.0.0-alpha.b305145da9_a43930547da206c2a3d03fba663f3d7b: + dependencies: + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-blog': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-docs': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-pages': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-debug': 2.0.0-alpha.b305145da9_e342ee84aa4c58264377ee43e7695221 + '@docusaurus/plugin-google-analytics': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-google-gtag': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-sitemap': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/theme-classic': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/theme-search-algolia': 2.0.0-alpha.b305145da9_a43930547da206c2a3d03fba663f3d7b react: 17.0.1 react-dom: 17.0.1_react@17.0.1 dev: false @@ -2278,11 +2266,11 @@ packages: node: '>=12.13.0' peerDependencies: '@types/react': '*' + prism-react-renderer: '*' react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-NTAGdJv6aBA+yWg+zJF7apmwqfp6JG6ZrdD9NjprayHnIpRO/ejw3ClHpuEEnk1fKfJXtVt70XmcQIYakijPYw== + integrity: sha512-CJvt6o8S9cK3sMBKgpmf8MmYkenTInRONzBbEax+ZnhB5GVy/xyEi1NWHoenwznAxeTJtSoUXAs7I8vS3qH+qA== /@docusaurus/react-loadable/5.5.0_react@17.0.1: dependencies: prop-types: 15.7.2 @@ -2292,26 +2280,24 @@ packages: react: '*' resolution: integrity: sha512-Ld/kwUE6yATIOTLq3JCsWiTa/drisajwKqBQ2Rw6IcT+sFsKfYek8F2jSH8f68AT73xX97UehduZeCSlnuCBIg== - /@docusaurus/theme-classic/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: - dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-blog': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-docs': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-pages': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/theme-common': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 - '@docusaurus/utils': 2.0.0-alpha.71 - '@docusaurus/utils-validation': 2.0.0-alpha.71 + /@docusaurus/theme-classic/2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1: + dependencies: + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-blog': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-docs': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-pages': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/theme-common': 2.0.0-alpha.b305145da9_64bed22dbd68a67f3076edd8caaab2e8 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 '@mdx-js/mdx': 1.6.22 '@mdx-js/react': 1.6.22_react@17.0.1 - '@types/react-toggle': 4.0.2 chalk: 4.1.0 clsx: 1.1.1 copy-text-to-clipboard: 3.0.1 fs-extra: 9.1.0 globby: 11.0.2 - infima: 0.2.0-alpha.20 - joi: 17.4.0 + infima: 0.2.0-alpha.22 lodash: 4.17.21 parse-numeric-range: 1.2.0 postcss: 7.0.35 @@ -2321,7 +2307,6 @@ packages: react: 17.0.1 react-dom: 17.0.1_react@17.0.1 react-router-dom: 5.2.0_react@17.0.1 - react-toggle: 4.1.1_738bb8f954d12b6833bcb33fcfa7848e rtlcss: 2.6.2 dev: false engines: @@ -2329,38 +2314,39 @@ packages: peerDependencies: react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-f5abm+KgoMm+B5uYRoLK/wmQA69lUH0JOfP+KalhoUifw2m9Ly/alcrHe/d4XGfCEGZLx5RLAEc/Xj0m4uaNAg== - /@docusaurus/theme-common/2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1: + integrity: sha512-JIz2wY8LRFHDwkeLRTQQ01dmBPNmhtCBDzwP4WqGuErZuVIbLdWLwZqwt5y6abO8N+FrFX8ogXXL5+5++cIX/A== + /@docusaurus/theme-common/2.0.0-alpha.b305145da9_64bed22dbd68a67f3076edd8caaab2e8: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-blog': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-docs': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/plugin-content-pages': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/types': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-blog': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-docs': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/plugin-content-pages': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/types': 2.0.0-alpha.b305145da9 + prism-react-renderer: 1.2.0_react@17.0.1 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 + tslib: 2.2.0 dev: false engines: node: '>=12.13.0' peerDependencies: + prism-react-renderer: ^1.1.1 react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-XI7wC5mN//05UEjv0LJDTfsgl4rQZW4GgSoRWm9pexrSC/kiSgvjTLrD2yiIu3wvt+fR/lF05MS5N9QzivhCdw== - /@docusaurus/theme-search-algolia/2.0.0-alpha.71_1d18ec48d56e323c6ed0865312478831: + integrity: sha512-4Y+/nSeKIA295sAMZydDThLymr69tjw8lsLlcLfucZhnBtKhrOc+8N3Yw0FctjatqA/R07s0r55UHU4Qr3GB1A== + /@docusaurus/theme-search-algolia/2.0.0-alpha.b305145da9_a43930547da206c2a3d03fba663f3d7b: dependencies: '@docsearch/react': 3.0.0-alpha.33_e342ee84aa4c58264377ee43e7695221 - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/theme-common': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 - '@docusaurus/utils': 2.0.0-alpha.71 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 + '@docusaurus/theme-common': 2.0.0-alpha.b305145da9_64bed22dbd68a67f3076edd8caaab2e8 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 + '@docusaurus/utils-validation': 2.0.0-alpha.b305145da9 algoliasearch: 4.8.5 algoliasearch-helper: 3.4.4_algoliasearch@4.8.5 clsx: 1.1.1 eta: 1.12.1 - joi: 17.4.0 lodash: 4.17.21 react: 17.0.1 react-dom: 17.0.1_react@17.0.1 @@ -2369,47 +2355,48 @@ packages: node: '>=12.13.0' peerDependencies: '@types/react': '*' + prism-react-renderer: '*' react: ^16.8.4 || ^17.0.0 react-dom: ^16.8.4 || ^17.0.0 - typescript: '*' resolution: - integrity: sha512-pHtuSvott+AdUTiLAu3VjjMNfPAoodTITd8xWiUFlCmED9oEu7aswM1YkwQMAWKguueJ8PdslKHqU1E9FK+70A== - /@docusaurus/types/2.0.0-alpha.71: + integrity: sha512-/r5kmePnUnZzI9D9lIJsb5yBrn1Vg61BrJhTE0IcG6y5w6fsZDXRyQ6+WtXxsQaJSFR4rAX9BneD2q0e+UDvig== + /@docusaurus/types/2.0.0-alpha.b305145da9: dependencies: - '@types/webpack': 4.41.26 commander: 5.1.0 + joi: 17.4.0 querystring: 0.2.0 - webpack-merge: 4.2.2 + webpack: 5.31.2 + webpack-merge: 5.7.3 dev: false resolution: - integrity: sha512-LpYcaYU2NdAfYGKFIlXUtXw3R8HuQpyyDwdXk4dxN7VQXKO1dHDIl9JinuI5p9+95Go0F76T9qNrElAxNIORzQ== - /@docusaurus/utils-validation/2.0.0-alpha.71: + integrity: sha512-yjr07VhOExw1gUDHGW29vJ5MNsjlNkNl96dEeHrRmPx1WazLcgFDaF9Haga/mj00lk6AF3zOKwjD0Y3lxHa2Rg== + /@docusaurus/utils-validation/2.0.0-alpha.b305145da9: dependencies: - '@docusaurus/utils': 2.0.0-alpha.71 + '@docusaurus/utils': 2.0.0-alpha.b305145da9 chalk: 4.1.0 joi: 17.4.0 + tslib: 2.2.0 dev: false engines: node: '>=12.13.0' resolution: - integrity: sha512-+bps3QZrZ72OWmH8DhC1PsZBn2uWJWEOKAqM6Y/c/24Ka+ptUzUVfCwb62YKhZZiitXp2JgmAsLq3ly9aVdD7w== - /@docusaurus/utils/2.0.0-alpha.71: + integrity: sha512-klwmf+meUHw/b5wVDjsAMwpoMjaC+qT2IDrWIaNNCka9TFkWjpgyWlmoSCUBp5ID8xqZTssciwJRz4ry4Hmm5g== + /@docusaurus/utils/2.0.0-alpha.b305145da9: dependencies: - '@docusaurus/types': 2.0.0-alpha.71 + '@docusaurus/types': 2.0.0-alpha.b305145da9 '@types/github-slugger': 1.3.0 chalk: 4.1.0 escape-string-regexp: 4.0.0 fs-extra: 9.1.0 gray-matter: 4.0.2 - intl: 1.2.5 - intl-locales-supported: 1.8.12 lodash: 4.17.21 resolve-pathname: 3.0.0 + tslib: 2.2.0 dev: false engines: node: '>=12.13.0' resolution: - integrity: sha512-X0mTSG9vF5ZIC705yVm9YFMucxnp15PgcPYjPMMN/qFNf1lDrxIc3DV4giDBOcQYaQ5kIq9appm3VL/G3qIftg== + integrity: sha512-tmOv14grot5adtkRgWegxPm536fBKIN/G6e0BbGlol2Dz4l2idb74sBhfXfPKYh+WuEMkcsjyaWd6Uu4lEZEOw== /@endiliey/static-site-generator-webpack-plugin/4.0.0: dependencies: bluebird: 3.7.2 @@ -2890,15 +2877,6 @@ packages: node: '>= 8' resolution: integrity: sha512-8Broas6vTtW4GIXTAHDoE32hnN2M5ykgCpWGbuXHQ15vEMqr23pB76e/GZcYsZCHALv50ktd24qhEyKr6wBtow== - /@npmcli/move-file/1.1.2: - dependencies: - mkdirp: 1.0.4 - rimraf: 3.0.2 - dev: false - engines: - node: '>=10' - resolution: - integrity: sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== /@parcel/fs/1.11.0: dependencies: '@parcel/utils': 1.11.0 @@ -3054,7 +3032,7 @@ packages: integrity: sha512-q52VOcsJPvV3jO1wkPtzTuKlvX7Y3xIcWRpCMtBF3MrteZJtBfQw/+u0B1BHy5ColpQc1/YVTrPEtSYIMNZlrQ== /@svgr/hast-util-to-babel-ast/5.5.0: dependencies: - '@babel/types': 7.13.0 + '@babel/types': 7.13.14 dev: false engines: node: '>=10' @@ -3104,14 +3082,16 @@ packages: node: '>=6' resolution: integrity: sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + /@trysound/sax/0.1.1: + dev: false + engines: + node: '>=10.13.0' + resolution: + integrity: sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow== /@tsconfig/docusaurus/1.0.2: dev: true resolution: integrity: sha512-x4rRVb346vjyym6QbeB1Tv01XXwhbkujOmvDmtf0bT20oc2gbDhbmwpskKqZ5Of2Q/Vk4jNk1WMiLsZdJ9t7Dw== - /@types/anymatch/1.3.1: - dev: false - resolution: - integrity: sha512-/+CRPXpBDpo2RK9C68N3b2cOvO0Cf5B9aPijHsoDQTHivnGSObdOF2BRQOYjojWTDy6nQvMjmqRXIxH55VjxxA== /@types/babel__core/7.1.12: dependencies: '@babel/parser': 7.13.9 @@ -3155,18 +3135,15 @@ packages: dependencies: '@types/eslint': 7.2.9 '@types/estree': 0.0.46 - dev: true resolution: integrity: sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw== /@types/eslint/7.2.9: dependencies: '@types/estree': 0.0.46 '@types/json-schema': 7.0.7 - dev: true resolution: integrity: sha512-SdAAXZNvWfhtf3X3y1cbbCZhP3xyPh7mfTvzV6CgfWc/ZhiHpyr9bVroe2/RCHIf7gczaNcprhaBLsx0CCJHQA== /@types/estree/0.0.46: - dev: true resolution: integrity: sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg== /@types/exit/0.1.31: @@ -3312,6 +3289,7 @@ packages: resolution: integrity: sha512-xRCgeE0Q4pT5UZ189TJ3SpYuX/QGl6QIAOAIeDSbAVAd2gX1NxSZup4jNVK7cxIeP8KDSbJgcckun495isP1jQ== /@types/node/14.14.32: + dev: true resolution: integrity: sha512-/Ctrftx/zp4m8JOujM5ZhwzlWLx22nbQJiVqz8/zE15gOeEW+uly3FSX4fGFpcfEvFzXcMCJwq9lGVWgyARXhg== /@types/node/14.14.37: @@ -3333,6 +3311,7 @@ packages: resolution: integrity: sha512-i99hy7Ki19EqVOl77WplDrvgNugHnsSjECVR/wUrzw2TJXz1zlUfT2ngGckR6xN7yFYaijsMAqPkOLx9HgUqHg== /@types/prop-types/15.7.3: + dev: true resolution: integrity: sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== /@types/puppeteer/5.4.3: @@ -3365,26 +3344,22 @@ packages: dev: true resolution: integrity: sha512-0bhXQwHYfMeJlCh7mGhc0VJTRm0Gk+Z8T00aiP4702mDUuLs9SMhnd2DitpjWFjdOecx2UXtICK14H9iMnziGA== - /@types/react-toggle/4.0.2: - dependencies: - '@types/react': 17.0.3 - dev: false - resolution: - integrity: sha512-sHqfoKFnL0YU2+OC4meNEC8Ptx9FE8/+nFeFvNcdBa6ANA8KpAzj3R9JN8GtrvlLgjKDoYgI7iILgXYcTPo2IA== /@types/react/17.0.3: dependencies: '@types/prop-types': 15.7.3 '@types/scheduler': 0.16.1 csstype: 3.0.7 + dev: true resolution: integrity: sha512-wYOUxIgs2HZZ0ACNiIayItyluADNbONl7kt8lkLjVK8IitMH5QMyAh75Fwhmo37r1m7L2JaFj03sIfxBVDvRAg== /@types/sax/1.2.1: dependencies: - '@types/node': 14.14.32 + '@types/node': 14.14.37 dev: false resolution: integrity: sha512-dqYdvN7Sbw8QT/0Ci5rhjE4/iCMJEM0Y9rHpCu+gGXD9Lwbz28t6HI2yegsB6BoV1sShRMU6lAmAcgRjmFy7LA== /@types/scheduler/0.16.1: + dev: true resolution: integrity: sha512-EaCxbanVeyxDRTQBkdLb3Bvl/HK7PBK6UJjsSixB0iHKoWxE5uu2Q/DgtpOhPIojN0Zl1whvOd7PoHs2P0s5eA== /@types/semver/6.2.2: @@ -3397,10 +3372,6 @@ packages: dev: true resolution: integrity: sha512-05d9fUDqRnt36rizLgo38SbPTrkMzdhXpvSHSAhxzokgIUPGNUoXHV0zYjPpTd4IryDADJ0mGHpfJ/Yhjyh9JQ== - /@types/source-list-map/0.1.2: - dev: false - resolution: - integrity: sha512-K5K+yml8LTo9bWJI/rECfIPrGgxdpeNbj+d53lwN4QjW1MCwlkhUms+gtdzigTeUyBr09+u8BwOIY3MXvHdcsA== /@types/stack-utils/1.0.1: dev: true resolution: @@ -3413,43 +3384,14 @@ packages: dev: true resolution: integrity: sha512-akhlviqwowzRNiz3ooAbkjvyMO8cikBqap9z/0yfvMAb6vIsp91Rfox67qtgIhZosWP01MVSTwsgSFYWo4SWQA== - /@types/tapable/1.0.6: - dev: false - resolution: - integrity: sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA== /@types/tmp/0.2.0: dev: true resolution: integrity: sha512-flgpHJjntpBAdJD43ShRosQvNC0ME97DCfGvZEDlAThQmnerRXrLbX6YgzRBQCZTthET9eAWFAMaYP0m0Y4HzQ== - /@types/uglify-js/3.13.0: - dependencies: - source-map: 0.6.1 - dev: false - resolution: - integrity: sha512-EGkrJD5Uy+Pg0NUR8uA4bJ5WMfljyad0G+784vLCNUkD+QwOJXUbBYExXfVGf7YtyzdQp3L/XMYcliB987kL5Q== /@types/unist/2.0.3: dev: false resolution: integrity: sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ== - /@types/webpack-sources/2.1.0: - dependencies: - '@types/node': 14.14.37 - '@types/source-list-map': 0.1.2 - source-map: 0.7.3 - dev: false - resolution: - integrity: sha512-LXn/oYIpBeucgP1EIJbKQ2/4ZmpvRl+dlrFdX7+94SKRUV3Evy3FsfMZY318vGhkWUS5MPhtOM3w1/hCOAOXcg== - /@types/webpack/4.41.26: - dependencies: - '@types/anymatch': 1.3.1 - '@types/node': 14.14.32 - '@types/tapable': 1.0.6 - '@types/uglify-js': 3.13.0 - '@types/webpack-sources': 2.1.0 - source-map: 0.6.1 - dev: false - resolution: - integrity: sha512-7ZyTfxjCRwexh+EJFwRUM+CDB2XvgHl4vfuqf1ZKrgGvcS5BrNvPQqJh3tsZ0P6h6Aa1qClVHaJZszLPzpqHeA== /@types/yargs-parser/20.2.0: dev: true resolution: @@ -3649,123 +3591,48 @@ packages: dependencies: '@webassemblyjs/helper-numbers': 1.11.0 '@webassemblyjs/helper-wasm-bytecode': 1.11.0 - dev: true resolution: integrity: sha512-kX2W49LWsbthrmIRMbQZuQDhGtjyqXfEmmHyEi4XWnSZtPmxY0+3anPIzsnRb45VH/J55zlOfWvZuY47aJZTJg== - /@webassemblyjs/ast/1.9.0: - dependencies: - '@webassemblyjs/helper-module-context': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/wast-parser': 1.9.0 - dev: false - resolution: - integrity: sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== /@webassemblyjs/floating-point-hex-parser/1.11.0: - dev: true resolution: integrity: sha512-Q/aVYs/VnPDVYvsCBL/gSgwmfjeCb4LW8+TMrO3cSzJImgv8lxxEPM2JA5jMrivE7LSz3V+PFqtMbls3m1exDA== - /@webassemblyjs/floating-point-hex-parser/1.9.0: - dev: false - resolution: - integrity: sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== /@webassemblyjs/helper-api-error/1.11.0: - dev: true resolution: integrity: sha512-baT/va95eXiXb2QflSx95QGT5ClzWpGaa8L7JnJbgzoYeaA27FCvuBXU758l+KXWRndEmUXjP0Q5fibhavIn8w== - /@webassemblyjs/helper-api-error/1.9.0: - dev: false - resolution: - integrity: sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== /@webassemblyjs/helper-buffer/1.11.0: - dev: true resolution: integrity: sha512-u9HPBEl4DS+vA8qLQdEQ6N/eJQ7gT7aNvMIo8AAWvAl/xMrcOSiI2M0MAnMCy3jIFke7bEee/JwdX1nUpCtdyA== - /@webassemblyjs/helper-buffer/1.9.0: - dev: false - resolution: - integrity: sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== - /@webassemblyjs/helper-code-frame/1.9.0: - dependencies: - '@webassemblyjs/wast-printer': 1.9.0 - dev: false - resolution: - integrity: sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== - /@webassemblyjs/helper-fsm/1.9.0: - dev: false - resolution: - integrity: sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== - /@webassemblyjs/helper-module-context/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - dev: false - resolution: - integrity: sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== /@webassemblyjs/helper-numbers/1.11.0: dependencies: '@webassemblyjs/floating-point-hex-parser': 1.11.0 '@webassemblyjs/helper-api-error': 1.11.0 '@xtuc/long': 4.2.2 - dev: true resolution: integrity: sha512-DhRQKelIj01s5IgdsOJMKLppI+4zpmcMQ3XboFPLwCpSNH6Hqo1ritgHgD0nqHeSYqofA6aBN/NmXuGjM1jEfQ== /@webassemblyjs/helper-wasm-bytecode/1.11.0: - dev: true resolution: integrity: sha512-MbmhvxXExm542tWREgSFnOVo07fDpsBJg3sIl6fSp9xuu75eGz5lz31q7wTLffwL3Za7XNRCMZy210+tnsUSEA== - /@webassemblyjs/helper-wasm-bytecode/1.9.0: - dev: false - resolution: - integrity: sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== /@webassemblyjs/helper-wasm-section/1.11.0: dependencies: '@webassemblyjs/ast': 1.11.0 '@webassemblyjs/helper-buffer': 1.11.0 '@webassemblyjs/helper-wasm-bytecode': 1.11.0 '@webassemblyjs/wasm-gen': 1.11.0 - dev: true resolution: integrity: sha512-3Eb88hcbfY/FCukrg6i3EH8H2UsD7x8Vy47iVJrP967A9JGqgBVL9aH71SETPx1JrGsOUVLo0c7vMCN22ytJew== - /@webassemblyjs/helper-wasm-section/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - dev: false - resolution: - integrity: sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== /@webassemblyjs/ieee754/1.11.0: dependencies: '@xtuc/ieee754': 1.2.0 - dev: true resolution: integrity: sha512-KXzOqpcYQwAfeQ6WbF6HXo+0udBNmw0iXDmEK5sFlmQdmND+tr773Ti8/5T/M6Tl/413ArSJErATd8In3B+WBA== - /@webassemblyjs/ieee754/1.9.0: - dependencies: - '@xtuc/ieee754': 1.2.0 - dev: false - resolution: - integrity: sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== /@webassemblyjs/leb128/1.11.0: dependencies: '@xtuc/long': 4.2.2 - dev: true resolution: integrity: sha512-aqbsHa1mSQAbeeNcl38un6qVY++hh8OpCOzxhixSYgbRfNWcxJNJQwe2rezK9XEcssJbbWIkblaJRwGMS9zp+g== - /@webassemblyjs/leb128/1.9.0: - dependencies: - '@xtuc/long': 4.2.2 - dev: false - resolution: - integrity: sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== /@webassemblyjs/utf8/1.11.0: - dev: true resolution: integrity: sha512-A/lclGxH6SpSLSyFowMzO/+aDEPU4hvEiooCMXQPcQFPPJaYcPQNKGOCLUySJsYJ4trbpr+Fs08n4jelkVTGVw== - /@webassemblyjs/utf8/1.9.0: - dev: false - resolution: - integrity: sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== /@webassemblyjs/wasm-edit/1.11.0: dependencies: '@webassemblyjs/ast': 1.11.0 @@ -3776,22 +3643,8 @@ packages: '@webassemblyjs/wasm-opt': 1.11.0 '@webassemblyjs/wasm-parser': 1.11.0 '@webassemblyjs/wast-printer': 1.11.0 - dev: true resolution: integrity: sha512-JHQ0damXy0G6J9ucyKVXO2j08JVJ2ntkdJlq1UTiUrIgfGMmA7Ik5VdC/L8hBK46kVJgujkBIoMtT8yVr+yVOQ== - /@webassemblyjs/wasm-edit/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/helper-wasm-section': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - '@webassemblyjs/wasm-opt': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - '@webassemblyjs/wast-printer': 1.9.0 - dev: false - resolution: - integrity: sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== /@webassemblyjs/wasm-gen/1.11.0: dependencies: '@webassemblyjs/ast': 1.11.0 @@ -3799,37 +3652,16 @@ packages: '@webassemblyjs/ieee754': 1.11.0 '@webassemblyjs/leb128': 1.11.0 '@webassemblyjs/utf8': 1.11.0 - dev: true resolution: integrity: sha512-BEUv1aj0WptCZ9kIS30th5ILASUnAPEvE3tVMTrItnZRT9tXCLW2LEXT8ezLw59rqPP9klh9LPmpU+WmRQmCPQ== - /@webassemblyjs/wasm-gen/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/ieee754': 1.9.0 - '@webassemblyjs/leb128': 1.9.0 - '@webassemblyjs/utf8': 1.9.0 - dev: false - resolution: - integrity: sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== /@webassemblyjs/wasm-opt/1.11.0: dependencies: '@webassemblyjs/ast': 1.11.0 '@webassemblyjs/helper-buffer': 1.11.0 '@webassemblyjs/wasm-gen': 1.11.0 '@webassemblyjs/wasm-parser': 1.11.0 - dev: true resolution: integrity: sha512-tHUSP5F4ywyh3hZ0+fDQuWxKx3mJiPeFufg+9gwTpYp324mPCQgnuVKwzLTZVqj0duRDovnPaZqDwoyhIO8kYg== - /@webassemblyjs/wasm-opt/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-buffer': 1.9.0 - '@webassemblyjs/wasm-gen': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - dev: false - resolution: - integrity: sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== /@webassemblyjs/wasm-parser/1.11.0: dependencies: '@webassemblyjs/ast': 1.11.0 @@ -3838,46 +3670,14 @@ packages: '@webassemblyjs/ieee754': 1.11.0 '@webassemblyjs/leb128': 1.11.0 '@webassemblyjs/utf8': 1.11.0 - dev: true resolution: integrity: sha512-6L285Sgu9gphrcpDXINvm0M9BskznnzJTE7gYkjDbxET28shDqp27wpruyx3C2S/dvEwiigBwLA1cz7lNUi0kw== - /@webassemblyjs/wasm-parser/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-api-error': 1.9.0 - '@webassemblyjs/helper-wasm-bytecode': 1.9.0 - '@webassemblyjs/ieee754': 1.9.0 - '@webassemblyjs/leb128': 1.9.0 - '@webassemblyjs/utf8': 1.9.0 - dev: false - resolution: - integrity: sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== - /@webassemblyjs/wast-parser/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/floating-point-hex-parser': 1.9.0 - '@webassemblyjs/helper-api-error': 1.9.0 - '@webassemblyjs/helper-code-frame': 1.9.0 - '@webassemblyjs/helper-fsm': 1.9.0 - '@xtuc/long': 4.2.2 - dev: false - resolution: - integrity: sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== /@webassemblyjs/wast-printer/1.11.0: dependencies: '@webassemblyjs/ast': 1.11.0 '@xtuc/long': 4.2.2 - dev: true resolution: integrity: sha512-Fg5OX46pRdTgB7rKIUojkh9vXaVN6sGYCnEiJN1GYkb0RPwShZXp6KTDqmoMdQPKhcroOXh3fEzmkWmCYaKYhQ== - /@webassemblyjs/wast-printer/1.9.0: - dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/wast-parser': 1.9.0 - '@xtuc/long': 4.2.2 - dev: false - resolution: - integrity: sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== /@webpack-cli/configtest/1.0.2_webpack-cli@4.6.0+webpack@5.31.2: dependencies: webpack: 5.31.2_webpack-cli@4.6.0 @@ -3993,6 +3793,7 @@ packages: resolution: integrity: sha512-+bpA9MJsHdZ4bgfDcpk0ozQyhhVct7rzOmO0s1IIr0AGGgKBljss8n2zp11rRP2wid5VGeh04CgeKzgat5/25A== /acorn/6.4.2: + dev: true engines: node: '>=0.4.0' hasBin: true @@ -4006,13 +3807,13 @@ packages: resolution: integrity: sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== /acorn/8.0.5: + dev: true engines: node: '>=0.4.0' hasBin: true resolution: integrity: sha512-v+DieK/HJkJOpFBETDJioequtc3PfxsWMaxIdIwujtF7FEV/MAyDQLlm6/zPvr7Mix07mLh6ccVwIsloceodlg== /acorn/8.1.0: - dev: true engines: node: '>=0.4.0' hasBin: true @@ -4207,7 +4008,7 @@ packages: /anymatch/3.1.1: dependencies: normalize-path: 3.0.0 - picomatch: 2.2.2 + picomatch: 2.2.3 engines: node: '>= 8' resolution: @@ -4340,6 +4141,7 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 safer-buffer: 2.1.2 + dev: true resolution: integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== /asn1/0.2.4: @@ -4356,6 +4158,7 @@ packages: dependencies: object-assign: 4.1.1 util: 0.10.3 + dev: true resolution: integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA== /assign-symbols/1.0.0: @@ -4401,7 +4204,7 @@ packages: /autoprefixer/10.2.5_postcss@8.2.8: dependencies: browserslist: 4.16.3 - caniuse-lite: 1.0.30001197 + caniuse-lite: 1.0.30001208 colorette: 1.2.2 fraction.js: 4.0.13 normalize-range: 0.1.2 @@ -4418,7 +4221,7 @@ packages: /autoprefixer/9.8.6: dependencies: browserslist: 4.16.3 - caniuse-lite: 1.0.30001197 + caniuse-lite: 1.0.30001208 colorette: 1.2.2 normalize-range: 0.1.2 num2fraction: 1.2.2 @@ -4458,14 +4261,14 @@ packages: '@babel/core': ^7.0.0 resolution: integrity: sha512-pl4Q+GAVOHwvjrck6jKjvmGhnO3jHX/xuB9d27f+EJZ/6k+6nMuPjorrYp7s++bKKdANwzElBWnLWaObvTnaZA== - /babel-loader/8.2.2_10cd6a7d04848c96a6e299bf325db7c9: + /babel-loader/8.2.2_e0e9ddbddd54b6aecd5a57e1ae14969b: dependencies: '@babel/core': 7.13.8 find-cache-dir: 3.3.1 loader-utils: 1.4.0 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: node: '>= 8.9' @@ -4642,6 +4445,7 @@ packages: resolution: integrity: sha1-4pf2DX7BAUp6lxo568ipjAtoHnA= /base64-js/1.5.1: + dev: true resolution: integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== /batch/0.6.1: @@ -4700,9 +4504,11 @@ packages: resolution: integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== /bn.js/4.12.0: + dev: true resolution: integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== /bn.js/5.2.0: + dev: true resolution: integrity: sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== /body-parser/1.19.0: @@ -4808,6 +4614,7 @@ packages: resolution: integrity: sha512-OfZpABRQQf+Xsmju8XE9bDjs+uU4vLREGolP7bDgcpsI17QREyZ4Bl+2KLxxx1kCgA0fAIhKQBaBYh+PEcCqYQ== /brorand/1.1.0: + dev: true resolution: integrity: sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= /browser-process-hrtime/1.0.0: @@ -4822,6 +4629,7 @@ packages: evp_bytestokey: 1.0.3 inherits: 2.0.4 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== /browserify-cipher/1.0.1: @@ -4829,6 +4637,7 @@ packages: browserify-aes: 1.2.0 browserify-des: 1.0.2 evp_bytestokey: 1.0.3 + dev: true resolution: integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== /browserify-des/1.0.2: @@ -4837,12 +4646,14 @@ packages: des.js: 1.0.1 inherits: 2.0.4 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== /browserify-rsa/4.1.0: dependencies: bn.js: 5.2.0 randombytes: 2.1.0 + dev: true resolution: integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== /browserify-sign/4.2.1: @@ -4856,17 +4667,19 @@ packages: parse-asn1: 5.1.6 readable-stream: 3.6.0 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== /browserify-zlib/0.2.0: dependencies: pako: 1.0.11 + dev: true resolution: integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== /browserslist/4.14.2: dependencies: - caniuse-lite: 1.0.30001197 - electron-to-chromium: 1.3.682 + caniuse-lite: 1.0.30001208 + electron-to-chromium: 1.3.712 escalade: 3.1.1 node-releases: 1.1.71 dev: false @@ -4917,11 +4730,8 @@ packages: /buffer-indexof/1.1.1: resolution: integrity: sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g== - /buffer-json/2.0.0: - dev: false - resolution: - integrity: sha512-+jjPFVqyfF1esi9fvfUs3NqM0pH1ziZ36VP4hmA/y/Ssfo/5w5xHKfTw9BwQjoJ1w/oVtpLomqwUHKdefGyuHw== /buffer-xor/1.0.3: + dev: true resolution: integrity: sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= /buffer/4.9.2: @@ -4929,6 +4739,7 @@ packages: base64-js: 1.5.1 ieee754: 1.2.1 isarray: 1.0.0 + dev: true resolution: integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg== /buffer/5.7.1: @@ -4939,6 +4750,7 @@ packages: resolution: integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== /builtin-status-codes/3.0.0: + dev: true resolution: integrity: sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug= /bytes/3.0.0: @@ -4951,50 +4763,6 @@ packages: node: '>= 0.8' resolution: integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - /cacache/12.0.4: - dependencies: - bluebird: 3.7.2 - chownr: 1.1.4 - figgy-pudding: 3.5.2 - glob: 7.1.6 - graceful-fs: 4.2.6 - infer-owner: 1.0.4 - lru-cache: 5.1.1 - mississippi: 3.0.0 - mkdirp: 0.5.5 - move-concurrently: 1.0.1 - promise-inflight: 1.0.1 - rimraf: 2.7.1 - ssri: 6.0.1 - unique-filename: 1.1.1 - y18n: 4.0.1 - dev: false - resolution: - integrity: sha512-a0tMB40oefvuInr4Cwb3GerbL9xTj1D5yg0T5xrjGCGyfvbxseIXX7BAO/u/hIXdafzOI5JC3wDwHyf24buOAQ== - /cacache/15.0.5: - dependencies: - '@npmcli/move-file': 1.1.2 - chownr: 2.0.0 - fs-minipass: 2.1.0 - glob: 7.1.6 - infer-owner: 1.0.4 - lru-cache: 6.0.0 - minipass: 3.1.3 - minipass-collect: 1.0.2 - minipass-flush: 1.0.5 - minipass-pipeline: 1.2.4 - mkdirp: 1.0.4 - p-map: 4.0.0 - promise-inflight: 1.0.1 - rimraf: 3.0.2 - ssri: 8.0.1 - tar: 6.1.0 - unique-filename: 1.1.1 - dev: false - engines: - node: '>= 10' - resolution: - integrity: sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A== /cache-base/1.0.1: dependencies: collection-visit: 1.0.0 @@ -5010,22 +4778,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - /cache-loader/4.1.0_webpack@4.46.0: - dependencies: - buffer-json: 2.0.0 - find-cache-dir: 3.3.1 - loader-utils: 1.4.0 - mkdirp: 0.5.5 - neo-async: 2.6.2 - schema-utils: 2.7.1 - webpack: 4.46.0 - dev: false - engines: - node: '>= 8.9.0' - peerDependencies: - webpack: ^4.0.0 - resolution: - integrity: sha512-ftOayxve0PwKzBF/GLsZNC9fJBXl8lkZE3TOsjkboHfVHVkL39iUEs1FO07A33mizmci5Dudt38UZrrYXDtbhw== /cacheable-request/6.1.0: dependencies: clone-response: 1.0.2 @@ -5134,10 +4886,6 @@ packages: lodash.uniq: 4.5.0 resolution: integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== - /caniuse-lite/1.0.30001197: - dev: false - resolution: - integrity: sha512-8aE+sqBqtXz4G8g35Eg/XEaFr2N7rd/VQ6eABGBmNtcB8cN6qNJhMi6oSFy4UWWZgqgL3filHT8Nha4meu3tsw== /caniuse-lite/1.0.30001208: resolution: integrity: sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA== @@ -5283,26 +5031,12 @@ packages: resolution: integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== /chownr/1.1.4: + dev: true resolution: integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - /chownr/2.0.0: - dev: false + /chrome-trace-event/1.0.3: engines: - node: '>=10' - resolution: - integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - /chrome-trace-event/1.0.2: - dependencies: - tslib: 1.14.1 - dev: false - engines: - node: '>=6.0' - resolution: - integrity: sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ== - /chrome-trace-event/1.0.3: - dev: true - engines: - node: '>=6.0' + node: '>=6.0' resolution: integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== /ci-info/2.0.0: @@ -5316,6 +5050,7 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== /cjs-module-lexer/0.6.0: @@ -5332,10 +5067,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - /classnames/2.2.6: - dev: false - resolution: - integrity: sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== /clean-css/4.2.3: dependencies: source-map: 0.6.1 @@ -5463,7 +5194,6 @@ packages: is-plain-object: 2.0.4 kind-of: 6.0.3 shallow-clone: 3.0.1 - dev: true engines: node: '>=6' resolution: @@ -5569,6 +5299,12 @@ packages: node: '>=0.1.90' resolution: integrity: sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + /combine-promises/1.1.0: + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-ZI9jvcLDxqwaXEixOhArm3r7ReIivsXkpbyEWyeOhzz1QS0iSgBPnWvEqvIQtYyamGCYA88gFhmUrs9hrrQ0pg== /combined-stream/1.0.8: dependencies: delayed-stream: 1.0.0 @@ -5576,6 +5312,10 @@ packages: node: '>= 0.8' resolution: integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + /comlink/4.3.0: + dev: false + resolution: + integrity: sha512-mu4KKKNuW8TvkfpW/H88HBPeILubBS6T94BdD1VWBXNXfiyqVtwUCVNO1GeNOBTsIswzsMjWlycYr+77F5b84g== /comma-separated-tokens/1.0.8: dev: false resolution: @@ -5607,7 +5347,6 @@ packages: resolution: integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== /commander/7.2.0: - dev: true engines: node: '>= 10' resolution: @@ -5665,6 +5404,7 @@ packages: inherits: 2.0.4 readable-stream: 2.3.7 typedarray: 0.0.6 + dev: true engines: '0': node >= 0.8 resolution: @@ -5692,6 +5432,7 @@ packages: resolution: integrity: sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== /console-browserify/1.2.0: + dev: true resolution: integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA== /console-control-strings/1.1.0: @@ -5699,6 +5440,7 @@ packages: resolution: integrity: sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= /constants-browserify/1.0.0: + dev: true resolution: integrity: sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= /content-disposition/0.5.2: @@ -5732,17 +5474,6 @@ packages: node: '>= 0.6' resolution: integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - /copy-concurrently/1.0.5: - dependencies: - aproba: 1.2.0 - fs-write-stream-atomic: 1.0.10 - iferr: 0.1.5 - mkdirp: 0.5.5 - rimraf: 2.7.1 - run-queue: 1.0.3 - dev: false - resolution: - integrity: sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== /copy-descriptor/0.1.1: engines: node: '>=0.10.0' @@ -5760,27 +5491,23 @@ packages: dev: false resolution: integrity: sha512-i13qo6kIHTTpCm8/Wup+0b1mVWETvu2kIMzKoK8FpkLkFxlt0znUAHcMzox+T8sPlqtZXq3CulEjQHsYiGFJUw== - /copy-webpack-plugin/6.4.1_webpack@4.46.0: + /copy-webpack-plugin/8.1.1_webpack@5.31.2: dependencies: - cacache: 15.0.5 fast-glob: 3.2.5 - find-cache-dir: 3.3.1 glob-parent: 5.1.2 - globby: 11.0.2 - loader-utils: 2.0.0 + globby: 11.0.3 normalize-path: 3.0.0 p-limit: 3.1.0 schema-utils: 3.0.0 serialize-javascript: 5.0.1 - webpack: 4.46.0 - webpack-sources: 1.4.3 + webpack: 5.31.2 dev: false engines: node: '>= 10.13.0' peerDependencies: - webpack: ^4.37.0 || ^5.0.0 + webpack: ^5.1.0 resolution: - integrity: sha512-MXyPCjdPVx5iiWyl40Va3JGh27bKzOTNY3NjUTrosD2q7dR/cLD0013uqJ3BpFbUjyONINjb6qI7nDIJujrMbA== + integrity: sha512-rYM2uzRxrLRpcyPqGceRBDpxxUV8vcDqIKxAUKfcnFpcrPxT5+XvhTxv7XLjo5AvEJFPdAE3zCogG2JVahqgSQ== /core-js-compat/3.9.1: dependencies: browserslist: 4.16.3 @@ -5830,6 +5557,7 @@ packages: dependencies: bn.js: 4.12.0 elliptic: 6.5.4 + dev: true resolution: integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== /create-hash/1.2.0: @@ -5839,6 +5567,7 @@ packages: md5.js: 1.3.5 ripemd160: 2.0.2 sha.js: 2.4.11 + dev: true resolution: integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== /create-hmac/1.1.7: @@ -5849,6 +5578,7 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 + dev: true resolution: integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== /create-require/1.1.1: @@ -5919,6 +5649,7 @@ packages: public-encrypt: 4.0.3 randombytes: 2.1.0 randomfill: 1.0.4 + dev: true resolution: integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== /crypto-random-string/2.0.0: @@ -5939,6 +5670,10 @@ packages: /css-color-names/0.0.4: resolution: integrity: sha1-gIrcLnnPhHOAabZGyyDsJ762KeA= + /css-color-names/1.0.1: + dev: false + resolution: + integrity: sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA== /css-declaration-sorter/4.0.1: dependencies: postcss: 7.0.35 @@ -5947,6 +5682,17 @@ packages: node: '>4' resolution: integrity: sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA== + /css-declaration-sorter/6.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + timsort: 0.3.0 + dev: false + engines: + node: '>= 10' + peerDependencies: + postcss: ^8.0.9 + resolution: + integrity: sha512-S0TE4E0ha5+tBHdLWPc5n+S8E4dFBS5xScPvgHkLNZwWvX4ISoFGhGeerLC9uS1cKA/sC+K2wHq6qEbcagT/fg== /css-has-pseudo/0.10.0: dependencies: postcss: 7.0.35 @@ -5964,7 +5710,7 @@ packages: dev: false resolution: integrity: sha512-PJF0SpJT+WdbVVt0AOYp9C8GnuruRlL/UFW7932nLWmFLQTaWEzTBQEx7/hn4BuV+WON75iAViSUJLiU3PKbpA== - /css-loader/5.1.1_webpack@4.46.0: + /css-loader/5.1.1_webpack@5.31.2: dependencies: camelcase: 6.2.0 cssesc: 3.0.0 @@ -5978,7 +5724,7 @@ packages: postcss-value-parser: 4.1.0 schema-utils: 3.0.0 semver: 7.3.4 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: node: '>= 10.13.0' @@ -5986,6 +5732,31 @@ packages: webpack: ^4.27.0 || ^5.0.0 resolution: integrity: sha512-5FfhpjwtuRgxqmusDidowqmLlcb+1HgnEDMsi2JhiUrZUcoc+cqw+mUtMIF/+OfeMYaaFCLYp1TaIt9H6I/fKA== + /css-minimizer-webpack-plugin/2.0.0_clean-css@5.1.1+webpack@5.31.2: + dependencies: + clean-css: 5.1.1 + cssnano: 5.0.1_postcss@8.2.12 + jest-worker: 26.6.2 + p-limit: 3.1.0 + postcss: 8.2.12 + schema-utils: 3.0.0 + serialize-javascript: 5.0.1 + source-map: 0.6.1 + webpack: 5.31.2 + dev: false + engines: + node: '>= 10.13.0' + peerDependencies: + clean-css: '*' + csso: '*' + webpack: ^5.0.0 + peerDependenciesMeta: + clean-css: + optional: true + csso: + optional: true + resolution: + integrity: sha512-cG/uc94727tx5pBNtb1Sd7gvUPzwmcQi1lkpfqTpdkuNq75hJCw7bIVsCNijLm4dhDcr1atvuysl2rZqOG8Txw== /css-modules-loader-core/1.1.0: dependencies: icss-replace-symbols: 1.1.0 @@ -6026,6 +5797,16 @@ packages: nth-check: 1.0.2 resolution: integrity: sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ== + /css-select/3.1.2: + dependencies: + boolbase: 1.0.0 + css-what: 4.0.0 + domhandler: 4.1.0 + domutils: 2.5.2 + nth-check: 2.0.0 + dev: false + resolution: + integrity: sha512-qmss1EihSuBNWNNhHjxzxSfJoFBM/lERB/Q4EnsJQQC62R2evJDW481091oAdOr9uh46/0n4nrg0It5cAnj1RA== /css-selector-tokenizer/0.7.3: dependencies: cssesc: 3.0.0 @@ -6041,19 +5822,10 @@ packages: node: '>=8.0.0' resolution: integrity: sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg== - /css-tree/1.1.2: - dependencies: - mdn-data: 2.0.14 - source-map: 0.6.1 - engines: - node: '>=8.0.0' - resolution: - integrity: sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ== /css-tree/1.1.3: dependencies: mdn-data: 2.0.14 source-map: 0.6.1 - dev: false engines: node: '>=8.0.0' resolution: @@ -6067,6 +5839,12 @@ packages: node: '>= 6' resolution: integrity: sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ== + /css-what/4.0.0: + dev: false + engines: + node: '>= 6' + resolution: + integrity: sha512-teijzG7kwYfNVsUh2H/YN62xW3KK9YhXEgSlbxMlcyjPNvdKJqFx5lrwlJgoFP1ZHlB89iGDlo/JyshKeRhv5A== /cssdb/4.4.0: dev: false resolution: @@ -6087,7 +5865,7 @@ packages: /cssnano-preset-advanced/4.0.7: dependencies: autoprefixer: 9.8.6 - cssnano-preset-default: 4.0.7 + cssnano-preset-default: 4.0.8 postcss-discard-unused: 4.0.1 postcss-merge-idents: 4.0.1 postcss-reduce-idents: 4.0.2 @@ -6097,43 +5875,6 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-j1O5/DQnaAqEyFFQfC+Z/vRlLXL3LxJHN+lvsfYqr7KgPH74t69+Rsy2yXkovWNaJjZYBpdz2Fj8ab2nH7pZXw== - /cssnano-preset-default/4.0.7: - dependencies: - css-declaration-sorter: 4.0.1 - cssnano-util-raw-cache: 4.0.1 - postcss: 7.0.35 - postcss-calc: 7.0.5 - postcss-colormin: 4.0.3 - postcss-convert-values: 4.0.1 - postcss-discard-comments: 4.0.2 - postcss-discard-duplicates: 4.0.2 - postcss-discard-empty: 4.0.1 - postcss-discard-overridden: 4.0.1 - postcss-merge-longhand: 4.0.11 - postcss-merge-rules: 4.0.3 - postcss-minify-font-values: 4.0.2 - postcss-minify-gradients: 4.0.2 - postcss-minify-params: 4.0.2 - postcss-minify-selectors: 4.0.2 - postcss-normalize-charset: 4.0.1 - postcss-normalize-display-values: 4.0.2 - postcss-normalize-positions: 4.0.2 - postcss-normalize-repeat-style: 4.0.2 - postcss-normalize-string: 4.0.2 - postcss-normalize-timing-functions: 4.0.2 - postcss-normalize-unicode: 4.0.1 - postcss-normalize-url: 4.0.1 - postcss-normalize-whitespace: 4.0.2 - postcss-ordered-values: 4.1.2 - postcss-reduce-initial: 4.0.3 - postcss-reduce-transforms: 4.0.2 - postcss-svgo: 4.0.2 - postcss-unique-selectors: 4.0.1 - dev: false - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA== /cssnano-preset-default/4.0.8: dependencies: css-declaration-sorter: 4.0.1 @@ -6166,11 +5907,49 @@ packages: postcss-reduce-transforms: 4.0.2 postcss-svgo: 4.0.3 postcss-unique-selectors: 4.0.1 - dev: true engines: node: '>=6.9.0' resolution: integrity: sha512-LdAyHuq+VRyeVREFmuxUZR1TXjQm8QQU/ktoo/x7bz+SdOge1YKc5eMN6pRW7YWBmyq59CqYba1dJ5cUukEjLQ== + /cssnano-preset-default/5.0.0_postcss@8.2.12: + dependencies: + css-declaration-sorter: 6.0.0_postcss@8.2.12 + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-calc: 8.0.0_postcss@8.2.12 + postcss-colormin: 5.0.0_postcss@8.2.12 + postcss-convert-values: 5.0.0_postcss@8.2.12 + postcss-discard-comments: 5.0.0_postcss@8.2.12 + postcss-discard-duplicates: 5.0.0_postcss@8.2.12 + postcss-discard-empty: 5.0.0_postcss@8.2.12 + postcss-discard-overridden: 5.0.0_postcss@8.2.12 + postcss-merge-longhand: 5.0.0_postcss@8.2.12 + postcss-merge-rules: 5.0.0_postcss@8.2.12 + postcss-minify-font-values: 5.0.0_postcss@8.2.12 + postcss-minify-gradients: 5.0.0_postcss@8.2.12 + postcss-minify-params: 5.0.0_postcss@8.2.12 + postcss-minify-selectors: 5.0.0_postcss@8.2.12 + postcss-normalize-charset: 5.0.0_postcss@8.2.12 + postcss-normalize-display-values: 5.0.0_postcss@8.2.12 + postcss-normalize-positions: 5.0.0_postcss@8.2.12 + postcss-normalize-repeat-style: 5.0.0_postcss@8.2.12 + postcss-normalize-string: 5.0.0_postcss@8.2.12 + postcss-normalize-timing-functions: 5.0.0_postcss@8.2.12 + postcss-normalize-unicode: 5.0.0_postcss@8.2.12 + postcss-normalize-url: 5.0.0_postcss@8.2.12 + postcss-normalize-whitespace: 5.0.0_postcss@8.2.12 + postcss-ordered-values: 5.0.0_postcss@8.2.12 + postcss-reduce-initial: 5.0.0_postcss@8.2.12 + postcss-reduce-transforms: 5.0.0_postcss@8.2.12 + postcss-svgo: 5.0.0_postcss@8.2.12 + postcss-unique-selectors: 5.0.0_postcss@8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-zsLppqF7PxY6Tk+ghVx8djf4o1jIOu2GNufqy9lMxldt7gGpSy3FQ6jn7FCd5DZWCaBa7A/1/HVh8CK3BdFSJg== /cssnano-util-get-arguments/4.0.0: engines: node: '>=6.9.0' @@ -6193,31 +5972,42 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q== - /cssnano/4.1.10: + /cssnano-utils/2.0.0_postcss@8.2.12: dependencies: - cosmiconfig: 5.2.1 - cssnano-preset-default: 4.0.7 - is-resolvable: 1.1.0 - postcss: 7.0.35 + postcss: 8.2.12 dev: false engines: - node: '>=6.9.0' + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 resolution: - integrity: sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ== + integrity: sha512-xvxmTszdrvSyTACdPe8VU5J6p4sm3egpgw54dILvNqt5eBUv6TFjACLhSxtRuEsxYrgy8uDy269YjScO5aKbGA== /cssnano/4.1.11: dependencies: cosmiconfig: 5.2.1 cssnano-preset-default: 4.0.8 is-resolvable: 1.1.0 postcss: 7.0.35 - dev: true engines: node: '>=6.9.0' resolution: integrity: sha512-6gZm2htn7xIPJOHY824ERgj8cNPgPxyCSnkXc4v7YvNW+TdVfzgngHcEhy/8D11kUWRUMbke+tC+AUcUsnMz2g== + /cssnano/5.0.1_postcss@8.2.12: + dependencies: + cosmiconfig: 7.0.0 + cssnano-preset-default: 5.0.0_postcss@8.2.12 + is-resolvable: 1.1.0 + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-5WubEmKcK2cqw43DUAayRBiIlTdX7iX3ZowrWDVxSVcW3hyohVnbJ4K4mbnWtJp5rfJnUwHg5H4mDAGzmuCM3g== /csso/4.2.0: dependencies: - css-tree: 1.1.2 + css-tree: 1.1.3 engines: node: '>=8.0.0' resolution: @@ -6245,6 +6035,7 @@ packages: resolution: integrity: sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== /csstype/3.0.7: + dev: true resolution: integrity: sha512-KxnUB0ZMlnUWCsx2Z8MUsr6qV6ja1w9ArPErJaJaF8a5SOWoHLIszeCTKGRGRgtLgYrs1E8CHkNSP1VZTTPc9g== /csstype/3.0.8: @@ -6291,10 +6082,6 @@ packages: node: '>=0.8' resolution: integrity: sha1-FyQAaUBXwioTsM8WFix+S3p/5Wc= - /cyclist/1.0.1: - dev: false - resolution: - integrity: sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= /dashdash/1.14.1: dependencies: assert-plus: 1.0.0 @@ -6504,7 +6291,7 @@ packages: integrity: sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== /del/6.0.0: dependencies: - globby: 11.0.2 + globby: 11.0.3 graceful-fs: 4.2.6 is-glob: 4.0.1 is-path-cwd: 2.2.0 @@ -6540,6 +6327,7 @@ packages: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 + dev: true resolution: integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== /destroy/1.0.4: @@ -6613,6 +6401,7 @@ packages: bn.js: 4.12.0 miller-rabin: 4.0.1 randombytes: 2.1.0 + dev: true resolution: integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== /dir-glob/3.0.1: @@ -6652,9 +6441,9 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - /docusaurus-plugin-sass/0.1.12_@docusaurus+core@2.0.0-alpha.71: + /docusaurus-plugin-sass/0.1.12_fbfe03ce431717eca61618b6732e25d5: dependencies: - '@docusaurus/core': 2.0.0-alpha.71_5347ba9dae72bc17e95cc7756ff465f1 + '@docusaurus/core': 2.0.0-alpha.b305145da9_react-dom@17.0.1+react@17.0.1 node-sass: 4.14.1 sass-loader: 10.1.1_node-sass@4.14.1 dev: false @@ -6685,10 +6474,10 @@ packages: domelementtype: 2.2.0 domhandler: 4.1.0 entities: 2.2.0 - dev: true resolution: integrity: sha512-Pv2ZluG5ife96udGgEDovOOOA5UELkltfJpnIExPrAk1LTvecolUGn6lIaoLh86d83GiB86CjzciMd9BuRB71Q== /domain-browser/1.2.0: + dev: true engines: node: '>=0.4' npm: '>=1.2' @@ -6722,14 +6511,13 @@ packages: /domhandler/4.1.0: dependencies: domelementtype: 2.2.0 - dev: true engines: node: '>= 4' resolution: integrity: sha512-/6/kmsGlMY4Tup/nGVutdrK9yQi4YjWVcVeoQmixpzjOUK1U7pQkvAPHBJeUxOgxF0J8f8lwCJSlCfD0V4CMGQ== /domutils/1.5.1: dependencies: - dom-serializer: 0.1.1 + dom-serializer: 0.2.2 domelementtype: 1.3.1 dev: false resolution: @@ -6745,7 +6533,6 @@ packages: dom-serializer: 1.3.1 domelementtype: 2.2.0 domhandler: 4.1.0 - dev: true resolution: integrity: sha512-MHTthCb1zj8f1GVfRpeZUbohQf/HdBos0oX5gZcQFepOZPLLRyj6Wn7XS7EMnY7CVpwv8863u2vyE83Hfu28HQ== /dot-case/3.0.4: @@ -6791,15 +6578,6 @@ packages: dev: false resolution: integrity: sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - /duplexify/3.7.1: - dependencies: - end-of-stream: 1.4.4 - inherits: 2.0.4 - readable-stream: 2.3.7 - stream-shift: 1.0.1 - dev: false - resolution: - integrity: sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== /ecc-jsbn/0.1.2: dependencies: jsbn: 0.1.1 @@ -6809,10 +6587,6 @@ packages: /ee-first/1.1.1: resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.682: - dev: false - resolution: - integrity: sha512-zok2y37qR00U14uM6qBz/3iIjWHom2eRfC2S1StA0RslP7x34jX+j4mxv80t8OEOHLJPVG54ZPeaFxEI7gPrwg== /electron-to-chromium/1.3.712: resolution: integrity: sha512-3kRVibBeCM4vsgoHHGKHmPocLqtFAGTrebXxxtgKs87hNUzXrX2NuS3jnBys7IozCnw7viQlozxKkmty2KNfrw== @@ -6825,6 +6599,7 @@ packages: inherits: 2.0.4 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: true resolution: integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== /emittery/0.7.2: @@ -6862,21 +6637,10 @@ packages: once: 1.4.0 resolution: integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - /enhanced-resolve/4.5.0: - dependencies: - graceful-fs: 4.2.6 - memory-fs: 0.5.0 - tapable: 1.1.3 - dev: false - engines: - node: '>=6.9.0' - resolution: - integrity: sha512-Nv9m36S/vxpsI+Hc4/ZGRs0n9mXqSWGGq49zxb/cJfPAQMbUtttJAlNPS4AQzaBdw/pKskw5bMbekT/Y7W/Wlg== /enhanced-resolve/5.7.0: dependencies: graceful-fs: 4.2.6 tapable: 2.2.0 - dev: true engines: node: '>=10.13.0' resolution: @@ -6942,7 +6706,6 @@ packages: resolution: integrity: sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== /es-module-lexer/0.4.1: - dev: true resolution: integrity: sha512-ooYciCUtfw6/d2w56UVeqHPcoCFAiJdz5XOkYpv/Txl1HMUozpXjz/2RIQgqwKdXNDPSF1W7mJCFse3G+HDyAA== /es-to-primitive/1.2.1: @@ -7113,20 +6876,10 @@ packages: eslint: ^3 || ^4 || ^5 || ^6 || ^7 resolution: integrity: sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA== - /eslint-scope/4.0.3: - dependencies: - esrecurse: 4.3.0 - estraverse: 4.3.0 - dev: false - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== /eslint-scope/5.1.1: dependencies: esrecurse: 4.3.0 estraverse: 4.3.0 - dev: true engines: node: '>=8.0.0' resolution: @@ -7300,6 +7053,7 @@ packages: dependencies: md5.js: 1.3.5 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== /exec-sh/0.3.4: @@ -7685,10 +7439,6 @@ packages: optional: true resolution: integrity: sha512-PG1XUv+x7iag5p/iNHD4/jdpxL9FtVSqRMUQhPab4hVDt80T1MH5ehzVrL2IdXO9Q2iBggArFvPqjUbHFuI58Q== - /figgy-pudding/3.5.2: - dev: false - resolution: - integrity: sha512-0btnI/H8f2pavGMN8w40mlSKOfTK2SVJmBfBeVIj3kNw0swwgzyRq0d5TJVOwodFmtvpPeWPN/MCcfuWF0Ezbw== /figures/2.0.0: dependencies: escape-string-regexp: 1.0.5 @@ -7712,11 +7462,11 @@ packages: node: ^10.12.0 || >=12.0.0 resolution: integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - /file-loader/6.2.0_webpack@4.46.0: + /file-loader/6.2.0_webpack@5.31.2: dependencies: loader-utils: 2.0.0 schema-utils: 3.0.0 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: node: '>= 10.13.0' @@ -7774,6 +7524,7 @@ packages: commondir: 1.0.1 make-dir: 2.1.0 pkg-dir: 3.0.0 + dev: true engines: node: '>=6' resolution: @@ -7887,13 +7638,6 @@ packages: dev: false resolution: integrity: sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== - /flush-write-stream/1.1.1: - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: false - resolution: - integrity: sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== /flux/4.0.1_react@17.0.1: dependencies: fbemitter: 3.0.0 @@ -7997,13 +7741,6 @@ packages: node: '>= 0.6' resolution: integrity: sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - /from2/2.3.0: - dependencies: - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: false - resolution: - integrity: sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= /fs-constants/1.0.0: dev: true resolution: @@ -8044,23 +7781,6 @@ packages: node: '>=10' resolution: integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== - /fs-minipass/2.1.0: - dependencies: - minipass: 3.1.3 - dev: false - engines: - node: '>= 8' - resolution: - integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - /fs-write-stream-atomic/1.0.10: - dependencies: - graceful-fs: 4.2.6 - iferr: 0.1.5 - imurmurhash: 0.1.4 - readable-stream: 2.3.7 - dev: false - resolution: - integrity: sha1-tH31NJPvkR33VzHnCp3tAYnbQMk= /fs.realpath/1.0.0: resolution: integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8= @@ -8225,7 +7945,6 @@ packages: resolution: integrity: sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= /glob-to-regexp/0.4.1: - dev: true resolution: integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== /glob/7.1.6: @@ -8322,6 +8041,19 @@ packages: node: '>=10' resolution: integrity: sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og== + /globby/11.0.3: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.5 + ignore: 5.1.8 + merge2: 1.4.1 + slash: 3.0.0 + dev: false + engines: + node: '>=10' + resolution: + integrity: sha512-ffdmosjA807y7+lA1NM0jELARVmYul/715xiILEjo3hBLPTcirgQNnXECn5g3mtR8TOLCVbkfua1Hpen25/Xcg== /globby/6.1.0: dependencies: array-union: 1.0.2 @@ -8536,6 +8268,7 @@ packages: inherits: 2.0.4 readable-stream: 3.6.0 safe-buffer: 5.2.1 + dev: true engines: node: '>=4' resolution: @@ -8544,6 +8277,7 @@ packages: dependencies: inherits: 2.0.4 minimalistic-assert: 1.0.1 + dev: true resolution: integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== /hast-to-hyperscript/9.0.1: @@ -8636,7 +8370,7 @@ packages: integrity: sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ== /history/4.10.1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 loose-envify: 1.4.0 resolve-pathname: 3.0.0 tiny-invariant: 1.1.0 @@ -8650,6 +8384,7 @@ packages: hash.js: 1.1.7 minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + dev: true resolution: integrity: sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= /hoist-non-react-statics/3.3.2: @@ -8683,10 +8418,6 @@ packages: /hsla-regex/1.0.0: resolution: integrity: sha1-wc56MWjIxmFAM6S194d/OyJfnDg= - /html-comment-regex/1.1.2: - dev: false - resolution: - integrity: sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== /html-encoding-sniffer/1.0.2: dependencies: whatwg-encoding: 1.0.5 @@ -8738,25 +8469,6 @@ packages: dev: false resolution: integrity: sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== - /html-webpack-plugin/4.5.2_webpack@4.46.0: - dependencies: - '@types/html-minifier-terser': 5.1.1 - '@types/tapable': 1.0.6 - '@types/webpack': 4.41.26 - html-minifier-terser: 5.1.1 - loader-utils: 1.4.0 - lodash: 4.17.21 - pretty-error: 2.1.2 - tapable: 1.1.3 - util.promisify: 1.0.0 - webpack: 4.46.0 - dev: false - engines: - node: '>=6.9' - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - resolution: - integrity: sha512-q5oYdzjKUIPQVjOosjgvCHQOv9Ett9CYYHlgvJeXG0qQvdSojnBq4vAdQBwn1+yGveAwHCoe/rMR86ozX3+c2A== /html-webpack-plugin/5.3.1_webpack@5.31.2: dependencies: '@types/html-minifier-terser': 5.1.1 @@ -8764,8 +8476,7 @@ packages: lodash: 4.17.21 pretty-error: 2.1.2 tapable: 2.2.0 - webpack: 5.31.2_webpack-cli@4.6.0 - dev: true + webpack: 5.31.2 engines: node: '>=10.13.0' peerDependencies: @@ -8881,6 +8592,7 @@ packages: resolution: integrity: sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= /https-browserify/1.0.0: + dev: true resolution: integrity: sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= /https-proxy-agent/5.0.0: @@ -8952,12 +8664,9 @@ packages: resolution: integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== /ieee754/1.2.1: + dev: true resolution: integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - /iferr/0.1.5: - dev: false - resolution: - integrity: sha1-xg7taebY/bazEEofy8ocGS3FtQE= /ignore/4.0.6: dev: true engines: @@ -9043,16 +8752,12 @@ packages: /indexes-of/1.0.1: resolution: integrity: sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - /infer-owner/1.0.4: - dev: false - resolution: - integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - /infima/0.2.0-alpha.20: + /infima/0.2.0-alpha.22: dev: false engines: node: '>=12' resolution: - integrity: sha512-HSAyIW4/iMq85dJC8PircFA530yEsxqSK/3lXjhSZY+4dms84Izi6sKGdl5V0mDxVaikjAt1oexITtj8T4B0KQ== + integrity: sha512-wKOWp4C1lTFG/h54UWD3Uf6VEsj5qYehM3ZVio3GBzIQuY8B3cTiwG7ZRNoobg+LvdQA21p5BJTugpTLQJLIrA== /inflight/1.0.6: dependencies: once: 1.4.0 @@ -9060,6 +8765,7 @@ packages: resolution: integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= /inherits/2.0.1: + dev: true resolution: integrity: sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE= /inherits/2.0.3: @@ -9116,15 +8822,6 @@ packages: node: '>= 0.10' resolution: integrity: sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw== - /intl-locales-supported/1.8.12: - deprecated: bad publish - dev: false - resolution: - integrity: sha512-FJPl7p1LYO/C+LpwlDcvVpq7AeFTdFgwnq1JjdNYKjb51xkIxssXRR8LaA0fJFogjwRRztqw1ahgSJMSZsSFdw== - /intl/1.2.5: - dev: false - resolution: - integrity: sha1-giRKIZDE5Bn4Nx9ao02qNCDiq94= /ip-regex/2.1.0: engines: node: '>=4' @@ -9444,6 +9141,7 @@ packages: resolution: integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== /is-plain-obj/1.1.0: + dev: true engines: node: '>=0.10.0' resolution: @@ -9519,14 +9217,6 @@ packages: dev: true resolution: integrity: sha1-ilkRfZMt4d4A8kX83TnOQ/HpOaY= - /is-svg/3.0.0: - dependencies: - html-comment-regex: 1.1.2 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ== /is-symbol/1.0.3: dependencies: has-symbols: 1.0.2 @@ -10462,13 +10152,6 @@ packages: node: '>=10' resolution: integrity: sha512-st0l4Q3cmK4XmK5h7P7dQqfChm3a2G7huP1EVMzZ1IoMARommE3lsXOm3BjBEZEFGeS4fLAKj+c8iOYXySK6Nw== - /last-call-webpack-plugin/3.0.0: - dependencies: - lodash: 4.17.21 - webpack-sources: 1.4.3 - dev: false - resolution: - integrity: sha512-7KI2l2GIZa9p2spzPIVZBYyNKkN+e/SQPpnjlTiPhdbDW3F86tdKKELxKpzJ5sgU19wQWsACULZmpTPYHeWO5w== /latest-version/5.1.0: dependencies: package-json: 6.5.0 @@ -10587,14 +10270,7 @@ packages: node: '>=6' resolution: integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw== - /loader-runner/2.4.0: - dev: false - engines: - node: '>=4.3.0 <5.0.0 || >=5.10' - resolution: - integrity: sha512-Jsmr89RcXGIwivFY21FcRrisYZfvLMTWx5kOLc+JTxtpBOG6xML0vzbc6SEQG2FO9/4Fc3wW4LVcB5DmGflaRw== /loader-runner/4.2.0: - dev: true engines: node: '>=6.11.5' resolution: @@ -10658,10 +10334,6 @@ packages: webpack: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.1.0 resolution: integrity: sha512-nsHN/+IxZK/C425vGC8pAxkKJ8KQH2+NJnhDul14zYNWr6HJcA95w+oRR7Cp0oZpOdMplDZXmjVROp8prPk7ig== - /lodash._reinterpolate/3.0.0: - dev: false - resolution: - integrity: sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= /lodash.assignin/4.2.0: dev: false resolution: @@ -10748,19 +10420,6 @@ packages: dev: true resolution: integrity: sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg= - /lodash.template/4.5.0: - dependencies: - lodash._reinterpolate: 3.0.0 - lodash.templatesettings: 4.2.0 - dev: false - resolution: - integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== - /lodash.templatesettings/4.2.0: - dependencies: - lodash._reinterpolate: 3.0.0 - dev: false - resolution: - integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== /lodash.toarray/4.4.0: dev: false resolution: @@ -10844,6 +10503,7 @@ packages: /lru-cache/5.1.1: dependencies: yallist: 3.1.1 + dev: true resolution: integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== /lru-cache/6.0.0: @@ -10867,6 +10527,7 @@ packages: dependencies: pify: 4.0.1 semver: 5.7.1 + dev: true engines: node: '>=6' resolution: @@ -10927,6 +10588,7 @@ packages: hash-base: 3.1.0 inherits: 2.0.4 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== /mdast-squeeze-paragraphs/4.0.0: @@ -10979,15 +10641,6 @@ packages: readable-stream: 2.3.7 resolution: integrity: sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= - /memory-fs/0.5.0: - dependencies: - errno: 0.1.8 - readable-stream: 2.3.7 - dev: false - engines: - node: '>=4.3.0 <5.0.0 || >=5.10' - resolution: - integrity: sha512-jA0rdU5KoQMC0e6ppoNRtpp6vjFq6+NY7r8hywnC7V+1Xj/MtHwGIbB1QaK/dunyjWteJzmkpd7ooeWg10T7GA== /memorystream/0.3.1: dev: true engines: @@ -11105,6 +10758,7 @@ packages: dependencies: bn.js: 4.12.0 brorand: 1.1.0 + dev: true hasBin: true resolution: integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== @@ -11115,6 +10769,7 @@ packages: resolution: integrity: sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== /mime-db/1.46.0: + dev: true engines: node: '>= 0.6' resolution: @@ -11135,6 +10790,7 @@ packages: /mime-types/2.1.29: dependencies: mime-db: 1.46.0 + dev: true engines: node: '>= 0.6' resolution: @@ -11183,7 +10839,7 @@ packages: integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== /mini-create-react-context/0.4.1_prop-types@15.7.2+react@17.0.1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 prop-types: 15.7.2 react: 17.0.1 tiny-warning: 1.0.3 @@ -11193,24 +10849,24 @@ packages: react: ^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 resolution: integrity: sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ== - /mini-css-extract-plugin/0.8.2_webpack@4.46.0: + /mini-css-extract-plugin/1.5.0_webpack@5.31.2: dependencies: - loader-utils: 1.4.0 - normalize-url: 1.9.1 - schema-utils: 1.0.0 - webpack: 4.46.0 + loader-utils: 2.0.0 + schema-utils: 3.0.0 + webpack: 5.31.2 webpack-sources: 1.4.3 dev: false engines: - node: '>= 6.9.0' + node: '>= 10.13.0' peerDependencies: - webpack: ^4.4.0 + webpack: ^4.4.0 || ^5.0.0 resolution: - integrity: sha512-a3Y4of27Wz+mqK3qrcd3VhYz6cU0iW5x3Sgvqzbj+XmlrSizmvu8QQMl5oMYJjgHOC4iyt+w7l4umP+dQeW3bw== + integrity: sha512-SIbuLMv6jsk1FnLIU5OUG/+VMGUprEjM1+o2trOAx8i5KOKMrhyezb1dJ4Ugsykb8Jgq8/w5NEopy6escV9G7g== /minimalistic-assert/1.0.1: resolution: integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== /minimalistic-crypto-utils/1.0.1: + dev: true resolution: integrity: sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= /minimatch/3.0.4: @@ -11231,64 +10887,6 @@ packages: /minimist/1.2.5: resolution: integrity: sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - /minipass-collect/1.0.2: - dependencies: - minipass: 3.1.3 - dev: false - engines: - node: '>= 8' - resolution: - integrity: sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - /minipass-flush/1.0.5: - dependencies: - minipass: 3.1.3 - dev: false - engines: - node: '>= 8' - resolution: - integrity: sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - /minipass-pipeline/1.2.4: - dependencies: - minipass: 3.1.3 - dev: false - engines: - node: '>=8' - resolution: - integrity: sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - /minipass/3.1.3: - dependencies: - yallist: 4.0.0 - dev: false - engines: - node: '>=8' - resolution: - integrity: sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg== - /minizlib/2.1.2: - dependencies: - minipass: 3.1.3 - yallist: 4.0.0 - dev: false - engines: - node: '>= 8' - resolution: - integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - /mississippi/3.0.0: - dependencies: - concat-stream: 1.6.2 - duplexify: 3.7.1 - end-of-stream: 1.4.4 - flush-write-stream: 1.1.1 - from2: 2.3.0 - parallel-transform: 1.2.0 - pump: 3.0.0 - pumpify: 1.5.1 - stream-each: 1.2.3 - through2: 2.0.5 - dev: false - engines: - node: '>=4.0.0' - resolution: - integrity: sha512-x471SsVjUtBRtcvd4BzKE9kFC+/2TeWgKCgw0bZcw1b9l2X3QX5vCWgF+KaZaYm87Ss//rHnWryupDrgLvmSkA== /mixin-deep/1.3.2: dependencies: for-in: 1.0.2 @@ -11323,6 +10921,7 @@ packages: resolution: integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== /mkdirp/1.0.4: + dev: true engines: node: '>=10' hasBin: true @@ -11336,17 +10935,6 @@ packages: dev: false resolution: integrity: sha512-q+CP5zMR/aFiMTE9QlIavGyGicKnG2v/H8qVvybLzeFsARM8f6G9fL0sMST2tyVYCwDKkGamZUI6647A0jR/Lg== - /move-concurrently/1.0.1: - dependencies: - aproba: 1.2.0 - copy-concurrently: 1.0.5 - fs-write-stream-atomic: 1.0.10 - mkdirp: 0.5.5 - rimraf: 2.7.1 - run-queue: 1.0.3 - dev: false - resolution: - integrity: sha1-viwAX9oy4LKa8fBdfEszIUxwH5I= /ms/2.0.0: resolution: integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= @@ -11397,6 +10985,13 @@ packages: hasBin: true resolution: integrity: sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + /nanoid/3.1.22: + dev: false + engines: + node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1 + hasBin: true + resolution: + integrity: sha512-/2ZUaJX2ANuLtTvqTlgqBQNJoQO398KyJgZloL0PZkC0dpysjncRUPsFe3DUPzz/y3h+u7C46np8RMuvF3jsSQ== /nanomatch/1.2.13: dependencies: arr-diff: 4.0.0 @@ -11504,6 +11099,7 @@ packages: url: 0.11.0 util: 0.11.1 vm-browserify: 1.1.2 + dev: true resolution: integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q== /node-modules-regexp/1.0.0: @@ -11586,17 +11182,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= - /normalize-url/1.9.1: - dependencies: - object-assign: 4.1.1 - prepend-http: 1.0.4 - query-string: 4.3.4 - sort-keys: 1.1.2 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-LMDWazHqIwNkWENuNiDYWVTGbDw= /normalize-url/3.3.0: engines: node: '>=6' @@ -11657,18 +11242,12 @@ packages: boolbase: 1.0.0 resolution: integrity: sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg== - /null-loader/4.0.1_webpack@4.46.0: + /nth-check/2.0.0: dependencies: - loader-utils: 2.0.0 - schema-utils: 3.0.0 - webpack: 4.46.0 + boolbase: 1.0.0 dev: false - engines: - node: '>= 10.13.0' - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 resolution: - integrity: sha512-pxqVbi4U6N26lq+LmgIbB5XATP0VdZKOG25DhHi8btMmJJefGArFyDg1yc4U3hWCJbMqSrw0qyrz1UQX+qYXqg== + integrity: sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q== /num2fraction/1.2.2: dev: false resolution: @@ -11852,16 +11431,6 @@ packages: node: '>=4' resolution: integrity: sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== - /optimize-css-assets-webpack-plugin/5.0.4_webpack@4.46.0: - dependencies: - cssnano: 4.1.10 - last-call-webpack-plugin: 3.0.0 - webpack: 4.46.0 - dev: false - peerDependencies: - webpack: ^4.0.0 - resolution: - integrity: sha512-wqd6FdI2a5/FdoiCNNkEvLeA//lHHfG24Ln2Xm2qqdIk4aOlsR18jwpyOihqQ8849W3qu2DX8fOYxpvTMj+93A== /optionator/0.8.3: dependencies: deep-is: 0.1.3 @@ -11906,6 +11475,7 @@ packages: resolution: integrity: sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== /os-browserify/0.3.0: + dev: true resolution: integrity: sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc= /os-homedir/1.0.2: @@ -12060,16 +11630,9 @@ packages: resolution: integrity: sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU= /pako/1.0.11: + dev: true resolution: integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - /parallel-transform/1.2.0: - dependencies: - cyclist: 1.0.1 - inherits: 2.0.4 - readable-stream: 2.3.7 - dev: false - resolution: - integrity: sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== /param-case/3.0.4: dependencies: dot-case: 3.0.4 @@ -12159,6 +11722,7 @@ packages: evp_bytestokey: 1.0.3 pbkdf2: 3.1.1 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== /parse-entities/2.0.0: @@ -12236,6 +11800,7 @@ packages: resolution: integrity: sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= /path-browserify/0.0.1: + dev: true resolution: integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ== /path-dirname/1.0.2: @@ -12327,6 +11892,7 @@ packages: ripemd160: 2.0.2 safe-buffer: 5.2.1 sha.js: 2.4.11 + dev: true engines: node: '>=0.12' resolution: @@ -12343,6 +11909,7 @@ packages: resolution: integrity: sha1-GN4vl+S/epVRrXURlCtUlverpmA= /picomatch/2.2.2: + dev: true engines: node: '>=8.6' resolution: @@ -12443,16 +12010,6 @@ packages: dev: true resolution: integrity: sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA== - /pnp-webpack-plugin/1.6.4_typescript@4.2.3: - dependencies: - ts-pnp: 1.2.0_typescript@4.2.3 - dev: false - engines: - node: '>=6' - peerDependencies: - typescript: '*' - resolution: - integrity: sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg== /portfinder/1.0.28: dependencies: async: 2.6.3 @@ -12481,6 +12038,16 @@ packages: postcss-value-parser: 4.1.0 resolution: integrity: sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg== + /postcss-calc/8.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + postcss-selector-parser: 6.0.4 + postcss-value-parser: 4.1.0 + dev: false + peerDependencies: + postcss: ^8.2.2 + resolution: + integrity: sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g== /postcss-color-functional-notation/2.0.1: dependencies: postcss: 7.0.35 @@ -12539,6 +12106,19 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw== + /postcss-colormin/5.0.0_postcss@8.2.12: + dependencies: + browserslist: 4.16.3 + color: 3.1.3 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-Yt84+5V6CgS/AhK7d7MA58vG8dSZ7+ytlRtWLaQhag3HXOncTfmYpuUOX4cDoXjvLfw1sHRCHMiBjYhc35CymQ== /postcss-convert-values/4.0.1: dependencies: postcss: 7.0.35 @@ -12547,6 +12127,17 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ== + /postcss-convert-values/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-V5kmYm4xoBAjNs+eHY/6XzXJkkGeg4kwNf2ocfqhLb1WBPEa4oaSmoi1fnVO7Dkblqvus9h+AenDvhCKUCK7uQ== /postcss-custom-media/7.0.8: dependencies: postcss: 7.0.35 @@ -12589,6 +12180,16 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg== + /postcss-discard-comments/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-Umig6Gxs8m20RihiXY6QkePd6mp4FxkA1Dg+f/Kd6uw0gEMfKRjDeQOyFkLibexbJJGHpE3lrN/Q0R9SMrUMbQ== /postcss-discard-duplicates/4.0.2: dependencies: postcss: 7.0.35 @@ -12596,6 +12197,16 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ== + /postcss-discard-duplicates/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-vEJJ+Y3pFUnO1FyCBA6PSisGjHtnphL3V6GsNvkASq/VkP3OX5/No5RYXXLxHa2QegStNzg6HYrYdo71uR4caQ== /postcss-discard-empty/4.0.1: dependencies: postcss: 7.0.35 @@ -12603,6 +12214,16 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w== + /postcss-discard-empty/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-+wigy099Y1xZxG36WG5L1f2zeH1oicntkJEW4TDIqKKDO2g9XVB3OhoiHTu08rDEjLnbcab4rw0BAccwi2VjiQ== /postcss-discard-overridden/4.0.1: dependencies: postcss: 7.0.35 @@ -12610,6 +12231,16 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg== + /postcss-discard-overridden/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-hybnScTaZM2iEA6kzVQ6Spozy7kVdLw+lGw8hftLlBEzt93uzXoltkYp9u0tI8xbfhxDLTOOzHsHQCkYdmzRUg== /postcss-discard-unused/4.0.1: dependencies: postcss: 7.0.35 @@ -12677,13 +12308,12 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-oPTcFFip5LZy8Y/whto91L9xdRHCWEMs3e1MdJxhgt4jy2WYXfhkng59fH5qLXSCPN8k4n94p1Czrfe5IOkKUw== - /postcss-initial/3.0.2: + /postcss-initial/3.0.4: dependencies: - lodash.template: 4.5.0 postcss: 7.0.35 dev: false resolution: - integrity: sha512-ugA2wKonC0xeNHgirR4D3VWHs2JcU08WAi1KFLVcnb7IN89phID6Qtg2RIctWbnvp1TM2BOmDtX8GGLCKdR8YA== + integrity: sha512-3RLn6DIpMsK1l5UUy9jxQvoDeUN4gP939tDcKUHD/kM8SGSKbFAnvkpFpj3Bhtz3HGk1jWY5ZNWX6mPta5M9fg== /postcss-lab-function/2.0.1: dependencies: '@csstools/convert-colors': 1.4.0 @@ -12694,23 +12324,21 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-whLy1IeZKY+3fYdqQFuDBf8Auw+qFuVnChWjmxm/UhHWqNHZx+B99EwxTvGYmUBqe3Fjxs4L1BoZTJmPu6usVg== - /postcss-loader/4.2.0_postcss@8.2.8+webpack@4.46.0: + /postcss-loader/5.2.0_postcss@8.2.8+webpack@5.31.2: dependencies: cosmiconfig: 7.0.0 klona: 2.0.4 - loader-utils: 2.0.0 postcss: 8.2.8 - schema-utils: 3.0.0 semver: 7.3.4 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: node: '>= 10.13.0' peerDependencies: postcss: ^7.0.0 || ^8.0.1 - webpack: ^4.0.0 || ^5.0.0 + webpack: ^5.0.0 resolution: - integrity: sha512-mqgScxHqbiz1yxbnNcPdKYo/6aVt+XExURmEbQlviFVWogDbM4AJ0A/B+ZBpYsJrTRxKw7HyRazg9x0Q9SWwLA== + integrity: sha512-uSuCkENFeUaOYsKrXm0eNNgVIxc71z8RcckLMbVw473rGojFnrUeqEz6zBgXsH2q1EIzXnO/4pEz9RhALjlITA== /postcss-logical/3.0.0: dependencies: postcss: 7.0.35 @@ -12748,6 +12376,19 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw== + /postcss-merge-longhand/5.0.0_postcss@8.2.12: + dependencies: + css-color-names: 1.0.1 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + stylehacks: 5.0.0_postcss@8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-VZNFA40K8BYHzJNA6jHPdg1Nofsz/nK5Dkszrcb5IgWcLroSBZOD6I/iNQzpejSU/3XwpOiZNaYAdBV4KcvxWA== /postcss-merge-rules/4.0.3: dependencies: browserslist: 4.16.3 @@ -12760,6 +12401,21 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ== + /postcss-merge-rules/5.0.0_postcss@8.2.12: + dependencies: + browserslist: 4.16.3 + caniuse-api: 3.0.0 + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-selector-parser: 6.0.4 + vendors: 1.0.4 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-TfsXbKjNYCGfUPEXGIGPySnMiJbdS+3gcVeV8gwmJP4RajyKZHW8E0FYDL1WmggTj3hi+m+WUCAvqRpX2ut4Kg== /postcss-minify-font-values/4.0.2: dependencies: postcss: 7.0.35 @@ -12768,6 +12424,17 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg== + /postcss-minify-font-values/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-zi2JhFaMOcIaNxhndX5uhsqSY1rexKDp23wV8EOmC9XERqzLbHsoRye3aYF716Zm+hkcR4loqKDt8LZlmihwAg== /postcss-minify-gradients/4.0.2: dependencies: cssnano-util-get-arguments: 4.0.0 @@ -12778,6 +12445,19 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q== + /postcss-minify-gradients/5.0.0_postcss@8.2.12: + dependencies: + cssnano-utils: 2.0.0_postcss@8.2.12 + is-color-stop: 1.1.0 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-/jPtNgs6JySMwgsE5dPOq8a2xEopWTW3RyqoB9fLqxgR+mDUNLSi7joKd+N1z7FXWgVkc4l/dEBMXHgNAaUbvg== /postcss-minify-params/4.0.2: dependencies: alphanum-sort: 1.0.2 @@ -12790,6 +12470,21 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg== + /postcss-minify-params/5.0.0_postcss@8.2.12: + dependencies: + alphanum-sort: 1.0.2 + browserslist: 4.16.3 + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + uniqs: 2.0.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-KvZYIxTPBVKjdd+XgObq9A+Sfv8lMkXTpbZTsjhr42XbfWIeLaTItMlygsDWfjArEc3muUfDaUFgNSeDiJ5jug== /postcss-minify-selectors/4.0.2: dependencies: alphanum-sort: 1.0.2 @@ -12800,6 +12495,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g== + /postcss-minify-selectors/5.0.0_postcss@8.2.12: + dependencies: + alphanum-sort: 1.0.2 + postcss: 8.2.12 + postcss-selector-parser: 3.1.2 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-cEM0O0eWwFIvmo6nfB0lH0vO/XFwgqIvymODbfPXZ1gTA3i76FKnb7TGUrEpiTxaXH6tgYQ6DcTHwRiRS+YQLQ== /postcss-modules-extract-imports/1.1.0: dependencies: postcss: 6.0.23 @@ -12887,6 +12594,16 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g== + /postcss-normalize-charset/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-pqsCkgo9KmQP0ew6DqSA+uP9YN6EfsW20pQ3JU5JoQge09Z6Too4qU0TNDsTNWuEaP8SWsMp+19l15210MsDZQ== /postcss-normalize-display-values/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 @@ -12896,6 +12613,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ== + /postcss-normalize-display-values/5.0.0_postcss@8.2.12: + dependencies: + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-t4f2d//gH1f7Ns0Jq3eNdnWuPT7TeLuISZ6RQx4j8gpl5XrhkdshdNcOnlrEK48YU6Tcb6jqK7dorME3N4oOGA== /postcss-normalize-positions/4.0.2: dependencies: cssnano-util-get-arguments: 4.0.0 @@ -12906,6 +12635,17 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA== + /postcss-normalize-positions/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-0o6/qU5ky74X/eWYj/tv4iiKCm3YqJnrhmVADpIMNXxzFZywsSQxl8F7cKs8jQEtF3VrJBgcDHTexZy1zgDoYg== /postcss-normalize-repeat-style/4.0.2: dependencies: cssnano-util-get-arguments: 4.0.0 @@ -12916,6 +12656,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q== + /postcss-normalize-repeat-style/5.0.0_postcss@8.2.12: + dependencies: + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-KRT14JbrXKcFMYuc4q7lh8lvv8u22wLyMrq+UpHKLtbx2H/LOjvWXYdoDxmNrrrJzomAWL+ViEXr48/IhSUJnQ== /postcss-normalize-string/4.0.2: dependencies: has: 1.0.3 @@ -12925,6 +12677,17 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA== + /postcss-normalize-string/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-wSO4pf7GNcDZpmelREWYADF1+XZWrAcbFLQCOqoE92ZwYgaP/RLumkUTaamEzdT2YKRZAH8eLLKGWotU/7FNPw== /postcss-normalize-timing-functions/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 @@ -12934,6 +12697,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A== + /postcss-normalize-timing-functions/5.0.0_postcss@8.2.12: + dependencies: + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-TwPaDX+wl9wO3MUm23lzGmOzGCGKnpk+rSDgzB2INpakD5dgWR3L6bJq1P1LQYzBAvz8fRIj2NWdnZdV4EV98Q== /postcss-normalize-unicode/4.0.1: dependencies: browserslist: 4.16.3 @@ -12943,6 +12718,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg== + /postcss-normalize-unicode/5.0.0_postcss@8.2.12: + dependencies: + browserslist: 4.16.3 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-2CpVoz/67rXU5s9tsPZDxG1YGS9OFHwoY9gsLAzrURrCxTAb0H7Vp87/62LvVPgRWTa5ZmvgmqTp2rL8tlm72A== /postcss-normalize-url/4.0.1: dependencies: is-absolute-url: 2.1.0 @@ -12953,6 +12740,19 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA== + /postcss-normalize-url/5.0.0_postcss@8.2.12: + dependencies: + is-absolute-url: 3.0.3 + normalize-url: 4.5.0 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-ICDaGFBqLgA3dlrCIRuhblLl80D13YtgEV9NJPTYJtgR72vu61KgxAHv+z/lKMs1EbwfSQa3ALjOFLSmXiE34A== /postcss-normalize-whitespace/4.0.2: dependencies: postcss: 7.0.35 @@ -12961,6 +12761,17 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA== + /postcss-normalize-whitespace/5.0.0_postcss@8.2.12: + dependencies: + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-KRnxQvQAVkJfaeXSz7JlnD9nBN9sFZF9lrk9452Q2uRoqrRSkinqifF8Iex7wZGei2DZVG/qpmDFDmRvbNAOGA== /postcss-ordered-values/4.1.2: dependencies: cssnano-util-get-arguments: 4.0.0 @@ -12970,6 +12781,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw== + /postcss-ordered-values/5.0.0_postcss@8.2.12: + dependencies: + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-dPr+SRObiHueCIc4IUaG0aOGQmYkuNu50wQvdXTGKy+rzi2mjmPsbeDsheLk5WPb9Zyf2tp8E+I+h40cnivm6g== /postcss-overflow-shorthand/2.0.0: dependencies: postcss: 7.0.35 @@ -12997,7 +12820,7 @@ packages: dependencies: autoprefixer: 9.8.6 browserslist: 4.16.3 - caniuse-lite: 1.0.30001197 + caniuse-lite: 1.0.30001208 css-blank-pseudo: 0.1.4 css-has-pseudo: 0.10.0 css-prefers-color-scheme: 3.1.1 @@ -13020,7 +12843,7 @@ packages: postcss-font-variant: 4.0.1 postcss-gap-properties: 2.0.0 postcss-image-set-function: 3.0.1 - postcss-initial: 3.0.2 + postcss-initial: 3.0.4 postcss-lab-function: 2.0.1 postcss-logical: 3.0.0 postcss-media-minmax: 4.0.0 @@ -13065,6 +12888,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA== + /postcss-reduce-initial/5.0.0_postcss@8.2.12: + dependencies: + browserslist: 4.16.3 + caniuse-api: 3.0.0 + postcss: 8.2.12 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-wR6pXUaFbSMG1oCKx8pKVA+rnSXCHlca5jMrlmkmif+uig0HNUTV9oGN5kjKsM3mATQAldv2PF9Tbl2vqLFjnA== /postcss-reduce-transforms/4.0.2: dependencies: cssnano-util-get-match: 4.0.0 @@ -13075,6 +12910,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg== + /postcss-reduce-transforms/5.0.0_postcss@8.2.12: + dependencies: + cssnano-utils: 2.0.0_postcss@8.2.12 + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-iHdGODW4YzM3WjVecBhPQt6fpJC4lGQZxJKjkBNHpp2b8dzmvj0ogKThqya+IRodQEFzjfXgYeESkf172FH5Lw== /postcss-replace-overflow-wrap/3.0.0: dependencies: postcss: 7.0.35 @@ -13143,27 +12990,27 @@ packages: node: '>=8.0.0' resolution: integrity: sha512-h+HbXXfOVFeLvCJOzl/Z9SqQ25MNpG/73k71756ftisaaJy75h06/Dn6KOwC4OCMN10ewT2PXMzHV03JNKwBbg== - /postcss-svgo/4.0.2: + /postcss-svgo/4.0.3: dependencies: - is-svg: 3.0.0 postcss: 7.0.35 postcss-value-parser: 3.3.1 svgo: 1.3.2 - dev: false engines: node: '>=6.9.0' resolution: - integrity: sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw== - /postcss-svgo/4.0.3: + integrity: sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw== + /postcss-svgo/5.0.0_postcss@8.2.12: dependencies: - postcss: 7.0.35 - postcss-value-parser: 3.3.1 - svgo: 1.3.2 - dev: true + postcss: 8.2.12 + postcss-value-parser: 4.1.0 + svgo: 2.3.0 + dev: false engines: - node: '>=6.9.0' + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 resolution: - integrity: sha512-NoRbrcMWTtUghzuKSoIm6XV+sJdvZ7GZSc3wdBN0W19FTtp2ko8NqLsgoh/m9CzNhU3KLPvQmjIwtaNFkaFTvw== + integrity: sha512-M3/VS4sFI1Yp9g0bPL+xzzCNz5iLdRUztoFaugMit5a8sMfkVzzhwqbsOlD8IFFymCdJDmXmh31waYHWw1K4BA== /postcss-unique-selectors/4.0.1: dependencies: alphanum-sort: 1.0.2 @@ -13173,6 +13020,19 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg== + /postcss-unique-selectors/5.0.0_postcss@8.2.12: + dependencies: + alphanum-sort: 1.0.2 + postcss: 8.2.12 + postcss-selector-parser: 6.0.4 + uniqs: 2.0.0 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-o9l4pF8SRn7aCMTmzb/kNv/kjV7wPZpZ8Nlb1Gq8v/Qvw969K1wanz1RVA0ehHzWe9+wHXaC2DvZlak/gdMJ5w== /postcss-value-parser/3.3.1: resolution: integrity: sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ== @@ -13237,6 +13097,16 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg== + /postcss/8.2.12: + dependencies: + colorette: 1.2.2 + nanoid: 3.1.22 + source-map: 0.6.1 + dev: false + engines: + node: ^10 || ^12 || >=14 + resolution: + integrity: sha512-BJnGT5+0q2tzvs6oQfnY2NpEJ7rIXNfBnZtQOKCIsweeWXBXeDd5k31UgTdS3d/c02ouspufn37mTaHWkJyzMQ== /postcss/8.2.8: dependencies: colorette: 1.2.2 @@ -13307,12 +13177,6 @@ packages: node: '>= 0.8.0' resolution: integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - /prepend-http/1.0.4: - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= /prepend-http/2.0.0: dev: false engines: @@ -13400,6 +13264,7 @@ packages: resolution: integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== /process/0.11.10: + dev: true engines: node: '>= 0.6.0' resolution: @@ -13410,10 +13275,6 @@ packages: node: '>=0.4.0' resolution: integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - /promise-inflight/1.0.1: - dev: false - resolution: - integrity: sha1-mEcocL8igTL8vdhoEputEsPAKeM= /promise/7.3.1: dependencies: asap: 2.0.6 @@ -13432,7 +13293,6 @@ packages: dependencies: kleur: 3.0.3 sisteransi: 1.0.5 - dev: true engines: node: '>= 6' resolution: @@ -13477,31 +13337,17 @@ packages: browserify-rsa: 4.1.0 create-hash: 1.2.0 parse-asn1: 5.1.6 - randombytes: 2.1.0 - safe-buffer: 5.2.1 - resolution: - integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - /pump/2.0.1: - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - dev: false + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true resolution: - integrity: sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== + integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== /pump/3.0.0: dependencies: end-of-stream: 1.4.4 once: 1.4.0 resolution: integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - /pumpify/1.5.1: - dependencies: - duplexify: 3.7.1 - inherits: 2.0.4 - pump: 2.0.1 - dev: false - resolution: - integrity: sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== /punycode/1.3.2: resolution: integrity: sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= @@ -13571,16 +13417,8 @@ packages: node: '>=0.6' resolution: integrity: sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - /query-string/4.3.4: - dependencies: - object-assign: 4.1.1 - strict-uri-encode: 1.1.0 - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-u7aTucqRXCMlFbIosaArYJBD2+s= /querystring-es3/0.2.1: + dev: true engines: node: '>=0.4.x' resolution: @@ -13626,6 +13464,7 @@ packages: dependencies: randombytes: 2.1.0 safe-buffer: 5.2.1 + dev: true resolution: integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== /range-parser/1.2.0: @@ -13775,19 +13614,19 @@ packages: dev: false resolution: integrity: sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== - /react-loadable-ssr-addon/0.3.0_a36ef9e00c6a4042d75d363eaf7d686c: + /react-loadable-ssr-addon-v5-slorber/1.0.1_0535cba41aad84857b1eb4d2e14c69d1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 react-loadable: 5.5.0_react@17.0.1 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: - node: '>=4.2.4' + node: '>=10.13.0' peerDependencies: react-loadable: '*' - webpack: '>=4.41.1' + webpack: '>=4.41.1 || 5.x' resolution: - integrity: sha512-E+lnmDakV0k6ut6R2J77vurwCOwTKEwKlHs9S62G8ez+ujecLPcqjt3YAU8M58kIGjp2QjFlZ7F9QWkq/mr6Iw== + integrity: sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A== /react-loadable/5.5.0_react@17.0.1: dependencies: prop-types: 15.7.2 @@ -13799,7 +13638,7 @@ packages: integrity: sha512-C8Aui0ZpMd4KokxRdVAm2bQtI03k2RMRNzOB+IipV3yxFTSVICv7WoUr5L9ALB5BmKO1iHgZtWM8EvYG83otdg== /react-router-config/5.1.1_react-router@5.2.0+react@17.0.1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 react: 17.0.1 react-router: 5.2.0_react@17.0.1 dev: false @@ -13810,7 +13649,7 @@ packages: integrity: sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg== /react-router-dom/5.2.0_react@17.0.1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 history: 4.10.1 loose-envify: 1.4.0 prop-types: 15.7.2 @@ -13825,7 +13664,7 @@ packages: integrity: sha512-gxAmfylo2QUjcwxI63RhQ5G85Qqt4voZpUXSEqCwykV0baaOTQDR1f0PmY8AELqIyVc0NEZUj0Gov5lNGcXgsA== /react-router/5.2.0_react@17.0.1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 history: 4.10.1 hoist-non-react-statics: 3.3.2 loose-envify: 1.4.0 @@ -13862,7 +13701,7 @@ packages: integrity: sha512-iiPER+vuKsW5+6+HroNnahc2Cah6UpO4w9SeuGw1pf/6p/F/vAD4+4288yJS5fLY4xJpDNEiOiRBk2kLUui6nw== /react-textarea-autosize/8.3.2_@types+react@17.0.3+react@17.0.1: dependencies: - '@babel/runtime': 7.13.9 + '@babel/runtime': 7.13.17 react: 17.0.1 use-composed-ref: 1.1.0_react@17.0.1 use-latest: 1.2.0_@types+react@17.0.3+react@17.0.1 @@ -13874,19 +13713,6 @@ packages: react: ^16.8.0 || ^17.0.0 resolution: integrity: sha512-JrMWVgQSaExQByP3ggI1eA8zF4mF0+ddVuX7acUeK2V7bmrpjVOY72vmLz2IXFJSAXoY3D80nEzrn0GWajWK3Q== - /react-toggle/4.1.1_738bb8f954d12b6833bcb33fcfa7848e: - dependencies: - classnames: 2.2.6 - prop-types: 15.7.2 - react: 17.0.1 - react-dom: 17.0.1_react@17.0.1 - dev: false - peerDependencies: - prop-types: ^15.3.0 || ^16.0.0 - react: ^15.3.0 || ^16.0.0 - react-dom: ^15.3.0 || ^16.0.0 - resolution: - integrity: sha512-+wXlMcSpg8SmnIXauMaZiKpR+r2wp2gMUteroejp2UTSqGTVvZLN+m9EhMzFARBKEw7KpQOwzCyfzeHeAndQGw== /react-universal-interface/0.6.2_react@17.0.1+tslib@2.2.0: dependencies: react: 17.0.1 @@ -14022,7 +13848,7 @@ packages: integrity: sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== /readdirp/3.5.0: dependencies: - picomatch: 2.2.2 + picomatch: 2.2.3 dev: false engines: node: '>=8.10.0' @@ -14475,6 +14301,7 @@ packages: dependencies: hash-base: 3.1.0 inherits: 2.0.4 + dev: true resolution: integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== /rollup/2.45.2: @@ -14498,6 +14325,10 @@ packages: dev: false resolution: integrity: sha512-G9N1s/6329FpJr8k9e1U/Lg0IDWThv99sb7k0IrXHjSnubxe01h52/ajsPRafJK1/2Vqrhz3VKLe3E1dx6jS9Q== + /rtl-detect/1.0.2: + dev: false + resolution: + integrity: sha512-5X1422hvphzg2a/bo4tIDbjFjbJUOaPZwqE6dnyyxqwFqfR+tBcvfqapJr0o0VygATVCGKiODEewhZtKF+90AA== /rtlcss/2.6.2: dependencies: '@choojs/findup': 0.2.1 @@ -14514,12 +14345,6 @@ packages: queue-microtask: 1.2.3 resolution: integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - /run-queue/1.0.3: - dependencies: - aproba: 1.2.0 - dev: false - resolution: - integrity: sha1-6Eg5bwV9Ij8kOGkkYY4laUFh7Ec= /rx/4.1.0: dev: true resolution: @@ -14527,6 +14352,7 @@ packages: /rxjs/6.6.6: dependencies: tslib: 1.14.1 + dev: true engines: npm: '>=2.0.0' resolution: @@ -14780,12 +14606,6 @@ packages: node: '>= 0.8.0' resolution: integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - /serialize-javascript/4.0.0: - dependencies: - randombytes: 2.1.0 - dev: false - resolution: - integrity: sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw== /serialize-javascript/5.0.1: dependencies: randombytes: 2.1.0 @@ -14880,6 +14700,7 @@ packages: dependencies: inherits: 2.0.4 safe-buffer: 5.2.1 + dev: true hasBin: true resolution: integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== @@ -14897,7 +14718,6 @@ packages: /shallow-clone/3.0.1: dependencies: kind-of: 6.0.3 - dev: true engines: node: '>=8' resolution: @@ -14996,7 +14816,7 @@ packages: integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== /sitemap/6.4.0: dependencies: - '@types/node': 14.14.32 + '@types/node': 14.14.37 '@types/sax': 1.2.1 arg: 5.0.0 sax: 1.2.4 @@ -15103,14 +14923,6 @@ packages: node: '>= 6.3.0' resolution: integrity: sha512-QofNE7CEVH1AKdhS7L9IPbV9UtyQYNXyw++8lC+xG6iOLlpzsmncZRiKbihTAESvZ8wOhwnPoesHbMrehrQyyw== - /sort-keys/1.1.2: - dependencies: - is-plain-obj: 1.1.0 - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-RBttTTRnmPG05J6JIK37oOVD+a0= /source-list-map/2.0.1: resolution: integrity: sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw== @@ -15260,20 +15072,6 @@ packages: hasBin: true resolution: integrity: sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - /ssri/6.0.1: - dependencies: - figgy-pudding: 3.5.2 - dev: false - resolution: - integrity: sha512-3Wge10hNcT1Kur4PDFwEieXSCMCJs/7WvSACcrMYrNp+b8kDL1/0wJch5Ni2WrtwEa2IO8OsVfeKIciKCDx/QA== - /ssri/8.0.1: - dependencies: - minipass: 3.1.3 - dev: false - engines: - node: '>= 8' - resolution: - integrity: sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== /stable/0.1.8: resolution: integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== @@ -15385,15 +15183,9 @@ packages: dependencies: inherits: 2.0.4 readable-stream: 2.3.7 + dev: true resolution: integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg== - /stream-each/1.2.3: - dependencies: - end-of-stream: 1.4.4 - stream-shift: 1.0.1 - dev: false - resolution: - integrity: sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== /stream-http/2.8.3: dependencies: builtin-status-codes: 3.0.0 @@ -15401,24 +15193,15 @@ packages: readable-stream: 2.3.7 to-arraybuffer: 1.0.1 xtend: 4.0.2 + dev: true resolution: integrity: sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw== - /stream-shift/1.0.1: - dev: false - resolution: - integrity: sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== /stream-transform/2.0.4: dependencies: mixme: 0.4.0 dev: true resolution: integrity: sha512-LQXH1pUksoef5Ijo6+2ihnjLLZtZuoqu1vhut6a7xZ77nrLA/shbbx2FAzVC/nkb6wwrPzOO98700mv4HDQcWg== - /strict-uri-encode/1.1.0: - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= /string-argv/0.3.1: dev: true engines: @@ -15636,6 +15419,18 @@ packages: node: '>=6.9.0' resolution: integrity: sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g== + /stylehacks/5.0.0_postcss@8.2.12: + dependencies: + browserslist: 4.16.3 + postcss: 8.2.12 + postcss-selector-parser: 6.0.4 + dev: false + engines: + node: ^10 || ^12 || >=14.0 + peerDependencies: + postcss: ^8.2.1 + resolution: + integrity: sha512-QOWm6XivDLb+fqffTZP8jrmPmPITVChl2KCY2R05nsCWwLi3VGhCdVc3IVGNwd1zzTt1jPd67zIKjpQfxzQZeA== /stylis/4.0.10: dev: false resolution: @@ -15718,6 +15513,21 @@ packages: hasBin: true resolution: integrity: sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw== + /svgo/2.3.0: + dependencies: + '@trysound/sax': 0.1.1 + chalk: 4.1.0 + commander: 7.2.0 + css-select: 3.1.2 + css-tree: 1.1.3 + csso: 4.2.0 + stable: 0.1.8 + dev: false + engines: + node: '>=10.13.0' + hasBin: true + resolution: + integrity: sha512-fz4IKjNO6HDPgIQxu4IxwtubtbSfGEAJUq/IXyTPIkGhWck/faiiwfkvsB8LnBkKLvSoyNNIY6d13lZprJMc9Q== /symbol-tree/3.2.4: dev: true resolution: @@ -15740,7 +15550,6 @@ packages: resolution: integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== /tapable/2.2.0: - dev: true engines: node: '>=6' resolution: @@ -15774,19 +15583,6 @@ packages: dev: false resolution: integrity: sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== - /tar/6.1.0: - dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 3.1.3 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 - dev: false - engines: - node: '>= 10' - resolution: - integrity: sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA== /temp-dir/2.0.0: dev: true engines: @@ -15815,44 +15611,6 @@ packages: node: '>=8' resolution: integrity: sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ== - /terser-webpack-plugin/1.4.5_webpack@4.46.0: - dependencies: - cacache: 12.0.4 - find-cache-dir: 2.1.0 - is-wsl: 1.1.0 - schema-utils: 1.0.0 - serialize-javascript: 4.0.0 - source-map: 0.6.1 - terser: 4.8.0 - webpack: 4.46.0 - webpack-sources: 1.4.3 - worker-farm: 1.7.0 - dev: false - engines: - node: '>= 6.9.0' - peerDependencies: - webpack: ^4.0.0 - resolution: - integrity: sha512-04Rfe496lN8EYruwi6oPQkG0vo8C+HT49X687FZnpPF0qMAIHONI6HEXYPKDOE8e5HjXTyKfqRd/agHtH0kOtw== - /terser-webpack-plugin/4.2.3_webpack@4.46.0: - dependencies: - cacache: 15.0.5 - find-cache-dir: 3.3.1 - jest-worker: 26.6.2 - p-limit: 3.1.0 - schema-utils: 3.0.0 - serialize-javascript: 5.0.1 - source-map: 0.6.1 - terser: 5.6.0 - webpack: 4.46.0 - webpack-sources: 1.4.3 - dev: false - engines: - node: '>= 10.13.0' - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - resolution: - integrity: sha512-jTgXh40RnvOrLQNgIkwEKnQ8rmHjHK4u+6UBEi+W+FPmvb+uo+chJXntKe7/3lW5mNysgSWD60KyesnhW8D6MQ== /terser-webpack-plugin/5.1.1_webpack@5.31.2: dependencies: jest-worker: 26.6.2 @@ -15861,8 +15619,7 @@ packages: serialize-javascript: 5.0.1 source-map: 0.6.1 terser: 5.6.1 - webpack: 5.31.2_webpack-cli@4.6.0 - dev: true + webpack: 5.31.2 engines: node: '>= 10.13.0' peerDependencies: @@ -15890,23 +15647,11 @@ packages: hasBin: true resolution: integrity: sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw== - /terser/5.6.0: - dependencies: - commander: 2.20.3 - source-map: 0.7.3 - source-map-support: 0.5.19 - dev: false - engines: - node: '>=10' - hasBin: true - resolution: - integrity: sha512-vyqLMoqadC1uR0vywqOZzriDYzgEkNJFK4q9GeyOBHIbiECHiWLKcWfbQWAUaPfxkjDhapSlZB9f7fkMrvkVjA== /terser/5.6.1: dependencies: commander: 2.20.3 source-map: 0.7.3 source-map-support: 0.5.19 - dev: true engines: node: '>=10' hasBin: true @@ -15943,6 +15688,7 @@ packages: dependencies: readable-stream: 2.3.7 xtend: 4.0.2 + dev: true resolution: integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== /thunky/1.1.0: @@ -15951,6 +15697,7 @@ packages: /timers-browserify/2.0.12: dependencies: setimmediate: 1.0.5 + dev: true engines: node: '>=0.6.0' resolution: @@ -16000,6 +15747,7 @@ packages: resolution: integrity: sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE= /to-arraybuffer/1.0.1: + dev: true resolution: integrity: sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= /to-fast-properties/1.0.3: @@ -16198,19 +15946,6 @@ packages: typescript: '>=2.7' resolution: integrity: sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== - /ts-pnp/1.2.0_typescript@4.2.3: - dependencies: - typescript: 4.2.3 - dev: false - engines: - node: '>=6' - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - resolution: - integrity: sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw== /tsc-multi/0.5.0_typescript@4.2.4: dependencies: chalk: 4.1.0 @@ -16254,6 +15989,7 @@ packages: resolution: integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== /tty-browserify/0.0.0: + dev: true resolution: integrity: sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= /tty-table/2.8.13: @@ -16342,6 +16078,7 @@ packages: resolution: integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== /typedarray/0.0.6: + dev: true resolution: integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= /typedoc-default-themes/0.12.8: @@ -16519,18 +16256,6 @@ packages: /uniqs/2.0.0: resolution: integrity: sha1-/+3ks2slKQaW5uFl1KWe25mOawI= - /unique-filename/1.1.1: - dependencies: - unique-slug: 2.0.2 - dev: false - resolution: - integrity: sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== - /unique-slug/2.0.2: - dependencies: - imurmurhash: 0.1.4 - dev: false - resolution: - integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== /unique-string/2.0.0: dependencies: crypto-random-string: 2.0.0 @@ -16657,13 +16382,13 @@ packages: deprecated: Please see https://github.com/lydell/urix#deprecated resolution: integrity: sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - /url-loader/4.1.1_file-loader@6.2.0+webpack@4.46.0: + /url-loader/4.1.1_file-loader@6.2.0+webpack@5.31.2: dependencies: - file-loader: 6.2.0_webpack@4.46.0 + file-loader: 6.2.0_webpack@5.31.2 loader-utils: 2.0.0 - mime-types: 2.1.29 + mime-types: 2.1.30 schema-utils: 3.0.0 - webpack: 4.46.0 + webpack: 5.31.2 dev: false engines: node: '>= 10.13.0' @@ -16749,13 +16474,6 @@ packages: /util-deprecate/1.0.2: resolution: integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - /util.promisify/1.0.0: - dependencies: - define-properties: 1.1.3 - object.getownpropertydescriptors: 2.1.2 - dev: false - resolution: - integrity: sha512-i+6qA2MPhvoKLuxnJNpXAGhg7HphQOSUq2LKMZD0m15EiskXUkMvKdF4Uui0WYeCUGea+o2cw/ZuwehtfsrNkA== /util.promisify/1.0.1: dependencies: define-properties: 1.1.3 @@ -16767,11 +16485,13 @@ packages: /util/0.10.3: dependencies: inherits: 2.0.1 + dev: true resolution: integrity: sha1-evsa/lCAUkZInj23/g7TeTNqwPk= /util/0.11.1: dependencies: inherits: 2.0.3 + dev: true resolution: integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== /utila/0.4.0: @@ -16864,6 +16584,7 @@ packages: resolution: integrity: sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== /vm-browserify/1.1.2: + dev: true resolution: integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== /vscode-textmate/5.2.0: @@ -16911,7 +16632,7 @@ packages: joi: 17.4.0 lodash: 4.17.21 minimist: 1.2.5 - rxjs: 6.6.6 + rxjs: 6.6.7 dev: false engines: node: '>=8.9.0' @@ -16935,28 +16656,10 @@ packages: dev: true resolution: integrity: sha1-L3+bj9ENZ3JisYqITijRlhjgKPs= - /watchpack-chokidar2/2.0.1: - dependencies: - chokidar: 2.1.8 - dev: false - optional: true - resolution: - integrity: sha512-nCFfBIPKr5Sh61s4LPpy1Wtfi0HE8isJ3d2Yb5/Ppw2P2B/3eVSEBjKfN0fmHJSK14+31KwMKmcrzs2GM4P0Ww== - /watchpack/1.7.5: - dependencies: - graceful-fs: 4.2.6 - neo-async: 2.6.2 - dev: false - optionalDependencies: - chokidar: 3.5.1 - watchpack-chokidar2: 2.0.1 - resolution: - integrity: sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== /watchpack/2.1.1: dependencies: glob-to-regexp: 0.4.1 graceful-fs: 4.2.6 - dev: true engines: node: '>=10.13.0' resolution: @@ -16994,7 +16697,7 @@ packages: integrity: sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== /webpack-bundle-analyzer/4.4.0: dependencies: - acorn: 8.0.5 + acorn: 8.1.0 acorn-walk: 8.0.2 chalk: 4.1.0 commander: 6.2.1 @@ -17086,30 +16789,14 @@ packages: optional: true resolution: integrity: sha512-9YV+qTcGMjQFiY7Nb1kmnupvb1x40lfpj8pwdO/bom+sQiP4OBMKjHq29YQrlDWDPZO9r/qWaRRywKaRDKqBTA== - /webpack-dev-middleware/3.7.3_webpack@4.46.0: - dependencies: - memory-fs: 0.4.1 - mime: 2.5.2 - mkdirp: 0.5.5 - range-parser: 1.2.1 - webpack: 4.46.0 - webpack-log: 2.0.0 - dev: false - engines: - node: '>= 6' - peerDependencies: - webpack: ^4.0.0 || ^5.0.0 - resolution: - integrity: sha512-djelc/zGiz9nZj/U7PTBi2ViorGJXEWo/3ltkPbDyxCXhhEXkW0ce99falaok4TPj+AsxLiXJR0EBOb0zh9fKQ== /webpack-dev-middleware/3.7.3_webpack@5.31.2: dependencies: memory-fs: 0.4.1 mime: 2.5.2 mkdirp: 0.5.5 range-parser: 1.2.1 - webpack: 5.31.2_webpack-cli@4.6.0 + webpack: 5.31.2 webpack-log: 2.0.0 - dev: true engines: node: '>= 6' peerDependencies: @@ -17165,7 +16852,7 @@ packages: optional: true resolution: integrity: sha512-A80BkuHRQfCiNtGBS1EMf2ChTUs0x+B3wGDFmOeT4rmJOHhHTCH2naNxIHhmkr0/UillP4U3yeIyv1pNp+QDLQ== - /webpack-dev-server/3.11.2_webpack@4.46.0: + /webpack-dev-server/3.11.2_webpack@5.31.2: dependencies: ansi-html: 0.0.7 bonjour: 3.5.0 @@ -17196,8 +16883,8 @@ packages: strip-ansi: 3.0.1 supports-color: 6.1.0 url: 0.11.0 - webpack: 4.46.0 - webpack-dev-middleware: 3.7.3_webpack@4.46.0 + webpack: 5.31.2 + webpack-dev-middleware: 3.7.3_webpack@5.31.2 webpack-log: 2.0.0 ws: 6.2.1 yargs: 13.3.2 @@ -17221,17 +16908,10 @@ packages: node: '>= 6' resolution: integrity: sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - /webpack-merge/4.2.2: - dependencies: - lodash: 4.17.21 - dev: false - resolution: - integrity: sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g== /webpack-merge/5.7.3: dependencies: clone-deep: 4.0.1 wildcard: 2.0.0 - dev: true engines: node: '>=10.0.0' resolution: @@ -17247,50 +16927,46 @@ packages: dependencies: source-list-map: 2.0.1 source-map: 0.6.1 - dev: true engines: node: '>=10.13.0' resolution: integrity: sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w== - /webpack/4.46.0: + /webpack/5.31.2: dependencies: - '@webassemblyjs/ast': 1.9.0 - '@webassemblyjs/helper-module-context': 1.9.0 - '@webassemblyjs/wasm-edit': 1.9.0 - '@webassemblyjs/wasm-parser': 1.9.0 - acorn: 6.4.2 - ajv: 6.12.6 - ajv-keywords: 3.5.2_ajv@6.12.6 - chrome-trace-event: 1.0.2 - enhanced-resolve: 4.5.0 - eslint-scope: 4.0.3 + '@types/eslint-scope': 3.7.0 + '@types/estree': 0.0.46 + '@webassemblyjs/ast': 1.11.0 + '@webassemblyjs/wasm-edit': 1.11.0 + '@webassemblyjs/wasm-parser': 1.11.0 + acorn: 8.1.0 + browserslist: 4.16.3 + chrome-trace-event: 1.0.3 + enhanced-resolve: 5.7.0 + es-module-lexer: 0.4.1 + eslint-scope: 5.1.1 + events: 3.3.0 + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.6 json-parse-better-errors: 1.0.2 - loader-runner: 2.4.0 - loader-utils: 1.4.0 - memory-fs: 0.4.1 - micromatch: 3.1.10 - mkdirp: 0.5.5 + loader-runner: 4.2.0 + mime-types: 2.1.30 neo-async: 2.6.2 - node-libs-browser: 2.2.1 - schema-utils: 1.0.0 - tapable: 1.1.3 - terser-webpack-plugin: 1.4.5_webpack@4.46.0 - watchpack: 1.7.5 - webpack-sources: 1.4.3 + schema-utils: 3.0.0 + tapable: 2.2.0 + terser-webpack-plugin: 5.1.1_webpack@5.31.2 + watchpack: 2.1.1 + webpack-sources: 2.2.0 dev: false engines: - node: '>=6.11.5' + node: '>=10.13.0' hasBin: true peerDependencies: webpack-cli: '*' - webpack-command: '*' peerDependenciesMeta: webpack-cli: optional: true - webpack-command: - optional: true resolution: - integrity: sha512-6jJuJjg8znb/xRItk7bkT0+Q7AHCYjjFnvKIWQPkNIOyRqoCGvkOs0ipeQzrqz4l5FtN5ZI/ukEHroeX/o1/5Q== + integrity: sha512-0bCQe4ybo7T5Z0SC5axnIAH+1WuIdV4FwLYkaAlLtvfBhIx8bPS48WHTfiRZS1VM+pSiYt7e/rgLs3gLrH82lQ== /webpack/5.31.2_webpack-cli@4.6.0: dependencies: '@types/eslint-scope': 3.7.0 @@ -17328,7 +17004,7 @@ packages: optional: true resolution: integrity: sha512-0bCQe4ybo7T5Z0SC5axnIAH+1WuIdV4FwLYkaAlLtvfBhIx8bPS48WHTfiRZS1VM+pSiYt7e/rgLs3gLrH82lQ== - /webpackbar/5.0.0-3_webpack@4.46.0: + /webpackbar/5.0.0-3_webpack@5.31.2: dependencies: ansi-escapes: 4.3.1 chalk: 4.1.0 @@ -17337,7 +17013,7 @@ packages: pretty-time: 1.1.0 std-env: 2.3.0 text-table: 0.2.0 - webpack: 4.46.0 + webpack: 5.31.2 wrap-ansi: 7.0.0 dev: false engines: @@ -17457,7 +17133,6 @@ packages: resolution: integrity: sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== /wildcard/2.0.0: - dev: true resolution: integrity: sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== /word-wrap/1.2.3: @@ -17469,12 +17144,6 @@ packages: dev: true resolution: integrity: sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= - /worker-farm/1.7.0: - dependencies: - errno: 0.1.8 - dev: false - resolution: - integrity: sha512-rvw3QTZc8lAxyVrqcSGVm5yP/IJ2UcB3U0graE3LCFoZ0Yn2x4EoVSqJKdB/T5M+FLcRPjz4TDacRf3OCfNUzw== /worker-rpc/0.1.1: dependencies: microevent.ts: 0.1.1 @@ -17571,6 +17240,7 @@ packages: resolution: integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== /y18n/4.0.1: + dev: true resolution: integrity: sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ== /y18n/4.0.3: @@ -17585,6 +17255,7 @@ packages: resolution: integrity: sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= /yallist/3.1.1: + dev: true resolution: integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== /yallist/4.0.0: diff --git a/website/.eslintrc.js b/website/.eslintrc.js index 5d1ccfb3f..c75642832 100644 --- a/website/.eslintrc.js +++ b/website/.eslintrc.js @@ -9,20 +9,10 @@ module.exports = { rules: { "@typescript-eslint/explicit-module-boundary-types": "off", "node/no-unpublished-import": "off", + "node/no-missing-import": "off", "react/prop-types": "off" }, settings: { - node: { - allowModules: [ - "@theme/Layout", - "@theme/CodeBlock", - "@theme/hooks/usePrismTheme", - "@theme/hooks/useThemeContext", - "@docusaurus/Link", - "@docusaurus/useDocusaurusContext", - "@docusaurus/useBaseUrl" - ] - }, react: { version: readPkg.sync({ cwd: resolvePkg("react", { cwd: __dirname }) diff --git a/website/package.json b/website/package.json index 0940b1b67..78aa9fe68 100644 --- a/website/package.json +++ b/website/package.json @@ -27,13 +27,12 @@ ] }, "dependencies": { - "@docusaurus/core": "2.0.0-alpha.71", - "@docusaurus/preset-classic": "2.0.0-alpha.71", - "@kosko/env": "workspace:*", - "@kosko/generate": "workspace:*", + "@docusaurus/core": "2.0.0-alpha.b305145da9", + "@docusaurus/preset-classic": "2.0.0-alpha.b305145da9", "@mdx-js/react": "^1.6.22", "@monaco-editor/react": "^4.1.1", "clsx": "^1.1.1", + "comlink": "^4.3.0", "docusaurus-plugin-sass": "^0.1.12", "fs-extra": "^9.1.0", "globby": "^11.0.2", @@ -49,7 +48,7 @@ "use-immer": "^0.5.1" }, "devDependencies": { - "@docusaurus/module-type-aliases": "2.0.0-alpha.71", + "@docusaurus/module-type-aliases": "2.0.0-alpha.b305145da9", "@tsconfig/docusaurus": "^1.0.2", "@types/lodash": "^4.14.167", "@types/react": "^17.0.0", diff --git a/website/plugins/comlink-loader/index.js b/website/plugins/comlink-loader/index.js new file mode 100644 index 000000000..dadc1aa9c --- /dev/null +++ b/website/plugins/comlink-loader/index.js @@ -0,0 +1,28 @@ +"use strict"; + +module.exports = function () { + return { + name: "comlink-loader", + configureWebpack(config, isServer, { getBabelLoader }) { + return { + module: { + rules: [ + { + test: /\.worker\.(js|ts)$/, + use: [ + // getBabelLoader(isServer), + { + loader: "comlink-loader", + options: { + singleton: true + } + }, + getBabelLoader(isServer) + ] + } + ] + } + }; + } + }; +}; diff --git a/website/src/components/Playground/Container/index.tsx b/website/src/components/Playground/Container/index.tsx deleted file mode 100644 index 8a96a0611..000000000 --- a/website/src/components/Playground/Container/index.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React, { - FunctionComponent, - useLayoutEffect, - useRef, - useState -} from "react"; -import styles from "./styles.module.scss"; -import { - Container as ResizerContainer, - Bar as ResizerBar, - Section as ResizerSection, - ChildProps -} from "react-simple-resizer"; -import cx from "clsx"; - -export const Container: FunctionComponent = ({ children }) => { - const ref = useRef(); - - useLayoutEffect(() => { - if (!ref.current) return; - - ref.current.parentElement.classList.add(styles.wrapper); - - return () => { - ref.current.parentElement.classList.remove(styles.wrapper); - }; - }, [ref]); - - return ( -
- - {children} - -
- ); -}; - -export const Section: FunctionComponent> = ( - props -) => { - return ; -}; - -export const Bar: FunctionComponent = (props) => { - const [active, setActive] = useState(false); - - return ( - - ); -}; diff --git a/website/src/components/Playground/Preview/Content.tsx b/website/src/components/Playground/Preview/Content.tsx deleted file mode 100644 index ae8190da9..000000000 --- a/website/src/components/Playground/Preview/Content.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import React, { FunctionComponent, useEffect, useState } from "react"; -import { usePlayground } from "../context"; -import styles from "./styles.module.scss"; -import generateBundle from "./generateBundle"; -import executeModule from "./executeModule"; -import MonacoEditor from "../MonacoEditor"; -import { useThrottle } from "react-use"; - -let CALLBACK_ID = 0; - -const Content: FunctionComponent = () => { - const [code, setCode] = useState(""); - const { - value: { component, environment, files: filesValue } - } = usePlayground(); - const files = useThrottle(filesValue, 500); - - useEffect(() => { - const callbackId = `__koskoPreview${CALLBACK_ID++}`; - let scriptElement: HTMLScriptElement | undefined; - let canceled = false; - - (window as any)[callbackId] = (result) => { - if (canceled) return; - setCode(result); - }; - - (async () => { - const result = await generateBundle({ - files, - component, - environment, - callbackId - }); - - scriptElement = executeModule(result); - scriptElement.id = callbackId; - })(); - - return () => { - canceled = true; - - delete (window as any)[callbackId]; - - if (scriptElement) { - scriptElement.remove(); - } - }; - }, [files, component, environment]); - - return ( -
- -
- ); -}; - -export default Content; diff --git a/website/src/components/Playground/Preview/Select.tsx b/website/src/components/Playground/Preview/Select.tsx deleted file mode 100644 index cf36aaf9c..000000000 --- a/website/src/components/Playground/Preview/Select.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React, { FunctionComponent } from "react"; -import styles from "./styles.module.scss"; - -const Select: FunctionComponent<{ - label: string; - options: readonly string[]; - value: string; - onChange(value: string): void; -}> = ({ label, options, value, onChange }) => { - return ( - - ); -}; - -export default Select; diff --git a/website/src/components/Playground/Preview/executeModule.ts b/website/src/components/Playground/Preview/executeModule.ts deleted file mode 100644 index 8a66e6a8f..000000000 --- a/website/src/components/Playground/Preview/executeModule.ts +++ /dev/null @@ -1,10 +0,0 @@ -export default function executeModule(code: string): HTMLScriptElement { - const script = document.createElement("script"); - - script.type = "module"; - script.innerHTML = code; - - document.body.appendChild(script); - - return script; -} diff --git a/website/src/components/Playground/Preview/generateBundle.ts b/website/src/components/Playground/Preview/generateBundle.ts deleted file mode 100644 index b19258129..000000000 --- a/website/src/components/Playground/Preview/generateBundle.ts +++ /dev/null @@ -1,110 +0,0 @@ -import type rollupType from "rollup"; -import { basename, extname } from "../../../utils/path"; -import createVirtualFSPlugin from "./virtualFS"; -import createCDNResolvePlugin, { getModuleURLForCDN } from "./cdnResolve"; -import createAliasPlugin from "./alias"; - -const SYSTEM_DIR = "/.kosko"; -const SYSTEM_ENTRY_ID = `${SYSTEM_DIR}/entry.js`; -const SYSTEM_ENV_ID = `${SYSTEM_DIR}/env.js`; -const KOSKO_ENV_BARE_SPECIFIER = "@kosko/env"; - -interface BundleOptions { - files: Record; - component: string; - environment: string; - callbackId: string; -} - -function generateEntry({ - component, - callbackId -}: Pick): string { - return ` -import "${SYSTEM_ENV_ID}"; -import { resolve, print, PrintFormat } from "@kosko/generate"; -import component from "/components/${component}.js"; - -(async () => { - const manifests = await resolve(component); - const result = []; - - print({ manifests }, { - format: PrintFormat.YAML, - writer: { - write(data) { - result.push(data); - } - } - }); - - if (typeof window[${JSON.stringify(callbackId)}] === "function") { - window[${JSON.stringify(callbackId)}](result.join("")); - } -})(); -`; -} - -function generateEnvModule({ - files, - environment -}: Pick): string { - const koskoEnv = getModuleURLForCDN(KOSKO_ENV_BARE_SPECIFIER); - const envs = Object.keys(files) - .filter( - (path) => - path.startsWith(`/environments/${environment}/`) && - extname(path) === ".js" - ) - .map((path) => [basename(path, extname(path)), path] as const); - - return ` -import { createSyncEnvironment, createSyncLoaderReducers } from "${koskoEnv}"; -${envs.map(([, path], i) => `import env${i} from "${path}";`).join("\n")} - -const envMap = { - ${envs.map(([name], i) => `"${name}": env${i}`).join(",\n")} -}; -const env = createSyncEnvironment(); - -env.setReducers(reducers => reducers.concat(createSyncLoaderReducers({ - global: () => envMap.index || {}, - component: (name) => envMap[name] || {}, -}))); - -export default env; -`; -} - -export default async function generateBundle({ - files, - component, - environment, - callbackId -}: BundleOptions) { - const rollup: typeof rollupType = await import( - /* webpackChunkName: "rollup" */ "rollup/dist/rollup.browser" - ); - - const build = await rollup.rollup({ - input: SYSTEM_ENTRY_ID, - plugins: [ - createAliasPlugin({ - [KOSKO_ENV_BARE_SPECIFIER]: SYSTEM_ENV_ID - }), - createVirtualFSPlugin({ - ...files, - [SYSTEM_ENTRY_ID]: generateEntry({ component, callbackId }), - [SYSTEM_ENV_ID]: generateEnvModule({ files, environment }) - }), - createCDNResolvePlugin() - ], - onwarn(warning) { - console.warn(warning); - } - }); - - const result = await build.generate({}); - - return result.output[0].code; -} diff --git a/website/src/components/Playground/Preview/index.tsx b/website/src/components/Playground/Preview/index.tsx deleted file mode 100644 index 17455b94e..000000000 --- a/website/src/components/Playground/Preview/index.tsx +++ /dev/null @@ -1,69 +0,0 @@ -import React, { FunctionComponent } from "react"; -import { usePlayground } from "../context"; -import styles from "./styles.module.scss"; -import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; -import Content from "./Content"; -import useComponentList from "../hooks/useComponentList"; -import useEnvironmentList from "../hooks/useEnvironmentList"; -import Select from "./Select"; - -const ComponentSelect: FunctionComponent = () => { - const components = useComponentList(); - const { - value: { component }, - updateValue - } = usePlayground(); - - return ( - { - updateValue((draft) => { - draft.environment = value; - }); - }} - /> - ); -}; - -const Preview: FunctionComponent = () => { - const { - value: { editorMounted } - } = usePlayground(); - - return ( -
- - Preview - - - - {editorMounted && } -
- ); -}; - -export default Preview; diff --git a/website/src/components/Playground/Preview/styles.module.scss b/website/src/components/Playground/Preview/styles.module.scss deleted file mode 100644 index 0b3af5285..000000000 --- a/website/src/components/Playground/Preview/styles.module.scss +++ /dev/null @@ -1,21 +0,0 @@ -.container { - height: 100%; - display: flex; - flex-direction: column; - overflow: hidden; -} - -.editor { - flex: 1; -} - -.selectContainer { - display: flex; - align-items: center; - padding-left: 0.75rem; -} - -.selectLabel { - font-size: 0.875rem; - padding-right: 0.5rem; -} diff --git a/website/src/components/Playground/Preview/virtualFS.ts b/website/src/components/Playground/Preview/virtualFS.ts deleted file mode 100644 index 7bf0344e2..000000000 --- a/website/src/components/Playground/Preview/virtualFS.ts +++ /dev/null @@ -1,25 +0,0 @@ -import type { Plugin } from "rollup"; -import { isAbsolute, isRelative, relative, dirname } from "../../../utils/path"; - -export default function createVirtualFSPlugin( - files: Record -): Plugin { - return { - name: "virtual-fs", - resolveId(source, importer) { - if (isAbsolute(source)) { - return source; - } - - if (isRelative(source)) { - const path = "/" + relative(dirname(importer), source); - return path; - } - }, - load(id) { - if (files[id] != null) { - return files[id]; - } - } - }; -} diff --git a/website/src/components/Playground/context.tsx b/website/src/components/Playground/context.tsx deleted file mode 100644 index 950d195ff..000000000 --- a/website/src/components/Playground/context.tsx +++ /dev/null @@ -1,65 +0,0 @@ -import React, { - createContext, - FunctionComponent, - useContext, - useMemo -} from "react"; -import { noop } from "lodash"; -import { Draft } from "immer"; -import { useImmer } from "use-immer"; - -interface ContextValue { - activePath: string; - files: Record; - component: string; - environment: string; - editorMounted: boolean; -} - -const PlaygroundContext = createContext<{ - value: ContextValue; - updateValue(callback: (draft: Draft) => void): void; -}>({ - value: { - activePath: "", - files: {}, - component: "", - environment: "", - editorMounted: false - }, - updateValue: noop -}); - -export function usePlayground() { - return useContext(PlaygroundContext); -} - -export const PlaygroundProvider: FunctionComponent = ({ children }) => { - const [value, updateValue] = useImmer(() => ({ - activePath: "/components/nginx.js", - files: { - /* eslint-disable @typescript-eslint/no-var-requires */ - "/components/nginx.js": require("!!raw-loader!./fixtures/components/nginx.js") - .default, - "/environments/dev/index.js": require("!!raw-loader!./fixtures/environments/dev/index.js") - .default, - "/environments/dev/nginx.js": require("!!raw-loader!./fixtures/environments/dev/nginx.js") - .default, - "/environments/prod/index.js": require("!!raw-loader!./fixtures/environments/prod/index.js") - .default, - "/environments/prod/nginx.js": require("!!raw-loader!./fixtures/environments/prod/nginx.js") - .default - /* eslint-enable @typescript-eslint/no-var-requires */ - }, - component: "nginx", - environment: "dev", - editorMounted: false - })); - const ctx = useMemo(() => ({ value, updateValue }), [value, updateValue]); - - return ( - - {children} - - ); -}; diff --git a/website/src/components/Playground/hooks/useComponentList.ts b/website/src/components/Playground/hooks/useComponentList.ts deleted file mode 100644 index 8cc698f5a..000000000 --- a/website/src/components/Playground/hooks/useComponentList.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { useMemo } from "react"; -import { basename, extname } from "../../../utils/path"; -import { usePlayground } from "../context"; - -export default function useComponentList(): readonly string[] { - const { - value: { files } - } = usePlayground(); - - return useMemo( - () => - Object.keys(files) - .map((path) => path.substring(1).split("/")) - .filter(([dir, name]) => dir === "components" && name.endsWith(".js")) - .map(([, name]) => basename(name, extname(name))), - [files] - ); -} diff --git a/website/src/components/Playground/hooks/useEnvironmentList.ts b/website/src/components/Playground/hooks/useEnvironmentList.ts deleted file mode 100644 index 9f3eec81b..000000000 --- a/website/src/components/Playground/hooks/useEnvironmentList.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { useMemo } from "react"; -import { uniq } from "lodash"; -import { usePlayground } from "../context"; - -export default function useEnvironmentList(): readonly string[] { - const { - value: { files } - } = usePlayground(); - - return useMemo(() => { - const keys = Object.keys(files) - .map((path) => path.substring(1).split("/")) - .filter(([dir, name]) => dir === "environments" && !name.endsWith(".js")) - .map(([, name]) => name); - - return uniq(keys); - }, [files]); -} diff --git a/website/src/components/Playground/index.tsx b/website/src/components/Playground/index.tsx deleted file mode 100644 index fca25f479..000000000 --- a/website/src/components/Playground/index.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React, { FunctionComponent } from "react"; -import Layout from "@theme/Layout"; -import { Container, Section, Bar } from "./Container"; -import Sidebar from "./Sidebar"; -import Editor from "./Editor"; -import Preview from "./Preview"; -import { PlaygroundProvider } from "./context"; - -const Playground: FunctionComponent = () => { - return ( - - - -
- -
- -
- -
- -
- -
-
-
-
- ); -}; - -export default Playground; diff --git a/website/src/hooks/useScript.ts b/website/src/hooks/useScript.ts deleted file mode 100644 index bd84f75e2..000000000 --- a/website/src/hooks/useScript.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { useState, useEffect } from "react"; - -export enum ScriptLoadStatus { - Idle = "idle", - Loading = "loading", - Ready = "ready", - Error = "error" -} - -// Source: https://usehooks.com/useScript/ -export default function useScript(src: string): ScriptLoadStatus { - // Keep track of script status ("idle", "loading", "ready", "error") - const [status, setStatus] = useState( - src ? ScriptLoadStatus.Loading : ScriptLoadStatus.Idle - ); - - useEffect( - () => { - // Allow falsy src value if waiting on other data needed for - // constructing the script URL passed to this hook. - if (!src) { - setStatus(ScriptLoadStatus.Idle); - return; - } - - // Fetch existing script element by src - // It may have been added by another intance of this hook - let script: HTMLScriptElement = document.querySelector( - `script[src="${src}"]` - ); - - if (!script) { - // Create script - script = document.createElement("script"); - script.src = src; - script.async = true; - script.setAttribute("data-status", ScriptLoadStatus.Loading); - // Add script to document body - document.body.appendChild(script); - - // Store status in attribute on script - // This can be read by other instances of this hook - const setAttributeFromEvent = (event) => { - script.setAttribute( - "data-status", - event.type === "load" - ? ScriptLoadStatus.Ready - : ScriptLoadStatus.Error - ); - }; - - script.addEventListener("load", setAttributeFromEvent); - script.addEventListener("error", setAttributeFromEvent); - } else { - // Grab existing script status from attribute and set to state. - setStatus(script.getAttribute("data-status") as ScriptLoadStatus); - } - - // Script event handler to update status in state - // Note: Even if the script already exists we still need to add - // event handlers to update the state for *this* hook instance. - const setStateFromEvent = (event) => { - setStatus( - event.type === "load" - ? ScriptLoadStatus.Ready - : ScriptLoadStatus.Error - ); - }; - - // Add event listeners - script.addEventListener("load", setStateFromEvent); - script.addEventListener("error", setStateFromEvent); - - // Remove event listeners on cleanup - return () => { - if (script) { - script.removeEventListener("load", setStateFromEvent); - script.removeEventListener("error", setStateFromEvent); - } - }; - }, - [src] // Only re-run effect if script src changes - ); - - return status; -} diff --git a/website/src/components/CodeBlock/index.tsx b/website/src/modules/common/components/CodeBlock/index.tsx similarity index 98% rename from website/src/components/CodeBlock/index.tsx rename to website/src/modules/common/components/CodeBlock/index.tsx index 88bc60a5f..f174a119a 100644 --- a/website/src/components/CodeBlock/index.tsx +++ b/website/src/modules/common/components/CodeBlock/index.tsx @@ -1,7 +1,6 @@ import React, { FunctionComponent, useMemo } from "react"; import clsx from "clsx"; import Highlight, { defaultProps, Language } from "prism-react-renderer"; -// eslint-disable-next-line node/no-missing-import import usePrismTheme from "@theme/hooks/usePrismTheme"; import styles from "./styles.module.scss"; diff --git a/website/src/components/CodeBlock/styles.module.scss b/website/src/modules/common/components/CodeBlock/styles.module.scss similarity index 100% rename from website/src/components/CodeBlock/styles.module.scss rename to website/src/modules/common/components/CodeBlock/styles.module.scss diff --git a/website/src/components/LinkButton/index.tsx b/website/src/modules/common/components/LinkButton/index.tsx similarity index 85% rename from website/src/components/LinkButton/index.tsx rename to website/src/modules/common/components/LinkButton/index.tsx index 2c3755372..748f2d98b 100644 --- a/website/src/components/LinkButton/index.tsx +++ b/website/src/modules/common/components/LinkButton/index.tsx @@ -1,5 +1,5 @@ import React, { FunctionComponent } from "react"; -import Link, { LinkProps } from "@docusaurus/Link"; +import Link from "@docusaurus/Link"; import clsx from "clsx"; type ButtonColor = @@ -13,7 +13,11 @@ type ButtonColor = type ButtonSize = "sm" | "lg"; -type LinkButtonProps = LinkProps & { +type LinkButtonProps = { + to?: string; + className?: string; + activeClassName?: string; + isNavLink?: boolean; color?: ButtonColor; size?: ButtonSize; outline?: boolean; diff --git a/website/src/components/HomePage/DeployEverywhere/examples/components/nginx.js b/website/src/modules/home/components/DeployEverywhere/examples/components/nginx.js similarity index 100% rename from website/src/components/HomePage/DeployEverywhere/examples/components/nginx.js rename to website/src/modules/home/components/DeployEverywhere/examples/components/nginx.js diff --git a/website/src/components/HomePage/DeployEverywhere/examples/environments/prod.js b/website/src/modules/home/components/DeployEverywhere/examples/environments/prod.js similarity index 100% rename from website/src/components/HomePage/DeployEverywhere/examples/environments/prod.js rename to website/src/modules/home/components/DeployEverywhere/examples/environments/prod.js diff --git a/website/src/components/HomePage/DeployEverywhere/examples/environments/stage.js b/website/src/modules/home/components/DeployEverywhere/examples/environments/stage.js similarity index 100% rename from website/src/components/HomePage/DeployEverywhere/examples/environments/stage.js rename to website/src/modules/home/components/DeployEverywhere/examples/environments/stage.js diff --git a/website/src/components/HomePage/DeployEverywhere/examples/results/prod.yml b/website/src/modules/home/components/DeployEverywhere/examples/results/prod.yml similarity index 100% rename from website/src/components/HomePage/DeployEverywhere/examples/results/prod.yml rename to website/src/modules/home/components/DeployEverywhere/examples/results/prod.yml diff --git a/website/src/components/HomePage/DeployEverywhere/examples/results/stage.yml b/website/src/modules/home/components/DeployEverywhere/examples/results/stage.yml similarity index 100% rename from website/src/components/HomePage/DeployEverywhere/examples/results/stage.yml rename to website/src/modules/home/components/DeployEverywhere/examples/results/stage.yml diff --git a/website/src/components/HomePage/DeployEverywhere/index.tsx b/website/src/modules/home/components/DeployEverywhere/index.tsx similarity index 96% rename from website/src/components/HomePage/DeployEverywhere/index.tsx rename to website/src/modules/home/components/DeployEverywhere/index.tsx index d74c1ce74..54aee29ee 100644 --- a/website/src/components/HomePage/DeployEverywhere/index.tsx +++ b/website/src/modules/home/components/DeployEverywhere/index.tsx @@ -12,7 +12,10 @@ import environmentProd from "!!raw-loader!./examples/environments/prod.js"; import environmentStage from "!!raw-loader!./examples/environments/stage.js"; import resultProd from "!!raw-loader!./examples/results/prod.yml"; import resultStage from "!!raw-loader!./examples/results/stage.yml"; -import CodeBlock, { CodeBlockProps, usePrismTheme } from "../../CodeBlock"; +import CodeBlock, { + CodeBlockProps, + usePrismTheme +} from "@site/src/modules/common/components/CodeBlock"; const Pane: FunctionComponent<{ tabs: Record; diff --git a/website/src/components/HomePage/DeployEverywhere/styles.module.scss b/website/src/modules/home/components/DeployEverywhere/styles.module.scss similarity index 100% rename from website/src/components/HomePage/DeployEverywhere/styles.module.scss rename to website/src/modules/home/components/DeployEverywhere/styles.module.scss diff --git a/website/src/components/HomePage/Feature/index.tsx b/website/src/modules/home/components/Feature/index.tsx similarity index 100% rename from website/src/components/HomePage/Feature/index.tsx rename to website/src/modules/home/components/Feature/index.tsx diff --git a/website/src/components/HomePage/Feature/styles.module.scss b/website/src/modules/home/components/Feature/styles.module.scss similarity index 100% rename from website/src/components/HomePage/Feature/styles.module.scss rename to website/src/modules/home/components/Feature/styles.module.scss diff --git a/website/src/components/HomePage/Header/index.tsx b/website/src/modules/home/components/Header/index.tsx similarity index 90% rename from website/src/components/HomePage/Header/index.tsx rename to website/src/modules/home/components/Header/index.tsx index c25346e72..e8a1cb3ce 100644 --- a/website/src/components/HomePage/Header/index.tsx +++ b/website/src/modules/home/components/Header/index.tsx @@ -2,7 +2,7 @@ import React, { FunctionComponent } from "react"; import clsx from "clsx"; import styles from "./styles.module.scss"; import useBaseUrl from "@docusaurus/useBaseUrl"; -import LinkButton from "../../LinkButton"; +import LinkButton from "@site/src/modules/common/components/LinkButton"; const Header: FunctionComponent = () => { return ( diff --git a/website/src/components/HomePage/Header/styles.module.scss b/website/src/modules/home/components/Header/styles.module.scss similarity index 100% rename from website/src/components/HomePage/Header/styles.module.scss rename to website/src/modules/home/components/Header/styles.module.scss diff --git a/website/src/components/HomePage/index.tsx b/website/src/modules/home/components/HomePage/index.tsx similarity index 70% rename from website/src/components/HomePage/index.tsx rename to website/src/modules/home/components/HomePage/index.tsx index 36e00d4df..b92fdc194 100644 --- a/website/src/components/HomePage/index.tsx +++ b/website/src/modules/home/components/HomePage/index.tsx @@ -1,9 +1,9 @@ import React, { FunctionComponent } from "react"; import Layout from "@theme/Layout"; -import Header from "./Header"; -import WriteLess from "./WriteLess"; -import DeployEverywhere from "./DeployEverywhere"; -import TypeSafe from "./TypeSafe"; +import Header from "../Header"; +import WriteLess from "../WriteLess"; +import DeployEverywhere from "../DeployEverywhere"; +import TypeSafe from "../TypeSafe"; const HomePage: FunctionComponent = () => { return ( diff --git a/website/src/components/HomePage/TypeSafe/examples/component.js b/website/src/modules/home/components/TypeSafe/examples/component.js similarity index 100% rename from website/src/components/HomePage/TypeSafe/examples/component.js rename to website/src/modules/home/components/TypeSafe/examples/component.js diff --git a/website/src/components/HomePage/TypeSafe/index.tsx b/website/src/modules/home/components/TypeSafe/index.tsx similarity index 97% rename from website/src/components/HomePage/TypeSafe/index.tsx rename to website/src/modules/home/components/TypeSafe/index.tsx index 83e3d1079..b0dea84c5 100644 --- a/website/src/components/HomePage/TypeSafe/index.tsx +++ b/website/src/modules/home/components/TypeSafe/index.tsx @@ -3,7 +3,7 @@ import CodeBlock, { defaultTokenRenderer, TokenRenderer, usePrismTheme -} from "../../CodeBlock"; +} from "@site/src/modules/common/components/CodeBlock"; import { Feature, FeatureDescription, diff --git a/website/src/components/HomePage/TypeSafe/styles.module.scss b/website/src/modules/home/components/TypeSafe/styles.module.scss similarity index 100% rename from website/src/components/HomePage/TypeSafe/styles.module.scss rename to website/src/modules/home/components/TypeSafe/styles.module.scss diff --git a/website/src/components/HomePage/WriteLess/examples/deployment.yml b/website/src/modules/home/components/WriteLess/examples/deployment.yml similarity index 100% rename from website/src/components/HomePage/WriteLess/examples/deployment.yml rename to website/src/modules/home/components/WriteLess/examples/deployment.yml diff --git a/website/src/components/HomePage/WriteLess/examples/service.yml b/website/src/modules/home/components/WriteLess/examples/service.yml similarity index 100% rename from website/src/components/HomePage/WriteLess/examples/service.yml rename to website/src/modules/home/components/WriteLess/examples/service.yml diff --git a/website/src/components/HomePage/WriteLess/index.tsx b/website/src/modules/home/components/WriteLess/index.tsx similarity index 95% rename from website/src/components/HomePage/WriteLess/index.tsx rename to website/src/modules/home/components/WriteLess/index.tsx index 2dda9caa8..4834820f5 100644 --- a/website/src/components/HomePage/WriteLess/index.tsx +++ b/website/src/modules/home/components/WriteLess/index.tsx @@ -5,7 +5,7 @@ import { FeatureExample, FeatureTitle } from "../Feature"; -import CodeBlock from "../../CodeBlock"; +import CodeBlock from "@site/src/modules/common/components/CodeBlock"; import styles from "./styles.module.scss"; import deployment from "!!raw-loader!./examples/deployment.yml"; import service from "!!raw-loader!./examples/service.yml"; diff --git a/website/src/components/HomePage/WriteLess/styles.module.scss b/website/src/modules/home/components/WriteLess/styles.module.scss similarity index 100% rename from website/src/components/HomePage/WriteLess/styles.module.scss rename to website/src/modules/home/components/WriteLess/styles.module.scss diff --git a/website/src/components/Playground/Editor/index.tsx b/website/src/modules/playground/components/Editor/index.tsx similarity index 82% rename from website/src/components/Playground/Editor/index.tsx rename to website/src/modules/playground/components/Editor/index.tsx index 077fd4867..28724371b 100644 --- a/website/src/components/Playground/Editor/index.tsx +++ b/website/src/modules/playground/components/Editor/index.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent, useMemo } from "react"; import styles from "./styles.module.scss"; -import { usePlayground } from "../context"; +import usePlaygroundContext from "../../hooks/usePlaygroundContext"; import MonacoEditor from "../MonacoEditor"; import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; @@ -8,7 +8,7 @@ const Editor: FunctionComponent = () => { const { value: { activePath, files }, updateValue - } = usePlayground(); + } = usePlaygroundContext(); const value = useMemo(() => files[activePath], [activePath, files]); return ( @@ -22,11 +22,6 @@ const Editor: FunctionComponent = () => { language="javascript" path={activePath} value={value} - onMount={() => { - updateValue((draft) => { - draft.editorMounted = true; - }); - }} onChange={(value) => { updateValue((draft) => { draft.files[activePath] = value; diff --git a/website/src/components/Playground/Editor/styles.module.scss b/website/src/modules/playground/components/Editor/styles.module.scss similarity index 100% rename from website/src/components/Playground/Editor/styles.module.scss rename to website/src/modules/playground/components/Editor/styles.module.scss diff --git a/website/src/components/Playground/MonacoEditor/index.tsx b/website/src/modules/playground/components/MonacoEditor/index.tsx similarity index 61% rename from website/src/components/Playground/MonacoEditor/index.tsx rename to website/src/modules/playground/components/MonacoEditor/index.tsx index 629a35704..d715951f7 100644 --- a/website/src/components/Playground/MonacoEditor/index.tsx +++ b/website/src/modules/playground/components/MonacoEditor/index.tsx @@ -1,23 +1,22 @@ -import React, { FunctionComponent } from "react"; +import React, { FunctionComponent, useMemo } from "react"; import Editor, { EditorProps } from "@monaco-editor/react"; -// eslint-disable-next-line node/no-missing-import import useThemeContext from "@theme/hooks/useThemeContext"; const MonacoEditor: FunctionComponent = ({ - options, + options: inputOptions, ...props }) => { const { isDarkTheme } = useThemeContext(); + const options = useMemo( + () => ({ tabSize: 2, minimap: { enabled: false }, ...inputOptions }), + [inputOptions] + ); return ( ); }; diff --git a/website/src/modules/playground/components/Playground/Bar.tsx b/website/src/modules/playground/components/Playground/Bar.tsx new file mode 100644 index 000000000..be9b06157 --- /dev/null +++ b/website/src/modules/playground/components/Playground/Bar.tsx @@ -0,0 +1,22 @@ +import React, { FunctionComponent, useState } from "react"; +import { Bar as ResizerBar } from "react-simple-resizer"; +import clsx from "clsx"; +import styles from "./styles.module.scss"; + +const Bar: FunctionComponent = (props) => { + const [active, setActive] = useState(false); + + return ( + + ); +}; + +export default Bar; diff --git a/website/src/modules/playground/components/Playground/Provider.tsx b/website/src/modules/playground/components/Playground/Provider.tsx new file mode 100644 index 000000000..fe5856d60 --- /dev/null +++ b/website/src/modules/playground/components/Playground/Provider.tsx @@ -0,0 +1,42 @@ +import { sep } from "@site/src/utils/path"; +import React, { FunctionComponent, useMemo } from "react"; +import { useImmer } from "use-immer"; +import { + COMPONENT_DIR, + ENVIRONMENT_DIR, + JS_EXT, + MODULE_ENTRY +} from "../../constants"; +import { PlaygroundContext, PlaygroundContextValue } from "../../context"; + +const Provider: FunctionComponent = ({ children }) => { + const [value, updateValue] = useImmer(() => ({ + activePath: `${COMPONENT_DIR}nginx${JS_EXT}`, + files: { + /* eslint-disable @typescript-eslint/no-var-requires */ + [`${COMPONENT_DIR}nginx${JS_EXT}`]: require("!!raw-loader!../../fixtures/components/nginx.js") + .default, + [`${ENVIRONMENT_DIR}dev${sep}${MODULE_ENTRY}`]: require("!!raw-loader!../../fixtures/environments/dev/index.js") + .default, + [`${ENVIRONMENT_DIR}dev${sep}nginx${JS_EXT}`]: require("!!raw-loader!../../fixtures/environments/dev/nginx.js") + .default, + [`${ENVIRONMENT_DIR}prod${sep}${MODULE_ENTRY}`]: require("!!raw-loader!../../fixtures/environments/prod/index.js") + .default, + [`${ENVIRONMENT_DIR}prod${sep}nginx${JS_EXT}`]: require("!!raw-loader!../../fixtures/environments/prod/nginx.js") + .default + /* eslint-enable @typescript-eslint/no-var-requires */ + }, + component: "nginx", + environment: "dev", + editorMounted: false + })); + const ctx = useMemo(() => ({ value, updateValue }), [value, updateValue]); + + return ( + + {children} + + ); +}; + +export default Provider; diff --git a/website/src/modules/playground/components/Playground/index.tsx b/website/src/modules/playground/components/Playground/index.tsx new file mode 100644 index 000000000..ab1835fa5 --- /dev/null +++ b/website/src/modules/playground/components/Playground/index.tsx @@ -0,0 +1,51 @@ +import React, { FunctionComponent, useEffect, useRef } from "react"; +import Layout from "@theme/Layout"; +import Provider from "./Provider"; +import { Container, Section } from "react-simple-resizer"; +import Bar from "./Bar"; +import styles from "./styles.module.scss"; +import Sidebar from "../Sidebar"; +import Editor from "../Editor"; +import Preview from "../Preview"; + +const Playground: FunctionComponent = () => { + const ref = useRef(null); + + useEffect(() => { + const target = ref.current; + if (!target) return; + + const parent = target.parentElement; + if (!parent) return; + + parent.classList.add(styles.mainWrapper); + + return () => { + parent.classList.remove(styles.mainWrapper); + }; + }, [ref]); + + return ( + + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+ ); +}; + +export default Playground; diff --git a/website/src/components/Playground/Container/styles.module.scss b/website/src/modules/playground/components/Playground/styles.module.scss similarity index 81% rename from website/src/components/Playground/Container/styles.module.scss rename to website/src/modules/playground/components/Playground/styles.module.scss index 71ece26fb..4ae5a6356 100644 --- a/website/src/components/Playground/Container/styles.module.scss +++ b/website/src/modules/playground/components/Playground/styles.module.scss @@ -1,20 +1,15 @@ -.wrapper { +.mainWrapper { + height: 100%; display: flex; + flex-direction: column; } .main { - flex: 1; - overflow: hidden; + display: contents; } .container { - height: 100%; - user-select: none; -} - -.section { - display: flex; - flex-direction: column; + flex: 1; } .bar { diff --git a/website/src/modules/playground/components/Preview/Content.tsx b/website/src/modules/playground/components/Preview/Content.tsx new file mode 100644 index 000000000..2be8043bb --- /dev/null +++ b/website/src/modules/playground/components/Preview/Content.tsx @@ -0,0 +1,72 @@ +import React, { FunctionComponent, useEffect, useMemo, useState } from "react"; +import type * as monaco from "monaco-editor/esm/vs/editor/editor.api"; +import styles from "./styles.module.scss"; +import MonacoEditor from "../MonacoEditor"; +import { createPlaygroundWorker, execute } from "../../worker"; +import usePlaygroundContext from "../../hooks/usePlaygroundContext"; +import { useThrottle } from "react-use"; +import { noop } from "lodash"; + +let CALLBACK_ID = 0; + +const EDITOR_OPTIONS: monaco.editor.IStandaloneEditorConstructionOptions = { + readOnly: true +}; + +const Content: FunctionComponent = () => { + const [code, setCode] = useState(""); + const [mounted, setMounted] = useState(false); + const { value } = usePlaygroundContext(); + const files = useThrottle(value.files, 1000); + const worker = useMemo(() => createPlaygroundWorker(), []); + + useEffect(() => { + if (!mounted) return; + + const id = `__koskoPreview_${CALLBACK_ID++}`; + let canceled = false; + let dispose: () => void = noop; + + (async () => { + const result = await worker.bundle({ + files, + component: value.component, + environment: value.environment, + callback: `window.${id}` + }); + + if (canceled) return; + + // TODO: Handle bundle warnings + + dispose = execute(id, result.code, (err, code) => { + if (err) { + // TODO: Handle error + return; + } + + setCode(code); + }); + })(); + + return () => { + canceled = true; + dispose(); + }; + }, [mounted, files, value.component, value.environment]); + + return ( +
+ { + setMounted(true); + }} + /> +
+ ); +}; + +export default Content; diff --git a/website/src/modules/playground/components/Preview/index.tsx b/website/src/modules/playground/components/Preview/index.tsx new file mode 100644 index 000000000..397b06388 --- /dev/null +++ b/website/src/modules/playground/components/Preview/index.tsx @@ -0,0 +1,17 @@ +import React, { FunctionComponent } from "react"; +import styles from "./styles.module.scss"; +import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; +import Content from "./Content"; + +const Preview: FunctionComponent = () => { + return ( +
+ + Preview + + +
+ ); +}; + +export default Preview; diff --git a/website/src/modules/playground/components/Preview/styles.module.scss b/website/src/modules/playground/components/Preview/styles.module.scss new file mode 100644 index 000000000..ad9aa66c2 --- /dev/null +++ b/website/src/modules/playground/components/Preview/styles.module.scss @@ -0,0 +1,10 @@ +.container { + display: flex; + flex-direction: column; + height: 100%; + overflow: hidden; +} + +.editor { + flex: 1; +} diff --git a/website/src/components/Playground/Sidebar/Tree.tsx b/website/src/modules/playground/components/Sidebar/Tree.tsx similarity index 90% rename from website/src/components/Playground/Sidebar/Tree.tsx rename to website/src/modules/playground/components/Sidebar/Tree.tsx index bb6bd5cfc..601d96596 100644 --- a/website/src/components/Playground/Sidebar/Tree.tsx +++ b/website/src/modules/playground/components/Sidebar/Tree.tsx @@ -1,6 +1,6 @@ import React, { FunctionComponent, ReactNode } from "react"; -import cx from "clsx"; -import { usePlayground } from "../context"; +import clsx from "clsx"; +import usePlaygroundContext from "../../hooks/usePlaygroundContext"; import styles from "./styles.module.scss"; import { Directory, File, Entry, EntryType } from "./generateEntries"; import { FcFolder, FcFile } from "react-icons/fc"; @@ -15,7 +15,7 @@ const Cell: FunctionComponent<{ return (
+ {children} +
+ ); +}; + +export default Cell; diff --git a/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx b/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx new file mode 100644 index 000000000..3f884db52 --- /dev/null +++ b/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx @@ -0,0 +1,18 @@ +import React, { FunctionComponent } from "react"; +import { Directory } from "./types"; +import { FcFolder } from "react-icons/fc"; +import Cell from "./Cell"; +import Tree from "./Tree"; + +const DirectoryCell: FunctionComponent<{ entry: Directory; depth: number }> = ({ + entry, + depth +}) => { + return ( + } depth={depth}> + + + ); +}; + +export default DirectoryCell; diff --git a/website/src/modules/playground/components/Sidebar/FileCell.tsx b/website/src/modules/playground/components/Sidebar/FileCell.tsx new file mode 100644 index 000000000..dd9f870af --- /dev/null +++ b/website/src/modules/playground/components/Sidebar/FileCell.tsx @@ -0,0 +1,35 @@ +import React, { FunctionComponent } from "react"; +import clsx from "clsx"; +import usePlaygroundContext from "../../hooks/usePlaygroundContext"; +import styles from "./styles.module.scss"; +import { File } from "./types"; +import { FcFile } from "react-icons/fc"; +import Cell from "./Cell"; + +const FileCell: FunctionComponent<{ entry: File; depth: number }> = ({ + entry, + depth +}) => { + const { + value: { activePath }, + updateValue + } = usePlaygroundContext(); + + return ( + } + depth={depth} + className={clsx({ + [styles.cellButtonActive]: activePath === entry.path + })} + onClick={() => { + updateValue((draft) => { + draft.activePath = entry.path; + }); + }} + /> + ); +}; + +export default FileCell; diff --git a/website/src/modules/playground/components/Sidebar/Tree.tsx b/website/src/modules/playground/components/Sidebar/Tree.tsx index 601d96596..9bfc4a34e 100644 --- a/website/src/modules/playground/components/Sidebar/Tree.tsx +++ b/website/src/modules/playground/components/Sidebar/Tree.tsx @@ -1,68 +1,7 @@ -import React, { FunctionComponent, ReactNode } from "react"; -import clsx from "clsx"; -import usePlaygroundContext from "../../hooks/usePlaygroundContext"; -import styles from "./styles.module.scss"; -import { Directory, File, Entry, EntryType } from "./generateEntries"; -import { FcFolder, FcFile } from "react-icons/fc"; - -const Cell: FunctionComponent<{ - entry: Entry; - icon: ReactNode; - depth: number; - onClick?(): void; - className?: string; -}> = ({ children, entry, icon, depth, onClick, className }) => { - return ( -
- - {children} -
- ); -}; - -const FileCell: FunctionComponent<{ entry: File; depth: number }> = ({ - entry, - depth -}) => { - const { - value: { activePath }, - updateValue - } = usePlaygroundContext(); - - return ( - } - depth={depth} - className={clsx({ - [styles.cellButtonActive]: activePath === entry.path - })} - onClick={() => { - updateValue((draft) => { - draft.activePath = entry.path; - }); - }} - /> - ); -}; - -const DirectoryCell: FunctionComponent<{ entry: Directory; depth: number }> = ({ - entry, - depth -}) => { - return ( - } depth={depth}> - - - ); -}; +import React, { FunctionComponent } from "react"; +import { Entry, EntryType } from "./types"; +import DirectoryCell from "./DirectoryCell"; +import FileCell from "./FileCell"; const Tree: FunctionComponent<{ entries: readonly Entry[]; @@ -70,15 +9,13 @@ const Tree: FunctionComponent<{ }> = ({ entries, depth = 0 }) => { return (
- {entries.map((entry) => ( - - {entry.type === EntryType.Directory ? ( - - ) : ( - - )} - - ))} + {entries.map((entry) => + entry.type === EntryType.Directory ? ( + + ) : ( + + ) + )}
); }; diff --git a/website/src/modules/playground/components/Sidebar/generateEntries.ts b/website/src/modules/playground/components/Sidebar/generateEntries.ts index 315267aaf..fddf8f8c4 100644 --- a/website/src/modules/playground/components/Sidebar/generateEntries.ts +++ b/website/src/modules/playground/components/Sidebar/generateEntries.ts @@ -1,27 +1,6 @@ import { groupBy } from "lodash"; import { sep } from "@site/src/utils/path"; - -export enum EntryType { - File, - Directory -} - -interface BaseEntry { - type: EntryType; - name: string; - path: string; -} - -export interface File extends BaseEntry { - type: EntryType.File; -} - -export interface Directory extends BaseEntry { - type: EntryType.Directory; - children: readonly Entry[]; -} - -export type Entry = File | Directory; +import { Entry, EntryType, File, Directory } from "./types"; function doGenerateEntries( paths: readonly string[], diff --git a/website/src/modules/playground/components/Sidebar/types.ts b/website/src/modules/playground/components/Sidebar/types.ts new file mode 100644 index 000000000..f92f692e1 --- /dev/null +++ b/website/src/modules/playground/components/Sidebar/types.ts @@ -0,0 +1,21 @@ +export enum EntryType { + File, + Directory +} + +interface BaseEntry { + type: EntryType; + name: string; + path: string; +} + +export interface File extends BaseEntry { + type: EntryType.File; +} + +export interface Directory extends BaseEntry { + type: EntryType.Directory; + children: readonly Entry[]; +} + +export type Entry = File | Directory; diff --git a/website/src/modules/playground/worker/execute.ts b/website/src/modules/playground/worker/execute.ts index a0e5f1fbe..4a606409f 100644 --- a/website/src/modules/playground/worker/execute.ts +++ b/website/src/modules/playground/worker/execute.ts @@ -1,58 +1,51 @@ type ExecuteCallback = (err?: unknown, content?: string) => void; type Dispose = () => void; -const CATCH_GLOBAL_ERROR = ` - -`; +export function execute( + id: string, + code: string, + callback: ExecuteCallback +): Dispose { + function handleError(event: ErrorEvent) { + callback(event.error); + } -export function execute(code: string, callback: ExecuteCallback): Dispose { - function handleMessage(event: MessageEvent) { - if (event.data.source !== "kosko-playground") { + (window as any)[id] = (event) => { + if (event.source !== "kosko-playground") { return; } - switch (event.data.type) { + switch (event.type) { case "success": - callback(null, event.data.payload); + callback(null, event.payload); return; case "error": - callback(event.data.payload); + callback(event.payload); return; } - } + }; - window.addEventListener("message", handleMessage); + window.addEventListener("error", handleError); - const frame = document.createElement("iframe"); - const blob = new Blob( - [CATCH_GLOBAL_ERROR, ``], - { - type: "text/html" - } - ); - const url = URL.createObjectURL(blob); + const script = document.createElement("script"); + + script.type = "module"; + script.id = `${id}-script`; + script.innerHTML = code; - frame.width = "0"; - frame.height = "0"; - frame.src = url; - frame.style.display = "none"; + script.addEventListener("error", () => { + callback({ + name: "NetworkError", + message: "Script load failed. Open the console for more details." + }); + }); - document.body.appendChild(frame); + document.body.appendChild(script); return () => { - window.removeEventListener("message", handleMessage); - frame.remove(); - URL.revokeObjectURL(url); + delete (window as any)[id]; + window.removeEventListener("error", handleError); + script.remove(); }; } From af9d03abaa4b846e0efe9a66747fb92a579dcbbe Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Mon, 26 Apr 2021 01:08:20 +0800 Subject: [PATCH 12/36] docs(website): Implement sidebar actions in playground --- .../playground/components/Editor/index.tsx | 14 +- .../components/Playground/Provider.tsx | 24 ++- .../playground/components/Sidebar/Action.tsx | 23 +++ .../playground/components/Sidebar/Cell.tsx | 27 ++-- .../components/Sidebar/DirectoryAction.tsx | 140 ++++++++++++++++++ .../components/Sidebar/DirectoryCell.tsx | 8 +- .../components/Sidebar/FileAction.tsx | 68 +++++++++ .../components/Sidebar/FileCell.tsx | 8 +- .../components/Sidebar/generateEntries.ts | 17 ++- .../playground/components/Sidebar/index.tsx | 3 + .../components/Sidebar/styles.module.scss | 43 +++++- .../playground/components/Sidebar/utils.ts | 3 + website/src/modules/playground/constants.ts | 1 + website/src/modules/playground/context.ts | 3 +- .../playground/hooks/useComponentList.ts | 2 +- .../playground/hooks/useEnvironmentList.ts | 2 +- website/src/utils/path.ts | 2 +- 17 files changed, 349 insertions(+), 39 deletions(-) create mode 100644 website/src/modules/playground/components/Sidebar/Action.tsx create mode 100644 website/src/modules/playground/components/Sidebar/DirectoryAction.tsx create mode 100644 website/src/modules/playground/components/Sidebar/FileAction.tsx create mode 100644 website/src/modules/playground/components/Sidebar/utils.ts diff --git a/website/src/modules/playground/components/Editor/index.tsx b/website/src/modules/playground/components/Editor/index.tsx index 28724371b..3bae0ae60 100644 --- a/website/src/modules/playground/components/Editor/index.tsx +++ b/website/src/modules/playground/components/Editor/index.tsx @@ -3,26 +3,36 @@ import styles from "./styles.module.scss"; import usePlaygroundContext from "../../hooks/usePlaygroundContext"; import MonacoEditor from "../MonacoEditor"; import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; +import type * as monaco from "monaco-editor/esm/vs/editor/editor.api"; const Editor: FunctionComponent = () => { const { value: { activePath, files }, updateValue } = usePlaygroundContext(); - const value = useMemo(() => files[activePath], [activePath, files]); + const value = useMemo(() => files[activePath] || "", [activePath, files]); + const editorOptions = useMemo( + (): monaco.editor.IStandaloneEditorConstructionOptions => ({ + readOnly: !activePath + }), + [activePath] + ); return (
Editor -
{activePath}
+ {activePath &&
{activePath}
}
{ + if (!activePath) return; + updateValue((draft) => { draft.files[activePath] = value; }); diff --git a/website/src/modules/playground/components/Playground/Provider.tsx b/website/src/modules/playground/components/Playground/Provider.tsx index fe5856d60..8f186d93b 100644 --- a/website/src/modules/playground/components/Playground/Provider.tsx +++ b/website/src/modules/playground/components/Playground/Provider.tsx @@ -3,16 +3,36 @@ import React, { FunctionComponent, useMemo } from "react"; import { useImmer } from "use-immer"; import { COMPONENT_DIR, + DIRECTORY_PLACEHOLDER, ENVIRONMENT_DIR, JS_EXT, MODULE_ENTRY } from "../../constants"; import { PlaygroundContext, PlaygroundContextValue } from "../../context"; +function insertPlaceholder( + files: Record +): Record { + const result: Record = {}; + + for (const [k, v] of Object.entries(files)) { + result[k] = v; + + const parts = k.split(sep); + + for (let i = 1; i < parts.length; i++) { + const path = [...parts.slice(0, i), DIRECTORY_PLACEHOLDER].join(sep); + result[path] = ""; + } + } + + return result; +} + const Provider: FunctionComponent = ({ children }) => { const [value, updateValue] = useImmer(() => ({ activePath: `${COMPONENT_DIR}nginx${JS_EXT}`, - files: { + files: insertPlaceholder({ /* eslint-disable @typescript-eslint/no-var-requires */ [`${COMPONENT_DIR}nginx${JS_EXT}`]: require("!!raw-loader!../../fixtures/components/nginx.js") .default, @@ -25,7 +45,7 @@ const Provider: FunctionComponent = ({ children }) => { [`${ENVIRONMENT_DIR}prod${sep}nginx${JS_EXT}`]: require("!!raw-loader!../../fixtures/environments/prod/nginx.js") .default /* eslint-enable @typescript-eslint/no-var-requires */ - }, + }), component: "nginx", environment: "dev", editorMounted: false diff --git a/website/src/modules/playground/components/Sidebar/Action.tsx b/website/src/modules/playground/components/Sidebar/Action.tsx new file mode 100644 index 000000000..edd2ff7da --- /dev/null +++ b/website/src/modules/playground/components/Sidebar/Action.tsx @@ -0,0 +1,23 @@ +import React, { FunctionComponent, ReactNode } from "react"; +import styles from "./styles.module.scss"; + +export const ActionContainer: FunctionComponent = ({ children }) => { + return
{children}
; +}; + +export const ActionButton: FunctionComponent<{ + title: string; + onClick?(): void; + icon: ReactNode; +}> = ({ icon, title, onClick }) => { + return ( + + ); +}; diff --git a/website/src/modules/playground/components/Sidebar/Cell.tsx b/website/src/modules/playground/components/Sidebar/Cell.tsx index c2186a354..3dc992656 100644 --- a/website/src/modules/playground/components/Sidebar/Cell.tsx +++ b/website/src/modules/playground/components/Sidebar/Cell.tsx @@ -8,18 +8,27 @@ const Cell: FunctionComponent<{ icon: ReactNode; depth: number; onClick?(): void; - className?: string; -}> = ({ children, entry, icon, depth, onClick, className }) => { + action?: ReactNode; + active?: boolean; +}> = ({ children, entry, icon, depth, onClick, action, active }) => { return (
- + + {action &&
{action}
} +
{children}
); diff --git a/website/src/modules/playground/components/Sidebar/DirectoryAction.tsx b/website/src/modules/playground/components/Sidebar/DirectoryAction.tsx new file mode 100644 index 000000000..a1be3d002 --- /dev/null +++ b/website/src/modules/playground/components/Sidebar/DirectoryAction.tsx @@ -0,0 +1,140 @@ +import React, { FunctionComponent } from "react"; +import { ActionButton, ActionContainer } from "./Action"; +import { VscNewFolder, VscNewFile, VscEdit, VscTrash } from "react-icons/vsc"; +import usePlaygroundContext from "../../hooks/usePlaygroundContext"; +import { dirname, sep } from "@site/src/utils/path"; +import { DIRECTORY_PLACEHOLDER } from "../../constants"; +import { isValidName } from "./utils"; + +const DirectoryAction: FunctionComponent<{ + path: string; + showFileActions?: boolean; +}> = ({ path, showFileActions }) => { + const { + value: { files }, + updateValue + } = usePlaygroundContext(); + + return ( + + } + onClick={() => { + const name = prompt("Name of new file"); + if (!name) return; + + if (!isValidName(name)) { + alert(`File name "${name}" is invalid`); + return; + } + + const newPath = `${path}${sep}${name}.js`; + + if (files[newPath] != null) { + alert(`File "${newPath}" already exists`); + return; + } + + updateValue((draft) => { + draft.files[newPath] = ""; + draft.activePath = newPath; + }); + }} + /> + } + onClick={() => { + const name = prompt("Name of new folder"); + if (!name) return; + + if (!isValidName(name)) { + alert(`Folder name "${name}" is invalid`); + return; + } + + const dir = `${path}${sep}${name}`; + const newPath = `${dir}${sep}${DIRECTORY_PLACEHOLDER}`; + + if (files[newPath] != null) { + alert(`Folder "${dir}" already exists`); + return; + } + + updateValue((draft) => { + draft.files[newPath] = ""; + }); + }} + /> + {showFileActions && ( + <> + } + onClick={() => { + const name = prompt("New name of the folder"); + if (!name) return; + + if (!isValidName(name)) { + alert(`Folder name "${name}" is invalid`); + return; + } + + const parentDir = dirname(path); + const newDirPath = `${parentDir}${ + parentDir.endsWith(sep) ? "" : sep + }${name}`; + const newPlaceholderPath = `${newDirPath}${sep}${DIRECTORY_PLACEHOLDER}`; + + if (files[newPlaceholderPath] != null) { + alert(`Folder "${newDirPath}" already exists`); + return; + } + + updateValue((draft) => { + for (const key of Object.keys(draft.files)) { + if (!key.startsWith(`${path}${sep}`)) continue; + + const newPath = `${newDirPath}${key.substring(path.length)}`; + + if (draft.activePath === key) { + draft.activePath = newPath; + } + + draft.files[newPath] = draft.files[key]; + delete draft.files[key]; + } + }); + }} + /> + } + onClick={() => { + if (!confirm("Are you sure to delete this folder?")) { + return; + } + + updateValue((draft) => { + const pathsToDelete = Object.keys(draft.files).filter((key) => + key.startsWith(`${path}${sep}`) + ); + + if (pathsToDelete.includes(draft.activePath)) { + draft.activePath = undefined; + } + + for (const path of pathsToDelete) { + delete draft.files[path]; + } + }); + }} + /> + + )} + + ); +}; + +export default DirectoryAction; diff --git a/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx b/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx index 3f884db52..ba15a598d 100644 --- a/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx +++ b/website/src/modules/playground/components/Sidebar/DirectoryCell.tsx @@ -3,13 +3,19 @@ import { Directory } from "./types"; import { FcFolder } from "react-icons/fc"; import Cell from "./Cell"; import Tree from "./Tree"; +import DirectoryAction from "./DirectoryAction"; const DirectoryCell: FunctionComponent<{ entry: Directory; depth: number }> = ({ entry, depth }) => { return ( - } depth={depth}> + } + depth={depth} + action={} + > ); diff --git a/website/src/modules/playground/components/Sidebar/FileAction.tsx b/website/src/modules/playground/components/Sidebar/FileAction.tsx new file mode 100644 index 000000000..36e77d611 --- /dev/null +++ b/website/src/modules/playground/components/Sidebar/FileAction.tsx @@ -0,0 +1,68 @@ +import React, { FunctionComponent } from "react"; +import { ActionButton, ActionContainer } from "./Action"; +import { VscEdit, VscTrash } from "react-icons/vsc"; +import usePlaygroundContext from "../../hooks/usePlaygroundContext"; +import { dirname, sep } from "@site/src/utils/path"; +import { isValidName } from "./utils"; + +const FileAction: FunctionComponent<{ path: string }> = ({ path }) => { + const { + value: { files }, + updateValue + } = usePlaygroundContext(); + + return ( + + } + onClick={() => { + const name = prompt("New name of the file"); + if (!name) return; + + if (!isValidName(name)) { + alert(`File name "${name}" is invalid`); + return; + } + + const dir = dirname(path); + const newPath = `${dir}${dir.endsWith(sep) ? "" : sep}${name}.js`; + if (path === newPath) return; + + if (files[newPath] != null) { + alert(`File "${newPath}" already exists`); + return; + } + + updateValue((draft) => { + draft.files[newPath] = draft.files[path]; + delete draft.files[path]; + + if (draft.activePath === path) { + draft.activePath = newPath; + } + }); + }} + /> + } + onClick={() => { + if (!confirm("Are you sure to delete this file?")) { + return; + } + + updateValue((draft) => { + if (draft.activePath === path) { + draft.activePath = undefined; + } + + delete draft.files[path]; + }); + }} + /> + + ); +}; + +export default FileAction; diff --git a/website/src/modules/playground/components/Sidebar/FileCell.tsx b/website/src/modules/playground/components/Sidebar/FileCell.tsx index dd9f870af..873103396 100644 --- a/website/src/modules/playground/components/Sidebar/FileCell.tsx +++ b/website/src/modules/playground/components/Sidebar/FileCell.tsx @@ -1,10 +1,9 @@ import React, { FunctionComponent } from "react"; -import clsx from "clsx"; import usePlaygroundContext from "../../hooks/usePlaygroundContext"; -import styles from "./styles.module.scss"; import { File } from "./types"; import { FcFile } from "react-icons/fc"; import Cell from "./Cell"; +import FileAction from "./FileAction"; const FileCell: FunctionComponent<{ entry: File; depth: number }> = ({ entry, @@ -20,9 +19,8 @@ const FileCell: FunctionComponent<{ entry: File; depth: number }> = ({ entry={entry} icon={} depth={depth} - className={clsx({ - [styles.cellButtonActive]: activePath === entry.path - })} + action={} + active={activePath === entry.path} onClick={() => { updateValue((draft) => { draft.activePath = entry.path; diff --git a/website/src/modules/playground/components/Sidebar/generateEntries.ts b/website/src/modules/playground/components/Sidebar/generateEntries.ts index fddf8f8c4..97057a663 100644 --- a/website/src/modules/playground/components/Sidebar/generateEntries.ts +++ b/website/src/modules/playground/components/Sidebar/generateEntries.ts @@ -1,6 +1,7 @@ import { groupBy } from "lodash"; import { sep } from "@site/src/utils/path"; import { Entry, EntryType, File, Directory } from "./types"; +import { DIRECTORY_PLACEHOLDER } from "../../constants"; function doGenerateEntries( paths: readonly string[], @@ -25,13 +26,15 @@ function doGenerateEntries( }; } ), - ...files.map( - (name): File => ({ - type: EntryType.File, - name, - path: prefix + name - }) - ) + ...files + .filter((name) => name !== DIRECTORY_PLACEHOLDER) + .map( + (name): File => ({ + type: EntryType.File, + name, + path: prefix + name + }) + ) ].sort((a, b) => { // Move directories to the front if (a.type !== b.type) { diff --git a/website/src/modules/playground/components/Sidebar/index.tsx b/website/src/modules/playground/components/Sidebar/index.tsx index a7666b5e2..6a60c8c8c 100644 --- a/website/src/modules/playground/components/Sidebar/index.tsx +++ b/website/src/modules/playground/components/Sidebar/index.tsx @@ -4,6 +4,7 @@ import { ToolbarContainer, ToolbarTitle } from "../Toolbar"; import styles from "./styles.module.scss"; import generateEntries from "./generateEntries"; import Tree from "./Tree"; +import DirectoryAction from "./DirectoryAction"; const Sidebar: FunctionComponent = () => { const { @@ -15,6 +16,8 @@ const Sidebar: FunctionComponent = () => {