diff --git a/website/package.json b/website/package.json index 55d76b42..f9bc2d2a 100644 --- a/website/package.json +++ b/website/package.json @@ -10,18 +10,19 @@ "preview": "vite preview" }, "dependencies": { - "@dtinsight/molecule": "^1.3.4", + "@dtinsight/molecule": "2.0.0-alpha.1", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "@jcubic/lips": "^0.20.3", "assert": "link:rollup-plugin-node-polyfills/polyfills/assert", "buffer": "^6.0.3", - "monaco-editor": "0.31.0", + "idb-keyval": "^6.2.1", + "monaco-editor": "0.31.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "reflect-metadata": "^0.1.13", "rollup-plugin-node-polyfills": "^0.2.1", "rollup-plugin-polyfill-node": "^0.12.0", + "styled-components": "^6.1.6", "util": "link:rollup-plugin-node-polyfills/polyfills/util", "vite-plugin-commonjs": "^0.7.1" }, diff --git a/website/pnpm-lock.yaml b/website/pnpm-lock.yaml index 05d1d782..782a012b 100644 --- a/website/pnpm-lock.yaml +++ b/website/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: 5.3 specifiers: - '@dtinsight/molecule': ^1.3.4 + '@dtinsight/molecule': 2.0.0-alpha.1 '@esbuild-plugins/node-globals-polyfill': ^0.2.3 '@esbuild-plugins/node-modules-polyfill': ^0.2.2 '@jcubic/lips': ^0.20.3 @@ -16,30 +16,32 @@ specifiers: eslint: ^8.38.0 eslint-plugin-react-hooks: ^4.6.0 eslint-plugin-react-refresh: ^0.3.4 - monaco-editor: 0.31.0 + idb-keyval: ^6.2.1 + monaco-editor: 0.31.1 react: ^18.2.0 react-dom: ^18.2.0 - reflect-metadata: ^0.1.13 rollup-plugin-node-polyfills: ^0.2.1 rollup-plugin-polyfill-node: ^0.12.0 + styled-components: ^6.1.6 typescript: ^5.0.2 util: link:rollup-plugin-node-polyfills/polyfills/util vite: ^4.3.9 vite-plugin-commonjs: ^0.7.1 dependencies: - '@dtinsight/molecule': 1.3.4_f00573bd3726c9f289cfe34c027997e4 + '@dtinsight/molecule': 2.0.0-alpha.1_f00573bd3726c9f289cfe34c027997e4 '@esbuild-plugins/node-globals-polyfill': 0.2.3 '@esbuild-plugins/node-modules-polyfill': 0.2.2 '@jcubic/lips': 0.20.3 assert: link:rollup-plugin-node-polyfills/polyfills/assert buffer: 6.0.3 - monaco-editor: 0.31.0 + idb-keyval: 6.2.1 + monaco-editor: 0.31.1 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - reflect-metadata: 0.1.13 rollup-plugin-node-polyfills: 0.2.1 rollup-plugin-polyfill-node: 0.12.0 + styled-components: 6.1.6_react-dom@18.2.0+react@18.2.0 util: link:rollup-plugin-node-polyfills/polyfills/util vite-plugin-commonjs: 0.7.1 @@ -247,11 +249,11 @@ packages: '@babel/helper-plugin-utils': 7.21.5 dev: true - /@babel/runtime/7.22.5: - resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} + /@babel/runtime/7.23.7: + resolution: {integrity: sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==} engines: {node: '>=6.9.0'} dependencies: - regenerator-runtime: 0.13.11 + regenerator-runtime: 0.14.1 dev: false /@babel/template/7.21.9: @@ -290,43 +292,58 @@ packages: to-fast-properties: 2.0.0 dev: true - /@dtinsight/dt-utils/1.1.2: - resolution: {integrity: sha512-jPGRUBD96+4ZLiI4LE2+mhG4wOVq8GveiDZH4HfZTQlVy+NjPmcWXZWYc9cIiTYK9WqyEOJNgW87zgf+rz5S+g==} + /@dtinsight/dt-utils/1.3.1: + resolution: {integrity: sha512-bV3xfCUthEtPkBpsCV/798J/Fz9xhxq9QybAaXhOtfGlZRuqPrb4Irdp2ySj7UaFB4VmmDg0wTIyxv0HMyGctQ==} dependencies: - dayjs: 1.11.8 + dayjs: 1.11.10 lodash: 4.17.21 standard-version: 9.5.0 dev: false - /@dtinsight/molecule/1.3.4_f00573bd3726c9f289cfe34c027997e4: - resolution: {integrity: sha512-w18xVeursLCOJHdexcPxdquj9kDxSjpumWg5LCJAWPlE18dNnGgvZYhbKmUMVF1xlpe9HX03tZA22pOvfzDRVw==} - requiresBuild: true + /@dtinsight/molecule/2.0.0-alpha.1_f00573bd3726c9f289cfe34c027997e4: + resolution: {integrity: sha512-UnoZC5S855WSGVYUpkGl/y89czoGcD5ozm6kwxQ1+4PB9ZUG3vU8Mn/qtufMMyhMVP0i+lJSs+kVeGozZwdw2g==} peerDependencies: - react: '>=18.0.0' - react-dom: '>=18.0.0' - dependencies: - '@dtinsight/dt-utils': 1.1.2 - '@vscode/codicons': 0.0.26 - immutability-helper: 3.1.1 - lodash: 4.17.21 - monaco-editor: 0.31.0 - rc-dialog: 8.9.0_react-dom@18.2.0+react@18.2.0 - rc-textarea: 0.3.7_react-dom@18.2.0+react@18.2.0 - rc-tooltip: 5.3.1_react-dom@18.2.0+react@18.2.0 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 + react: '>=16.13.1' + react-dom: '>=16.13.1' + dependencies: + '@dtinsight/dt-utils': 1.3.1 + '@vscode/codicons': 0.0.33 + immer: 10.0.3 + lodash-es: 4.17.21 + monaco-editor: 0.31.1 + normalize.css: 8.0.1 + rc-dropdown: 4.1.0_react-dom@18.2.0+react@18.2.0 + rc-menu: 9.12.4_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dnd: 16.0.1_a5670010d83c4da6dfe751a35739cb3c react-dnd-html5-backend: 16.0.1 react-dom: 18.2.0_react@18.2.0 - react-scrollbars-custom: 4.1.1_react-dom@18.2.0+react@18.2.0 + react-use: 17.4.2_react-dom@18.2.0+react@18.2.0 reflect-metadata: 0.1.13 - tsyringe: 4.5.0 + sonner: 1.4.2_react-dom@18.2.0+react@18.2.0 + tapable: 2.2.1 + tsyringe: 4.8.0 + use-sync-external-store: 1.2.0_react@18.2.0 transitivePeerDependencies: - '@types/hoist-non-react-statics' - '@types/node' - '@types/react' dev: false + /@emotion/is-prop-valid/1.2.1: + resolution: {integrity: sha512-61Mf7Ufx4aDxx1xlDeOm8aFFigGHE4z+0sKCa+IHCeZKiyP9RLD0Mmx7m8b9/Cf37f7NAvQOOJAbQQGVr5uERw==} + dependencies: + '@emotion/memoize': 0.8.1 + dev: false + + /@emotion/memoize/0.8.1: + resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} + dev: false + + /@emotion/unitless/0.8.0: + resolution: {integrity: sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw==} + dev: false + /@esbuild-plugins/node-globals-polyfill/0.2.3: resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==} peerDependencies: @@ -660,6 +677,37 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.15.0 + /@rc-component/portal/1.1.2_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-6f813C0IsasTZms08kfA8kPAGxbbkYToa8ALaiDIGGECU4i9hj8Plgbx0sNJDrey3EtHO30hmdaxtT0138xZcg==} + engines: {node: '>=8.x'} + peerDependencies: + react: '>=16.9.0' + react-dom: '>=16.9.0' + dependencies: + '@babel/runtime': 7.23.7 + classnames: 2.5.1 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + + /@rc-component/trigger/1.18.2_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-jRLYgFgjLEPq3MvS87fIhcfuywFSRDaDrYw1FLku7Cm4esszvzTbA0JBsyacAyLrK9rF3TiHFcvoEDMzoD3CTA==} + engines: {node: '>=8.x'} + peerDependencies: + react: '>=16.9.0' + react-dom: '>=16.9.0' + dependencies: + '@babel/runtime': 7.23.7 + '@rc-component/portal': 1.1.2_react-dom@18.2.0+react@18.2.0 + classnames: 2.5.1 + rc-motion: 2.9.0_react-dom@18.2.0+react@18.2.0 + rc-resize-observer: 1.4.0_react-dom@18.2.0+react@18.2.0 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + /@react-dnd/asap/5.0.2: resolution: {integrity: sha512-WLyfoHvxhs0V9U+GTsGilGgf2QsPl6ZZ44fnv0/b8T3nQyvzxidxsg/ZltbWssbsRDlYW8UKSQMTGotuTotZ6A==} dev: false @@ -704,19 +752,23 @@ packages: resolution: {integrity: sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==} dev: false + /@types/js-cookie/2.2.7: + resolution: {integrity: sha512-aLkWa0C0vO5b4Sr798E26QgOkss68Un0bLjs7u9qxzPT5CG+8DuNTffWES58YzJs3hrVAOs1wonycqEBqNJubA==} + dev: false + /@types/json-schema/7.0.12: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} dev: true - /@types/minimist/1.2.2: - resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} + /@types/minimist/1.2.5: + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} dev: false /@types/node/20.2.5: resolution: {integrity: sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==} - /@types/normalize-package-data/2.4.1: - resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} + /@types/normalize-package-data/2.4.4: + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: false /@types/prop-types/15.7.5: @@ -742,6 +794,10 @@ packages: resolution: {integrity: sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==} dev: true + /@types/stylis/4.2.0: + resolution: {integrity: sha512-n4sx2bqL0mW1tvDf/loQ+aMX7GQD3lc3fkCMC55VFNDu/vBOabO+LTIeXKM14xK0ppk5TUGcWRjiSpIlUpghKw==} + dev: false + /@typescript-eslint/eslint-plugin/5.59.8_3b4f51ca606e75917ec30cda7acb4efd: resolution: {integrity: sha512-JDMOmhXteJ4WVKOiHXGCoB96ADWg9q7efPWHRViT/f09bA8XOMLAVHHju3l0MkZnG1izaWXYmgvQcUjTRcpShQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -887,8 +943,12 @@ packages: - supports-color dev: true - /@vscode/codicons/0.0.26: - resolution: {integrity: sha512-GrYFJPbZ+hRM3NUVdAIpDepWkYCizVb13a6pJDAhckElDvaf4UCmNpuBS4MSydXNK63Ccts0XpvJ6JOW+/aU1g==} + /@vscode/codicons/0.0.33: + resolution: {integrity: sha512-VdgpnD75swH9hpXjd34VBgQ2w2quK63WljodlUcOoJDPKiV+rPjHrcUc2sjLCNKxhl6oKqmsZgwOWcDAY2GKKQ==} + dev: false + + /@xobotyi/scrollbar-width/1.9.5: + resolution: {integrity: sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ==} dev: false /JSONStream/1.3.5: @@ -1023,6 +1083,10 @@ packages: engines: {node: '>=6'} dev: false + /camelize/1.0.1: + resolution: {integrity: sha512-dU+Tx2fsypxTgtLoE36npi3UqcjSSMNYfkqgmoEhtZrraP5VWq0K7FkWVTYa8eMPtnU/G2txVsfdCJTn9uzpuQ==} + dev: false + /caniuse-lite/1.0.30001492: resolution: {integrity: sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw==} dev: true @@ -1043,8 +1107,8 @@ packages: supports-color: 7.2.0 dev: true - /classnames/2.3.2: - resolution: {integrity: sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw==} + /classnames/2.5.1: + resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} dev: false /cliui/7.0.4: @@ -1055,15 +1119,6 @@ packages: wrap-ansi: 7.0.0 dev: false - /clsx/1.2.1: - resolution: {integrity: sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg==} - engines: {node: '>=6'} - dev: false - - /cnbuilder/3.1.0: - resolution: {integrity: sha512-9sxWwwprkPNTVQnx92WYPEWCmyZRqbf9VWUYABU4rl0mLL17VAV2MvvOApkMA6bQVXRLJ8jN//8Yp6drElpLWA==} - dev: false - /color-convert/1.9.3: resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} dependencies: @@ -1204,7 +1259,7 @@ packages: dependencies: conventional-commits-filter: 2.0.7 dateformat: 3.0.3 - handlebars: 4.7.7 + handlebars: 4.7.8 json-stringify-safe: 5.0.1 lodash: 4.17.21 meow: 8.1.2 @@ -1270,6 +1325,12 @@ packages: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} dev: true + /copy-to-clipboard/3.3.3: + resolution: {integrity: sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==} + dependencies: + toggle-selection: 1.0.6 + dev: false + /core-util-is/1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: false @@ -1283,6 +1344,33 @@ packages: which: 2.0.2 dev: true + /css-color-keywords/1.0.0: + resolution: {integrity: sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg==} + engines: {node: '>=4'} + dev: false + + /css-in-js-utils/3.1.0: + resolution: {integrity: sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A==} + dependencies: + hyphenate-style-name: 1.0.4 + dev: false + + /css-to-react-native/3.2.0: + resolution: {integrity: sha512-e8RKaLXMOFii+02mOlqwjbD00KSEKqblnpO9e++1aXS1fPQOpS1YoqdVHBqPjHNoxeF2mimzVqawm2KCbEdtHQ==} + dependencies: + camelize: 1.0.1 + css-color-keywords: 1.0.0 + postcss-value-parser: 4.2.0 + dev: false + + /css-tree/1.1.3: + resolution: {integrity: sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==} + engines: {node: '>=8.0.0'} + dependencies: + mdn-data: 2.0.14 + source-map: 0.6.1 + dev: false + /csstype/3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} @@ -1295,8 +1383,8 @@ packages: resolution: {integrity: sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==} dev: false - /dayjs/1.11.8: - resolution: {integrity: sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==} + /dayjs/1.11.10: + resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} dev: false /debug/4.3.4: @@ -1360,10 +1448,6 @@ packages: esutils: 2.0.3 dev: true - /dom-align/1.12.4: - resolution: {integrity: sha512-R8LUSEay/68zE5c8/3BDxiTEvgb4xZTF0RKmAHfiEVN3klfIpXfi2/QCoiWPccVQ0J/ZGdz9OjzL4uJEP/MRAw==} - dev: false - /dot-prop/5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -1393,6 +1477,12 @@ packages: is-arrayish: 0.2.1 dev: false + /error-stack-parser/2.1.4: + resolution: {integrity: sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==} + dependencies: + stackframe: 1.3.4 + dev: false + /es-module-lexer/1.2.1: resolution: {integrity: sha512-9978wrXM50Y4rTMmW5kXIC09ZdXQZqkE4mxhwkd8VbzsGkXGPgV4zWuqQJgCEzYngdo2dYDa0l8xhX4fkSwJSg==} dev: false @@ -1592,6 +1682,18 @@ packages: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} dev: true + /fast-loops/1.1.3: + resolution: {integrity: sha512-8EZzEP0eKkEEVX+drtd9mtuQ+/QrlfW/5MlwcwK5Nds6EkZ/tRzEexkzUY2mIssnAyVLT+TKHuRXmFNNXYUd6g==} + dev: false + + /fast-shallow-equal/1.0.0: + resolution: {integrity: sha512-HPtaa38cPgWvaCFmRNhlc6NG7pv6NUHqjPgVAkWGoB9mQMwYB27/K0CvOM5Czy+qpT3e8XJ6Q4aPAnzpNpzNaw==} + dev: false + + /fastest-stable-stringify/2.0.2: + resolution: {integrity: sha512-bijHueCGd0LqqNK9b5oCMHc0MluJAx0cwqASgbWMvkO01lCYgIhacVRLcaDz3QnyYIRNJRDwMb41VuT6pHJ91Q==} + dev: false + /fastq/1.15.0: resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} dependencies: @@ -1670,8 +1772,8 @@ packages: dev: true optional: true - /function-bind/1.1.1: - resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + /function-bind/1.1.2: + resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: false /gensync/1.0.0-beta.2: @@ -1790,8 +1892,8 @@ packages: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true - /handlebars/4.7.7: - resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} + /handlebars/4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} hasBin: true dependencies: @@ -1817,11 +1919,11 @@ packages: engines: {node: '>=8'} dev: true - /has/1.0.3: - resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} - engines: {node: '>= 0.4.0'} + /hasown/2.0.0: + resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} + engines: {node: '>= 0.4'} dependencies: - function-bind: 1.1.1 + function-bind: 1.1.2 dev: false /hoist-non-react-statics/3.3.2: @@ -1841,6 +1943,14 @@ packages: lru-cache: 6.0.0 dev: false + /hyphenate-style-name/1.0.4: + resolution: {integrity: sha512-ygGZLjmXfPHj+ZWh6LwbC37l43MhfztxetbFCoYTM2VjkIUpeHgSNn7QIyVFj7YQ1Wl9Cbw5sholVJPzWvC2MQ==} + dev: false + + /idb-keyval/6.2.1: + resolution: {integrity: sha512-8Sb3veuYCyrZL+VBt9LJfZjLUPWVvqn8tG28VqYNFCo43KHcKuq+b4EiXGeuaLAQWL2YmyDgMp2aSpH9JHsEQg==} + dev: false + /ieee754/1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: false @@ -1850,8 +1960,8 @@ packages: engines: {node: '>= 4'} dev: true - /immutability-helper/3.1.1: - resolution: {integrity: sha512-Q0QaXjPjwIju/28TsugCHNEASwoCcJSyJV3uO1sOIQGI0jKgm9f41Lvz0DZj3n46cNCyAZTsEYoY4C2bVRUzyQ==} + /immer/10.0.3: + resolution: {integrity: sha512-pwupu3eWfouuaowscykeckFmVTpqbzW+rXFCX8rQLkZzM9ftBmU/++Ra+o+L27mz03zJTlyV4UUr+fdKNffo4A==} dev: false /import-fresh/3.3.0: @@ -1886,14 +1996,21 @@ packages: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} dev: false + /inline-style-prefixer/7.0.0: + resolution: {integrity: sha512-I7GEdScunP1dQ6IM2mQWh6v0mOYdYmH3Bp31UecKdrcUgcURTcctSe1IECdUznSHKSmsHtjrT3CwCPI1pyxfUQ==} + dependencies: + css-in-js-utils: 3.1.0 + fast-loops: 1.1.3 + dev: false + /is-arrayish/0.2.1: resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==} dev: false - /is-core-module/2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + /is-core-module/2.13.1: + resolution: {integrity: sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==} dependencies: - has: 1.0.3 + hasown: 2.0.0 dev: false /is-extglob/2.1.1: @@ -1945,6 +2062,10 @@ packages: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} dev: true + /js-cookie/2.2.1: + resolution: {integrity: sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==} + dev: false + /js-tokens/4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -2048,6 +2169,10 @@ packages: dependencies: p-locate: 5.0.0 + /lodash-es/4.17.21: + resolution: {integrity: sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==} + dev: false + /lodash.ismatch/4.4.0: resolution: {integrity: sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==} dev: false @@ -2102,11 +2227,15 @@ packages: engines: {node: '>=8'} dev: false + /mdn-data/2.0.14: + resolution: {integrity: sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==} + dev: false + /meow/8.1.2: resolution: {integrity: sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==} engines: {node: '>=10'} dependencies: - '@types/minimist': 1.2.2 + '@types/minimist': 1.2.5 camelcase-keys: 6.2.2 decamelize-keys: 1.1.1 hard-rejection: 2.1.0 @@ -2158,19 +2287,36 @@ packages: engines: {node: '>=0.10.0'} dev: false - /monaco-editor/0.31.0: - resolution: {integrity: sha512-H3QmysEwxxY8oxmFhIFcY9JkuwilUDa6txdAxb797cVr7XFZX27a3SDwcGJmTlV9iGPwdh132r3KKCS5aNL4Gg==} + /monaco-editor/0.31.1: + resolution: {integrity: sha512-FYPwxGZAeP6mRRyrr5XTGHD9gRXVjy7GUzF4IPChnyt3fS5WrNxIkS8DNujWf6EQy0Zlzpxw8oTVE+mWI2/D1Q==} dev: false /ms/2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} dev: true + /nano-css/5.6.1_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-T2Mhc//CepkTa3X4pUhKgbEheJHYAxD0VptuqFhDbGMUWVV2m+lkNiW/Ieuj35wrfC8Zm0l7HvssQh7zcEttSw==} + peerDependencies: + react: '*' + react-dom: '*' + dependencies: + '@jridgewell/sourcemap-codec': 1.4.15 + css-tree: 1.1.3 + csstype: 3.1.2 + fastest-stable-stringify: 2.0.2 + inline-style-prefixer: 7.0.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + rtl-css-js: 1.16.1 + stacktrace-js: 2.0.2 + stylis: 4.3.1 + dev: false + /nanoid/3.3.6: resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - dev: true /natural-compare-lite/1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} @@ -2192,8 +2338,8 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 - semver: 5.7.1 + resolve: 1.22.8 + semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: false @@ -2202,14 +2348,13 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.12.1 + is-core-module: 2.13.1 semver: 7.5.1 validate-npm-package-license: 3.0.4 dev: false - /object-assign/4.1.1: - resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} - engines: {node: '>=0.10.0'} + /normalize.css/8.0.1: + resolution: {integrity: sha512-qizSNPO93t1YUuUhP22btGOo3chcvDFqFaj2TRybP0DMxkHOCTYwp3n34fel4a31ORXy4m1Xq0Gyqpb5m33qIg==} dev: false /once/1.4.0: @@ -2349,7 +2494,6 @@ packages: /picocolors/1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - dev: true /picomatch/2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -2365,6 +2509,10 @@ packages: engines: {node: '>=4'} dev: false + /postcss-value-parser/4.2.0: + resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + dev: false + /postcss/8.4.24: resolution: {integrity: sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg==} engines: {node: ^10 || ^12 || >=14} @@ -2374,6 +2522,15 @@ packages: source-map-js: 1.0.2 dev: true + /postcss/8.4.31: + resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.6 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: false + /prelude-ls/1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -2383,14 +2540,6 @@ packages: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} dev: false - /prop-types/15.8.1: - resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} - dependencies: - loose-envify: 1.4.0 - object-assign: 4.1.1 - react-is: 16.13.1 - dev: false - /punycode/2.3.0: resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} engines: {node: '>=6'} @@ -2409,116 +2558,87 @@ packages: engines: {node: '>=8'} dev: false - /rc-align/4.0.15_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-wqJtVH60pka/nOX7/IspElA8gjPNQKIx/ZqJ6heATCkXpe1Zg4cPVrMD2vC96wjsFFL8WsmhPbx9tdMo1qqlIA==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - dom-align: 1.12.4 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 - resize-observer-polyfill: 1.5.1 - dev: false - - /rc-dialog/8.9.0_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-Cp0tbJnrvPchJfnwIvOMWmJ4yjX3HWFatO6oBFD1jx8QkgsQCR0p8nUWAKdd3seLJhEC39/v56kZaEjwp9muoQ==} - peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' - dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - rc-motion: 2.7.3_react-dom@18.2.0+react@18.2.0 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 - dev: false - - /rc-motion/2.7.3_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-2xUvo8yGHdOHeQbdI8BtBsCIrWKchEmFEIskf0nmHtJsou+meLd/JE+vnvSX2JxcBrJtXY2LuBpxAOxrbY/wMQ==} + /rc-dropdown/4.1.0_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-VZjMunpBdlVzYpEdJSaV7WM7O0jf8uyDjirxXLZRNZ+tAC+NzD3PXPEtliFwGzVwBBdCmGuSqiS9DWcOLxQ9tw==} peerDependencies: - react: '>=16.9.0' - react-dom: '>=16.9.0' + react: '>=16.11.0' + react-dom: '>=16.11.0' dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 + '@babel/runtime': 7.23.7 + '@rc-component/trigger': 1.18.2_react-dom@18.2.0+react@18.2.0 + classnames: 2.5.1 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 dev: false - /rc-resize-observer/1.3.1_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-iFUdt3NNhflbY3mwySv5CA1TC06zdJ+pfo0oc27xpf4PIOvfZwZGtD9Kz41wGYqC4SLio93RVAirSSpYlV/uYg==} + /rc-menu/9.12.4_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-t2NcvPLV1mFJzw4F21ojOoRVofK2rWhpKPx69q2raUsiHPDP6DDevsBILEYdsIegqBeSXoWs2bf6CueBKg3BFg==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 + '@babel/runtime': 7.23.7 + '@rc-component/trigger': 1.18.2_react-dom@18.2.0+react@18.2.0 + classnames: 2.5.1 + rc-motion: 2.9.0_react-dom@18.2.0+react@18.2.0 + rc-overflow: 1.3.2_react-dom@18.2.0+react@18.2.0 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - resize-observer-polyfill: 1.5.1 dev: false - /rc-textarea/0.3.7_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-yCdZ6binKmAQB13hc/oehh0E/QRwoPP1pjF21aHBxlgXO3RzPF6dUu4LG2R4FZ1zx/fQd2L1faktulrXOM/2rw==} + /rc-motion/2.9.0_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-XIU2+xLkdIr1/h6ohPZXyPBMvOmuyFZQ/T0xnawz+Rh+gh4FINcnZmMT5UTIj6hgI0VLDjTaPeRd+smJeSPqiQ==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - rc-resize-observer: 1.3.1_react-dom@18.2.0+react@18.2.0 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 + '@babel/runtime': 7.23.7 + classnames: 2.5.1 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - shallowequal: 1.1.0 dev: false - /rc-tooltip/5.3.1_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-e6H0dMD38EPaSPD2XC8dRfct27VvT2TkPdoBSuNl3RRZ5tspiY/c5xYEmGC0IrABvMBgque4Mr2SMZuliCvoiQ==} + /rc-overflow/1.3.2_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-nsUm78jkYAoPygDAcGZeC2VwIg/IBGSodtOY3pMof4W3M9qRJgqaDYm03ZayHlde3I6ipliAxbN0RUcGf5KOzw==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - rc-trigger: 5.3.4_react-dom@18.2.0+react@18.2.0 + '@babel/runtime': 7.23.7 + classnames: 2.5.1 + rc-resize-observer: 1.4.0_react-dom@18.2.0+react@18.2.0 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 dev: false - /rc-trigger/5.3.4_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-mQv+vas0TwKcjAO2izNPkqR4j86OemLRmvL2nOzdP9OWNWA1ivoTt5hzFqYNW9zACwmTezRiN8bttrC7cZzYSw==} - engines: {node: '>=8.x'} + /rc-resize-observer/1.4.0_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-PnMVyRid9JLxFavTjeDXEXo65HCRqbmLBw9xX9gfC4BZiSzbLXKzW3jPz+J0P71pLbD5tBMTT+mkstV5gD0c9Q==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' dependencies: - '@babel/runtime': 7.22.5 - classnames: 2.3.2 - rc-align: 4.0.15_react-dom@18.2.0+react@18.2.0 - rc-motion: 2.7.3_react-dom@18.2.0+react@18.2.0 - rc-util: 5.33.0_react-dom@18.2.0+react@18.2.0 + '@babel/runtime': 7.23.7 + classnames: 2.5.1 + rc-util: 5.38.1_react-dom@18.2.0+react@18.2.0 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 + resize-observer-polyfill: 1.5.1 dev: false - /rc-util/5.33.0_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-mq2NkEAnHklq4fgU/JqjiE0PS8+8u33gEWw2bDUNDPck3OroPpSgw/8oEyuFrvPgaZEmt9BgQdh59JfQt2cU+w==} + /rc-util/5.38.1_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-e4ZMs7q9XqwTuhIK7zBIVFltUtMSjphuPPQXHoHlzRzNdOwUxDejo0Zls5HYaJfRKNURcsS/ceKVULlhjBrxng==} peerDependencies: react: '>=16.9.0' react-dom: '>=16.9.0' dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.23.7 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 - react-is: 16.13.1 + react-is: 18.2.0 dev: false /react-dnd-html5-backend/16.0.1: @@ -2562,38 +2682,51 @@ packages: scheduler: 0.23.0 dev: false - /react-draggable/4.4.5_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-OMHzJdyJbYTZo4uQE393fHcqqPYsEtkjfMgvCHr6rejT+Ezn4OZbNyGH50vv+SunC1RMvwOTSWkEODQLzw1M9g==} - peerDependencies: - react: '>= 16.3.0' - react-dom: '>= 16.3.0' - dependencies: - clsx: 1.2.1 - prop-types: 15.8.1 - react: 18.2.0 - react-dom: 18.2.0_react@18.2.0 - dev: false - /react-is/16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} dev: false + /react-is/18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + dev: false + /react-refresh/0.14.0: resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} engines: {node: '>=0.10.0'} dev: true - /react-scrollbars-custom/4.1.1_react-dom@18.2.0+react@18.2.0: - resolution: {integrity: sha512-FOI1EMrdN5qziwvFAuH4saOo0+ggxeTuKLPpy6nezNdLUnDW1vCHGq0VSSfTSRstDgfXgwff5TMP9NeJ8NiFOQ==} + /react-universal-interface/0.6.2_react@18.2.0+tslib@2.6.2: + resolution: {integrity: sha512-dg8yXdcQmvgR13RIlZbTRQOoUrDciFVoSBZILwjE2LFISxZZ8loVJKAkuzswl5js8BHda79bIb2b84ehU8IjXw==} peerDependencies: - react: '>=16.0.0' + react: '*' + tslib: '*' dependencies: - cnbuilder: 3.1.0 react: 18.2.0 - react-draggable: 4.4.5_react-dom@18.2.0+react@18.2.0 - zoom-level: 2.5.0 - transitivePeerDependencies: - - react-dom + tslib: 2.6.2 + dev: false + + /react-use/17.4.2_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-1jPtmWLD8OJJNYCdYLJEH/HM+bPDfJuyGwCYeJFgPmWY8ttwpgZnW5QnzgM55CYUByUiTjHxsGOnEpLl6yQaoQ==} + peerDependencies: + react: '*' + react-dom: '*' + dependencies: + '@types/js-cookie': 2.2.7 + '@xobotyi/scrollbar-width': 1.9.5 + copy-to-clipboard: 3.3.3 + fast-deep-equal: 3.1.3 + fast-shallow-equal: 1.0.0 + js-cookie: 2.2.1 + nano-css: 5.6.1_react-dom@18.2.0+react@18.2.0 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + react-universal-interface: 0.6.2_react@18.2.0+tslib@2.6.2 + resize-observer-polyfill: 1.5.1 + screenfull: 5.2.0 + set-harmonic-interval: 1.0.1 + throttle-debounce: 3.0.1 + ts-easing: 0.2.0 + tslib: 2.6.2 dev: false /react/18.2.0: @@ -2633,7 +2766,7 @@ packages: resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} engines: {node: '>=8'} dependencies: - '@types/normalize-package-data': 2.4.1 + '@types/normalize-package-data': 2.4.4 normalize-package-data: 2.5.0 parse-json: 5.2.0 type-fest: 0.6.0 @@ -2671,15 +2804,15 @@ packages: /redux/4.2.1: resolution: {integrity: sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.23.7 dev: false /reflect-metadata/0.1.13: resolution: {integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==} dev: false - /regenerator-runtime/0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + /regenerator-runtime/0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} dev: false /require-directory/2.1.1: @@ -2696,11 +2829,11 @@ packages: engines: {node: '>=4'} dev: true - /resolve/1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve/1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: false @@ -2753,6 +2886,12 @@ packages: fsevents: 2.3.2 dev: true + /rtl-css-js/1.16.1: + resolution: {integrity: sha512-lRQgou1mu19e+Ya0LsTvKrVJ5TYUbqCVPAiImX3UfLTenarvPUl1QFdvu5Z3PYmHT9RCcwIfbjRQBntExyj3Zg==} + dependencies: + '@babel/runtime': 7.23.7 + dev: false + /run-parallel/1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -2772,8 +2911,13 @@ packages: loose-envify: 1.4.0 dev: false - /semver/5.7.1: - resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + /screenfull/5.2.0: + resolution: {integrity: sha512-9BakfsO2aUQN2K9Fdbj87RJIEZ82Q9IGim7FqM5OsebfoFC6ZHXgDq/KvniuLTPdeM8wY2o6Dj3WQ7KeQCj3cA==} + engines: {node: '>=0.10.0'} + dev: false + + /semver/5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} hasBin: true dev: false @@ -2788,6 +2932,11 @@ packages: dependencies: lru-cache: 6.0.0 + /set-harmonic-interval/1.0.1: + resolution: {integrity: sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==} + engines: {node: '>=6.9'} + dev: false + /shallowequal/1.1.0: resolution: {integrity: sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==} dev: false @@ -2809,10 +2958,24 @@ packages: engines: {node: '>=8'} dev: true + /sonner/1.4.2_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-x3Kfzfhb56V/ErvUnH5dZcsu6QkZpyIlRAogO4vAbN+AkBsA/8CFqOV+5djqbE5pQCpejtO4JBWL1zRj2sO/Vg==} + peerDependencies: + react: ^18.0.0 + react-dom: ^18.0.0 + dependencies: + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + dev: false + /source-map-js/1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} - dev: true + + /source-map/0.5.6: + resolution: {integrity: sha512-MjZkVp0NHr5+TPihLcadqnlVoGIoWo4IBHptutGh9wI3ttUYvCG26HkSuDi+K6lsZ25syXJXcctwgyVCt//xqA==} + engines: {node: '>=0.10.0'} + dev: false /source-map/0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} @@ -2828,7 +2991,7 @@ packages: resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.13 + spdx-license-ids: 3.0.16 dev: false /spdx-exceptions/2.3.0: @@ -2839,11 +3002,11 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.13 + spdx-license-ids: 3.0.16 dev: false - /spdx-license-ids/3.0.13: - resolution: {integrity: sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==} + /spdx-license-ids/3.0.16: + resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} dev: false /split/1.0.1: @@ -2858,6 +3021,31 @@ packages: readable-stream: 3.6.2 dev: false + /stack-generator/2.0.10: + resolution: {integrity: sha512-mwnua/hkqM6pF4k8SnmZ2zfETsRUpWXREfA/goT8SLCV4iOFa4bzOX2nDipWAZFPTjLvQB82f5yaodMVhK0yJQ==} + dependencies: + stackframe: 1.3.4 + dev: false + + /stackframe/1.3.4: + resolution: {integrity: sha512-oeVtt7eWQS+Na6F//S4kJ2K2VbRlS9D43mAlMyVpVWovy9o+jfgH8O9agzANzaiLjclA0oYzUXEM4PurhSUChw==} + dev: false + + /stacktrace-gps/3.1.2: + resolution: {integrity: sha512-GcUgbO4Jsqqg6RxfyTHFiPxdPqF+3LFmQhm7MgCuYQOYuWyqxo5pwRPz5d/u6/WYJdEnWfK4r+jGbyD8TSggXQ==} + dependencies: + source-map: 0.5.6 + stackframe: 1.3.4 + dev: false + + /stacktrace-js/2.0.2: + resolution: {integrity: sha512-Je5vBeY4S1r/RnLydLl0TBTi3F2qdfWmYsGvtfZgEI+SCprPppaIhQf5nGcal4gI4cGpCV/duLcAzT1np6sQqg==} + dependencies: + error-stack-parser: 2.1.4 + stack-generator: 2.0.10 + stacktrace-gps: 3.1.2 + dev: false + /standard-version/9.5.0: resolution: {integrity: sha512-3zWJ/mmZQsOaO+fOlsa0+QK90pwhNd042qEcw6hKFNoLFs7peGyvPffpEBbK/DSGPbyOvli0mUIFv5A4qTjh2Q==} engines: {node: '>=10'} @@ -2928,6 +3116,30 @@ packages: engines: {node: '>=8'} dev: true + /styled-components/6.1.6_react-dom@18.2.0+react@18.2.0: + resolution: {integrity: sha512-DgTLULSC29xpabJ24bbn1+hulU6vvGFQf4RPwBOJrm8WJFnN42yXpo5voBt3jDSJBa5tBd1L6PqswJjQ0wRKdg==} + engines: {node: '>= 16'} + peerDependencies: + react: '>= 16.8.0' + react-dom: '>= 16.8.0' + dependencies: + '@emotion/is-prop-valid': 1.2.1 + '@emotion/unitless': 0.8.0 + '@types/stylis': 4.2.0 + css-to-react-native: 3.2.0 + csstype: 3.1.2 + postcss: 8.4.31 + react: 18.2.0 + react-dom: 18.2.0_react@18.2.0 + shallowequal: 1.1.0 + stylis: 4.3.1 + tslib: 2.5.0 + dev: false + + /stylis/4.3.1: + resolution: {integrity: sha512-EQepAV+wMsIaGVGX1RECzgrcqRRU/0sYOHkeLsZ3fzHaHXZy4DaOOX0vOlGQdlsjkh3mFHAIlVimpwAs4dslyQ==} + dev: false + /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -2946,6 +3158,11 @@ packages: engines: {node: '>= 0.4'} dev: false + /tapable/2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + dev: false + /text-extensions/1.9.0: resolution: {integrity: sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==} engines: {node: '>=0.10'} @@ -2955,6 +3172,11 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true + /throttle-debounce/3.0.1: + resolution: {integrity: sha512-dTEWWNu6JmeVXY0ZYoPuH5cRIwc0MeGbJwah9KUNYSJwommQpCzTySTpEe8Gs1J23aeWEuAobe4Ag7EHVt/LOg==} + engines: {node: '>=10'} + dev: false + /through/2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: false @@ -2983,14 +3205,30 @@ packages: dependencies: is-number: 7.0.0 + /toggle-selection/1.0.6: + resolution: {integrity: sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==} + dev: false + /trim-newlines/3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} dev: false + /ts-easing/0.2.0: + resolution: {integrity: sha512-Z86EW+fFFh/IFB1fqQ3/+7Zpf9t2ebOAxNI/V6Wo7r5gqiqtxmgTlQ1qbqQcjLKYeSHPTsEmvlJUDg/EuL0uHQ==} + dev: false + /tslib/1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + /tslib/2.5.0: + resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} + dev: false + + /tslib/2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} + dev: false + /tsutils/3.21.0_typescript@5.0.4: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} @@ -3001,8 +3239,8 @@ packages: typescript: 5.0.4 dev: true - /tsyringe/4.5.0: - resolution: {integrity: sha512-XvYgdUxkmGQfpCkKyr/ybJx71OLSnNec1SO0xdohMjaS2UOEyKi76YfKx92XUXgc1TocypHENg6y4wCyYyMKag==} + /tsyringe/4.8.0: + resolution: {integrity: sha512-YB1FG+axdxADa3ncEtRnQCFq/M0lALGLxSZeVNbTU8NqhOVc51nnv2CISTcvc1kyv6EGPtXVr0v6lWeDxiijOA==} engines: {node: '>= 6.0.0'} dependencies: tslib: 1.14.1 @@ -3070,6 +3308,14 @@ packages: punycode: 2.3.0 dev: true + /use-sync-external-store/1.2.0_react@18.2.0: + resolution: {integrity: sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.2.0 + dev: false + /util-deprecate/1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: false @@ -3198,7 +3444,3 @@ packages: /yocto-queue/0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - - /zoom-level/2.5.0: - resolution: {integrity: sha512-7UlRWU4Q3uCMCeDVMOm7eBrIu145OqsIJ3p6zq58l8UsSYwKWxc6zEapC5YA9tIeh0oheb4cT9Kk2Wq353loFg==} - dev: false diff --git a/website/public/MapleMono.ttf b/website/public/MapleMono.ttf new file mode 100644 index 00000000..859e69e7 Binary files /dev/null and b/website/public/MapleMono.ttf differ diff --git a/website/public/icons-carbon.json b/website/public/icons-carbon.json new file mode 100644 index 00000000..a6c1891a --- /dev/null +++ b/website/public/icons-carbon.json @@ -0,0 +1,626 @@ +{ + "fonts": [ + { + "id": "icons-carbon", + "src": [ + { + "path": "./icons-carbon.woff", + "format": "woff" + } + ], + "weight": "normal", + "style": "normal" + } + ], + "iconDefinitions": { + "account": { + "fontCharacter": "\\e000" + }, + "alert": { + "fontCharacter": "\\e001" + }, + "archive": { + "fontCharacter": "\\e002" + }, + "arrow-both": { + "fontCharacter": "\\e003" + }, + "arrow-down": { + "fontCharacter": "\\e004" + }, + "arrow-left": { + "fontCharacter": "\\e005" + }, + "arrow-right": { + "fontCharacter": "\\e006" + }, + "arrow-swap": { + "fontCharacter": "\\e007" + }, + "arrow-up": { + "fontCharacter": "\\e008" + }, + "beaker": { + "fontCharacter": "\\e009" + }, + "bell": { + "fontCharacter": "\\e00a" + }, + "bell-dot": { + "fontCharacter": "\\e00b" + }, + "bold": { + "fontCharacter": "\\e00c" + }, + "book": { + "fontCharacter": "\\e00d" + }, + "bookmark": { + "fontCharacter": "\\e00e" + }, + "briefcase": { + "fontCharacter": "\\e00f" + }, + "broadcast": { + "fontCharacter": "\\e010" + }, + "browser": { + "fontCharacter": "\\e011" + }, + "bug": { + "fontCharacter": "\\e012" + }, + "calendar": { + "fontCharacter": "\\e013" + }, + "call-incoming": { + "fontCharacter": "\\e014" + }, + "call-outgoing": { + "fontCharacter": "\\e015" + }, + "checklist": { + "fontCharacter": "\\e016" + }, + "chevron-down": { + "fontCharacter": "\\e017" + }, + "chevron-left": { + "fontCharacter": "\\e018" + }, + "chevron-right": { + "fontCharacter": "\\e019" + }, + "chevron-up": { + "fontCharacter": "\\e01a" + }, + "circle-slash": { + "fontCharacter": "\\e01b" + }, + "circuit-board": { + "fontCharacter": "\\e01c" + }, + "clear-all": { + "fontCharacter": "\\e01d" + }, + "clock": { + "fontCharacter": "\\e01e" + }, + "cloud": { + "fontCharacter": "\\e01f" + }, + "cloud-download": { + "fontCharacter": "\\e020" + }, + "cloud-upload": { + "fontCharacter": "\\e021" + }, + "code": { + "fontCharacter": "\\e022" + }, + "color-mode": { + "fontCharacter": "\\e023" + }, + "comment": { + "fontCharacter": "\\e024" + }, + "comment-add": { + "fontCharacter": "\\e025" + }, + "comment-discussion": { + "fontCharacter": "\\e026" + }, + "compare-changes": { + "fontCharacter": "\\e027" + }, + "console": { + "fontCharacter": "\\e028" + }, + "copy": { + "fontCharacter": "\\e029" + }, + "credit-card": { + "fontCharacter": "\\e02a" + }, + "dashboard": { + "fontCharacter": "\\e02b" + }, + "debug": { + "fontCharacter": "\\e02c" + }, + "debug-alt": { + "fontCharacter": "\\e02d" + }, + "device-camera": { + "fontCharacter": "\\e02e" + }, + "device-camera-video": { + "fontCharacter": "\\e02f" + }, + "device-desktop": { + "fontCharacter": "\\e030" + }, + "device-mobile": { + "fontCharacter": "\\e031" + }, + "discard": { + "fontCharacter": "\\e032" + }, + "edit": { + "fontCharacter": "\\e033" + }, + "export": { + "fontCharacter": "\\e034" + }, + "extensions": { + "fontCharacter": "\\e035" + }, + "feedback": { + "fontCharacter": "\\e036" + }, + "files": { + "fontCharacter": "\\e037" + }, + "filter": { + "fontCharacter": "\\e038" + }, + "filter-filled": { + "fontCharacter": "\\e039" + }, + "flame": { + "fontCharacter": "\\e03a" + }, + "gear": { + "fontCharacter": "\\e03b" + }, + "gift": { + "fontCharacter": "\\e03c" + }, + "gist": { + "fontCharacter": "\\e03d" + }, + "gist-private": { + "fontCharacter": "\\e03e" + }, + "git-branch": { + "fontCharacter": "\\e03f" + }, + "git-branch-create": { + "fontCharacter": "\\e040" + }, + "git-branch-delete": { + "fontCharacter": "\\e041" + }, + "git-commit": { + "fontCharacter": "\\e042" + }, + "git-compare": { + "fontCharacter": "\\e043" + }, + "git-fork-private": { + "fontCharacter": "\\e044" + }, + "globe": { + "fontCharacter": "\\e045" + }, + "heart": { + "fontCharacter": "\\e046" + }, + "history": { + "fontCharacter": "\\e047" + }, + "home": { + "fontCharacter": "\\e048" + }, + "hubot": { + "fontCharacter": "\\e049" + }, + "italic": { + "fontCharacter": "\\e04a" + }, + "json": { + "fontCharacter": "\\e04b" + }, + "key": { + "fontCharacter": "\\e04c" + }, + "keyboard": { + "fontCharacter": "\\e04d" + }, + "law": { + "fontCharacter": "\\e04e" + }, + "light-bulb": { + "fontCharacter": "\\e04f" + }, + "lightbulb": { + "fontCharacter": "\\e050" + }, + "lightbulb-autofix": { + "fontCharacter": "\\e051" + }, + "link": { + "fontCharacter": "\\e052" + }, + "link-external": { + "fontCharacter": "\\e053" + }, + "list-flat": { + "fontCharacter": "\\e054" + }, + "list-ordered": { + "fontCharacter": "\\e055" + }, + "list-tree": { + "fontCharacter": "\\e056" + }, + "list-unordered": { + "fontCharacter": "\\e057" + }, + "location": { + "fontCharacter": "\\e058" + }, + "lock": { + "fontCharacter": "\\e059" + }, + "log-in": { + "fontCharacter": "\\e05a" + }, + "log-out": { + "fontCharacter": "\\e05b" + }, + "mail-reply": { + "fontCharacter": "\\e05c" + }, + "megaphone": { + "fontCharacter": "\\e05d" + }, + "mention": { + "fontCharacter": "\\e05e" + }, + "menu": { + "fontCharacter": "\\e05f" + }, + "merge": { + "fontCharacter": "\\e060" + }, + "microscope": { + "fontCharacter": "\\e061" + }, + "milestone": { + "fontCharacter": "\\e062" + }, + "mirror-private": { + "fontCharacter": "\\e063" + }, + "move": { + "fontCharacter": "\\e064" + }, + "mute": { + "fontCharacter": "\\e065" + }, + "organization": { + "fontCharacter": "\\e066" + }, + "organization-filled": { + "fontCharacter": "\\e067" + }, + "organization-outline": { + "fontCharacter": "\\e068" + }, + "pass": { + "fontCharacter": "\\e069" + }, + "pass-filled": { + "fontCharacter": "\\e06a" + }, + "pencil": { + "fontCharacter": "\\e06b" + }, + "person": { + "fontCharacter": "\\e06c" + }, + "person-add": { + "fontCharacter": "\\e06d" + }, + "person-filled": { + "fontCharacter": "\\e06e" + }, + "person-follow": { + "fontCharacter": "\\e06f" + }, + "person-outline": { + "fontCharacter": "\\e070" + }, + "play": { + "fontCharacter": "\\e071" + }, + "play-circle": { + "fontCharacter": "\\e072" + }, + "plug": { + "fontCharacter": "\\e073" + }, + "pulse": { + "fontCharacter": "\\e074" + }, + "question": { + "fontCharacter": "\\e075" + }, + "quote": { + "fontCharacter": "\\e076" + }, + "reactions": { + "fontCharacter": "\\e077" + }, + "record-keys": { + "fontCharacter": "\\e078" + }, + "redo": { + "fontCharacter": "\\e079" + }, + "repl": { + "fontCharacter": "\\e07a" + }, + "reply": { + "fontCharacter": "\\e07b" + }, + "rocket": { + "fontCharacter": "\\e07c" + }, + "rss": { + "fontCharacter": "\\e07d" + }, + "save": { + "fontCharacter": "\\e07e" + }, + "save-all": { + "fontCharacter": "\\e07f" + }, + "save-as": { + "fontCharacter": "\\e080" + }, + "search": { + "fontCharacter": "\\e081" + }, + "search-save": { + "fontCharacter": "\\e082" + }, + "server": { + "fontCharacter": "\\e083" + }, + "settings": { + "fontCharacter": "\\e084" + }, + "settings-gear": { + "fontCharacter": "\\e085" + }, + "shield": { + "fontCharacter": "\\e086" + }, + "sign-in": { + "fontCharacter": "\\e087" + }, + "sign-out": { + "fontCharacter": "\\e088" + }, + "smiley": { + "fontCharacter": "\\e089" + }, + "source-control": { + "fontCharacter": "\\e08a" + }, + "star": { + "fontCharacter": "\\e08b" + }, + "star-add": { + "fontCharacter": "\\e08c" + }, + "star-delete": { + "fontCharacter": "\\e08d" + }, + "star-empty": { + "fontCharacter": "\\e08e" + }, + "star-full": { + "fontCharacter": "\\e08f" + }, + "star-half": { + "fontCharacter": "\\e090" + }, + "symbol-boolean": { + "fontCharacter": "\\e091" + }, + "symbol-class": { + "fontCharacter": "\\e092" + }, + "symbol-color": { + "fontCharacter": "\\e093" + }, + "symbol-event": { + "fontCharacter": "\\e094" + }, + "symbol-file": { + "fontCharacter": "\\e095" + }, + "symbol-folder": { + "fontCharacter": "\\e096" + }, + "symbol-function": { + "fontCharacter": "\\e097" + }, + "symbol-interface": { + "fontCharacter": "\\e098" + }, + "symbol-key": { + "fontCharacter": "\\e099" + }, + "symbol-method": { + "fontCharacter": "\\e09a" + }, + "symbol-misc": { + "fontCharacter": "\\e09b" + }, + "symbol-namespace": { + "fontCharacter": "\\e09c" + }, + "symbol-null": { + "fontCharacter": "\\e09d" + }, + "symbol-number": { + "fontCharacter": "\\e09e" + }, + "symbol-numeric": { + "fontCharacter": "\\e09f" + }, + "symbol-operator": { + "fontCharacter": "\\e0a0" + }, + "symbol-package": { + "fontCharacter": "\\e0a1" + }, + "symbol-parameter": { + "fontCharacter": "\\e0a2" + }, + "symbol-property": { + "fontCharacter": "\\e0a3" + }, + "symbol-reference": { + "fontCharacter": "\\e0a4" + }, + "symbol-ruler": { + "fontCharacter": "\\e0a5" + }, + "symbol-snippet": { + "fontCharacter": "\\e0a6" + }, + "symbol-string": { + "fontCharacter": "\\e0a7" + }, + "symbol-struct": { + "fontCharacter": "\\e0a8" + }, + "symbol-structure": { + "fontCharacter": "\\e0a9" + }, + "symbol-text": { + "fontCharacter": "\\e0aa" + }, + "symbol-type-parameter": { + "fontCharacter": "\\e0ab" + }, + "symbol-unit": { + "fontCharacter": "\\e0ac" + }, + "symbol-variable": { + "fontCharacter": "\\e0ad" + }, + "tag": { + "fontCharacter": "\\e0ae" + }, + "tag-add": { + "fontCharacter": "\\e0af" + }, + "tag-remove": { + "fontCharacter": "\\e0b0" + }, + "tasklist": { + "fontCharacter": "\\e0b1" + }, + "terminal": { + "fontCharacter": "\\e0b2" + }, + "text-size": { + "fontCharacter": "\\e0b3" + }, + "thumbsdown": { + "fontCharacter": "\\e0b4" + }, + "thumbsup": { + "fontCharacter": "\\e0b5" + }, + "tools": { + "fontCharacter": "\\e0b6" + }, + "trash": { + "fontCharacter": "\\e0b7" + }, + "trashcan": { + "fontCharacter": "\\e0b8" + }, + "triangle-down": { + "fontCharacter": "\\e0b9" + }, + "triangle-left": { + "fontCharacter": "\\e0ba" + }, + "triangle-right": { + "fontCharacter": "\\e0bb" + }, + "triangle-up": { + "fontCharacter": "\\e0bc" + }, + "twitter": { + "fontCharacter": "\\e0bd" + }, + "unlock": { + "fontCharacter": "\\e0be" + }, + "unmute": { + "fontCharacter": "\\e0bf" + }, + "variable": { + "fontCharacter": "\\e0c0" + }, + "versions": { + "fontCharacter": "\\e0c1" + }, + "wand": { + "fontCharacter": "\\e0c2" + }, + "warning": { + "fontCharacter": "\\e0c3" + }, + "watch": { + "fontCharacter": "\\e0c4" + }, + "whitespace": { + "fontCharacter": "\\e0c5" + }, + "wrench": { + "fontCharacter": "\\e0c6" + }, + "wrench-subaction": { + "fontCharacter": "\\e0c7" + }, + "zap": { + "fontCharacter": "\\e0c8" + }, + "zoom-in": { + "fontCharacter": "\\e0c9" + }, + "zoom-out": { + "fontCharacter": "\\e0ca" + } + } +} diff --git a/website/public/icons-carbon.woff b/website/public/icons-carbon.woff new file mode 100644 index 00000000..72d46315 Binary files /dev/null and b/website/public/icons-carbon.woff differ diff --git a/website/public/molecule-logo.png b/website/public/molecule-logo.png new file mode 100644 index 00000000..784233de Binary files /dev/null and b/website/public/molecule-logo.png differ diff --git a/website/src/App.tsx b/website/src/App.tsx index 51ecc1da..994bbf20 100644 --- a/website/src/App.tsx +++ b/website/src/App.tsx @@ -1,31 +1,56 @@ -import 'reflect-metadata'; -import React, { useEffect, useRef, useState } from 'react'; -import { create, Workbench } from '@dtinsight/molecule'; -import InstanceService from '@dtinsight/molecule/esm/services/instanceService'; -import { ExtendsWorkbench } from './extensions/workbench'; +import React, { useEffect, useRef } from 'react'; +import { create } from '@dtinsight/molecule'; +import extensions from './extensions'; import './languages'; - -import '@dtinsight/molecule/esm/style/mo.css'; import './App.css'; +const instance = create({ + extensions, + defaultLocale: 'zh-CN' +}); + function App(): React.ReactElement { - const refMoInstance = useRef(); - const [MyWorkbench, setMyWorkbench] = useState(); + const container = useRef(null); useEffect(() => { - if (!refMoInstance.current) { - refMoInstance.current = create({ - extensions: [ExtendsWorkbench] + // FIXME: Molecule Should support font-face + fetch('icons-carbon.json') + .then((res) => res.json()) + .then((value) => { + const style = Array.from(document.querySelectorAll('style')).find((ele) => + ele.textContent?.includes('font-family: "codicon"') + ); + if (!style) return; + const rules: string[] = []; + value.fonts.forEach(({ id, src, weight, style }: any) => { + const fontWeight = weight ? `font-weight: ${weight};` : ''; + const fontStyle = style ? `font-style: ${style};` : ''; + const srcString = src + .map((item: any) => `url(${item.path}) format('${item.format}')`) + .join(', '); + rules.push( + `@font-face { src: ${srcString}; font-family: ${id};${fontWeight}${fontStyle} font-display: block; }` + ); + Object.keys(value.iconDefinitions).forEach((key) => { + rules.push( + `.codicon-${key}:before { content: '${value.iconDefinitions[key].fontCharacter}' !important; font-family: "${id}" }` + ); + }); + }); + style.textContent += rules.join('\n'); }); - if (refMoInstance.current) { - const IDE = () => refMoInstance.current?.render(); - setMyWorkbench(IDE); - } - } }, []); - return
{MyWorkbench}
; + useEffect(() => { + instance.render(container.current); + + return () => { + instance.dispose(); + }; + }, []); + + return
; } export default App; diff --git a/website/src/components/icon/helper.tsx b/website/src/components/icon/helper.tsx new file mode 100644 index 00000000..bff75670 --- /dev/null +++ b/website/src/components/icon/helper.tsx @@ -0,0 +1,41 @@ +import { LanguageIdEnum } from 'monaco-sql-languages/out/esm/main.js'; +import { + FlinkIcon, + HiveIcon, + ImpalaIcon, + MysqlIcon, + PostgreSqlIcon, + SparkIcon, + TrinoIcon +} from '.'; +import React from 'react'; + +export function helper(id?: string) { + if (!id) return React.Fragment; + switch (id) { + case LanguageIdEnum.FLINK: { + return FlinkIcon; + } + case LanguageIdEnum.SPARK: { + return SparkIcon; + } + case LanguageIdEnum.HIVE: { + return HiveIcon; + } + case LanguageIdEnum.MYSQL: { + return MysqlIcon; + } + case LanguageIdEnum.TRINO: { + return TrinoIcon; + } + case LanguageIdEnum.PG: { + return PostgreSqlIcon; + } + case LanguageIdEnum.IMPALA: { + return ImpalaIcon; + } + + default: + return React.Fragment; + } +} diff --git a/website/src/components/icon/index.tsx b/website/src/components/icon/index.tsx new file mode 100644 index 00000000..0c4f1f38 --- /dev/null +++ b/website/src/components/icon/index.tsx @@ -0,0 +1,161 @@ +export const FlinkIcon = () => { + return ( + + + + + + + ); +}; + +export const SparkIcon = () => { + return ( + + + + + + ); +}; + +export const HiveIcon = () => { + return ( + + + + + + + ); +}; + +export const MysqlIcon = () => { + return ( + + + + + + ); +}; + +export const TrinoIcon = () => { + return ( + + + + + + + + ); +}; + +export const PostgreSqlIcon = () => { + return ( + + + + + + + + + + ); +}; + +export const ImpalaIcon = () => { + return ( + + + + + + ); +}; diff --git a/website/src/components/space/index.tsx b/website/src/components/space/index.tsx new file mode 100644 index 00000000..66eca90b --- /dev/null +++ b/website/src/components/space/index.tsx @@ -0,0 +1,14 @@ +import { HTMLAttributes, PropsWithChildren } from 'react'; +import { Container } from './styled'; + +interface ISpaceProps extends HTMLAttributes { + size?: number; +} + +export default function Space({ children, size = 8, ...rest }: PropsWithChildren) { + return ( + + {children} + + ); +} diff --git a/website/src/components/space/styled.tsx b/website/src/components/space/styled.tsx new file mode 100644 index 00000000..56041cc4 --- /dev/null +++ b/website/src/components/space/styled.tsx @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const Container = styled.div<{ gap: number }>` + display: flex; + align-items: center; + gap: ${({ gap }) => `${gap}px`}; +`; diff --git a/website/src/const/index.ts b/website/src/const/index.ts new file mode 100644 index 00000000..c0262588 --- /dev/null +++ b/website/src/const/index.ts @@ -0,0 +1,29 @@ +import { LanguageIdEnum } from 'monaco-sql-languages/out/esm/main.js'; + +export const SUPPORT_LANGUAGES = [ + LanguageIdEnum.FLINK, + LanguageIdEnum.SPARK, + LanguageIdEnum.HIVE, + LanguageIdEnum.MYSQL, + LanguageIdEnum.TRINO, + LanguageIdEnum.PG, + LanguageIdEnum.IMPALA +]; + +export const CREATE_TASK_ID = 'create.task.id'; + +export const RUN_SQL_ID = 'editor.run.sql'; + +export const TASK_TYPE = 'task.type'; + +export const TASK_PATH = 'task.path'; + +export const POWERED_BY = 'powered.by'; + +export const QUICK_GITHUB = 'quick.github'; + +export const DELETE_TASK_ID = 'delete.task.id'; + +export const EVENTS = { + EDITOR_UPDATE_NAME: 'editor.update.name' +} as const; diff --git a/website/src/extensions/actions/index.ts b/website/src/extensions/actions/index.ts new file mode 100644 index 00000000..6fb70780 --- /dev/null +++ b/website/src/extensions/actions/index.ts @@ -0,0 +1,14 @@ +import { IContributeType, IExtension } from '@dtinsight/molecule'; +import QuickSaveAction from './quickSaveAction'; +import QuickExecuteAction from './quickExecuteAction'; + +export const actionsExt: IExtension = { + id: 'actionsExt', + name: 'actionsExt', + contributes: { + [IContributeType.Commands]: [QuickSaveAction, QuickExecuteAction] + }, + activate() { + // TODO + } +}; diff --git a/website/src/extensions/actions/quickExecuteAction.ts b/website/src/extensions/actions/quickExecuteAction.ts new file mode 100644 index 00000000..5657928b --- /dev/null +++ b/website/src/extensions/actions/quickExecuteAction.ts @@ -0,0 +1,59 @@ +import { IMoleculeContext, KeybindingWeight, glue } from '@dtinsight/molecule'; +import { KeyChord, KeyCode, KeyMod } from '@dtinsight/molecule/esm/monaco'; +import lips from '@jcubic/lips'; +import { RUN_SQL_ID } from '../../const'; +import type { TreeNode } from '../../types'; + +export default class QuickExecuteAction extends glue.BaseAction { + static readonly ID = 'workbench.action.quickExecute'; + + constructor(private molecule: IMoleculeContext) { + super({ + id: QuickExecuteAction.ID, + title: '快速执行', + alias: 'execute', + precondition: undefined, + f1: true, + keybinding: { + when: undefined, + weight: KeybindingWeight.WorkbenchContrib, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.Enter) + } + }); + } + + run() { + const molecule = this.molecule; + const group = molecule.editor.getCurrentGroup(); + const tab = molecule.editor.getCurrentTab(); + if (!group?.editorInstance || !tab) return; + const instance = group.editorInstance; + // 获取全部文本 + const text = instance.getModel()?.getValue() || ''; + molecule.editor.updateToolbar({ + id: RUN_SQL_ID, + icon: 'loading~spin' + }); + import('monaco-sql-languages/out/esm/languageService') + .then(({ LanguageService }) => { + const languageService = new LanguageService(); + return languageService.parserTreeToString(tab.language || 'sql', text); + }) + .then((res) => { + const pre = res?.replace(/(\(|\))/g, '$1\n'); + const format = new lips.Formatter(pre); + const formatted = format.format({ + indent: 2, + offset: 2 + }); + molecule.layout.setPanel(true); + molecule.output.append(formatted); + }) + .finally(() => { + molecule.editor.updateToolbar({ + id: RUN_SQL_ID, + icon: 'run' + }); + }); + } +} diff --git a/website/src/extensions/actions/quickSaveAction.ts b/website/src/extensions/actions/quickSaveAction.ts new file mode 100644 index 00000000..11254adb --- /dev/null +++ b/website/src/extensions/actions/quickSaveAction.ts @@ -0,0 +1,32 @@ +import { IMoleculeContext, KeybindingWeight, glue } from '@dtinsight/molecule'; +import { KeyChord, KeyCode, KeyMod } from '@dtinsight/molecule/esm/monaco'; +import * as content from '../../storage/content'; + +export default class QuickSaveAction extends glue.BaseAction { + static readonly ID = 'workbench.action.quickSave'; + + constructor(private molecule: IMoleculeContext) { + super({ + id: QuickSaveAction.ID, + title: '快速保存', + alias: 'Save', + precondition: undefined, + f1: true, + keybinding: { + when: undefined, + weight: KeybindingWeight.WorkbenchContrib, + primary: KeyChord(KeyMod.CtrlCmd | KeyCode.KeyS) + } + }); + } + + run() { + const molecule = this.molecule; + const tab = molecule.editor.getCurrentTab(); + const groupId = molecule.editor.getCurrent(); + if (tab && groupId) { + molecule.editor.updateTab({ id: tab.id, modified: false }, groupId); + content.set(tab.id as string, tab.value || ''); + } + } +} diff --git a/website/src/extensions/default/index.tsx b/website/src/extensions/default/index.tsx new file mode 100644 index 00000000..233c7c7a --- /dev/null +++ b/website/src/extensions/default/index.tsx @@ -0,0 +1,202 @@ +import { IContributeType, IExtension, UniqueId, utils, components } from '@dtinsight/molecule'; +import { CREATE_TASK_ID, DELETE_TASK_ID, EVENTS, RUN_SQL_ID, SUPPORT_LANGUAGES } from '../../const'; +import type { IExplorerPanelItem } from '@dtinsight/molecule/esm/models/explorer'; +import Tree from '../../workbench/tree'; +import * as content from '../../storage/content'; +import * as task from '../../storage/task'; +import { TreeNodeModel } from '@dtinsight/molecule/esm/utils/tree'; +import { LanguageIdEnum } from 'monaco-sql-languages/out/esm/main.js'; +import QuickExecuteAction from '../actions/quickExecuteAction'; +import Space from '../../components/space'; + +export const defaultExt: IExtension = { + id: 'defaultExt', + name: 'defaultExt', + contributes: { + [IContributeType.Modules]: { + menuBar: null, + activityBar: null, + sidebar: import('../../workbench/sidebar'), + editor: import('../../workbench/editor') + } + }, + activate(molecule) { + molecule.editor.setOptions({ + fontFamily: 'Maple Mono' + }); + // 默认不展示 Panel + molecule.layout.setPanel(false); + // 重置 toolbar + molecule.editor.dispatch((draft) => { + draft.toolbar = [ + { + id: RUN_SQL_ID, + group: 'inline', + icon: 'run' + } + ]; + }); + + const items = SUPPORT_LANGUAGES.map( + (key) => + ({ + id: key, + // FIXME: Should Support ReactNode + name: ( + + + {key} + + ) as any, + title: key, + toolbar: [ + { + id: CREATE_TASK_ID, + name: '新建任务', + group: 'inline', + icon: 'new-file' + } + ], + render: () => ( + { + if (treeNode.id !== molecule.editor.getCurrentTab()?.id) { + closeCurrentTab(); + openTab(treeNode); + } + }} + onCreate={async () => { + const item = await create(key); + closeCurrentTab(); + await openTab(item); + }} + onContextMenu={(pos, treeNode) => { + molecule.contextMenu.open( + [ + { + id: DELETE_TASK_ID, + name: '删除任务' + } + ], + pos, + { id: treeNode.data?.language, treeId: treeNode.id } + ); + }} + /> + ) + } as IExplorerPanelItem) + ); + molecule.explorer.reset(); + molecule.explorer.add(items); + molecule.explorer.setActive(items.map((item) => item.id)); + + molecule.explorer.onPanelToolbarClick(async (toolbar, panel) => { + if (toolbar.id === CREATE_TASK_ID) { + const item = await create(panel as LanguageIdEnum); + closeCurrentTab(); + await openTab(item); + } + }); + + molecule.editor.onToolbarClick((item) => { + if (item.id === RUN_SQL_ID) { + molecule.action.execute(QuickExecuteAction.ID); + } + }); + + molecule.editor.onClose((tabs) => { + tabs.forEach((tab) => { + content.set(tab.id as string, tab.value || ''); + }); + }); + + molecule.contextMenu.onClick((item) => { + const scope = molecule.contextMenu.getScope<{ id: LanguageIdEnum; treeId: UniqueId }>(); + switch (item.id) { + case DELETE_TASK_ID: { + const tab = molecule.editor.getCurrentTab(); + if (tab?.id === scope.treeId) { + closeCurrentTab(); + } + content.remove(scope.treeId as string); + task.update(scope.id, (prev) => { + const next = prev?.concat() || []; + const idx = next.findIndex(utils.searchById(scope.treeId)); + if (idx === -1) return next; + next.splice(idx, 1); + return next; + }); + break; + } + + default: + break; + } + }); + + molecule.contextMenu.onClick((menu) => { + if (SUPPORT_LANGUAGES.includes(menu.id as LanguageIdEnum)) { + molecule.explorer.togglePanel(menu.id); + } + }); + + molecule.editor.subscribe(EVENTS.EDITOR_UPDATE_NAME, (value: string) => { + const tab = molecule.editor.getCurrentTab(); + const groupId = molecule.editor.getCurrent(); + if (tab && groupId) { + molecule.editor.updateTab({ id: tab.id, name: value }, groupId); + task.update(tab.language as string, (prev) => { + const next = prev?.concat() || []; + const idx = next.findIndex(utils.searchById(tab.id)); + if (idx === -1) return next; + next[idx].name = value; + return next; + }); + } + }); + + async function create(key: LanguageIdEnum) { + const id = new Date().valueOf().toString(); + const name = `默认_${key}_任务`; + const item = new TreeNodeModel<{ language: LanguageIdEnum }>( + id, + name, + 'File', + undefined, + undefined, + false, + { + language: key + } + ); + await task.update(key, (prev) => { + if (Array.isArray(prev)) { + return [...prev, item]; + } + + return [item]; + }); + + return item; + } + + async function openTab(tree: TreeNodeModel<{ language: string }>) { + const value = await content.get(tree.id as string); + molecule.editor.open({ + id: tree.id, + name: tree.name, + value, + language: tree.data?.language + }); + } + + function closeCurrentTab() { + const tab = molecule.editor.getCurrentTab(); + if (tab) { + molecule.editor.closeTab(tab.id, molecule.editor.getCurrentGroup()!.id); + } + } + } +}; diff --git a/website/src/extensions/index.ts b/website/src/extensions/index.ts new file mode 100644 index 00000000..9591603e --- /dev/null +++ b/website/src/extensions/index.ts @@ -0,0 +1,6 @@ +import { actionsExt } from './actions'; +import { defaultExt } from './default'; +import { statusExt } from './status'; +import { viewExt } from './view'; + +export default [defaultExt, actionsExt, viewExt, statusExt]; diff --git a/website/src/extensions/status.tsx b/website/src/extensions/status.tsx new file mode 100644 index 00000000..39cd334e --- /dev/null +++ b/website/src/extensions/status.tsx @@ -0,0 +1,42 @@ +import { IExtension } from '@dtinsight/molecule'; +import { POWERED_BY, QUICK_GITHUB, TASK_PATH, TASK_TYPE } from '../const'; +import Language from '../workbench/language'; +import Path from '../workbench/path'; +import PoweredBy from '../workbench/powerBy'; +import QuickGithub from '../workbench/github'; + +export const statusExt: IExtension = { + id: 'statusExt', + name: 'statusExt', + activate(molecule) { + molecule.statusBar.add({ + id: TASK_TYPE, + name: '编辑器语言', + alignment: 'right', + sortIndex: 12, + render: () => + }); + // FIXME: 空状态不应该有宽度 + molecule.statusBar.add({ + id: TASK_PATH, + name: '路径', + alignment: 'left', + sortIndex: 2, + render: () => + }); + molecule.statusBar.add({ + id: POWERED_BY, + name: '关于', + alignment: 'left', + sortIndex: 1, + render: () => + }); + molecule.statusBar.add({ + id: QUICK_GITHUB, + name: 'Github', + alignment: 'right', + sortIndex: 3, + render: () => + }); + } +}; diff --git a/website/src/extensions/view/index.ts b/website/src/extensions/view/index.ts new file mode 100644 index 00000000..3a13f97b --- /dev/null +++ b/website/src/extensions/view/index.ts @@ -0,0 +1,20 @@ +import { IExtension } from '@dtinsight/molecule'; +import * as view from '../../storage/view'; + +export const viewExt: IExtension = { + id: 'viewExt', + name: 'viewExt', + activate(molecule) { + view.get().then((viewState) => { + if (viewState?.explorer) { + molecule.explorer.setActive(viewState.explorer.active); + } + if (viewState?.layout) { + molecule.layout.setState(viewState.layout); + } + }); + }, + dispose(molecule) { + view.set(molecule); + } +}; diff --git a/website/src/extensions/workbench/common.ts b/website/src/extensions/workbench/common.ts deleted file mode 100644 index f06a97c1..00000000 --- a/website/src/extensions/workbench/common.ts +++ /dev/null @@ -1,27 +0,0 @@ -export const defaultLanguage = 'FlinkSQL'; - -export const defaultEditorTab = { - id: `fixedTab`, - name: defaultLanguage, - data: { - value: ``, - language: defaultLanguage.toLowerCase() - } -}; - -export const defaultLanguageStatusItem = { - id: `fixedStatusItem`, - name: defaultLanguage, - sortIndex: 3 -}; - -export const languages = [ - 'FlinkSQL', - 'SparkSQL', - 'HiveSQL', - 'MySQL', - 'PgSQL', - 'SQL', - 'TrinoSQL', - 'ImpalaSQL' -]; diff --git a/website/src/extensions/workbench/index.tsx b/website/src/extensions/workbench/index.tsx deleted file mode 100644 index 833d20af..00000000 --- a/website/src/extensions/workbench/index.tsx +++ /dev/null @@ -1,56 +0,0 @@ -import molecule from '@dtinsight/molecule'; -import { Float } from '@dtinsight/molecule/esm/model'; -import { IExtension } from '@dtinsight/molecule/esm/model/extension'; -import Sidebar from './sidebar'; -import { defaultEditorTab, defaultLanguageStatusItem } from './common'; - -export const ExtendsWorkbench: IExtension = { - id: 'ExtendWorkbench', - name: 'ExtendWorkbench', - - activate() { - const ParserSidebar = { - id: 'ParserSidebar', - title: 'Sidebar', - render() { - return ; - } - }; - - molecule.sidebar.add(ParserSidebar); - molecule.sidebar.setState({ - current: ParserSidebar.id - }); - - const parserActivityBarItem = { - id: 'OnlineParser', - icon: 'beaker', - title: 'SQL Languages Online Parse' - }; - - const githubPageActivityBarItem = { - id: 'GotoGithub', - icon: 'github', - title: 'Go To Github' - }; - - molecule.activityBar.remove('sidebar.explore.title'); - molecule.activityBar.remove('sidebar.search.title'); - - molecule.activityBar.add([parserActivityBarItem, githubPageActivityBarItem]); - molecule.activityBar.setState({ - selected: parserActivityBarItem.id - }); - - molecule.activityBar.onClick((id) => { - if (id === githubPageActivityBarItem.id) { - window.location.href = 'https://github.com/DTStack/monaco-sql-languages'; - } - }); - - molecule.editor.open(defaultEditorTab); - - molecule.statusBar.add(defaultLanguageStatusItem, Float.right); - }, - dispose() {} -}; diff --git a/website/src/extensions/workbench/sidebar.tsx b/website/src/extensions/workbench/sidebar.tsx deleted file mode 100644 index 46f54fd7..00000000 --- a/website/src/extensions/workbench/sidebar.tsx +++ /dev/null @@ -1,176 +0,0 @@ -import React from 'react'; -import * as monaco from 'monaco-editor'; - -import lips from '@jcubic/lips'; -import molecule from '@dtinsight/molecule'; -import { Button } from '@dtinsight/molecule/esm/components'; -import { Select, Option } from '@dtinsight/molecule/esm/components/select'; -import { IEditorTab, IProblemsItem, MarkerSeverity } from '@dtinsight/molecule/esm/model'; - -import { defaultLanguage, defaultEditorTab, defaultLanguageStatusItem, languages } from './common'; -import { LanguageService } from 'monaco-sql-languages/out/esm/languageService'; -import { debounce } from 'monaco-sql-languages/out/esm/common/utils'; - -export default class Sidebar extends React.Component { - private _language = defaultLanguage; - private languageService: LanguageService; - constructor(props: any) { - super(props); - this.languageService = new LanguageService(); - } - - componentDidMount() { - molecule.editor.onUpdateTab(this.analyseProblems); - - monaco.editor.setTheme('sql-dark'); - } - - private get language(): string { - return this._language.toLowerCase(); - } - - onClick = (e: any, item: any) => { - console.log('onClick:', e, item); - }; - - onChangeLanguage = (e: any, option: any) => { - if (option && option.value) { - this._language = option.value; - this.updateLanguage(option.value); - } - }; - - analyseProblems = debounce((tab: any) => { - const sql = tab.data.value; - this.languageService.valid(this.language, sql).then((res) => { - molecule.problems.reset(); - const problems = this.convertMsgToProblemItem(tab, sql, res); - molecule.problems.add(problems); - }); - }, 200); - - convertMsgToProblemItem = (tab: IEditorTab, code: string, msgs = []): IProblemsItem => { - const rootId = tab.id; - const rootName = `${tab.name || ''}`; - const languageProblems: IProblemsItem = { - id: rootId, - name: rootName, - isLeaf: false, - value: { - code: rootName, - message: '', - startLineNumber: 0, - startColumn: 1, - endLineNumber: 0, - endColumn: 1, - status: MarkerSeverity.Hint - }, - children: [] - }; - - languageProblems.children = msgs.map((msg: any, index: number) => { - return { - id: `${rootId}-${index}`, - name: msg.code || '', - isLeaf: true, - value: { - code: msg.code, - message: msg.message, - startLineNumber: Number(msg.startLine), - startColumn: Number(msg.startCol), - endLineNumber: Number(msg.endLine), - endColumn: Number(msg.endCol), - status: MarkerSeverity.Error - }, - children: [] - }; - }); - - return languageProblems; - }; - - updateLanguage(language: string) { - const languageId = this.language; - - const nextTab = Object.assign(defaultEditorTab, { - name: language, - data: { language: languageId, value: '' } - }); - const group = molecule.editor.getState().current?.id || -1; - molecule.editor.updateTab(nextTab, group); - const model = molecule.editor.editorInstance.getModel(); - if (model) { - monaco.editor.setModelLanguage(model, languageId); - } - - const nextStatusItem = Object.assign(defaultLanguageStatusItem, { - name: language, - sortIndex: 3 - }); - this.analyseProblems(nextTab); - molecule.statusBar.update(nextStatusItem); - } - - parse = () => { - this.setupOutputLanguage(); - const sql = molecule.editor.editorInstance.getValue(); - molecule.panel.cleanOutput(); - - this.languageService.parserTreeToString(this.language, sql).then((res) => { - const pre = res?.replace(/(\(|\))/g, '$1\n'); - const format = new lips.Formatter(pre); - const formatted = format.format({ - indent: 2, - offset: 2 - }); - const panel = - molecule.panel.getPanel(molecule.builtin.getConstants().PANEL_OUTPUT ?? '') ?? - ({} as any); - molecule.panel.update({ - ...panel, - data: formatted - }); - molecule.panel.appendOutput(''); - }); - }; - - async setupOutputLanguage() { - const model = await molecule.panel.outputEditorInstance?.getModel(); - if (model) { - monaco.editor.setModelLanguage(model, 'clojure'); - } - } - - renderColorThemes() { - const options = languages.map((language: string) => { - return ( - - ); - }); - return ( - - ); - } - - render() { - return ( -
-
-

- Select a language:{' '} -

- {this.renderColorThemes()} - -
-
- ); - } -} diff --git a/website/src/hooks/useEdit.ts b/website/src/hooks/useEdit.ts new file mode 100644 index 00000000..583ed0e7 --- /dev/null +++ b/website/src/hooks/useEdit.ts @@ -0,0 +1,22 @@ +import { useState } from 'react'; + +export default function useEdit() { + const [data, setData] = useState(''); + const [editing, setEditing] = useState(false); + + function start(initialValue: string) { + setEditing(true); + setData(initialValue); + } + + function stop() { + setEditing(false); + setData(''); + } + + function dispatch(value: string) { + setData(value); + } + + return { editing, data, start, stop, dispatch }; +} diff --git a/website/src/index.css b/website/src/index.css index 3cc15d31..e6de1465 100644 --- a/website/src/index.css +++ b/website/src/index.css @@ -1,15 +1,10 @@ -:root { - font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; - line-height: 1.5; - font-weight: 400; - - color-scheme: light dark; - color: rgba(255, 255, 255, 0.87); - background-color: #242424; +@font-family { + font-family: 'Maple Mono'; + src: url('/MapleMono.tff') format('truetype'); +} - font-synthesis: none; - text-rendering: optimizeLegibility; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - -webkit-text-size-adjust: 100%; +body { + font-family: 'Maple Mono', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, + Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'; + background-color: var(--editor-background); } diff --git a/website/src/main.tsx b/website/src/main.tsx index 419d05cd..716ee3a4 100644 --- a/website/src/main.tsx +++ b/website/src/main.tsx @@ -1,10 +1,5 @@ -import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App.tsx'; import './index.css'; -ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( - - - -); +ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(); diff --git a/website/src/storage/content/index.ts b/website/src/storage/content/index.ts new file mode 100644 index 00000000..5e5fe540 --- /dev/null +++ b/website/src/storage/content/index.ts @@ -0,0 +1,24 @@ +import * as idb from 'idb-keyval'; + +const tableName = `dtinsight/content`; + +export function set(id: string, content: string) { + return idb.update>(tableName, (prev) => { + const next = prev || new Map(); + next.set(id, content); + return next; + }); +} + +export async function get(id: string) { + const value = await idb.get>(tableName); + return value?.get(id); +} + +export async function remove(id: string) { + return idb.update>(tableName, (prev) => { + const next = prev || new Map(); + next.delete(id); + return next; + }); +} diff --git a/website/src/storage/task/index.ts b/website/src/storage/task/index.ts new file mode 100644 index 00000000..5cdb385e --- /dev/null +++ b/website/src/storage/task/index.ts @@ -0,0 +1,43 @@ +import * as idb from 'idb-keyval'; +import { useEffect, useState } from 'react'; +import { TreeNode } from '../../types'; + +type Updater = (oldValue?: TreeNode[]) => TreeNode[]; + +const trigger: (() => void)[] = []; + +export async function set(id: string, value: TreeNode[]) { + await idb.set(`dtinsight/${id}`, value); + trigger.forEach((fn) => fn()); +} + +export function get(id: string) { + return idb.get(`dtinsight/${id}`); +} + +export async function update(id: string, updater: Updater) { + await idb.update(`dtinsight/${id}`, updater); + trigger.forEach((fn) => fn()); +} + +export function useTask(id: string) { + const [data, setData] = useState([]); + + function update() { + get(id) + .then((values) => { + setData(values || []); + }) + .catch((error) => { + console.error(error); + setData([]); + }); + } + + useEffect(() => { + update(); + trigger.push(update); + }, []); + + return data; +} diff --git a/website/src/storage/view/index.ts b/website/src/storage/view/index.ts new file mode 100644 index 00000000..a8d04017 --- /dev/null +++ b/website/src/storage/view/index.ts @@ -0,0 +1,23 @@ +import { IMoleculeContext } from '@dtinsight/molecule'; +import { ExplorerModel } from '@dtinsight/molecule/esm/models/explorer'; +import { LayoutModel } from '@dtinsight/molecule/esm/models/layout'; +import * as idb from 'idb-keyval'; + +const tableName = `dtinsight/view`; + +type ViewState = { + layout: LayoutModel; + explorer: Pick; +}; + +export function set(molecule: IMoleculeContext) { + const data: ViewState = { + layout: molecule.layout.getState(), + explorer: { active: molecule.explorer.getState().active } + }; + return idb.set(tableName, data); +} + +export async function get() { + return idb.get(tableName); +} diff --git a/website/src/types.ts b/website/src/types.ts new file mode 100644 index 00000000..f192610e --- /dev/null +++ b/website/src/types.ts @@ -0,0 +1,4 @@ +import { TreeNodeModel } from '@dtinsight/molecule/esm/utils/tree'; +import { LanguageIdEnum } from 'monaco-sql-languages/out/esm/main.js'; + +export type TreeNode = TreeNodeModel<{ language: LanguageIdEnum }>; diff --git a/website/src/workbench/editor/index.tsx b/website/src/workbench/editor/index.tsx new file mode 100644 index 00000000..29703f43 --- /dev/null +++ b/website/src/workbench/editor/index.tsx @@ -0,0 +1,47 @@ +import { hooks, components, utils } from '@dtinsight/molecule'; +import { Container } from './styled'; +import Tab from '../tab'; +import { useMemo } from 'react'; +import { IEditorController } from '@dtinsight/molecule/esm/controllers/editor'; +import { EVENTS } from '../../const'; + +export default function Editor({ onMount, onModelMount, onToolbarClick, emit }: IEditorController) { + const editor = hooks.useConnector('editor'); + const settings = hooks.useSettings(); + const options = useMemo( + () => ({ + ...settings.editor, + ...editor.options + }), + [editor.options, settings.editor] + ); + + const group = editor.groups.find(utils.searchById(editor.current)); + const tab = group?.data.find(utils.searchById(group.activeTab)); + + const handleSubmit = (taskName: string) => { + // 借助 controller 的 emit 事件触发订阅事件 + emit(EVENTS.EDITOR_UPDATE_NAME, taskName); + }; + + return ( + + + {tab ? ( + + ) : ( + editor.entry || + )} + + ); +} diff --git a/website/src/workbench/editor/styled.tsx b/website/src/workbench/editor/styled.tsx new file mode 100644 index 00000000..20321e86 --- /dev/null +++ b/website/src/workbench/editor/styled.tsx @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const Container = styled.div` + background: var(--editor-background); + height: 100%; + width: 100%; +`; diff --git a/website/src/workbench/github/index.tsx b/website/src/workbench/github/index.tsx new file mode 100644 index 00000000..ce9a4a80 --- /dev/null +++ b/website/src/workbench/github/index.tsx @@ -0,0 +1,15 @@ +import Space from '../../components/space'; +import { components } from '@dtinsight/molecule'; + +export default function QuickGithub() { + return ( + window.open('https://github.com/DTStack/monaco-sql-languages')} + > + + Github + + ); +} diff --git a/website/src/workbench/language/index.tsx b/website/src/workbench/language/index.tsx new file mode 100644 index 00000000..bd92af24 --- /dev/null +++ b/website/src/workbench/language/index.tsx @@ -0,0 +1,10 @@ +import { hooks, utils } from '@dtinsight/molecule'; + +export default function Language() { + const editor = hooks.useConnector('editor'); + const group = editor.groups.find(utils.searchById(editor.current)); + const tab = group?.data.find(utils.searchById(group.activeTab)); + if (!tab) return null; + + return <>{tab.language}; +} diff --git a/website/src/workbench/path/index.tsx b/website/src/workbench/path/index.tsx new file mode 100644 index 00000000..b723542b --- /dev/null +++ b/website/src/workbench/path/index.tsx @@ -0,0 +1,15 @@ +import { hooks, utils } from '@dtinsight/molecule'; +import { Text } from './styled'; + +export default function Path() { + const editor = hooks.useConnector('editor'); + const group = editor.groups.find(utils.searchById(editor.current)); + const tab = group?.data.find(utils.searchById(group.activeTab)); + if (!tab) return null; + + return ( + + ~/{tab.language}/{tab.name} + + ); +} diff --git a/website/src/workbench/path/styled.ts b/website/src/workbench/path/styled.ts new file mode 100644 index 00000000..eb5900a9 --- /dev/null +++ b/website/src/workbench/path/styled.ts @@ -0,0 +1,7 @@ +import styled from 'styled-components'; + +export const Text = styled.div` + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; +`; diff --git a/website/src/workbench/powerBy/index.tsx b/website/src/workbench/powerBy/index.tsx new file mode 100644 index 00000000..9321bdbd --- /dev/null +++ b/website/src/workbench/powerBy/index.tsx @@ -0,0 +1,69 @@ +import { components } from '@dtinsight/molecule'; +import { useCallback, useEffect, useState } from 'react'; +import websitePkg from '../../../package.json'; +import pkg from '../../../../package.json'; +import { createPortal } from 'react-dom'; +import { Container, Dialog, Boxen, Row, Link, Text, ButtonRow } from './styled'; + +export default function PoweredBy() { + const [open, setOpen] = useState(false); + + const handleKeyDown = useCallback((e: any) => { + if (e.key === 'Escape') { + setOpen(false); + } + }, []); + + const handleOpen = () => { + setOpen(true); + }; + + useEffect(() => { + window.addEventListener('keydown', handleKeyDown, { once: true }); + return () => window.removeEventListener('keydown', handleKeyDown); + }, [open]); + + return ( + <> + + + + {createPortal( + e.target === e.currentTarget && setOpen(false)}> + + + + + + Molecule: {websitePkg.dependencies['@dtinsight/molecule']} + + + monaco-sql-languages: {pkg.version} + + + fonts: Maple Mono + + + + + setOpen(false)} + size="large" + > + 确认 + + + + , + document.body + )} + + ); +} diff --git a/website/src/workbench/powerBy/styled.ts b/website/src/workbench/powerBy/styled.ts new file mode 100644 index 00000000..38524450 --- /dev/null +++ b/website/src/workbench/powerBy/styled.ts @@ -0,0 +1,61 @@ +import styled from 'styled-components'; + +export const Container = styled.div` + display: flex; + align-items: center; + .codicon { + font-size: 20px; + } +`; + +export const Dialog = styled.dialog` + position: fixed; + left: 0; + top: 0; + z-index: 2600; + background: rgba(0, 0, 0, 0.3); + width: 100vw; + height: 100vh; + cursor: default; + margin: 0; + padding: 0; +`; + +export const Boxen = styled.div` + background: var(--editor-background); + width: fit-content; + min-width: 500px; + max-width: 90vw; + border-radius: 5px; + padding: 10px; + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%, -50%); +`; + +export const Row = styled.div` + display: flex; + padding: 20px 10px 10px; + gap: 16px; +`; + +export const Text = styled.div` + flex: 1; + text-align: center; + line-height: 40px; + display: flex; + flex-direction: column; +`; + +export const ButtonRow = styled.div` + display: flex; + white-space: nowrap; + padding: 20px 10px 10px; + justify-content: flex-end; +`; + +export const Link = styled.a` + font-size: 16px; + color: var(--foreground); +`; diff --git a/website/src/workbench/sidebar/index.tsx b/website/src/workbench/sidebar/index.tsx new file mode 100644 index 00000000..5b7cc538 --- /dev/null +++ b/website/src/workbench/sidebar/index.tsx @@ -0,0 +1,13 @@ +import { hooks } from '@dtinsight/molecule'; +import { Container, Content, Title } from './styled'; + +export default function SideBar() { + const Explorer = hooks.useDynamic('explorer'); + + return ( + + monaco-sql-languages + {Explorer} + + ); +} diff --git a/website/src/workbench/sidebar/styled.tsx b/website/src/workbench/sidebar/styled.tsx new file mode 100644 index 00000000..b3ef808f --- /dev/null +++ b/website/src/workbench/sidebar/styled.tsx @@ -0,0 +1,21 @@ +import styled from 'styled-components'; + +export const Container = styled.div` + background-color: var(--sideBar-background); + height: 100%; + border-right: 1px solid var(--sideBar-border); + color: var(--sideBar-foreground); + outline-color: var(--sideBar-border); +`; + +export const Title = styled.div` + height: 35px; + text-align: center; + line-height: 35px; + user-select: none; + font-size: 14px; +`; + +export const Content = styled.div` + height: calc(100% - 35px); +`; diff --git a/website/src/workbench/tab/index.tsx b/website/src/workbench/tab/index.tsx new file mode 100644 index 00000000..58165bd7 --- /dev/null +++ b/website/src/workbench/tab/index.tsx @@ -0,0 +1,138 @@ +import { IEditorTab, IMenuItemProps, UniqueId, components, controllers } from '@dtinsight/molecule'; +import { Actions, Container, EditorWrapper, Header, Name, Text, Title } from './styled'; +import { editor } from 'monaco-editor'; +import { createElement, useEffect, useMemo, useRef } from 'react'; +import useEdit from '../../hooks/useEdit'; +import { helper } from '../../components/icon/helper'; + +interface ITabProps + extends Pick< + controllers.editor.IEditorController, + 'onMount' | 'onModelMount' | 'onToolbarClick' + > { + data: IEditorTab; + instance?: editor.IStandaloneCodeEditor; + groupId: UniqueId; + options: editor.IEditorOptions; + toolbar: IMenuItemProps[]; + onSubmit?: (taskName: string) => void; +} + +export default function Tab({ + data, + groupId, + toolbar, + instance, + options, + onModelMount, + onMount, + onToolbarClick, + onSubmit +}: ITabProps) { + const edit = useEdit(); + const ref = useRef(null); + + const viewState = useRef(new WeakMap()); + const handleMount = (editor: editor.IStandaloneCodeEditor) => { + onMount?.(groupId, editor); + + editor.onDidChangeModel(() => { + const model = editor.getModel(); + if (model) { + const state = viewState.current.get(model); + if (state) { + editor.restoreViewState(state); + editor.focus(); + } + } + }); + + editor.onDidBlurEditorText(() => { + const model = editor.getModel(); + if (model) { + viewState.current.set(model, editor.saveViewState()); + } + }); + }; + + const handleModelMount = (model: editor.ITextModel) => { + if (!data) return; + if (!data.model) { + onModelMount?.(data.id, groupId, model); + } + }; + + const handleSubmit = () => { + edit.stop(); + if (ref.current) { + ref.current.style.removeProperty('width'); + } + onSubmit?.(edit.data); + }; + + const handleEdit = () => { + // 由于 Input 的内容会内陷,实现 input 的宽度和 text 的文案宽度保持一致 + if (ref.current) { + const { width } = ref.current.getBoundingClientRect(); + ref.current.style.setProperty('width', `${width}px`); + } + edit.start(data.name || ''); + }; + + useEffect(() => { + edit.stop(); + if (ref.current) { + ref.current.style.removeProperty('width'); + } + }, [data]); + + const icon = useMemo(() => { + return createElement(helper(data.language)); + }, [data]); + + return ( + +
+ + <components.Icon type={icon} /> + <Name ref={ref}> + {edit.editing ? ( + <components.Input + autoFocus + value={edit.data} + onChange={edit.dispatch} + onBlur={handleSubmit} + onSubmit={handleSubmit} + /> + ) : ( + <Text title={data.name} onClick={handleEdit}> + {data.name} + </Text> + )} + </Name> + {data.modified && <components.Icon type="primitive-dot" />} + + + onToolbarClick?.(item, groupId)} + /> + +
+ + + +
+ ); +} diff --git a/website/src/workbench/tab/styled.tsx b/website/src/workbench/tab/styled.tsx new file mode 100644 index 00000000..793c1bd4 --- /dev/null +++ b/website/src/workbench/tab/styled.tsx @@ -0,0 +1,49 @@ +import styled from 'styled-components'; + +export const Container = styled.div` + height: 100%; + position: relative; + width: 100%; +`; + +export const Title = styled.div` + line-height: 24px; + font-size: 14px; + padding: 6px 0; + display: flex; + align-items: center; + justify-content: center; + gap: 6px; + flex: 1; +`; + +export const EditorWrapper = styled.div` + height: calc(100% - 38px); +`; + +export const Actions = styled.div` + padding: 0 6px; +`; + +export const Header = styled.div` + display: flex; + width: 100%; +`; + +export const Name = styled.div` + cursor: pointer; + max-width: 400px; +`; + +export const Text = styled.div` + border: 1px solid transparent; + padding: 0 6px; + border-radius: 5px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + + &:hover { + border-color: var(--inputOption-activeBorder); + } +`; diff --git a/website/src/workbench/tree/index.tsx b/website/src/workbench/tree/index.tsx new file mode 100644 index 00000000..90e61647 --- /dev/null +++ b/website/src/workbench/tree/index.tsx @@ -0,0 +1,57 @@ +import { IMoleculeContext, hooks, components, utils, IPosition } from '@dtinsight/molecule'; +import { useTask } from '../../storage/task'; +import { Empty, TreeContainer } from './styled'; +import { createElement, useMemo } from 'react'; +import { helper } from '../../components/icon/helper'; +import { TreeNode } from '../../types'; + +interface ITreeProps { + id: string; + molecule: IMoleculeContext; + onSelect: components.ITreeProps['onSelect']; + onCreate: () => void; + onContextMenu: (pos: IPosition, treeNode: TreeNode) => void; +} + +export default function Tree({ id, onSelect, onCreate, onContextMenu }: ITreeProps) { + const editor = hooks.useConnector('editor'); + const rawData = useTask(id); + + const activeKey = editor.groups.find(utils.searchById(editor.current))?.activeTab; + + const data = useMemo( + () => + rawData.map((item) => ({ ...item, icon: createElement(helper(item.data?.language)) })), + [rawData] + ); + + return ( + + + {data.length ? ( + + onContextMenu(pos, treeNode)} + /> + + ) : ( + + 暂无数据 + + 点击新建 SQL 文件 + + + )} + + + ); +} diff --git a/website/src/workbench/tree/styled.ts b/website/src/workbench/tree/styled.ts new file mode 100644 index 00000000..c350e6ba --- /dev/null +++ b/website/src/workbench/tree/styled.ts @@ -0,0 +1,19 @@ +import { styled } from 'styled-components'; + +export const Empty = styled.div` + padding: 12px; + font-size: 14px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 8px; +`; + +export const TreeContainer = styled.div` + .mo-tree .mo-tree__treenode { + height: 30px; + font-size: 14px; + gap: 6px; + } +`; diff --git a/website/tsconfig.json b/website/tsconfig.json index d9051027..6189cf53 100644 --- a/website/tsconfig.json +++ b/website/tsconfig.json @@ -1,6 +1,5 @@ { "compilerOptions": { - "baseUrl": ".", "target": "ES2020", "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], diff --git a/website/vite.config.ts b/website/vite.config.ts index e5b2ae0c..14ec7f0c 100644 --- a/website/vite.config.ts +++ b/website/vite.config.ts @@ -9,7 +9,12 @@ import commonjs from 'vite-plugin-commonjs'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [commonjs(), react()], + plugins: [ + commonjs(), + react({ + jsxRuntime: 'automatic' + }) + ], define: { 'process.env': process.env },