diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index e679de3..53615d8 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,5 +1,7 @@ const anchorPlugin = require('markdown-it-anchor') const { viteBundler } = require('@vuepress/bundler-vite'); +const { shikiPlugin } = require('@vuepress/plugin-shiki') + const defaultTheme = require('./theme') const { path } = require('@vuepress/utils') @@ -73,7 +75,8 @@ module.exports = { }, ), plugins: [ - ["@vuepress/plugin-prismjs", true], + ["@vuepress/plugin-prismjs", false], + shikiPlugin({ theme: 'dark-plus' }) // https://github.com/shikijs/shiki/blob/main/docs/themes.md // ["@vuepress/plugin-shiki", { // theme: 'material-default' diff --git a/package-lock.json b/package-lock.json index d94aec3..1d25bec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "MIT", "devDependencies": { "@discue/ui-components": "^0.8.0", + "@vuepress/plugin-shiki": "^2.0.0-beta.5", "firebase-tools": "^10.9.0", "markdown-it-anchor": "^8.6.3", "markdown-it-attrs": "^4.1.4", @@ -201,6 +202,12 @@ "@types/node": "*" } }, + "node_modules/@types/hash-sum": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/hash-sum/-/hash-sum-1.0.0.tgz", + "integrity": "sha512-FdLBT93h3kcZ586Aee66HPCVJ6qvxVjBlDWNmxSGSbCZe9hTsjRKdSsl4y1T+3zfujxo9auykQMnFsfyHWD7wg==", + "dev": true + }, "node_modules/@types/linkify-it": { "version": "3.0.2", "dev": true, @@ -614,6 +621,107 @@ "prismjs": "^1.27.0" } }, + "node_modules/@vuepress/plugin-shiki": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-shiki/-/plugin-shiki-2.0.0-beta.5.tgz", + "integrity": "sha512-HxurQBQfz9/MRvGWLffkcvsFXKTGbrp8soXCpbJd19aPLXJBiG3tTisEpB++Veu9bDoGVcro77c8NK2VqY6X7Q==", + "dev": true, + "dependencies": { + "@vuepress/core": "2.0.0-beta.5", + "shiki": "^0.9.3" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/@vuepress/client": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/client/-/client-2.0.0-beta.5.tgz", + "integrity": "sha512-vy7a1qj6qLk1Vgttj8eYZlYKfzrC2vTBdbnhDAhBCMNdreYz2/YcwNHhppT0rTcKgq9rrxSRVlhqjovI55z2Nw==", + "dev": true, + "dependencies": { + "@vuepress/shared": "2.0.0-beta.4", + "vue": "^3.0.7", + "vue-router": "^4.0.5" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/@vuepress/core": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/core/-/core-2.0.0-beta.5.tgz", + "integrity": "sha512-wAJ3ELFPqWDCH3UaezbleWYsk4KG1TmVdmKAs5rtmC6rUAeXCBDvY1+UjfEHE2Cc/YHWpY3QoQcKHA5TPuyuMg==", + "dev": true, + "dependencies": { + "@vuepress/client": "2.0.0-beta.5", + "@vuepress/markdown": "2.0.0-beta.5", + "@vuepress/shared": "2.0.0-beta.4", + "@vuepress/utils": "2.0.0-beta.5", + "gray-matter": "^4.0.2", + "toml": "^3.0.0" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/@vuepress/markdown": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/markdown/-/markdown-2.0.0-beta.5.tgz", + "integrity": "sha512-V7SSrijXL9KAlD6YSsJwtX0F8clW8Mk/oamctuZKnlVR/LDuM7u8OUMkGFXft4dZx86vt+mpPM6Uo5eXzOTJNQ==", + "dev": true, + "dependencies": { + "@types/markdown-it": "^12.0.1", + "@vuepress/shared": "2.0.0-beta.4", + "@vuepress/utils": "2.0.0-beta.5", + "markdown-it": "^12.0.4", + "markdown-it-anchor": "^7.1.0", + "markdown-it-emoji": "^2.0.0" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/@vuepress/shared": { + "version": "2.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@vuepress/shared/-/shared-2.0.0-beta.4.tgz", + "integrity": "sha512-dfI735llPZ3GSAcTT7HqtBXqgn6nG/j7D9sUcZ0vxzHRUvz2NvrQnO5bsgTD6gFmb+o51y5kPpklrgjTpk2Mug==", + "dev": true, + "dependencies": { + "@vue/shared": "^3.0.7" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/@vuepress/utils": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/utils/-/utils-2.0.0-beta.5.tgz", + "integrity": "sha512-tpJvumHtvnA0vSiGnwF3p8zBk/9cNdZR9RmlcRF/+aDW3dcLxOv0P+EARtXxLDuezZiRxw0uf+l9Pb3pXFSiTQ==", + "dev": true, + "dependencies": { + "@types/debug": "^4.1.5", + "@types/fs-extra": "^9.0.8", + "@types/hash-sum": "^1.0.0", + "@vuepress/shared": "2.0.0-beta.4", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "fs-extra": "^9.1.0", + "globby": "^11.0.2", + "hash-sum": "^2.0.0", + "ora": "^5.4.0", + "upath": "^2.0.1" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "dependencies": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@vuepress/plugin-shiki/node_modules/markdown-it-anchor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-7.1.0.tgz", + "integrity": "sha512-loQggrwsIkkP7TOrESvmYkV2ikbQNNKhHcWyqC7/C2CmfHl1tkUizJJU8C5aGgg7J6oXVQJx17gk7i47tNn/lQ==", + "dev": true, + "peerDependencies": { + "markdown-it": "*" + } + }, "node_modules/@vuepress/plugin-theme-data": { "version": "2.0.0-beta.43", "dev": true, @@ -856,6 +964,15 @@ "node": ">=0.10.0" } }, + "node_modules/at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, "node_modules/autoprefixer": { "version": "10.4.7", "dev": true, @@ -1857,7 +1974,6 @@ "version": "2.1.0", "dev": true, "license": "BSD-2-Clause", - "peer": true, "funding": { "url": "https://github.com/fb55/entities?sponsor=1" } @@ -16981,6 +17097,12 @@ "dev": true, "license": "ISC" }, + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, "node_modules/jsonfile": { "version": "6.1.0", "dev": true, @@ -17059,7 +17181,6 @@ "version": "3.0.3", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "uc.micro": "^1.0.1" } @@ -17189,7 +17310,6 @@ "version": "12.3.2", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "argparse": "^2.0.1", "entities": "~2.1.0", @@ -17234,8 +17354,7 @@ "node_modules/markdown-it/node_modules/argparse": { "version": "2.0.1", "dev": true, - "license": "Python-2.0", - "peer": true + "license": "Python-2.0" }, "node_modules/mdurl": { "version": "1.0.1", @@ -18495,6 +18614,17 @@ "node": ">=8" } }, + "node_modules/shiki": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.15.tgz", + "integrity": "sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==", + "dev": true, + "dependencies": { + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" + } + }, "node_modules/signal-exit": { "version": "3.0.7", "dev": true, @@ -19108,6 +19238,18 @@ } } }, + "node_modules/vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, "node_modules/vue": { "version": "3.2.33", "dev": true, @@ -19461,6 +19603,12 @@ "@types/node": "*" } }, + "@types/hash-sum": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/hash-sum/-/hash-sum-1.0.0.tgz", + "integrity": "sha512-FdLBT93h3kcZ586Aee66HPCVJ6qvxVjBlDWNmxSGSbCZe9hTsjRKdSsl4y1T+3zfujxo9auykQMnFsfyHWD7wg==", + "dev": true + }, "@types/linkify-it": { "version": "3.0.2", "dev": true @@ -19807,6 +19955,104 @@ "prismjs": "^1.27.0" } }, + "@vuepress/plugin-shiki": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/plugin-shiki/-/plugin-shiki-2.0.0-beta.5.tgz", + "integrity": "sha512-HxurQBQfz9/MRvGWLffkcvsFXKTGbrp8soXCpbJd19aPLXJBiG3tTisEpB++Veu9bDoGVcro77c8NK2VqY6X7Q==", + "dev": true, + "requires": { + "@vuepress/core": "2.0.0-beta.5", + "shiki": "^0.9.3" + }, + "dependencies": { + "@vuepress/client": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/client/-/client-2.0.0-beta.5.tgz", + "integrity": "sha512-vy7a1qj6qLk1Vgttj8eYZlYKfzrC2vTBdbnhDAhBCMNdreYz2/YcwNHhppT0rTcKgq9rrxSRVlhqjovI55z2Nw==", + "dev": true, + "requires": { + "@vuepress/shared": "2.0.0-beta.4", + "vue": "^3.0.7", + "vue-router": "^4.0.5" + } + }, + "@vuepress/core": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/core/-/core-2.0.0-beta.5.tgz", + "integrity": "sha512-wAJ3ELFPqWDCH3UaezbleWYsk4KG1TmVdmKAs5rtmC6rUAeXCBDvY1+UjfEHE2Cc/YHWpY3QoQcKHA5TPuyuMg==", + "dev": true, + "requires": { + "@vuepress/client": "2.0.0-beta.5", + "@vuepress/markdown": "2.0.0-beta.5", + "@vuepress/shared": "2.0.0-beta.4", + "@vuepress/utils": "2.0.0-beta.5", + "gray-matter": "^4.0.2", + "toml": "^3.0.0" + } + }, + "@vuepress/markdown": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/markdown/-/markdown-2.0.0-beta.5.tgz", + "integrity": "sha512-V7SSrijXL9KAlD6YSsJwtX0F8clW8Mk/oamctuZKnlVR/LDuM7u8OUMkGFXft4dZx86vt+mpPM6Uo5eXzOTJNQ==", + "dev": true, + "requires": { + "@types/markdown-it": "^12.0.1", + "@vuepress/shared": "2.0.0-beta.4", + "@vuepress/utils": "2.0.0-beta.5", + "markdown-it": "^12.0.4", + "markdown-it-anchor": "^7.1.0", + "markdown-it-emoji": "^2.0.0" + } + }, + "@vuepress/shared": { + "version": "2.0.0-beta.4", + "resolved": "https://registry.npmjs.org/@vuepress/shared/-/shared-2.0.0-beta.4.tgz", + "integrity": "sha512-dfI735llPZ3GSAcTT7HqtBXqgn6nG/j7D9sUcZ0vxzHRUvz2NvrQnO5bsgTD6gFmb+o51y5kPpklrgjTpk2Mug==", + "dev": true, + "requires": { + "@vue/shared": "^3.0.7" + } + }, + "@vuepress/utils": { + "version": "2.0.0-beta.5", + "resolved": "https://registry.npmjs.org/@vuepress/utils/-/utils-2.0.0-beta.5.tgz", + "integrity": "sha512-tpJvumHtvnA0vSiGnwF3p8zBk/9cNdZR9RmlcRF/+aDW3dcLxOv0P+EARtXxLDuezZiRxw0uf+l9Pb3pXFSiTQ==", + "dev": true, + "requires": { + "@types/debug": "^4.1.5", + "@types/fs-extra": "^9.0.8", + "@types/hash-sum": "^1.0.0", + "@vuepress/shared": "2.0.0-beta.4", + "chalk": "^4.1.0", + "debug": "^4.3.1", + "fs-extra": "^9.1.0", + "globby": "^11.0.2", + "hash-sum": "^2.0.0", + "ora": "^5.4.0", + "upath": "^2.0.1" + } + }, + "fs-extra": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", + "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + } + }, + "markdown-it-anchor": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-7.1.0.tgz", + "integrity": "sha512-loQggrwsIkkP7TOrESvmYkV2ikbQNNKhHcWyqC7/C2CmfHl1tkUizJJU8C5aGgg7J6oXVQJx17gk7i47tNn/lQ==", + "dev": true, + "requires": {} + } + } + }, "@vuepress/plugin-theme-data": { "version": "2.0.0-beta.43", "dev": true, @@ -19960,6 +20206,12 @@ "version": "1.0.1", "dev": true }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, "autoprefixer": { "version": "10.4.7", "dev": true, @@ -20570,8 +20822,7 @@ }, "entities": { "version": "2.1.0", - "dev": true, - "peer": true + "dev": true }, "envinfo": { "version": "7.8.1", @@ -32559,6 +32810,12 @@ "version": "5.0.1", "dev": true }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", + "dev": true + }, "jsonfile": { "version": "6.1.0", "dev": true, @@ -32608,7 +32865,6 @@ "linkify-it": { "version": "3.0.3", "dev": true, - "peer": true, "requires": { "uc.micro": "^1.0.1" } @@ -32690,7 +32946,6 @@ "markdown-it": { "version": "12.3.2", "dev": true, - "peer": true, "requires": { "argparse": "^2.0.1", "entities": "~2.1.0", @@ -32701,8 +32956,7 @@ "dependencies": { "argparse": { "version": "2.0.1", - "dev": true, - "peer": true + "dev": true } } }, @@ -33466,6 +33720,17 @@ "version": "3.0.0", "dev": true }, + "shiki": { + "version": "0.9.15", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.9.15.tgz", + "integrity": "sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==", + "dev": true, + "requires": { + "jsonc-parser": "^3.0.0", + "vscode-oniguruma": "^1.6.1", + "vscode-textmate": "5.2.0" + } + }, "signal-exit": { "version": "3.0.7", "dev": true @@ -33861,6 +34126,18 @@ "rollup": "^2.59.0" } }, + "vscode-oniguruma": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", + "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==", + "dev": true + }, + "vscode-textmate": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", + "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", + "dev": true + }, "vue": { "version": "3.2.33", "dev": true, diff --git a/package.json b/package.json index 73d74fa..080d5b6 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "license": "MIT", "devDependencies": { "@discue/ui-components": "^0.8.0", + "@vuepress/plugin-shiki": "^2.0.0-beta.5", "firebase-tools": "^10.9.0", "markdown-it-anchor": "^8.6.3", "markdown-it-attrs": "^4.1.4",