From ca011cf48ef971fd636b2fe8f7385b59e1c65f4f Mon Sep 17 00:00:00 2001 From: Rachel Powers <508861+Ryex@users.noreply.github.com> Date: Fri, 5 Apr 2024 16:10:53 -0700 Subject: [PATCH] Begin rewriting frontend with web-componentes Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> --- www/package.json | 3 +- www/pnpm-lock.yaml | 606 +++++++++++----------------- www/src/index.html | 284 +------------ www/src/index.old.html | 305 ++++++++++++++ www/src/js/app/app.ts | 15 + www/src/js/app/icons.ts | 12 + www/src/js/app/index.ts | 4 + www/src/js/app/nav.ts | 151 +++++++ www/src/js/components/base.ts | 7 + www/src/js/components/index.ts | 3 + www/src/js/editor/index.ts | 390 +++++++++++++++--- www/src/js/editor/ui.ts | 34 +- www/src/js/index.ts | 100 +++-- www/src/js/main.ts | 12 +- www/src/js/session.ts | 17 +- www/src/js/virtual_machine/index.ts | 2 +- www/tsconfig.json | 7 +- www/webpack.config.js | 2 +- 18 files changed, 1150 insertions(+), 804 deletions(-) create mode 100644 www/src/index.old.html create mode 100644 www/src/js/app/app.ts create mode 100644 www/src/js/app/icons.ts create mode 100644 www/src/js/app/index.ts create mode 100644 www/src/js/app/nav.ts create mode 100644 www/src/js/components/base.ts create mode 100644 www/src/js/components/index.ts diff --git a/www/package.json b/www/package.json index c26bd72..2899ddd 100644 --- a/www/package.json +++ b/www/package.json @@ -44,6 +44,7 @@ "sass": "^1.72.0", "sass-loader": "^14.1.1", "style-loader": "^3.3.4", + "ts-lit-plugin": "^2.0.2", "ts-loader": "^9.5.1", "typescript": "^5.4.3", "webpack": "^5.91.0", @@ -52,6 +53,7 @@ }, "dependencies": { "@popperjs/core": "^2.11.8", + "@shoelace-style/shoelace": "^2.15.0", "ace-builds": "^1.32.9", "ace-linters": "^1.1.2", "bootstrap": "^5.3.3", @@ -63,7 +65,6 @@ "jquery": "^3.7.1", "lit": "^3.1.2", "lzma-web": "^3.0.1", - "shoelace": "^0.1.1", "stream-browserify": "^3.0.0", "uuid": "^9.0.1", "vm-browserify": "^1.1.2" diff --git a/www/pnpm-lock.yaml b/www/pnpm-lock.yaml index 9a60f55..38c88d6 100644 --- a/www/pnpm-lock.yaml +++ b/www/pnpm-lock.yaml @@ -8,6 +8,9 @@ dependencies: '@popperjs/core': specifier: ^2.11.8 version: 2.11.8 + '@shoelace-style/shoelace': + specifier: ^2.15.0 + version: 2.15.0(@types/react@18.2.74) ace-builds: specifier: ^1.32.9 version: 1.32.9 @@ -41,9 +44,6 @@ dependencies: lzma-web: specifier: ^3.0.1 version: 3.0.1 - shoelace: - specifier: ^0.1.1 - version: 0.1.1 stream-browserify: specifier: ^3.0.0 version: 3.0.0 @@ -115,6 +115,9 @@ devDependencies: style-loader: specifier: ^3.3.4 version: 3.3.4(webpack@5.91.0) + ts-lit-plugin: + specifier: ^2.0.2 + version: 2.0.2 ts-loader: specifier: ^9.5.1 version: 9.5.1(typescript@5.4.3)(webpack@5.91.0) @@ -156,11 +159,40 @@ packages: picocolors: 1.0.0 dev: true + /@babel/runtime@7.24.4: + resolution: {integrity: sha512-dkxf7+hn8mFBwKjs9bvBlArzLVxVbS8usaPUDd5p2a9JCL9tB8OaOVN1isD4+Xyk4ns89/xeOmbQvgdK7IIVdA==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.14.1 + dev: true + + /@ctrl/tinycolor@4.0.3: + resolution: {integrity: sha512-e9nEVehVJwkymQpkGhdSNzLT2Lr9UTTby+JePq4Z2SxBbOQjY7pLgSouAaXvfaGQVSAaY0U4eJdwfSDmCbItcw==} + engines: {node: '>=14'} + dev: false + /@discoveryjs/json-ext@0.5.7: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} dev: true + /@floating-ui/core@1.6.0: + resolution: {integrity: sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==} + dependencies: + '@floating-ui/utils': 0.2.1 + dev: false + + /@floating-ui/dom@1.6.3: + resolution: {integrity: sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==} + dependencies: + '@floating-ui/core': 1.6.0 + '@floating-ui/utils': 0.2.1 + dev: false + + /@floating-ui/utils@0.2.1: + resolution: {integrity: sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==} + dev: false + /@isaacs/cliui@8.0.2: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} @@ -218,6 +250,14 @@ packages: resolution: {integrity: sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g==} dev: false + /@lit/react@1.0.4(@types/react@18.2.74): + resolution: {integrity: sha512-6HBvk3AwF46z17fTkZp5F7/EdCJW9xqqQgYKr3sQGgoEJv0TKV1voWydG4UQQA2RWkoD4SHjy08snSpzyoyd0w==} + peerDependencies: + '@types/react': 17 || 18 + dependencies: + '@types/react': 18.2.74 + dev: false + /@lit/reactive-element@2.0.4: resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==} dependencies: @@ -261,6 +301,30 @@ packages: /@popperjs/core@2.11.8: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} + /@shoelace-style/animations@1.1.0: + resolution: {integrity: sha512-Be+cahtZyI2dPKRm8EZSx3YJQ+jLvEcn3xzRP7tM4tqBnvd/eW/64Xh0iOf0t2w5P8iJKfdBbpVNE9naCaOf2g==} + dev: false + + /@shoelace-style/localize@3.1.2: + resolution: {integrity: sha512-Hf45HeO+vdQblabpyZOTxJ4ZeZsmIUYXXPmoYrrR4OJ5OKxL+bhMz5mK8JXgl7HsoEowfz7+e248UGi861de9Q==} + dev: false + + /@shoelace-style/shoelace@2.15.0(@types/react@18.2.74): + resolution: {integrity: sha512-Lcg938Y8U2VsHqIYewzlt+H1rbrXC4GRSUkTJgXyF8/0YAOlI+srd5OSfIw+/LYmwLP2Peyh398Kae/6tg4PDA==} + engines: {node: '>=14.17.0'} + dependencies: + '@ctrl/tinycolor': 4.0.3 + '@floating-ui/dom': 1.6.3 + '@lit/react': 1.0.4(@types/react@18.2.74) + '@shoelace-style/animations': 1.1.0 + '@shoelace-style/localize': 3.1.2 + composed-offset-position: 0.0.4 + lit: 3.1.2 + qr-creator: 1.0.0 + transitivePeerDependencies: + - '@types/react' + dev: false + /@sindresorhus/is@0.7.0: resolution: {integrity: sha512-ONhaKPIufzzrlNbqtWFFd+jlnemX6lJAgq9ZeiZtS7I1PIf/la7CW4m83rTXRnVnsMbW2k56pGYu7AUFJD9Pow==} engines: {node: '>=4'} @@ -403,6 +467,10 @@ packages: undici-types: 5.26.5 dev: true + /@types/prop-types@15.7.12: + resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} + dev: false + /@types/qs@6.9.14: resolution: {integrity: sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==} dev: true @@ -411,6 +479,13 @@ packages: resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} dev: true + /@types/react@18.2.74: + resolution: {integrity: sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==} + dependencies: + '@types/prop-types': 15.7.12 + csstype: 3.1.3 + dev: false + /@types/responselike@1.0.3: resolution: {integrity: sha512-H/+L+UkTV33uf49PH5pCAUBVPNj2nDBXTN+qS1dOwyyg24l3CcicicCA7ca+HMvJBZcFgl5r8e+RR6elsb4Lyw==} dependencies: @@ -466,6 +541,10 @@ packages: resolution: {integrity: sha512-KYSIHVmslkaCDyw013pphY+d7x1qV8IZupYfeIfzNA+nsaWHbn5uPuQRvdRFsa9zFzGeudPuoGoZ1Op4jrJXIQ==} dev: false + /@vscode/web-custom-data@0.4.9: + resolution: {integrity: sha512-QeCJFISE/RiTG0NECX6DYmVRPVb0jdyaUrhY0JqNMv9ruUYtYqxxQfv3PSjogb+zNghmwgXLSYuQKk6G+Xnaig==} + dev: true + /@webassemblyjs/ast@1.12.1: resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} dependencies: @@ -715,10 +794,6 @@ packages: hasBin: true dev: true - /agent-base@1.0.2: - resolution: {integrity: sha512-IrdRInle5l28T2DjBsOojXniN91mXYkt9piDyPbPEoA/X+f7kjd0qiIb18vZThIZCJdLk2Zq/ukXxZp8NkcFsw==} - dev: false - /ajv-formats@2.1.1(ajv@8.12.0): resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} peerDependencies: @@ -829,10 +904,6 @@ packages: file-type: 4.4.0 dev: true - /archy@0.0.2: - resolution: {integrity: sha512-8mMsetjXv4pCPTrMbPPO2cxy9vzJn2jwbd+ug+mf8fEUZG2E78Vo5erJMjrnGuLTKqOLtS5ulFHJSfg1yaCjxA==} - dev: false - /argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} dev: true @@ -885,24 +956,10 @@ packages: /base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} - /batch@0.2.1: - resolution: {integrity: sha512-prVkjDV23cjQy3z89LUFWV96l+VtCvCNk2NBjDTXzssr6G+3RGdkuLfh3uKJ/GmzkE+jyBXBGmo2hn/J/W2Dcw==} - dev: false - - /batch@0.3.2: - resolution: {integrity: sha512-TIMqydnQ7j/svdKkp7oovtYKFwxSiLpU8E62A3cVbi9+T8KUlsJSAB7Cg+Z/4ioYGDF4anLfImvpZlUP46TPqQ==} - dev: false - /batch@0.6.1: resolution: {integrity: sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==} dev: true - /better-assert@0.1.0: - resolution: {integrity: sha512-U83vktWGmwjuSPMErA7ztkJHuq0q9sj1qyxggClobyxgl3YPoB+BlflxBnHkEKB64Oxy9tdI6aH9OSouvlNcgQ==} - dependencies: - callsite: 1.0.0 - dev: false - /bin-build@3.0.0: resolution: {integrity: sha512-jcUOof71/TNAI2uM5uoUaDq2ePcVBQ3R/qhxAz1rX7UfvduAL/RXD3jXzvn8cVcDJdGVkiR1shal3OH0ImpuhA==} engines: {node: '>=4'} @@ -1183,10 +1240,6 @@ packages: set-function-length: 1.2.2 dev: true - /callsite@1.0.0: - resolution: {integrity: sha512-0vdNRFXn5q+dtOqjfFtmtlI9N2eVZ7LMyEV2iKC5mEEFvSg/69Ml6b/WU2qF8W1nLRa0wiSrDT3Y5jOHZCwKPQ==} - dev: false - /callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -1294,6 +1347,15 @@ packages: source-map: 0.6.1 dev: true + /cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + dev: true + /clone-deep@4.0.1: resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} engines: {node: '>=6'} @@ -1332,28 +1394,11 @@ packages: resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==} dev: true - /commander@0.5.2: - resolution: {integrity: sha512-/IKo89++b1UhClEhWvKk00gKgw6iwvwD8TOPTqqN9AyvjgPCnf9OrjnDNY3dPDOj+K+OhN9SRjYQH0AfX0bROw==} - engines: {node: '>= 0.4.x'} - dev: false - - /commander@1.0.5: - resolution: {integrity: sha512-Iil6cZ1vitahfQSTrGO3L4v3dtvnfyGpKkXN+aJV9uR24JYxhM9bUfBLat65nU7cIXzOcnkjGtfdCuqaO1caIQ==} - engines: {node: '>= 0.6.x'} - dependencies: - keypress: 0.1.0 - dev: false - /commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} dev: true - /commander@2.0.0: - resolution: {integrity: sha512-qebjpyeaA/nJ4w3EO2cV2++/zEkccPnjWogzA2rff+Lk8ILI75vULeTmyd4wPxWdKwtP3J+G39IXVZadh0UHyw==} - engines: {node: '>= 0.6.x'} - dev: false - /commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true @@ -1373,76 +1418,8 @@ packages: engines: {node: ^12.20.0 || >=14} dev: false - /component-builder@0.10.0: - resolution: {integrity: sha512-J5dabmzaO8W3yIs3YNabTn8tU2bMwMVNith5/X8RFOxQZ1nJ+Gg1Cr8w63FRJkN/695/KRrnSXUodSDh7joDqg==} - dependencies: - batch: 0.2.1 - better-assert: 0.1.0 - component-require: 0.3.1 - cp: 0.1.1 - debug: 4.3.4 - mkdirp: 0.3.4 - string-to-js: 0.0.1 - transitivePeerDependencies: - - supports-color - dev: false - - /component-builder@0.8.3: - resolution: {integrity: sha512-fkElR5xGWJeyrgNGmiZV3quoO02I0+JbXLsGJwSngKNF6w6qzZA7y63ZVX0ZFfmr4X3+WLU9FQ9LcstK6UnuXg==} - dependencies: - batch: 0.2.1 - better-assert: 0.1.0 - component-require: 0.2.2 - debug: 4.3.4 - fs-extra: 0.6.4 - mkdirp: 0.3.4 - transitivePeerDependencies: - - supports-color - dev: false - - /component-require@0.2.2: - resolution: {integrity: sha512-Y9SwO0tVgVmEa3M20HmLKUJ824QwN9ZWEgSdBV1yFwG0UV0S8q2z0YOXM1RSZcae1b+0c5ol2RPK9tGBvpyx4g==} - dev: false - - /component-require@0.3.1: - resolution: {integrity: sha512-MpKgc0kIW93KPY2ew6Y0owtJiRtHJO6vJVtxst26FxNrtBdLHQ3k/rTbfSZSJ09F4QHUiKLh6fxZd3U2FZPHAg==} - dev: false - - /component-stylus@1.1.3(component-builder@0.8.3): - resolution: {integrity: sha512-of2le9CLJuNU00DicVdvmdAYdFfa83XwcIt1ZkO5PmKvR15ujiA7IgwGp7SjSU2n8GDV5XFln+nEJIFYS72+mQ==} - peerDependencies: - component-builder: ~0.8.1 - dependencies: - batch: 0.3.2 - component-builder: 0.8.3 - debug: 0.7.4 - nib: 0.9.2 - stylus: 0.32.1 - transitivePeerDependencies: - - supports-color - dev: false - - /component@0.18.0: - resolution: {integrity: sha512-lRWPQu2QdAiARAZUfX/lvP7CXnE/NZB0xTgfWO2S8m8essLEPSNAnMZAc5bHkh2eDj0rP51HID3h5r6weZOWgA==} - engines: {node: '>= 0.8.0'} - hasBin: true - dependencies: - archy: 0.0.2 - batch: 0.3.2 - commander: 1.0.5 - component-builder: 0.10.0 - debug: 4.3.4 - jog: 0.4.0 - mkdirp: 0.3.4 - netrc: 0.1.4 - open: 0.0.4 - rimraf: 2.1.4 - string-to-js: 0.0.1 - superagent: 0.15.3 - superagent-proxy: 0.0.1(superagent@0.15.3) - win-fork: 1.0.0 - transitivePeerDependencies: - - supports-color + /composed-offset-position@0.0.4: + resolution: {integrity: sha512-vMlvu1RuNegVE0YsCDSV/X4X10j56mq7PCIyOKK74FxkXzGLwhOUmdkJLSdOBOMwWycobGUMgft2lp+YgTe8hw==} dev: false /compressible@2.0.18: @@ -1507,10 +1484,6 @@ packages: engines: {node: '>= 0.6'} dev: true - /cookiejar@1.3.0: - resolution: {integrity: sha512-U+NgxxtwHIokuL04FqKEkqsaWBDtnCQo+wvYjUCtBA56Lcg8vpV3SGtBx+RAmw92SV3VT8PwsYcCFK/cC3Dw+A==} - dev: false - /copy-webpack-plugin@12.0.2(webpack@5.91.0): resolution: {integrity: sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==} engines: {node: '>= 18.12.0'} @@ -1545,10 +1518,6 @@ packages: typescript: 5.4.3 dev: true - /cp@0.1.1: - resolution: {integrity: sha512-ht9oKVsn1lAqV8FdUuSwBUQB8AG2cSyYbPim/mEwj+Dt3d21IRu2H5diDumMpKb77tsIAGM3eU484KvcTrPvHw==} - dev: false - /create-ecdh@4.0.4: resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} dependencies: @@ -1680,9 +1649,8 @@ packages: css-tree: 1.1.3 dev: true - /cssom@0.2.5: - resolution: {integrity: sha512-b9ecqKEfWrNcyzx5+1nmcfi80fPp8dVM8rlAh7fFK14PZbNjp++gRjyZTZfLJQa/Lw0qeCJho7WBIl0nw0v6HA==} - engines: {node: '>=0.2.0'} + /csstype@3.1.3: + resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} dev: false /currently-unhandled@0.4.1: @@ -1692,26 +1660,6 @@ packages: array-find-index: 1.0.2 dev: true - /debug@0.7.4: - resolution: {integrity: sha512-EohAb3+DSHSGx8carOSKJe8G0ayV5/i609OD0J2orCkuyae7SyZSz2aoLmQF2s0Pj5gITDebwPH7GFBlqOUQ1Q==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dev: false - - /debug@2.2.0: - resolution: {integrity: sha512-X0rGvJcskG1c3TgSCPqHJ0XJgwlcvOC7elJ5Y0hYuKBZoVqWpAMfLOeIh2UI/DCQ5ruodIjvsugZtjUYUw2pUw==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true - dependencies: - ms: 0.7.1 - dev: false - /debug@2.6.9: resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} peerDependencies: @@ -1721,6 +1669,7 @@ packages: optional: true dependencies: ms: 2.0.0 + dev: true /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} @@ -1732,6 +1681,7 @@ packages: optional: true dependencies: ms: 2.1.2 + dev: true /decamelize@1.2.0: resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} @@ -1863,6 +1813,15 @@ packages: resolution: {integrity: sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==} dev: true + /didyoumean2@4.1.0: + resolution: {integrity: sha512-qTBmfQoXvhKO75D/05C8m+fteQmn4U46FWYiLhXtZQInzitXLWY0EQ/2oKnpAz9g2lQWW8jYcLcT+hPJGT+kig==} + engines: {node: '>=10.13'} + dependencies: + '@babel/runtime': 7.24.4 + leven: 3.1.0 + lodash.deburr: 4.1.0 + dev: true + /diffie-hellman@5.0.3: resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} dependencies: @@ -1988,10 +1947,6 @@ packages: minimalistic-crypto-utils: 1.0.1 dev: false - /emitter-component@1.0.0: - resolution: {integrity: sha512-GZrLdp4Z7OERecoYQYElVVqf6/gcbGUs8nvaE+nmu2dGy453lLgGyPLNX9DdSyojdMqI86fCT9XQqsWJymciEw==} - dev: false - /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -2229,14 +2184,6 @@ packages: sort-keys-length: 1.0.1 dev: true - /extend@1.2.1: - resolution: {integrity: sha512-2/JwIYRpMBDSjbQjUUppNSrmc719crhFaWIdT+TRSVA8gE+6HEobQWqJ6VkPt/H8twS7h/0WWs7veh8wmp98Ng==} - dev: false - - /extend@3.0.2: - resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} - dev: false - /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true @@ -2417,12 +2364,6 @@ packages: signal-exit: 4.1.0 dev: true - /formidable@1.0.14: - resolution: {integrity: sha512-aOskFHEfYwkSKSzGui5jhQ+uyLo2NTwpzhndggz2YZHlv0HkAi+zG5ZEBCL3GTvqLyr/FzX9Mvx9DueCmu2HzQ==} - engines: {node: '>=0.8.0'} - deprecated: 'Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau' - dev: false - /forwarded@0.2.0: resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} engines: {node: '>= 0.6'} @@ -2448,15 +2389,6 @@ packages: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} dev: true - /fs-extra@0.6.4: - resolution: {integrity: sha512-5rU898vl/Z948L+kkJedbmo/iltzmiF5bn/eEk0j/SgrPpI+Ydau9xlJPicV7Av2CHYBGz5LAlwTnBU80j1zPQ==} - dependencies: - jsonfile: 1.0.1 - mkdirp: 0.3.4 - ncp: 0.4.2 - rimraf: 2.2.8 - dev: false - /fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -2472,6 +2404,11 @@ packages: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} dev: true + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + /get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} @@ -2649,14 +2586,6 @@ packages: url-to-options: 1.0.1 dev: true - /graceful-fs@1.2.3: - resolution: {integrity: sha512-iiTUZ5vZ+2ZV+h71XAgwCSu6+NAizhFU3Yw8aC/hH5SQ3SnISqEqAek40imAFGtDcwJKNhXvSY+hzIolnLwcdQ==} - engines: {node: '>=0.4.0'} - deprecated: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js - requiresBuild: true - dev: false - optional: true - /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} dev: true @@ -2864,16 +2793,6 @@ packages: resolution: {integrity: sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q==} dev: true - /http-proxy-agent@0.2.7: - resolution: {integrity: sha512-9W3grrlsrW2kRGNRbGkBNVFx4voQS1H1TxWR60MVHKQ+rw+kRtA9JXVGQiiDgYsp315Ex5HPk+3it4lBNyk4WA==} - dependencies: - agent-base: 1.0.2 - debug: 2.6.9 - extend: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /http-proxy-middleware@2.0.6(@types/express@4.17.21): resolution: {integrity: sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw==} engines: {node: '>=12.0.0'} @@ -2904,16 +2823,6 @@ packages: - debug dev: true - /https-proxy-agent@0.3.6: - resolution: {integrity: sha512-ZuLafAeUu97abfbpAO9Cwjl3slsx6yZ7apTYBNVtMdoDhlVzUhxXO0qh+Xxqc5FAm7oq747k2jjbICYJdEYShg==} - dependencies: - agent-base: 1.0.2 - debug: 2.6.9 - extend: 3.0.2 - transitivePeerDependencies: - - supports-color - dev: false - /human-signals@2.1.0: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} @@ -3270,18 +3179,6 @@ packages: hasBin: true dev: true - /jog@0.4.0: - resolution: {integrity: sha512-yhLpqkWesxFD7uI5X9Jzzu5gOlnpuzcURpVxzuLePLCBizhWlKrHzR+Rln2Ror/WiU+nteey8DFINisKeC64wA==} - hasBin: true - dependencies: - commander: 0.5.2 - debug: 4.3.4 - ms: 0.1.0 - redis: 0.7.1 - transitivePeerDependencies: - - supports-color - dev: false - /jpegtran-bin@5.0.2: resolution: {integrity: sha512-4FSmgIcr8d5+V6T1+dHbPZjaFH0ogVyP4UVsE+zri7S9YLO4qAT2our4IN3sW3STVgNTbqPermdIgt2XuAJ4EA==} engines: {node: '>=10'} @@ -3328,19 +3225,11 @@ packages: resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} dev: false - /jsonfile@1.0.1: - resolution: {integrity: sha512-KbsDJNRfRPF5v49tMNf9sqyyGqGLBcz1v5kZT01kG5ns5mQSltwxCKVmUzVKtEinkUnTDtSrp6ngWpV7Xw0ZlA==} - dev: false - /junk@3.1.0: resolution: {integrity: sha512-pBxcB3LFc8QVgdggvZWyeys+hnrNWg4OcZIU/1X59k5jQdLBlCsYGRQaz234SqoRLTCgMH00fY0xRJH+F9METQ==} engines: {node: '>=8'} dev: true - /keypress@0.1.0: - resolution: {integrity: sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==} - dev: false - /keyv@3.0.0: resolution: {integrity: sha512-eguHnq22OE3uVoSYG0LVWNP+4ppamWr9+zWBe1bsNcovIMy6huUJFPgy4mGwCd/rnl3vOLGW1MTlu4c57CT1xA==} dependencies: @@ -3359,10 +3248,30 @@ packages: shell-quote: 1.8.1 dev: true + /leven@3.1.0: + resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} + engines: {node: '>=6'} + dev: true + /lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true + /lit-analyzer@2.0.3: + resolution: {integrity: sha512-XiAjnwVipNrKav7r3CSEZpWt+mwYxrhPRVC7h8knDmn/HWTzzWJvPe+mwBcL2brn4xhItAMzZhFC8tzzqHKmiQ==} + hasBin: true + dependencies: + '@vscode/web-custom-data': 0.4.9 + chalk: 2.4.2 + didyoumean2: 4.1.0 + fast-glob: 3.3.2 + parse5: 5.1.0 + ts-simple-type: 2.0.0-next.0 + vscode-css-languageservice: 4.3.0 + vscode-html-languageservice: 3.1.0 + web-component-analyzer: 2.0.0 + dev: true + /lit-element@4.0.4: resolution: {integrity: sha512-98CvgulX6eCPs6TyAIQoJZBCQPo80rgXR+dVBs61cstJXqtI+USQZAbA4gFHh6L/mxBx9MrgPLHLsUgDUHAcCQ==} dependencies: @@ -3408,6 +3317,10 @@ packages: p-locate: 4.1.0 dev: true + /lodash.deburr@4.1.0: + resolution: {integrity: sha512-m/M1U1f3ddMCs6Hq2tAsYThTBDaAKFDX3dwDo97GEYzamXi9SqUpjWi/Rrj/gf3X2n8ktwgZrlP1z6E3v/IExQ==} + dev: true + /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} @@ -3552,10 +3465,6 @@ packages: engines: {node: '>= 8'} dev: true - /methods@0.0.1: - resolution: {integrity: sha512-pB8oFfci/xcfUgM6DTxc7lbTKifPPgs3mZUOsEgaH+1TTWpmcmv3sHl+5sUHIj2X2W8aPYa2+nJealRHK+Lo6A==} - dev: false - /methods@1.1.2: resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} engines: {node: '>= 0.6'} @@ -3589,10 +3498,6 @@ packages: mime-db: 1.52.0 dev: true - /mime@1.2.5: - resolution: {integrity: sha512-QfwTOA+zRHSZXxl9Y7ue5ifKDhU1prnh0dO67Vgcl7Lcx0+79vL9A1ln0qtVur8CFSdYq5Zhnw9DDZQgwDh8Ng==} - dev: false - /mime@1.6.0: resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} engines: {node: '>=4'} @@ -3654,29 +3559,13 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: true - /mkdirp@0.3.4: - resolution: {integrity: sha512-sZObLj65ImOahHTaycVJF559muyAvv1hYyBQSfVfZq9ajpgY9Da+cRQzbXDfsKJTwUMUABRjBMDHieYqbHKx0g==} - deprecated: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) - dev: false - - /mkdirp@0.3.5: - resolution: {integrity: sha512-8OCq0De/h9ZxseqzCH8Kw/Filf5pF/vMI6+BH7Lu0jXz2pqYCjTAQRolSxRIi+Ax+oCCjlxoJMP0YQ4XlrQNHg==} - deprecated: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) - dev: false - - /ms@0.1.0: - resolution: {integrity: sha512-7uwYj3Xip4rOFpe5dDy+C25Ad0nAXkT4yAVMSpuh1UYR2Z7tAswSh4wb/HghRa533wofFUsvg54OQ90Mu1dCJg==} - dev: false - - /ms@0.7.1: - resolution: {integrity: sha512-lRLiIR9fSNpnP6TC4v8+4OU7oStC01esuNowdQ34L+Gk8e5Puoc88IqJ+XAY/B3Mn2ZKis8l8HX90oU8ivzUHg==} - dev: false - /ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + dev: true /ms@2.1.2: resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + dev: true /ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -3696,11 +3585,6 @@ packages: hasBin: true dev: true - /ncp@0.4.2: - resolution: {integrity: sha512-PfGU8jYWdRl4FqJfCy0IzbkGyFHntfWygZg46nFk/dJD/XRrk2cj0SsKSX9n5u5gE0E0YfEpKWrEkfjnlZSTXA==} - hasBin: true - dev: false - /negotiator@0.6.3: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} @@ -3710,18 +3594,6 @@ packages: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} dev: true - /netrc@0.1.4: - resolution: {integrity: sha512-ye8AIYWQcP9MvoM1i0Z2jV0qed31Z8EWXYnyGNkiUAd+Fo8J+7uy90xTV8g/oAbhtjkY7iZbNTizQaXdKUuwpQ==} - dev: false - - /nib@0.9.2: - resolution: {integrity: sha512-8e1pkjRQSF8+HlwPJUytj+JDsDBuGQh7hnKzpwh4qoIvEol8SuDsCqOgGRL91d4HvfeIiBT9iyDII2gmDmA1Uw==} - dependencies: - stylus: 0.31.0 - transitivePeerDependencies: - - supports-color - dev: false - /nice-try@1.0.5: resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} dev: true @@ -3847,11 +3719,6 @@ packages: mimic-fn: 2.1.0 dev: true - /open@0.0.4: - resolution: {integrity: sha512-89TW6JswxDIlkXZ6gBscNCE7x+A3oN/J0OqGhiLNhFnWiphTVnXOMsi5ggo72DqpB5PzinTu9ZU508z7Af2TnA==} - engines: {node: '>= 0.6.0'} - dev: false - /open@10.1.0: resolution: {integrity: sha512-mnkeQ1qP5Ue2wd+aivTD3NHd/lZ96Lu0jgf0pwktLPtx6cTZiH7tyeGRRHs0zX0rbrahXPnXlUnbeXyaBBuIaw==} engines: {node: '>=18'} @@ -4015,6 +3882,10 @@ packages: lines-and-columns: 1.2.4 dev: true + /parse5@5.1.0: + resolution: {integrity: sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==} + dev: true + /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -4295,8 +4166,8 @@ packages: engines: {node: '>=6'} dev: true - /qs@0.6.5: - resolution: {integrity: sha512-n7wA/f30O3SsOw2BVkGUDzjWMw7kXvQJWKtDdgfq5HJvDoad+Jbc6osN1AQ0Iain5plo9e7Cs5fE+xR+DVkPTw==} + /qr-creator@1.0.0: + resolution: {integrity: sha512-C0cqfbS1P5hfqN4NhsYsUXePlk9BO+a45bAQ3xLYjBL3bOIFzoVEjs79Fado9u9BPBD3buHi3+vY+C8tHh4qMQ==} dev: false /qs@6.11.0: @@ -4319,14 +4190,6 @@ packages: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true - /rainbowsocks@0.1.3: - resolution: {integrity: sha512-/dfeXfgrecw1gCxmgfASMEYxAGLfztnXIwYoXTk4+I2qJY8oLmhKqlYZP7RTeuFPOQHQPCr0U0TbFG/k2fZgjg==} - dependencies: - debug: 2.2.0 - transitivePeerDependencies: - - supports-color - dev: false - /randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} dependencies: @@ -4420,9 +4283,9 @@ packages: strip-indent: 1.0.1 dev: true - /redis@0.7.1: - resolution: {integrity: sha512-kG/XY5DBOBo7NngF4+Ylj5FSbcjxGPHayDfjaGPAXTzay0f4vo+zFd4YPkL+2ANAkxQJYDISfoDa/qjgnYphCw==} - dev: false + /regenerator-runtime@0.14.1: + resolution: {integrity: sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==} + dev: true /regexp-to-ast@0.5.0: resolution: {integrity: sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==} @@ -4455,6 +4318,11 @@ packages: engines: {node: '>= 10'} dev: true + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + dev: true + /require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -4506,17 +4374,6 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true - /rimraf@2.1.4: - resolution: {integrity: sha512-tzwmX16YQhcFu0T/m0gHBcFKx6yQAg77Z6WWaQSJsUekXYa6yaAmHhrDdmFicgauX/er7GsdN+vRao3mBhA4kQ==} - optionalDependencies: - graceful-fs: 1.2.3 - dev: false - - /rimraf@2.2.8: - resolution: {integrity: sha512-R5KMKHnPAQaZMqLOsyuyUmcIjSeDm+73eoqQpaXA7AZ22BL+6C+1mcUscgOsNd8WVlJuvlgAPsegcx7pjlV0Dg==} - hasBin: true - dev: false - /rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} hasBin: true @@ -4776,18 +4633,6 @@ packages: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true - /shoelace@0.1.1: - resolution: {integrity: sha512-opa30oBCIpii7AgvzDokkg7ASWNNH8kiT7OfWyIAT4nHjVAD1OxvjJBZQvgEgv0Y2GvGrurB9AFerVes/wWvbQ==} - hasBin: true - dependencies: - commander: 2.0.0 - component: 0.18.0 - component-builder: 0.8.3 - component-stylus: 1.1.3(component-builder@0.8.3) - transitivePeerDependencies: - - supports-color - dev: false - /showdown@2.1.0: resolution: {integrity: sha512-/6NVYu4U819R2pUIk79n67SYgJHWCce0a5xTP979WbNp0FL9MN1I1QK662IDU1b6JzKTvmhgI7T7JYIxBi3kMQ==} hasBin: true @@ -4837,16 +4682,6 @@ packages: websocket-driver: 0.7.4 dev: true - /socks-proxy-agent@0.1.2: - resolution: {integrity: sha512-A6HCJpilsagbgSHmNbd6SdW5grzIn+UwJwughjFtSM9FldW44DJcdONeqVU74JNsJca5SDj7ParjW9aLKkNc4g==} - dependencies: - agent-base: 1.0.2 - extend: 1.2.1 - rainbowsocks: 0.1.3 - transitivePeerDependencies: - - supports-color - dev: false - /sort-keys-length@1.0.1: resolution: {integrity: sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==} engines: {node: '>=0.10.0'} @@ -4974,10 +4809,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /string-to-js@0.0.1: - resolution: {integrity: sha512-6/1FZ26C+iPY1+cfbScGQ91Br3ZixQn13s/wiOwVBMHZr/OrzrOcAp64li6OeoM1WiG8MZIk9kJZE5Q+Vr8dDg==} - dev: false - /string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -5091,56 +4922,6 @@ packages: webpack: 5.91.0(webpack-cli@5.1.4) dev: true - /stylus@0.31.0: - resolution: {integrity: sha512-BJ7iU9iUNOj/HlTuUF9SHh994ooIrOr/yYxzzQzpsweulT0HPyL4vtel9/QJcvq+xwy3ff7sf9Nv25kATr2qww==} - hasBin: true - dependencies: - cssom: 0.2.5 - debug: 4.3.4 - mkdirp: 0.3.5 - transitivePeerDependencies: - - supports-color - dev: false - - /stylus@0.32.1: - resolution: {integrity: sha512-QAUlDBLxjrNpf4dT991DOaXcxBKCJuICYAso29Q0RV9aI+REZIER4aRMfE5DIkV1meSiVccO27dA1Uhu+5gzEQ==} - hasBin: true - dependencies: - cssom: 0.2.5 - debug: 4.3.4 - mkdirp: 0.3.5 - transitivePeerDependencies: - - supports-color - dev: false - - /superagent-proxy@0.0.1(superagent@0.15.3): - resolution: {integrity: sha512-AaMG2jcK0qW8nPUvh1Y5p5yu5TygzKZ4MSHtvtA6VF3Pk0q6GNoyaeY/MxsIjye+SSD3LqbUIfbmGRM2QqCxbw==} - peerDependencies: - superagent: '0' - dependencies: - http-proxy-agent: 0.2.7 - https-proxy-agent: 0.3.6 - socks-proxy-agent: 0.1.2 - superagent: 0.15.3 - transitivePeerDependencies: - - supports-color - dev: false - - /superagent@0.15.3: - resolution: {integrity: sha512-PSYnen8vHPQeZNn25BPo146evL0EO2FgMCcHvC7xghasVZPuS/ubiI9A1w4O7gCf1IJ0sx6gdlu9Xeuussr6Uw==} - deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . - dependencies: - cookiejar: 1.3.0 - debug: 0.7.4 - emitter-component: 1.0.0 - formidable: 1.0.14 - methods: 0.0.1 - mime: 1.2.5 - qs: 0.6.5 - transitivePeerDependencies: - - supports-color - dev: false - /supports-color@2.0.0: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} @@ -5305,6 +5086,13 @@ packages: escape-string-regexp: 1.0.5 dev: true + /ts-lit-plugin@2.0.2: + resolution: {integrity: sha512-DPXlVxhjWHxg8AyBLcfSYt2JXgpANV1ssxxwjY98o26gD8MzeiM68HFW9c2VeDd1CjoR3w7B/6/uKxwBQe+ioA==} + dependencies: + lit-analyzer: 2.0.3 + web-component-analyzer: 2.0.0 + dev: true + /ts-loader@9.5.1(typescript@5.4.3)(webpack@5.91.0): resolution: {integrity: sha512-rNH3sK9kGZcH9dYzC7CewQm4NtxJTjSEVRJ2DyBZR7f8/wcta+iV44UPCXc5+nzDzivKtlzV6c9P4e+oFhDLYg==} engines: {node: '>=12.0.0'} @@ -5321,6 +5109,10 @@ packages: webpack: 5.91.0(webpack-cli@5.1.4) dev: true + /ts-simple-type@2.0.0-next.0: + resolution: {integrity: sha512-A+hLX83gS+yH6DtzNAhzZbPfU+D9D8lHlTSd7GeoMRBjOt3GRylDqLTYbdmjA4biWvq2xSfpqfIDj2l0OA/BVg==} + dev: true + /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: true @@ -5339,6 +5131,12 @@ packages: mime-types: 2.1.35 dev: true + /typescript@5.2.2: + resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + engines: {node: '>=14.17'} + hasBin: true + dev: true + /typescript@5.4.3: resolution: {integrity: sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==} engines: {node: '>=14.17'} @@ -5446,6 +5244,15 @@ packages: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} dev: false + /vscode-css-languageservice@4.3.0: + resolution: {integrity: sha512-BkQAMz4oVHjr0oOAz5PdeE72txlLQK7NIwzmclfr+b6fj6I8POwB+VoXvrZLTbWt9hWRgfvgiQRkh5JwrjPJ5A==} + dependencies: + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.16.0-next.2 + vscode-nls: 4.1.2 + vscode-uri: 2.1.2 + dev: true + /vscode-css-languageservice@6.2.13: resolution: {integrity: sha512-2rKWXfH++Kxd9Z4QuEgd1IF7WmblWWU7DScuyf1YumoGLkY9DW6wF/OTlhOyO2rN63sWHX2dehIpKBbho4ZwvA==} dependencies: @@ -5455,6 +5262,15 @@ packages: vscode-uri: 3.0.8 dev: false + /vscode-html-languageservice@3.1.0: + resolution: {integrity: sha512-QAyRHI98bbEIBCqTzZVA0VblGU40na0txggongw5ZgTj9UVsVk5XbLT16O9OTcbqBGSqn0oWmFDNjK/XGIDcqg==} + dependencies: + vscode-languageserver-textdocument: 1.0.11 + vscode-languageserver-types: 3.16.0-next.2 + vscode-nls: 4.1.2 + vscode-uri: 2.1.2 + dev: true + /vscode-html-languageservice@5.2.0: resolution: {integrity: sha512-cdNMhyw57/SQzgUUGSIMQ66jikqEN6nBNyhx5YuOyj9310+eY9zw8Q0cXpiKzDX8aHYFewQEXRnigl06j/TVwQ==} dependencies: @@ -5493,12 +5309,23 @@ packages: /vscode-languageserver-textdocument@1.0.11: resolution: {integrity: sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==} - dev: false + + /vscode-languageserver-types@3.16.0-next.2: + resolution: {integrity: sha512-QjXB7CKIfFzKbiCJC4OWC8xUncLsxo19FzGVp/ADFvvi87PlmBSCAtZI5xwGjF5qE0xkLf0jjKUn3DzmpDP52Q==} + dev: true /vscode-languageserver-types@3.17.5: resolution: {integrity: sha512-Ld1VelNuX9pdF39h2Hgaeb5hEZM2Z3jUrrMgWQAu82jMtZp7p3vJT3BzToKtZI7NgQssZje5o0zryOrhQvzQAg==} dev: false + /vscode-nls@4.1.2: + resolution: {integrity: sha512-7bOHxPsfyuCqmP+hZXscLhiHwe7CSuFE4hyhbs22xPIhQ4jv99FcR4eBzfYYVLP356HNFpdvz63FFb/xw6T4Iw==} + dev: true + + /vscode-uri@2.1.2: + resolution: {integrity: sha512-8TEXQxlldWAuIODdukIb+TR5s+9Ds40eSJrw+1iDDA9IFORPjMELarNQE3myz5XIkWWpdprmJjm1/SxMlWOC8A==} + dev: true + /vscode-uri@3.0.8: resolution: {integrity: sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==} dev: false @@ -5524,6 +5351,16 @@ packages: minimalistic-assert: 1.0.1 dev: true + /web-component-analyzer@2.0.0: + resolution: {integrity: sha512-UEvwfpD+XQw99sLKiH5B1T4QwpwNyWJxp59cnlRwFfhUW6JsQpw5jMeMwi7580sNou8YL3kYoS7BWLm+yJ/jVQ==} + hasBin: true + dependencies: + fast-glob: 3.3.2 + ts-simple-type: 2.0.0-next.0 + typescript: 5.2.2 + yargs: 17.7.2 + dev: true + /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} dev: false @@ -5727,10 +5564,6 @@ packages: resolution: {integrity: sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==} dev: true - /win-fork@1.0.0: - resolution: {integrity: sha512-iFsJSmXuUuGQKyCMx5pWPj0/jdLbpPAofFqbXDB8vOu2KjBmx3e8WO5heBtn0HTZ/MYVSMebx18f48Oe4bRn8Q==} - dev: false - /wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -5774,6 +5607,11 @@ packages: engines: {node: '>=0.4'} dev: true + /y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + dev: true + /yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} dev: true @@ -5782,6 +5620,24 @@ packages: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} dev: true + /yargs-parser@21.1.1: + resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} + engines: {node: '>=12'} + dev: true + + /yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + dependencies: + cliui: 8.0.1 + escalade: 3.1.2 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + dev: true + /yauzl@2.10.0: resolution: {integrity: sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==} dependencies: diff --git a/www/src/index.html b/www/src/index.html index 8538a9c..7516136 100644 --- a/www/src/index.html +++ b/www/src/index.html @@ -13,293 +13,11 @@ - - - - - - -
- - -
-
-
Editor Settings
- -
-
-
-
Editor Keyboard Bindings
-
- - - - - - - - - - -
-
-
-
Editor Cursor Style
-
- - - - - - - - - - -
-
-
- Font Size - - px -
-
-
- - -
-
-
-
- - - -
-
-
-
-
-
-
IC10 editor!
-
-
-
-
-
-
-
-
- - - -
-
-
- -
-
Instruction Pointer
-
-
-
-
-
Last Run Operations Count
-
-
-
-
-
Last State
-
-
- -
-
- -
- -
-
-
-
-
-
-
-
-

- -

-
-
-
- -
-
-
-
-
-

- -

-
-
-
-
-
-
-
-
-

- -

-
-
-
-
-
-
-
-
-
-
-
-
- - -
- - -
- - - - -
-
-
Devices
- -
-
-
-
-
+ diff --git a/www/src/index.old.html b/www/src/index.old.html new file mode 100644 index 0000000..8538a9c --- /dev/null +++ b/www/src/index.old.html @@ -0,0 +1,305 @@ + + + + + + Stationeers IC10 Emulator + + + + + + + + + + + + + + + + + + +
+ + +
+
+
Editor Settings
+ +
+
+
+
Editor Keyboard Bindings
+
+ + + + + + + + + + +
+
+
+
Editor Cursor Style
+
+ + + + + + + + + + +
+
+
+ Font Size + + px +
+
+
+ + +
+
+
+
+ + + +
+
+
+
+
+
+
IC10 editor!
+
+
+
+
+
+
+
+
+ + + +
+
+
+ +
+
Instruction Pointer
+
+
+
+
+
Last Run Operations Count
+
+
+
+
+
Last State
+
+
+ +
+
+ +
+ +
+
+
+
+
+
+
+
+

+ +

+
+
+
+ +
+
+
+
+
+

+ +

+
+
+
+
+
+
+
+
+

+ +

+
+
+
+
+
+
+
+
+
+
+
+
+ + +
+ + +
+ + + + +
+
+
Devices
+ +
+
+
+
+
+ + + diff --git a/www/src/js/app/app.ts b/www/src/js/app/app.ts new file mode 100644 index 0000000..955a850 --- /dev/null +++ b/www/src/js/app/app.ts @@ -0,0 +1,15 @@ +import { HTMLTemplateResult, html, css } from "lit"; +import { customElement, property } from "lit/decorators.js"; +import { BaseElement } from "../components"; +import "./nav.ts"; + +@customElement('ic10emu-app') +export class App extends BaseElement { + constructor() { + super(); + } + + protected render(): HTMLTemplateResult { + return html``; + } +} diff --git a/www/src/js/app/icons.ts b/www/src/js/app/icons.ts new file mode 100644 index 0000000..549b1b5 --- /dev/null +++ b/www/src/js/app/icons.ts @@ -0,0 +1,12 @@ +import { registerIconLibrary } from "@shoelace-style/shoelace/dist/utilities/icon-library.js"; + +registerIconLibrary("fa", { + resolver: (name) => { + const filename = name.replace(/^fa[rbs]-/, ""); + let folder = "regular"; + if (name.substring(0, 4) === "fas-") folder = "solid"; + if (name.substring(0, 4) === "fab-") folder = "brands"; + return `https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/svgs/${folder}/${filename}.svg`; + }, + mutator: (svg) => svg.setAttribute("fill", "currentColor"), +}); diff --git a/www/src/js/app/index.ts b/www/src/js/app/index.ts new file mode 100644 index 0000000..1c7efc7 --- /dev/null +++ b/www/src/js/app/index.ts @@ -0,0 +1,4 @@ +import { App } from "./app"; +import { Nav } from "./nav"; +import "./icons"; +export { App, Nav } diff --git a/www/src/js/app/nav.ts b/www/src/js/app/nav.ts new file mode 100644 index 0000000..3e57791 --- /dev/null +++ b/www/src/js/app/nav.ts @@ -0,0 +1,151 @@ +import { HTMLTemplateResult, html, css } from "lit"; +import { customElement, property } from "lit/decorators.js"; +import { BaseElement } from "../components"; +import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js"; +import "@shoelace-style/shoelace/dist/components/menu/menu.js"; +import "@shoelace-style/shoelace/dist/components/divider/divider.js"; +import "@shoelace-style/shoelace/dist/components/menu-item/menu-item.js"; +import "@shoelace-style/shoelace/dist/components/dropdown/dropdown.js"; + +@customElement("app-nav") +export class Nav extends BaseElement { + static styles = css` + .nav { + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; + } + .navbar { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: left; + justify-content: space-between; + padding: 0.5rem 0; + } + .navbar-nav { + display: flex; + flex-direction: column; + padding-left: 0; + margin-bottom: 0; + list-style: none; + } + .ps-2 { + padding-left: 0.5rem !important; + } + .ms-2 { + margin-left: 0.5rem !important; + } + .ms-auto { + margin-left: auto !important; + } + .flex-row { + flex-direction: row !important; + } + .d-flex { + display: flex !important; + } + @media (min-width: 768px) .d-md-flex { + display: flex !important; + } + @media (min-width: 576px) .d-sm-none { + display: none !important; + } + .d-none { + display: none !important; + } + ol, + ul, + dl { + margin-top: 0; + margin-bottom: 1rem; + } + .navbar-text { + padding: 0; + padding-right: 10px; + position: relative; + color: #fff; + } + `; + + constructor() { + super(); + } + protected render(): HTMLTemplateResult { + return html` + + `; + } +} diff --git a/www/src/js/components/base.ts b/www/src/js/components/base.ts new file mode 100644 index 0000000..b97f124 --- /dev/null +++ b/www/src/js/components/base.ts @@ -0,0 +1,7 @@ +import { LitElement, css } from "lit"; +import shoelaceDark from "@shoelace-style/shoelace/dist/themes/dark.styles.js"; + +export class BaseElement extends LitElement { + // Some default styles + static styles = shoelaceDark; +} diff --git a/www/src/js/components/index.ts b/www/src/js/components/index.ts new file mode 100644 index 0000000..5bad36b --- /dev/null +++ b/www/src/js/components/index.ts @@ -0,0 +1,3 @@ +import { BaseElement } from './base'; + +export { BaseElement } diff --git a/www/src/js/editor/index.ts b/www/src/js/editor/index.ts index 5327f83..e882bd7 100644 --- a/www/src/js/editor/index.ts +++ b/www/src/js/editor/index.ts @@ -1,19 +1,10 @@ -// import { ace } from "./ace.js" import ace from "ace-builds"; import "ace-builds/esm-resolver"; -// patch prompt ext -ace.config.setModuleLoader('ace/ext/prompt', () => import('./prompt_patch')); -ace.config.setDefaultValue("session", "theme", "ace/theme/one_dark"); - - -import "ace-builds/src-noconflict/ext-language_tools"; -ace.require("ace/ext/language_tools"); - -import "./ic10_mode"; import { AceLanguageClient } from "ace-linters/build/ace-language-client"; -import { IC10EditorUI } from './ui'; -import { Range } from 'ace-builds'; + +import { IC10EditorUI } from "./ui"; +import { Range } from "ace-builds"; import { App } from "../index"; import { Session } from "../session"; @@ -24,13 +15,12 @@ ace.config.loadModule("ace/ext/language_tools"); import { Mode as TextMode } from "ace-builds/src-noconflict/mode-text"; - async function setupLspWorker() { // Create a web worker - let worker = new Worker(new URL('./lspWorker.ts', import.meta.url)); + let worker = new Worker(new URL("./lspWorker.ts", import.meta.url)); const loaded = (w: Worker) => - new Promise(r => w.addEventListener("message", r, { once: true })); + new Promise((r) => w.addEventListener("message", r, { once: true })); await Promise.all([loaded(worker)]); // Register the editor with the language provider @@ -38,19 +28,115 @@ async function setupLspWorker() { } declare global { - interface Window { Editor: IC10Editor } + interface Window { + Editor: IC10Editor; + } } -class IC10Editor { +import { BaseElement } from "../components"; +import { html, css } from "lit"; +import { customElement, property } from "lit/decorators.js"; + +@customElement("ace-ic10") +class IC10Editor extends BaseElement { mode: string; - settings: { keyboard: string; cursor: string; fontSize: number; relativeLineNumbers: boolean; }; - aceEditor: ace.Ace.Editor; + settings: { + keyboard: string; + cursor: string; + fontSize: number; + relativeLineNumbers: boolean; + }; sessions: Map; - active_session: number; - active_line_markers: Map; - languageProvider: null | AceLanguageClient; + + @property({ type: Number }) + accessor active_session: number = 0; + + active_line_markers: Map = new Map(); + languageProvider?: AceLanguageClient; ui: IC10EditorUI; - constructor(session_id: number) { + + static styles = css` + :host { + display: block; + width: 100%; + height: 100%; + } + #editor { + border: var(--lae-border, 1px solid var(--lumo-contrast-20pct)); + border-radius: var(--lae-border-radius, var(--lumo-border-radius)); + @apply --ace-widget-editor; + } + #editorStatusbar { + z-index: 9 !important; + position: absolute !important; + right: 4px; + bottom: 4px; + } + .ace_status-indicator { + background-color: var(--las-background-color, #777); + color: var(--las-color, white); + text-align: center; + border: none; + border-radius: var(--las-border-radius, 7px); + padding-right: 3px; + padding-left: 3px; + padding-bottom: 1px; + font-size: small; + opacity: 0.9; + } + .hide_statusbar { + display: none; + } + .ace_marker-layer .green { + background-color: var(--lumo-success-color); + color: var(--lumo-primary-contrast-color); + position: absolute; + } + .ace_marker-layer .darkGrey { + background-color: var(--lumo-shade-50pct); + color: var(--lumo-primary-contrast-color); + position: absolute; + } + .ace_marker-layer .red { + background-color: var(--lumo-error-color); + color: var(--lumo-primary-contrast-color); + position: absolute; + } + .ace_marker-layer .blue { + background-color: var(--lumo-primary-color); + color: var(--lumo-primary-contrast-color); + position: absolute; + } + .ace_marker-layer .orange { + background-color: #ff9900; + color: #555; + position: absolute; + } + .ace_placeholder { + color: #808080 !important; + font-family: var(--lumo-font-family) !important; + transform: scale(1) !important; + opacity: 1 !important; + font-style: italic !important; + } + `; + initialInit: boolean; + editorDiv: HTMLElement; + editorContainerDiv: HTMLElement; + editorStatusbarDiv: HTMLElement; + editor: ace.Ace.Editor; + statusBar: any; + snippetManager: any; + observer: ResizeObserver; + private _statusbarIndex: number; + private _statusbar: any; + vScrollbarObserver: IntersectionObserver; + hScrollbarObserver: any; + + constructor() { + super(); + console.log('constructing editor') + window.Editor = this; this.mode = "ace/mode/ic10"; @@ -61,33 +147,14 @@ class IC10Editor { relativeLineNumbers: false, }; - this.aceEditor = ace.edit('editor', { - mode: this.mode, - enableBasicAutocompletion: true, - enableLiveAutocompletion: true, - enableSnippets: true, - theme: "ace/theme/one_dark", - fontSize: 16, - customScrollbar: false, - firstLineNumber: 0, - printMarginColumn: 52, - placeholder: "Your code goes here ...", - }); - this.sessions = new Map(); - this.sessions.set(session_id, this.aceEditor.getSession()); - this.active_session = session_id; - this.bindSession(session_id, this.sessions.get(session_id)); this.active_line_markers = new Map(); - this.active_line_markers.set(session_id, null); - this.languageProvider = null; - - this.ui = new IC10EditorUI(this); + // this.ui = new IC10EditorUI(this); const that = this; - App.session.onLoad((session: Session ) => { + App.session.onLoad((session: Session) => { const updated_ids = []; for (const [id, _] of session.programs) { updated_ids.push(id); @@ -99,7 +166,6 @@ class IC10Editor { that.destroySession(id); } } - }); App.session.loadFromFragment(); @@ -114,17 +180,220 @@ class IC10Editor { } const session = that.sessions.get(id); if (session) { - that.active_line_markers.set(id, session.addMarker(new Range(active_line, 0, active_line, 1), "vm_ic_active_line", "fullLine", true)); + that.active_line_markers.set( + id, + session.addMarker( + new Range(active_line, 0, active_line, 1), + "vm_ic_active_line", + "fullLine", + true, + ), + ); if (that.active_session == id) { // editor.resize(true); // TODO: Scroll to line if vm was stepped - //that.aceEditor.scrollToLine(active_line, true, true, ()=>{}) + //that.editor.scrollToLine(active_line, true, true, ()=>{}) } } } } - }) + }); + } + render() { + return html` +
+
+
+
+ `; + } + + async firstUpdated() { + console.log('editor firstUpdated') + if (!ace.require("ace/ext/language_tools")) { + await import("ace-builds/src-noconflict/ext-language_tools"); + } + if (!ace.require("ace/ext/statusbar")) { + await import("ace-builds/src-noconflict/ext-statusbar"); + } + if (!ace.require("ace/mode/ic10")) { + await import("./ic10_mode"); + } + // patch prompt ext + ace.config.setModuleLoader( + "ace/ext/prompt", + () => import("./prompt_patch"), + ); + ace.config.setDefaultValue("session", "theme", "ace/theme/one_dark"); + + this.initialInit = true; + + this.editorDiv = this.shadowRoot.getElementById("editor"); + this.editorContainerDiv = this.shadowRoot.getElementById("editorContainer"); + this.editorStatusbarDiv = this.shadowRoot.getElementById("editorStatusbar"); + + this.editor = ace.edit(this.editorDiv, { + mode: this.mode, + enableBasicAutocompletion: true, + enableLiveAutocompletion: true, + enableSnippets: true, + theme: "ace/theme/one_dark", + fontSize: 16, + customScrollbar: false, + firstLineNumber: 0, + printMarginColumn: 52, + placeholder: "Your code goes here ...", + }); + this.editor.renderer.attachToShadowRoot(); + this.statusBar = ace.require("ace/ext/statusbar").StatusBar; + this.snippetManager = ace.require("ace/snippets").snippetManager; + + this.sessions.set(this.active_session, this.editor.getSession()); + this.bindSession( + this.active_session, + this.sessions.get(this.active_session), + ); + this.active_line_markers.set(this.active_session, null); + + const worker = await setupLspWorker(); + this.setupLsp(worker); + + const that = this; + + // when the CSS resize Property is added (to a container-div or ace-ic10 ) + // the correct sizing is maintained (after user resize) + document.addEventListener("mouseup", function (e) { + that.resizeEditor(); + }); + + this.observer = new ResizeObserver(function (entries) { + entries.forEach(function (entry) { + that.resizeEditor(); + }); + }); + + this.observer.observe(this.editorContainerDiv); + + this.initializeEditor(); + } + + initializeEditor() { + let editor = this.editor; + + // change -> possibility to allow saving the value without having to wait for blur + editor.on("change", () => this.editorChangeAction()); + + this._statusbarIndex = 1; + this._statusbar = new this.statusBar( + this.editor, + this.editorStatusbarDiv, + this._statusbarIndex, + ); + this._statusbar.updateStatus(this.editor); + + this.vScrollbarObserver = new IntersectionObserver( + this._vScrollbarHandler.bind(this), + { root: null }, + ); + this.vScrollbarObserver.observe( + this.shadowRoot.querySelector(".ace_scrollbar-v"), + ); + + this.hScrollbarObserver = new IntersectionObserver( + this._hScrollbarHandler.bind(this), + { root: null }, + ); + this.hScrollbarObserver.observe( + this.shadowRoot.querySelector(".ace_scrollbar-h"), + ); + } + + resizeEditor() { + if (this.editor == undefined) { + this.addEventListener("editor-ready", () => this._resizeEditor(), { + once: true, + }); + } else { + this._resizeEditor(); + } + } + + /** @private */ + _resizeEditor() { + this.editor.resize(); + } + + /** @private */ + _vScrollbarHandler() { + var vScrollbar = this.shadowRoot.querySelector( + ".ace_scrollbar-v", + ) as HTMLDivElement; + if (vScrollbar.style.display === "none") { + this.editorStatusbarDiv.style.right = "4px"; + } else { + let width = vScrollbar.offsetWidth - vScrollbar.clientWidth; + if (width === undefined || width === null) { + width = 20; + } + this.editorStatusbarDiv.style.right = width + 4 + "px"; + } + } + + /** @private */ + _hScrollbarHandler() { + var hScrollbar = this.shadowRoot.querySelector( + ".ace_scrollbar-h", + ) as HTMLDivElement; + if (hScrollbar.style.display === "none") { + this.editorStatusbarDiv.style.bottom = "4px"; + } else { + let height = hScrollbar.offsetHeight - hScrollbar.clientHeight; + if (height === undefined || height === null) { + height = 20; + } + this.editorStatusbarDiv.style.bottom = height + 4 + "px"; + } + } + + editorChangeAction() { + this.dispatchEvent( + new CustomEvent("editor-change", { + detail: { + value: this.editorValue, + }, + }), + ); + } + + get editorValue() { + if (this.editor == undefined) { + return ""; + } + return this.editor.getValue(); + } + + set editorValue(value) { + if (this.editor == undefined || value === undefined) { + return; + } + this.editor.setValue(value, 1); + } + + focusEditor() { + if (this.editor == undefined) { + this.addEventListener("editor-ready", (e) => this.editor.focus(), { + once: true, + }); + } else { + this.editor.focus(); + } } createOrSetSession(session_id: number, content: any) { @@ -141,7 +410,7 @@ class IC10Editor { const session = ace.createEditSession("", this.mode as any); session.setOptions({ firstLineNumber: 0, - }) + }); this.sessions.set(session_id, session); this.bindSession(session_id, session); } @@ -155,12 +424,7 @@ class IC10Editor { }; // Create a language provider for web worker this.languageProvider = AceLanguageClient.for(serverData as any); - (this.languageProvider as any).registerEditor(this.aceEditor); - - // for (const session_id of this.sessions.keys()) { - // let options = {}; - // (this.languageProvider as any).setSessionOptions(this.sessions.get(session_id), options); - // } + (this.languageProvider as any).registerEditor(this.editor); } @@ -168,7 +432,7 @@ class IC10Editor { if (!this.sessions.get(session_id)) { return false; } - this.aceEditor.setSession(this.sessions.get(session_id)); + this.editor.setSession(this.sessions.get(session_id)); this.active_session = session_id; return true; } @@ -200,7 +464,7 @@ class IC10Editor { } const session = this.sessions.get(session_id); this.sessions.delete(session_id); - if (this.active_session = session_id) { + if ((this.active_session = session_id)) { this.activateSession(this.sessions.entries().next().value); } session.destroy(); @@ -208,19 +472,11 @@ class IC10Editor { } bindSession(session_id: number, session: ace.Ace.EditSession) { - session.on('change', () => { + session.on("change", () => { var val = session.getValue(); window.App.session.setProgramCode(session_id, val); }); } } - - - - - - - - -export { IC10Editor, setupLspWorker }; +export { IC10Editor }; diff --git a/www/src/js/editor/ui.ts b/www/src/js/editor/ui.ts index 4968470..469b56d 100644 --- a/www/src/js/editor/ui.ts +++ b/www/src/js/editor/ui.ts @@ -11,19 +11,19 @@ class IC10EditorUI { that.ic10editor = ic10editor; - that.ic10editor.aceEditor.commands.addCommand({ - name: "showSettingsMenu", - description: "Show settings menu", - bindKey: { win: "Ctrl-,", mac: "Command-," }, - exec: (_editor: ace.Ace.Editor) => { - const offCanvas = new Offcanvas(document.getElementById("editorSettings")); - offCanvas.toggle(); - } - } as any); + // that.ic10editor.editor.commands.addCommand({ + // name: "showSettingsMenu", + // description: "Show settings menu", + // bindKey: { win: "Ctrl-,", mac: "Command-," }, + // exec: (_editor: ace.Ace.Editor) => { + // const offCanvas = new Offcanvas(document.getElementById("editorSettings")); + // offCanvas.toggle(); + // } + // } as any); ace.config.loadModule("ace/ext/keyboard_menu", function (module) { console.log("keybinding_menu loaded"); - module.init(that.ic10editor.aceEditor); + module.init(that.ic10editor.editor); }); that.ic10editor.loadEditorSettings(); @@ -58,21 +58,17 @@ class IC10EditorUI { that.updateEditorSettings(); }); - console.log(that.ic10editor.aceEditor.getOption('keyboardHandler')); + console.log(that.ic10editor.editor.getOption('keyboardHandler')); - that.ic10editor.aceEditor.setTheme("ace/theme/one_dark"); - ace.config.loadModule("ace/ext/statusbar", function (module) { - const statusBar = new module.StatusBar(that.ic10editor.aceEditor, document.getElementById("statusBar")); - statusBar.updateStatus(that.ic10editor.aceEditor); - }); + that.ic10editor.editor.setTheme("ace/theme/one_dark"); - that.ic10editor.aceEditor.setAutoScrollEditorIntoView(true); + that.ic10editor.editor.setAutoScrollEditorIntoView(true); } updateEditorSettings() { const settings = this.ic10editor.settings; - const editor = this.ic10editor.aceEditor; + const editor = this.ic10editor.editor; if (settings.keyboard === 'ace') { editor.setOption('keyboardHandler', null); } else { @@ -96,7 +92,7 @@ class IC10EditorUI { } reCalcEditorSize() { - const editor = this.ic10editor.aceEditor; + const editor = this.ic10editor.editor; const navBar = document.getElementById("navBar"); const statusBarContainer = document.getElementById("statusBarContainer"); diff --git a/www/src/js/index.ts b/www/src/js/index.ts index 7fcea87..ffd02cf 100644 --- a/www/src/js/index.ts +++ b/www/src/js/index.ts @@ -1,71 +1,87 @@ -import { IC10Editor, setupLspWorker } from "./editor"; -import { Session } from './session'; +import { IC10Editor } from "./editor"; +import { Session } from "./session"; import { VirtualMachine } from "./virtual_machine"; import { docReady, openFile, saveFile } from "./utils"; // import { makeRequest } from "./utils"; declare global { - interface Window { App: App } + interface Window { + App: App; + } } type App = { - editorSettings: { fontSize: number, relativeLineNumbers: boolean }; editor: IC10Editor, vm: VirtualMachine, session: Session -} - + editorSettings: { fontSize: number; relativeLineNumbers: boolean }; + editor: IC10Editor; + vm: VirtualMachine; + session: Session; +}; export const App: App = { editor: null, vm: null, session: new Session(), - editorSettings: { fontSize: 16, relativeLineNumbers: false } + editorSettings: { fontSize: 16, relativeLineNumbers: false }, }; window.App = App; // const dbPromise = makeRequest({ method: "GET", url: "/data/database.json"}); // const dbPromise = fetch("/data/database.json").then(resp => resp.json()); -const dbPromise = import("../../data/database.json") +const dbPromise = import("../../data/database.json"); docReady(() => { - App.vm = new VirtualMachine(); - dbPromise.then(db => App.vm.setupDeviceDatabase(db)) + dbPromise.then((db) => App.vm.setupDeviceDatabase(db)); const init_session_id = App.vm.devices.get(0).id; - App.editor = new IC10Editor(init_session_id); - - setupLspWorker().then((worker) => { - App.editor.setupLsp(worker); - }) + // App.editor = new IC10Editor(init_session_id); + // setupLspWorker().then((worker) => { + // App.editor.setupLsp(worker); + // }); // Menu - document.getElementById("mainMenuShare").addEventListener('click', (_event) => { - const link = document.getElementById("shareLinkText") as HTMLInputElement; - link.setAttribute('value', window.location.href); - link.setSelectionRange(0, 0); - }, { capture: true }); - document.getElementById("shareLinkCopyButton").addEventListener('click', (event) => { - event.preventDefault(); - const link = document.getElementById("shareLinkText") as HTMLInputElement; - link.select(); - link.setSelectionRange(0, 99999); - navigator.clipboard.writeText(link.value); - }, { capture: true }); - document.getElementById("mainMenuOpenFile").addEventListener('click', (_event) => { - openFile(App.editor.aceEditor); - }, { capture: true }); - document.getElementById("mainMenuSaveAs").addEventListener('click', (_event) => { - saveFile(App.editor.aceEditor.getSession().getValue()) - - }, { capture: true }); - document.getElementById("mainMenuKeyboardShortcuts").addEventListener('click', (_event) => { - App.editor.aceEditor.execCommand("showKeyboardShortcuts"); - }, { capture: true }); - + document.getElementById("mainMenuShare").addEventListener( + "click", + (_event) => { + const link = document.getElementById("shareLinkText") as HTMLInputElement; + link.setAttribute("value", window.location.href); + link.setSelectionRange(0, 0); + }, + { capture: true }, + ); + document.getElementById("shareLinkCopyButton").addEventListener( + "click", + (event) => { + event.preventDefault(); + const link = document.getElementById("shareLinkText") as HTMLInputElement; + link.select(); + link.setSelectionRange(0, 99999); + navigator.clipboard.writeText(link.value); + }, + { capture: true }, + ); + document.getElementById("mainMenuOpenFile").addEventListener( + "click", + (_event) => { + openFile(App.editor.editor); + }, + { capture: true }, + ); + document.getElementById("mainMenuSaveAs").addEventListener( + "click", + (_event) => { + saveFile(App.editor.editor.getSession().getValue()); + }, + { capture: true }, + ); + document.getElementById("mainMenuKeyboardShortcuts").addEventListener( + "click", + (_event) => { + App.editor.editor.execCommand("showKeyboardShortcuts"); + }, + { capture: true }, + ); }); - - - - diff --git a/www/src/js/main.ts b/www/src/js/main.ts index 84b6acc..2d82601 100644 --- a/www/src/js/main.ts +++ b/www/src/js/main.ts @@ -1,10 +1,10 @@ - -import '@popperjs/core'; -import '../scss/styles.scss'; -import { Dropdown, Modal } from 'bootstrap'; +import "@popperjs/core"; +import "../scss/styles.scss"; +import { Dropdown, Modal } from "bootstrap"; +import "./app"; // A dependency graph that contains any wasm must all be imported // asynchronously. This `main.js` file does the single async import, so // that no one else needs to worry about it again. -import("./index") - .catch(e => console.error("Error importing `index.ts`:", e)); +// import("./index") +// .catch(e => console.error("Error importing `index.ts`:", e)); diff --git a/www/src/js/session.ts b/www/src/js/session.ts index 652ad5b..f3be3f4 100644 --- a/www/src/js/session.ts +++ b/www/src/js/session.ts @@ -3,20 +3,20 @@ const demoCode = `# Highlighting Demo # This is a comment # Hover a define id anywhere to see it's definition -define a_def 10 +define a_def 10 # Hover HASH("String")'s to see computed crc32 # hover here vvvvvvvvvvvvvvvv -define a_hash HASH("This is a String") +define a_hash HASH("This is a String") # hover over an alias anywhere in the code # to see it's definition -alias a_var r0 +alias a_var r0 alias a_device d0 -# instructions have Auto Completion, +# instructions have Auto Completion, # numeric logic types are identified on hover -s db 12 0 +s db 12 0 # ^^ # hover here @@ -42,9 +42,9 @@ move r0 HASH("AccessCardBlack") push r0 beqzal r1 test -# -2045627372 is the crc32 hash of a SolarPanel, +# -2045627372 is the crc32 hash of a SolarPanel, # hover it to see the documentation! -# vvvvvvvvvv +# vvvvvvvvvv move r1 -2045627372 jal test move r1 $FF @@ -65,7 +65,7 @@ interface SessionCbFn { (param: Session): void; } -class Session { +class Session extends EventTarget { _programs: Map; _onLoadCallbacks: SessionCbFn[]; _activeSession: number; @@ -74,6 +74,7 @@ class Session { _activeLine: number; private _save_timeout: ReturnType; constructor() { + super(); this._programs = new Map(); this._save_timeout = null; this._onLoadCallbacks = []; diff --git a/www/src/js/virtual_machine/index.ts b/www/src/js/virtual_machine/index.ts index c6e049c..f529d6c 100644 --- a/www/src/js/virtual_machine/index.ts +++ b/www/src/js/virtual_machine/index.ts @@ -112,7 +112,7 @@ class VirtualMachine { const ic = this.activeIC; if (ic) { try { - ic.step(); + ic.step(false); } catch (e) { console.log(e); } diff --git a/www/tsconfig.json b/www/tsconfig.json index e91f392..90d4261 100644 --- a/www/tsconfig.json +++ b/www/tsconfig.json @@ -8,6 +8,11 @@ "allowJs": true, "moduleResolution": "bundler", "resolveJsonModule": true, - "types": ["@types/wicg-file-system-access", "@types/ace"] + "types": ["@types/wicg-file-system-access", "@types/ace"], + "plugins": [ + { + "name": "ts-lit-plugin" + } + ] } } diff --git a/www/webpack.config.js b/www/webpack.config.js index 255d8e9..f92b13f 100644 --- a/www/webpack.config.js +++ b/www/webpack.config.js @@ -36,7 +36,7 @@ module.exports = { type: 'asset/resource', }, { - test: /\.(scss)$/, + test: /\.(s?css)$/, use: [{ // inject CSS to page loader: miniCssExtractPlugin.loader