From 9b5421a7febd1f57cbd504855ea375eec5d57843 Mon Sep 17 00:00:00 2001 From: Jeroen Claassens Date: Fri, 27 Jan 2023 01:05:36 +0100 Subject: [PATCH] feat: finish all but state handling of live demo --- .eslintrc.js | 3 +- .prettierrc.js | 1 - docs/.vuepress/client.ts | 27 ++ docs/.vuepress/components/Demo/Demo.vue | 419 +++++++---------- .../components/Demo/MonacoEditor.vue | 83 ++++ docs/.vuepress/tsconfig.json | 10 + docs/demo.md | 9 +- package-lock.json | 431 ++---------------- package.json | 9 +- 9 files changed, 339 insertions(+), 653 deletions(-) create mode 100644 docs/.vuepress/components/Demo/MonacoEditor.vue create mode 100644 docs/.vuepress/tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js index 51bf28852..7557fc480 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -18,7 +18,6 @@ module.exports = { rules: { 'no-console': process.env.NODE_ENV !== 'production' ? 0 : 2, 'no-useless-escape': 0, - 'no-empty': 0, - indent: ['error', 2] + 'no-empty': 0 } } diff --git a/.prettierrc.js b/.prettierrc.js index d0bd2e224..df9510243 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -11,5 +11,4 @@ module.exports = { } } ] - // htmlWhitespaceSensitivity: false } diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index 786c21782..0089c5873 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -1,7 +1,28 @@ import { defineClientConfig } from '@vuepress/client' +// @ts-expect-error monaco editor doesn't have types for the workers +import editorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker' +// @ts-expect-error monaco editor doesn't have types for the workers +import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker' +// @ts-expect-error monaco editor doesn't have types for the workers +import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker' + export default defineClientConfig({ enhance({ router }) { + self.MonacoEnvironment = { + getWorker(_, label) { + switch (label) { + case 'json': + return new jsonWorker() + case 'typescript': + case 'javascript': + return new tsWorker() + default: + return editorWorker() + } + } + } + router.addRoute('/', { path: '/ads.txt', redirect: '', @@ -19,3 +40,9 @@ export default defineClientConfig({ }) } }) + +declare global { + interface Window { + MonacoEnvironment?: import('monaco-editor').Environment | undefined + } +} diff --git a/docs/.vuepress/components/Demo/Demo.vue b/docs/.vuepress/components/Demo/Demo.vue index 778dcd660..66b9a6c7c 100644 --- a/docs/.vuepress/components/Demo/Demo.vue +++ b/docs/.vuepress/components/Demo/Demo.vue @@ -1,300 +1,211 @@ - - diff --git a/docs/.vuepress/components/Demo/MonacoEditor.vue b/docs/.vuepress/components/Demo/MonacoEditor.vue new file mode 100644 index 000000000..8a3c263c3 --- /dev/null +++ b/docs/.vuepress/components/Demo/MonacoEditor.vue @@ -0,0 +1,83 @@ + + + + + diff --git a/docs/.vuepress/tsconfig.json b/docs/.vuepress/tsconfig.json new file mode 100644 index 000000000..6b6f0f5ba --- /dev/null +++ b/docs/.vuepress/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "module": "ESNext", + "target": "es2016", + "incremental": true, + "lib": ["DOM", "ESNext"] + }, + "include": ["."] +} diff --git a/docs/demo.md b/docs/demo.md index c7dab0d05..eabdb735d 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -4,13 +4,6 @@ Play around with a live demo of Fuse.js. Have a look at the [options](api/options.html) to understand what they mean. - - - - - + diff --git a/package-lock.json b/package-lock.json index 0810c90b5..740fe383a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,33 +15,30 @@ "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/theme-one-dark": "^6.1.0", "@commitlint/cli": "^17.4.2", "@commitlint/config-conventional": "^17.4.2", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-replace": "^5.0.2", + "@sapphire/stopwatch": "^1.5.0", "@snippetors/vuepress-plugin-tabs": "1.2.3", "@vuepress/plugin-google-analytics": "2.0.0-beta.60", "@vuepress/plugin-pwa": "2.0.0-beta.60", "@vuepress/plugin-register-components": "2.0.0-beta.60", "@vuepress/plugin-search": "2.0.0-beta.60", "babel-loader": "^9.1.2", - "codemirror": "6.0.1", "eslint": "8.32.0", "eslint-config-prettier": "8.6.0", "husky": "^8.0.3", + "monaco-editor": "^0.34.1", "prettier": "2.8.3", - "prismjs": "^1.29.0", "replace-in-file": "^6.3.5", "rollup": "^2.79.1", "rollup-plugin-copy": "3.4.0", "standard-version": "^9.5.0", "terser": "^5.16.1", "typescript": "^4.9.4", - "vitest": "^0.28.1", - "vue-codemirror": "^6.1.1", + "vitest": "^0.28.2", "vuepress": "2.0.0-beta.60", "vuepress-plugin-google-adsense2": "1.0.2" }, @@ -1762,116 +1759,6 @@ "node": ">=6.9.0" } }, - "node_modules/@codemirror/autocomplete": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.4.0.tgz", - "integrity": "sha512-HLF2PnZAm1s4kGs30EiqKMgD7XsYaQ0XJnMR0rofEWQ5t5D60SfqpDIkIh1ze5tiEbyUWm8+VJ6W1/erVvBMIA==", - "dev": true, - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.6.0", - "@lezer/common": "^1.0.0" - }, - "peerDependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@codemirror/commands": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.2.0.tgz", - "integrity": "sha512-+00smmZBradoGFEkRjliN7BjqPh/Hx0KCHWOEibUmflUqZz2RwBTU0MrVovEEHozhx3AUSGcO/rl3/5f9e9Biw==", - "dev": true, - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.2.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@codemirror/lang-javascript": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.2.tgz", - "integrity": "sha512-OcwLfZXdQ1OHrLiIcKCn7MqZ7nx205CMKlhe+vL88pe2ymhT9+2P+QhwkYGxMICj8TDHyp8HFKVwpiisUT7iEQ==", - "dev": true, - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/javascript": "^1.0.0" - } - }, - "node_modules/@codemirror/language": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.4.0.tgz", - "integrity": "sha512-Wzb7GnNj8vnEtbPWiOy9H0m1fBtE28kepQNGLXekU2EEZv43BF865VKITUn+NoV8OpW6gRtvm29YEhqm46927Q==", - "dev": true, - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0", - "style-mod": "^4.0.0" - } - }, - "node_modules/@codemirror/lint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.1.0.tgz", - "integrity": "sha512-mdvDQrjRmYPvQ3WrzF6Ewaao+NWERYtpthJvoQ3tK3t/44Ynhk8ZGjTSL9jMEv8CgSMogmt75X8ceOZRDSXHtQ==", - "dev": true, - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "crelt": "^1.0.5" - } - }, - "node_modules/@codemirror/search": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.2.3.tgz", - "integrity": "sha512-V9n9233lopQhB1dyjsBK2Wc1i+8hcCqxl1wQ46c5HWWLePoe4FluV3TGHoZ04rBRlGjNyz9DTmpJErig8UE4jw==", - "dev": true, - "dependencies": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "crelt": "^1.0.5" - } - }, - "node_modules/@codemirror/state": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.2.0.tgz", - "integrity": "sha512-69QXtcrsc3RYtOtd+GsvczJ319udtBf1PTrr2KbLWM/e2CXUPnh0Nz9AUo8WfhSQ7GeL8dPVNUmhQVgpmuaNGA==", - "dev": true - }, - "node_modules/@codemirror/theme-one-dark": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.0.tgz", - "integrity": "sha512-AiTHtFRu8+vWT9wWUWDM+cog6ZwgivJogB1Tm/g40NIpLwph7AnmxrSzWfvJN5fBVufsuwBxecQCNmdcR5D7Aw==", - "dev": true, - "dependencies": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/highlight": "^1.0.0" - } - }, - "node_modules/@codemirror/view": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.7.3.tgz", - "integrity": "sha512-Lt+4POnhXrZFfHOdPzXEHxrzwdy7cjqYlMkOWvoFGi6/bAsjzlFfr0NY3B15B/PGx+cDFgM1hlc12wvYeZbGLw==", - "dev": true, - "dependencies": { - "@codemirror/state": "^6.1.4", - "style-mod": "^4.0.0", - "w3c-keyname": "^2.2.4" - } - }, "node_modules/@commitlint/cli": { "version": "17.4.2", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.4.2.tgz", @@ -2584,40 +2471,6 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, - "node_modules/@lezer/common": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.2.tgz", - "integrity": "sha512-SVgiGtMnMnW3ActR8SXgsDhw7a0w0ChHSYAyAUxxrOiJ1OqYWEKk/xJd84tTSPo1mo6DXLObAJALNnd0Hrv7Ng==", - "dev": true - }, - "node_modules/@lezer/highlight": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.1.3.tgz", - "integrity": "sha512-3vLKLPThO4td43lYRBygmMY18JN3CPh9w+XS2j8WC30vR4yZeFG4z1iFe4jXE43NtGqe//zHW5q8ENLlHvz9gw==", - "dev": true, - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, - "node_modules/@lezer/javascript": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.1.tgz", - "integrity": "sha512-Hqx36DJeYhKtdpc7wBYPR0XF56ZzIp0IkMO/zNNj80xcaFOV4Oj/P7TQc/8k2TxNhzl7tV5tXS8ZOCPbT4L3nA==", - "dev": true, - "dependencies": { - "@lezer/highlight": "^1.1.3", - "@lezer/lr": "^1.3.0" - } - }, - "node_modules/@lezer/lr": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.3.1.tgz", - "integrity": "sha512-+GymJB/+3gThkk2zHwseaJTI5oa4AuOuj1I2LCslAVq1dFZLSX8SAe4ZlJq1TjezteDXtF/+d4qeWz9JvnrG9Q==", - "dev": true, - "dependencies": { - "@lezer/common": "^1.0.0" - } - }, "node_modules/@mdit-vue/plugin-component": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/@mdit-vue/plugin-component/-/plugin-component-0.11.2.tgz", @@ -2849,6 +2702,19 @@ } } }, + "node_modules/@sapphire/stopwatch": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/stopwatch/-/stopwatch-1.5.0.tgz", + "integrity": "sha512-DtyKugdy3JTqm6JnEepTY64fGJAqlusDVrlrzifEgSCfGYCqpvB+SBldkWtDH+z+zLcp+PyaFLq7xpVfkhmvGg==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + }, + "engines": { + "node": ">=v14.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/@snippetors/vuepress-plugin-tabs": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@snippetors/vuepress-plugin-tabs/-/vuepress-plugin-tabs-1.2.3.tgz", @@ -4415,21 +4281,6 @@ "node": ">=0.8" } }, - "node_modules/codemirror": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.1.tgz", - "integrity": "sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==", - "dev": true, - "dependencies": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/commands": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/search": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" - } - }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -4976,12 +4827,6 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "node_modules/crelt": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz", - "integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==", - "dev": true - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -8023,6 +7868,12 @@ "node": ">=0.10.0" } }, + "node_modules/monaco-editor": { + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.34.1.tgz", + "integrity": "sha512-FKc80TyiMaruhJKKPz5SpJPIjL+dflGvz4CpuThaPMc94AyN7SeC9HQ8hrvaxX7EyHdJcUY5i4D0gNyJj1vSZQ==", + "dev": true + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -9968,12 +9819,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/style-mod": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz", - "integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==", - "dev": true - }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -10203,6 +10048,12 @@ } } }, + "node_modules/tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -10605,22 +10456,6 @@ "@vue/shared": "3.2.45" } }, - "node_modules/vue-codemirror": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/vue-codemirror/-/vue-codemirror-6.1.1.tgz", - "integrity": "sha512-rTAYo44owd282yVxKtJtnOi7ERAcXTeviwoPXjIc6K/IQYUsoDkzPvw/JDFtSP6T7Cz/2g3EHaEyeyaQCKoDMg==", - "dev": true, - "dependencies": { - "@codemirror/commands": "6.x", - "@codemirror/language": "6.x", - "@codemirror/state": "6.x", - "@codemirror/view": "6.x" - }, - "peerDependencies": { - "codemirror": "6.x", - "vue": "3.x" - } - }, "node_modules/vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", @@ -10706,12 +10541,6 @@ "vue": "^3.2.45" } }, - "node_modules/w3c-keyname": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz", - "integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg==", - "dev": true - }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -12539,110 +12368,6 @@ "to-fast-properties": "^2.0.0" } }, - "@codemirror/autocomplete": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.4.0.tgz", - "integrity": "sha512-HLF2PnZAm1s4kGs30EiqKMgD7XsYaQ0XJnMR0rofEWQ5t5D60SfqpDIkIh1ze5tiEbyUWm8+VJ6W1/erVvBMIA==", - "dev": true, - "requires": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.6.0", - "@lezer/common": "^1.0.0" - } - }, - "@codemirror/commands": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.2.0.tgz", - "integrity": "sha512-+00smmZBradoGFEkRjliN7BjqPh/Hx0KCHWOEibUmflUqZz2RwBTU0MrVovEEHozhx3AUSGcO/rl3/5f9e9Biw==", - "dev": true, - "requires": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.2.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0" - } - }, - "@codemirror/lang-javascript": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-javascript/-/lang-javascript-6.1.2.tgz", - "integrity": "sha512-OcwLfZXdQ1OHrLiIcKCn7MqZ7nx205CMKlhe+vL88pe2ymhT9+2P+QhwkYGxMICj8TDHyp8HFKVwpiisUT7iEQ==", - "dev": true, - "requires": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/javascript": "^1.0.0" - } - }, - "@codemirror/language": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.4.0.tgz", - "integrity": "sha512-Wzb7GnNj8vnEtbPWiOy9H0m1fBtE28kepQNGLXekU2EEZv43BF865VKITUn+NoV8OpW6gRtvm29YEhqm46927Q==", - "dev": true, - "requires": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/common": "^1.0.0", - "@lezer/highlight": "^1.0.0", - "@lezer/lr": "^1.0.0", - "style-mod": "^4.0.0" - } - }, - "@codemirror/lint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.1.0.tgz", - "integrity": "sha512-mdvDQrjRmYPvQ3WrzF6Ewaao+NWERYtpthJvoQ3tK3t/44Ynhk8ZGjTSL9jMEv8CgSMogmt75X8ceOZRDSXHtQ==", - "dev": true, - "requires": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "crelt": "^1.0.5" - } - }, - "@codemirror/search": { - "version": "6.2.3", - "resolved": "https://registry.npmjs.org/@codemirror/search/-/search-6.2.3.tgz", - "integrity": "sha512-V9n9233lopQhB1dyjsBK2Wc1i+8hcCqxl1wQ46c5HWWLePoe4FluV3TGHoZ04rBRlGjNyz9DTmpJErig8UE4jw==", - "dev": true, - "requires": { - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "crelt": "^1.0.5" - } - }, - "@codemirror/state": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.2.0.tgz", - "integrity": "sha512-69QXtcrsc3RYtOtd+GsvczJ319udtBf1PTrr2KbLWM/e2CXUPnh0Nz9AUo8WfhSQ7GeL8dPVNUmhQVgpmuaNGA==", - "dev": true - }, - "@codemirror/theme-one-dark": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.0.tgz", - "integrity": "sha512-AiTHtFRu8+vWT9wWUWDM+cog6ZwgivJogB1Tm/g40NIpLwph7AnmxrSzWfvJN5fBVufsuwBxecQCNmdcR5D7Aw==", - "dev": true, - "requires": { - "@codemirror/language": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0", - "@lezer/highlight": "^1.0.0" - } - }, - "@codemirror/view": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.7.3.tgz", - "integrity": "sha512-Lt+4POnhXrZFfHOdPzXEHxrzwdy7cjqYlMkOWvoFGi6/bAsjzlFfr0NY3B15B/PGx+cDFgM1hlc12wvYeZbGLw==", - "dev": true, - "requires": { - "@codemirror/state": "^6.1.4", - "style-mod": "^4.0.0", - "w3c-keyname": "^2.2.4" - } - }, "@commitlint/cli": { "version": "17.4.2", "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-17.4.2.tgz", @@ -13184,40 +12909,6 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, - "@lezer/common": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.2.tgz", - "integrity": "sha512-SVgiGtMnMnW3ActR8SXgsDhw7a0w0ChHSYAyAUxxrOiJ1OqYWEKk/xJd84tTSPo1mo6DXLObAJALNnd0Hrv7Ng==", - "dev": true - }, - "@lezer/highlight": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.1.3.tgz", - "integrity": "sha512-3vLKLPThO4td43lYRBygmMY18JN3CPh9w+XS2j8WC30vR4yZeFG4z1iFe4jXE43NtGqe//zHW5q8ENLlHvz9gw==", - "dev": true, - "requires": { - "@lezer/common": "^1.0.0" - } - }, - "@lezer/javascript": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.1.tgz", - "integrity": "sha512-Hqx36DJeYhKtdpc7wBYPR0XF56ZzIp0IkMO/zNNj80xcaFOV4Oj/P7TQc/8k2TxNhzl7tV5tXS8ZOCPbT4L3nA==", - "dev": true, - "requires": { - "@lezer/highlight": "^1.1.3", - "@lezer/lr": "^1.3.0" - } - }, - "@lezer/lr": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.3.1.tgz", - "integrity": "sha512-+GymJB/+3gThkk2zHwseaJTI5oa4AuOuj1I2LCslAVq1dFZLSX8SAe4ZlJq1TjezteDXtF/+d4qeWz9JvnrG9Q==", - "dev": true, - "requires": { - "@lezer/common": "^1.0.0" - } - }, "@mdit-vue/plugin-component": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/@mdit-vue/plugin-component/-/plugin-component-0.11.2.tgz", @@ -13391,6 +13082,15 @@ "picomatch": "^2.3.1" } }, + "@sapphire/stopwatch": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@sapphire/stopwatch/-/stopwatch-1.5.0.tgz", + "integrity": "sha512-DtyKugdy3JTqm6JnEepTY64fGJAqlusDVrlrzifEgSCfGYCqpvB+SBldkWtDH+z+zLcp+PyaFLq7xpVfkhmvGg==", + "dev": true, + "requires": { + "tslib": "^2.4.0" + } + }, "@snippetors/vuepress-plugin-tabs": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/@snippetors/vuepress-plugin-tabs/-/vuepress-plugin-tabs-1.2.3.tgz", @@ -14653,21 +14353,6 @@ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", "dev": true }, - "codemirror": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.1.tgz", - "integrity": "sha512-J8j+nZ+CdWmIeFIGXEFbFPtpiYacFMDR8GlHK3IyHQJMCaVRfGx9NT+Hxivv1ckLWPvNdZqndbr/7lVhrf/Svg==", - "dev": true, - "requires": { - "@codemirror/autocomplete": "^6.0.0", - "@codemirror/commands": "^6.0.0", - "@codemirror/language": "^6.0.0", - "@codemirror/lint": "^6.0.0", - "@codemirror/search": "^6.0.0", - "@codemirror/state": "^6.0.0", - "@codemirror/view": "^6.0.0" - } - }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -15101,12 +14786,6 @@ "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", "dev": true }, - "crelt": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz", - "integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==", - "dev": true - }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -17367,6 +17046,12 @@ "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", "dev": true }, + "monaco-editor": { + "version": "0.34.1", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.34.1.tgz", + "integrity": "sha512-FKc80TyiMaruhJKKPz5SpJPIjL+dflGvz4CpuThaPMc94AyN7SeC9HQ8hrvaxX7EyHdJcUY5i4D0gNyJj1vSZQ==", + "dev": true + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -18784,12 +18469,6 @@ "acorn": "^8.8.1" } }, - "style-mod": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz", - "integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==", - "dev": true - }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -18953,6 +18632,12 @@ "yn": "3.1.1" } }, + "tslib": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", + "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "dev": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -19203,18 +18888,6 @@ "@vue/shared": "3.2.45" } }, - "vue-codemirror": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/vue-codemirror/-/vue-codemirror-6.1.1.tgz", - "integrity": "sha512-rTAYo44owd282yVxKtJtnOi7ERAcXTeviwoPXjIc6K/IQYUsoDkzPvw/JDFtSP6T7Cz/2g3EHaEyeyaQCKoDMg==", - "dev": true, - "requires": { - "@codemirror/commands": "6.x", - "@codemirror/language": "6.x", - "@codemirror/state": "6.x", - "@codemirror/view": "6.x" - } - }, "vue-demi": { "version": "0.13.11", "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.13.11.tgz", @@ -19263,12 +18936,6 @@ "@vuepress/theme-default": "2.0.0-beta.60" } }, - "w3c-keyname": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz", - "integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg==", - "dev": true - }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/package.json b/package.json index b7ca9a918..2707a24bf 100644 --- a/package.json +++ b/package.json @@ -59,33 +59,30 @@ "@babel/plugin-proposal-object-rest-spread": "7.20.7", "@babel/preset-env": "7.20.2", "@babel/preset-typescript": "7.18.6", - "@codemirror/lang-javascript": "^6.1.2", - "@codemirror/theme-one-dark": "^6.1.0", "@commitlint/cli": "^17.4.2", "@commitlint/config-conventional": "^17.4.2", "@rollup/plugin-babel": "^6.0.3", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-replace": "^5.0.2", + "@sapphire/stopwatch": "^1.5.0", "@snippetors/vuepress-plugin-tabs": "1.2.3", "@vuepress/plugin-google-analytics": "2.0.0-beta.60", "@vuepress/plugin-pwa": "2.0.0-beta.60", "@vuepress/plugin-register-components": "2.0.0-beta.60", "@vuepress/plugin-search": "2.0.0-beta.60", "babel-loader": "^9.1.2", - "codemirror": "6.0.1", "eslint": "8.32.0", "eslint-config-prettier": "8.6.0", "husky": "^8.0.3", + "monaco-editor": "^0.34.1", "prettier": "2.8.3", - "prismjs": "^1.29.0", "replace-in-file": "^6.3.5", "rollup": "^2.79.1", "rollup-plugin-copy": "3.4.0", "standard-version": "^9.5.0", "terser": "^5.16.1", "typescript": "^4.9.4", - "vitest": "^0.28.1", - "vue-codemirror": "^6.1.1", + "vitest": "^0.28.2", "vuepress": "2.0.0-beta.60", "vuepress-plugin-google-adsense2": "1.0.2" },