diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 459dd40a..896231e1 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -31,6 +31,10 @@ export default defineUserConfig({ theme: themePlume({ logo: 'https://pengzhanbo.cn/g.gif', hostname: 'https://pengzhanbo.cn', + repo: 'https://github.com/pengzhanbo/vuepress-theme-plume', + docsDir: 'docs', + editLink: true, + editLinkText: 'Edit this page on GitHub', appearance: true, avatar: { url: '/images/blogger.jpg', diff --git a/docs/README.md b/docs/README.md index f9f3abf7..f01219b7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,6 +1,8 @@ --- home: true banner: /images/bg-home.jpg +bannerMask: + dark: 0.2 hero: name: 鹏展博 tagline: 前端开发工程师 diff --git a/docs/notes/vuepress-theme-plume/README.md b/docs/notes/vuepress-theme-plume/README.md index 3cab3958..6ca1487e 100644 --- a/docs/notes/vuepress-theme-plume/README.md +++ b/docs/notes/vuepress-theme-plume/README.md @@ -55,7 +55,7 @@ npm i @vuepress-plume/vuepress-theme-plume // .vuepress/config.ts import { defineUserConfig } from 'vuepress' import { themePlume } from '@vuepress-plume/vuepress-theme-plume' -export default defineUserConfig({ // [!code focus] +export default defineUserConfig({ theme: themePlume({ // more... }) diff --git a/docs/notes/vuepress-theme-plume/markdown增强.md b/docs/notes/vuepress-theme-plume/markdown增强.md index 3f4199e7..25b08fde 100644 --- a/docs/notes/vuepress-theme-plume/markdown增强.md +++ b/docs/notes/vuepress-theme-plume/markdown增强.md @@ -58,6 +58,17 @@ markdown 增强 由 [vuepress-plugin-md-enhance](https://vuepress-theme-hope.git 警告内容 ::: +- 危险 + ``` md + ::: danger 危险 + 危险内容 + ::: + ``` + ::: danger 危险 + 危险内容 + `markdown` + ::: + - 详情 ``` md ::: details 详情 @@ -68,6 +79,17 @@ markdown 增强 由 [vuepress-plugin-md-enhance](https://vuepress-theme-hope.git 详情信息 ::: +- 重要 + + ``` md + ::: important 重要 + 重要内容 + ::: + ``` + ::: important 重要 + 重要内容 + ::: + ## 自定义对齐 - 左对齐 diff --git a/docs/notes/vuepress-theme-plume/基础功能.md b/docs/notes/vuepress-theme-plume/基础功能.md index c567f5ee..89b8073d 100644 --- a/docs/notes/vuepress-theme-plume/基础功能.md +++ b/docs/notes/vuepress-theme-plume/基础功能.md @@ -76,3 +76,18 @@ permalink: /note/vuepress-theme-plume/basis-power/ ## 文章评论 支持文章评论。 + +## Badge + +- +- +- +- + +````md +```js +export default function foo() { + console.log('foo'); // [\!code ++] +} +``` +```` diff --git a/package.json b/package.json index 8fcbebf7..8fee2e66 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "husky": "^8.0.3", "lint-staged": "^15.2.0", "minimist": "^1.2.8", - "ora": "^7.0.1", + "ora": "^8.0.0", "pnpm": "^8.12.1", "prettier": "^3.1.1", "prettier-config-vuepress": "^4.4.0", diff --git a/plugins/plugin-netlify-functions/README.md b/plugins/plugin-netlify-functions/README.md index e9938e16..0a1f7505 100644 --- a/plugins/plugin-netlify-functions/README.md +++ b/plugins/plugin-netlify-functions/README.md @@ -1,4 +1,4 @@ -# `@vuepress-plume/plugin-netlify-functions` +# `vuepress-plugin-netlify-functions` If your vuepress site is deployed on `netlify` and you want to be able to use `netlify functions` for ` serverless`. @@ -24,7 +24,7 @@ You may need this plugin to provide support. ## Install ``` -yarn add @vuepress-plume/plugin-netlify-functions +yarn add vuepress-plugin-netlify-functions ``` ## Usage @@ -33,7 +33,7 @@ yarn add @vuepress-plume/plugin-netlify-functions 在 vuepress 项目中,或者在一个 vuepress 主题中 ``` js // .vuepress/config.js - import { netlifyFunctionsPlugin } from '@vuepress-plume/plugin-netlify-functions' + import { netlifyFunctionsPlugin } from 'vuepress-plugin-netlify-functions' module.exports = { //... plugins: [ @@ -47,7 +47,7 @@ yarn add @vuepress-plume/plugin-netlify-functions 在 vuepress plugin 中: ``` js - import { useNetlifyFunctionsPlugin } from '@vuepress-plume/plugin-netlify-functions' + import { useNetlifyFunctionsPlugin } from 'vuepress-plugin-netlify-functions' const myPlugin = (): Plugin => { return (app: App) => { diff --git a/plugins/plugin-netlify-functions/package.json b/plugins/plugin-netlify-functions/package.json index 716046f8..e964f416 100644 --- a/plugins/plugin-netlify-functions/package.json +++ b/plugins/plugin-netlify-functions/package.json @@ -1,5 +1,5 @@ { - "name": "@vuepress-plume/plugin-netlify-functions", + "name": "vuepress-plugin-netlify-functions", "version": "1.0.0-rc.1", "description": "The Plugin for VuePres 2, Support Netlify Functions", "keywords": [ @@ -8,7 +8,7 @@ "netlify", "netlify functions", "netlifyFunctions", - "vuepress-plugin-plugin-netlify-functions" + "vuepress-plugin-netlify-functions" ], "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "bugs": { diff --git a/plugins/plugin-netlify-functions/src/node/plugin.ts b/plugins/plugin-netlify-functions/src/node/plugin.ts index 644cf484..b05a5360 100644 --- a/plugins/plugin-netlify-functions/src/node/plugin.ts +++ b/plugins/plugin-netlify-functions/src/node/plugin.ts @@ -78,7 +78,7 @@ export const netlifyFunctionsPlugin = ( let server: NetlifyServe cache.options = opts return { - name: '@vuepress-plume/plugin-netlify-functions', + name: 'vuepress-plugin-netlify-functions', onInitialized: async (app) => { // 启动netlify functions server diff --git a/plugins/plugin-netlify-functions/src/node/useNetlifyFunctionsPlugins.ts b/plugins/plugin-netlify-functions/src/node/useNetlifyFunctionsPlugins.ts index ce941877..d6032606 100644 --- a/plugins/plugin-netlify-functions/src/node/useNetlifyFunctionsPlugins.ts +++ b/plugins/plugin-netlify-functions/src/node/useNetlifyFunctionsPlugins.ts @@ -35,7 +35,7 @@ export const useNetlifyFunctionsPlugin = ( if ( !plugins.some( (plugin: PluginObject) => - plugin.name === '@vuepress-plume/plugin-netlify-functions' + plugin.name === 'vuepress-plugin-netlify-functions' ) ) { app.use(netlifyFunctionsPlugin()) diff --git a/plugins/plugin-page-collection/package.json b/plugins/plugin-page-collection/package.json index c1964f5c..498ab7d0 100644 --- a/plugins/plugin-page-collection/package.json +++ b/plugins/plugin-page-collection/package.json @@ -1,5 +1,5 @@ { - "name": "@vuepress-plume/plugin-page-collection", + "name": "plugin-page-collection", "version": "1.0.0-rc.1", "private": true, "description": "The Plugin for VuePres 2", @@ -32,14 +32,14 @@ }, "dependencies": { "@netlify/functions": "^2.4.1", - "@vuepress-plume/plugin-netlify-functions": "workspace:*", "@vuepress/client": "2.0.0-rc.0", "@vuepress/core": "2.0.0-rc.0", "@vuepress/shared": "2.0.0-rc.0", "@vuepress/utils": "2.0.0-rc.0", "leancloud-storage": "^4.15.2", "vue": "^3.3.13", - "vue-router": "4.2.5" + "vue-router": "4.2.5", + "vuepress-plugin-netlify-functions": "workspace:*" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-page-collection/src/node/plugin.ts b/plugins/plugin-page-collection/src/node/plugin.ts index 608a9be4..54bd47e3 100644 --- a/plugins/plugin-page-collection/src/node/plugin.ts +++ b/plugins/plugin-page-collection/src/node/plugin.ts @@ -4,11 +4,11 @@ * 然后在此基础上进行修改 */ -// 通过引入 '@vuepress-plume/plugin-netlify-functions' 插件,来为本插件提供 +// 通过引入 'vuepress-plugin-netlify-functions' 插件,来为本插件提供 // netlify functions 开发时支持 import type { App, Plugin } from '@vuepress/core' import { getDirname, path } from '@vuepress/utils' -import { useNetlifyFunctionsPlugin } from '@vuepress-plume/plugin-netlify-functions' +import { useNetlifyFunctionsPlugin } from 'vuepress-plugin-netlify-functions' import type { PageCollectionOptions } from '../shared/index.js' const __dirname = getDirname(import.meta.url) diff --git a/plugins/plugin-shikiji/src/node/highlight.ts b/plugins/plugin-shikiji/src/node/highlight.ts index de50dc9d..852fd286 100644 --- a/plugins/plugin-shikiji/src/node/highlight.ts +++ b/plugins/plugin-shikiji/src/node/highlight.ts @@ -116,7 +116,7 @@ export async function highlight( return s.replace( /()(<\/span>)/g, '$1$2' - ) + '\n' + ).replace(/(\/\/\s*?\[)\\(!code.*?\])/g, '$1$2') + '\n' } str = removeMustache(str).trimEnd() @@ -125,13 +125,6 @@ export async function highlight( lang, transformers: [ ...transformers, - // transformerCompactLineOptions(lineOptions), - // { - // name: 'vitepress:v-pre', - // pre(node) { - // if (vPre) node.properties['v-pre'] = '' - // } - // }, ...userTransformers ], meta: { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1949996d..59d2bea0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -72,8 +72,8 @@ importers: specifier: ^1.2.8 version: 1.2.8 ora: - specifier: ^7.0.1 - version: 7.0.1 + specifier: ^8.0.0 + version: 8.0.0 pnpm: specifier: ^8.12.1 version: 8.12.1 @@ -345,9 +345,6 @@ importers: '@netlify/functions': specifier: ^2.4.1 version: 2.4.1 - '@vuepress-plume/plugin-netlify-functions': - specifier: workspace:* - version: link:../plugin-netlify-functions '@vuepress/client': specifier: 2.0.0-rc.0 version: 2.0.0-rc.0(typescript@5.3.3) @@ -369,6 +366,9 @@ importers: vue-router: specifier: 4.2.5 version: 4.2.5(vue@3.3.13) + vuepress-plugin-netlify-functions: + specifier: workspace:* + version: link:../plugin-netlify-functions plugins/plugin-shikiji: dependencies: @@ -490,8 +490,8 @@ importers: specifier: ^10.7.0 version: 10.7.0(vue@3.3.13) date-fns: - specifier: ^3.0.5 - version: 3.0.5 + specifier: ^3.0.6 + version: 3.0.6 lodash.merge: specifier: ^4.6.2 version: 4.6.2 @@ -508,20 +508,17 @@ importers: specifier: 4.2.5 version: 4.2.5(vue@3.3.13) vuepress-plugin-comment2: - specifier: 2.0.0-rc.0 - version: 2.0.0-rc.0(typescript@5.3.3) + specifier: 2.0.0-rc.5 + version: 2.0.0-rc.5(typescript@5.3.3) vuepress-plugin-md-enhance: - specifier: 2.0.0-rc.0 - version: 2.0.0-rc.0(@types/js-yaml@4.0.9)(typescript@5.3.3) + specifier: 2.0.0-rc.5 + version: 2.0.0-rc.5(markdown-it@13.0.2)(typescript@5.3.3) vuepress-plugin-seo2: - specifier: 2.0.0-rc.0 - version: 2.0.0-rc.0(typescript@5.3.3) + specifier: 2.0.0-rc.5 + version: 2.0.0-rc.5(typescript@5.3.3) vuepress-plugin-sitemap2: - specifier: 2.0.0-rc.0 - version: 2.0.0-rc.0(typescript@5.3.3) - windicss: - specifier: ^3.5.6 - version: 3.5.6 + specifier: 2.0.0-rc.5 + version: 2.0.0-rc.5(typescript@5.3.3) devDependencies: '@types/lodash.merge': specifier: ^4.6.9 @@ -672,14 +669,6 @@ packages: '@algolia/requester-common': 4.20.0 dev: false - /@ampproject/remapping@2.2.0: - resolution: {integrity: sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/gen-mapping': 0.1.1 - '@jridgewell/trace-mapping': 0.3.18 - dev: false - /@antfu/ni@0.21.12: resolution: {integrity: sha512-2aDL3WUv8hMJb2L3r/PIQWsTLyq7RQr3v9xD16fiz6O8ys1xEyLhhTOv8gxtZvJiTzjTF5pHoArvRdesGL1DMQ==} hasBin: true @@ -702,110 +691,6 @@ packages: '@babel/highlight': 7.22.5 dev: true - /@babel/compat-data@7.22.9: - resolution: {integrity: sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ==} - engines: {node: '>=6.9.0'} - dev: false - - /@babel/core@7.23.3: - resolution: {integrity: sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==} - engines: {node: '>=6.9.0'} - dependencies: - '@ampproject/remapping': 2.2.0 - '@babel/code-frame': 7.22.13 - '@babel/generator': 7.23.3 - '@babel/helper-compilation-targets': 7.22.15 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.3) - '@babel/helpers': 7.23.2 - '@babel/parser': 7.23.6 - '@babel/template': 7.22.15 - '@babel/traverse': 7.23.3 - '@babel/types': 7.23.5 - convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@9.2.2) - gensync: 1.0.0-beta.2 - json5: 2.2.3 - semver: 6.3.1 - transitivePeerDependencies: - - supports-color - dev: false - - /@babel/generator@7.23.3: - resolution: {integrity: sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.23.5 - '@jridgewell/gen-mapping': 0.3.2 - '@jridgewell/trace-mapping': 0.3.18 - jsesc: 2.5.2 - dev: false - - /@babel/helper-compilation-targets@7.22.15: - resolution: {integrity: sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/compat-data': 7.22.9 - '@babel/helper-validator-option': 7.22.15 - browserslist: 4.22.1 - lru-cache: 5.1.1 - semver: 6.3.1 - dev: false - - /@babel/helper-environment-visitor@7.22.20: - resolution: {integrity: sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==} - engines: {node: '>=6.9.0'} - dev: false - - /@babel/helper-function-name@7.23.0: - resolution: {integrity: sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.22.15 - '@babel/types': 7.23.5 - dev: false - - /@babel/helper-hoist-variables@7.22.5: - resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.23.5 - dev: false - - /@babel/helper-module-imports@7.22.15: - resolution: {integrity: sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.23.5 - dev: false - - /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.3): - resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0 - dependencies: - '@babel/core': 7.23.3 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-module-imports': 7.22.15 - '@babel/helper-simple-access': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/helper-validator-identifier': 7.22.20 - dev: false - - /@babel/helper-simple-access@7.22.5: - resolution: {integrity: sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.23.5 - dev: false - - /@babel/helper-split-export-declaration@7.22.6: - resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/types': 7.23.5 - dev: false - /@babel/helper-string-parser@7.23.4: resolution: {integrity: sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==} engines: {node: '>=6.9.0'} @@ -820,22 +705,6 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helper-validator-option@7.22.15: - resolution: {integrity: sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==} - engines: {node: '>=6.9.0'} - dev: false - - /@babel/helpers@7.23.2: - resolution: {integrity: sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/template': 7.22.15 - '@babel/traverse': 7.23.3 - '@babel/types': 7.23.5 - transitivePeerDependencies: - - supports-color - dev: false - /@babel/highlight@7.22.20: resolution: {integrity: sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==} engines: {node: '>=6.9.0'} @@ -875,33 +744,6 @@ packages: dependencies: regenerator-runtime: 0.13.11 - /@babel/template@7.22.15: - resolution: {integrity: sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.13 - '@babel/parser': 7.23.6 - '@babel/types': 7.23.5 - dev: false - - /@babel/traverse@7.23.3: - resolution: {integrity: sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==} - engines: {node: '>=6.9.0'} - dependencies: - '@babel/code-frame': 7.22.13 - '@babel/generator': 7.23.3 - '@babel/helper-environment-visitor': 7.22.20 - '@babel/helper-function-name': 7.23.0 - '@babel/helper-hoist-variables': 7.22.5 - '@babel/helper-split-export-declaration': 7.22.6 - '@babel/parser': 7.23.6 - '@babel/types': 7.23.5 - debug: 4.3.4(supports-color@9.2.2) - globals: 11.12.0 - transitivePeerDependencies: - - supports-color - dev: false - /@babel/types@7.23.4: resolution: {integrity: sha512-7uIFwVYpoplT5jp/kVv6EF93VaJ8H+Yn5IczYiaAi98ajzjfoZfslet/e0sLh+wVBjb2qqIut1b0S26VSafsSQ==} engines: {node: '>=6.9.0'} @@ -1994,14 +1836,6 @@ packages: chalk: 4.1.2 dev: false - /@jridgewell/gen-mapping@0.1.1: - resolution: {integrity: sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==} - engines: {node: '>=6.0.0'} - dependencies: - '@jridgewell/set-array': 1.1.2 - '@jridgewell/sourcemap-codec': 1.4.15 - dev: false - /@jridgewell/gen-mapping@0.3.2: resolution: {integrity: sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==} engines: {node: '>=6.0.0'} @@ -2215,8 +2049,20 @@ packages: resolution: {integrity: sha512-xeF5+sHLzRNF7plbksywKCph4qli20l72of2fMlZQQ7RECvXYrRkE9+bjRFQCyULC7B8ydUYbpbkux5xJlVWyw==} dev: false - /@mdit/plugin-align@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-Grg8LuEaJpY74Imd7HEVUTQc8qaq9FM9ntuNILkikguyodBoz1UYEYH6iULaoKbp8N5HphoQh74jq9rTbPjdYQ==} + /@mdit/plugin-alert@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-Z+/bHBDniCz/Q+TMa3M6f47KG4tUKvJI8FHXhDwgbKLzDLn045ZBHcOTeqvuWrrjCIKBEo4fVAlYszYcehxmfg==} + peerDependencies: + markdown-it: ^13.0.2 + peerDependenciesMeta: + markdown-it: + optional: true + dependencies: + '@types/markdown-it': 13.0.7 + markdown-it: 13.0.2 + dev: false + + /@mdit/plugin-align@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-NYGrsnX1c84dtY1tugDVX71zxxfcGSIjWANzQ0/od4B0+N31eXkq3SXdAjCXOWUUHSa6phfvtok+x4V9ExQwHA==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2224,13 +2070,13 @@ packages: markdown-it: optional: true dependencies: - '@mdit/plugin-container': 0.6.5(markdown-it@13.0.2) + '@mdit/plugin-container': 0.7.6(markdown-it@13.0.2) '@types/markdown-it': 13.0.7 markdown-it: 13.0.2 dev: false - /@mdit/plugin-attrs@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-53CMAw/DJ7/bpDG4VVfB6Pq5wm77W6Suv1dFMb0WyfcM8u4nWbd0tCrIXlf0Gj4X/4C8oM5bGtOOLU/xxxgLUA==} + /@mdit/plugin-attrs@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-vTSsqZUXglZRQ4cLNou6N2cTLudHS01Tir+HPtrWkN+VB4VAIRlCKV3hf0vzKRM+HR3DSe+vQMrWzfnQdD0o4A==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2242,8 +2088,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-container@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-OEZv3vPzAGxH6OYHI1QVbn+yHdYap3T0ryG1Lzvd498Y4JHUGmHj69LWsKfSDmqKtVq/k4o/XbFwafxwQ/OFxQ==} + /@mdit/plugin-container@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-egEYoJLkar4hxrBfFf6tO3IfoLzeUHYChGRI3FA2fxiMwwyclPvBMMQTtG2rY3sjPy497Z86QiqYwjRM0qA8Mw==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2255,8 +2101,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-demo@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-lUx8fONmZYPg56UnEZjznPHaK/sTL5haY9uOjWCM+42WTKCVQrnsJcCMnJIKd88BROBSP+BdyHzrUxWR9ZSS2g==} + /@mdit/plugin-demo@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-pybxLVpIKYlxt7fgjHK4Zd6f/IMCjACB6eZmIIlow0eOnijRnikHdRDVkoyDOxcFuQvP0yvT6LWcQlhHF+CGwQ==} peerDependencies: markdown-it: ^13.0.2 peerDependenciesMeta: @@ -2267,8 +2113,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-figure@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-bwgOB3noaJ9CEWdQkIdpkCbxVdv+amS/KkmzeGxK/ut3vflyppeVSif/aiFX9Jo3Y3RZqe3xXajQ7E7bs9DGjQ==} + /@mdit/plugin-figure@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-ysH5O3WWuDrfxLWQO4wYXYGdo8oi+EbMQFgbaSTxhoPKTFf3HTovCn3RANn7qATBqmGP26zf0hY55mX9BFUu5A==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2280,8 +2126,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-footnote@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-71zsfKwI90NVmbBv4I1cD4alyFFuW46NLgx06rKTETOseLX5fkGxC4tta2KdZcY0Bd7dvFdZVtUv91in2I3rcg==} + /@mdit/plugin-footnote@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-fQvbi3+/Hm+k4GJptXCc5i0n9/+ZpQx4yqpjOTGGSUz1k22XU07YaK3wpL9w+nPAfcBfzD06D72Y+eDIG5wi8w==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2290,8 +2136,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-img-lazyload@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-Bed8x88W3boXEOtWDvADqLeJ4rbTxJgpHt882eycGbYGHD6Q4mtJnZOfT1GYrxiPpHtZTpxtGR1AkOV5gW3X0A==} + /@mdit/plugin-img-lazyload@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-BBgxlXCOO7+9TMHJXtUyvi48jlH4ZYQtC9lNfgu1rvmq56iblZ7etOzg61/CmXmLgMHNvCbb/Kx7gRLkOBhv6A==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2303,8 +2149,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-img-mark@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-qlD/9Kd6EJRdP4pRkg24RffMWsbBOGbwIJiDwFoDtSYO/z0UN3NEZTC603TjufP2lAb4Vqgkq4X1pkV14/28kw==} + /@mdit/plugin-img-mark@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-IhbkmTLbxr+c04ZQcSV2IFq8n1GeRFO08qQagkONUijI1O2G/RE2y6QvCVBUy0gB1Hc8c1i9vEyK1F0e4GpheQ==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2316,8 +2162,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-img-size@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-rPHt7dr/rlCxzGbBlL2hf8OtCT1F8nZw4MRXB971EX8gAjw1svrZKQBSwSppZt7MHzwPYRH1wRbO8kjhUh+7JQ==} + /@mdit/plugin-img-size@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-GZGEbuR0l4+ENXDG1Y2HsrNO2JuEmjI6PPe7pgsolk5yveWOiqzcEV4ushrWnpvwNal3Acuj+dpFDmZFOtm42g==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2329,8 +2175,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-include@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-2IJV+nhrLxMRKl4QcbyMrK1i8Yp4KfDXiadMJrxSSyZwHu9PP49a4DAbzaE2J2aVI0AvTkg/LLQRZqQkWKtCCA==} + /@mdit/plugin-include@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-4Pu0SdD2IOONLor/3GtQOYOBDv1xZ1LWByXLhht0kqEioX5D+aDZ5KD5MZ0AxH0xoNUGMynMEn/ak4/D9LLI7Q==} peerDependencies: markdown-it: ^13.0.2 peerDependenciesMeta: @@ -2342,8 +2188,8 @@ packages: upath: 2.0.1 dev: false - /@mdit/plugin-katex@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-viAovlZhZTske9GqDEyMbibCebdykASJt0Yx182w6GjM4XNuuvsfDqWFe3yANQN7CMTNfYxfaJ/ZSO2UnEc5Lg==} + /@mdit/plugin-katex@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-ZbPIks1SlgzS5R6YOL5s0J5vk20ROl5hF+Yj9o6CiEljodK2ln0ewpX36qM6POVrS/cu6E4Lx4X0fc5JTI6nAQ==} engines: {node: '>= 18'} peerDependencies: katex: ^0.16.9 @@ -2354,14 +2200,14 @@ packages: markdown-it: optional: true dependencies: - '@mdit/plugin-tex': 0.6.5(markdown-it@13.0.2) - '@types/katex': 0.16.6 + '@mdit/plugin-tex': 0.7.6(markdown-it@13.0.2) + '@types/katex': 0.16.7 '@types/markdown-it': 13.0.7 markdown-it: 13.0.2 dev: false - /@mdit/plugin-mark@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-sXIDGlEqoH4iByXMmSW+kg/E/KO4bOv3lHbztu9MGBIIrdOtoZ6PcBNYTNEBynlCIMvLrwa3g7HKxAQT59fHkQ==} + /@mdit/plugin-mark@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-D9gv+ebVORa4r69t0JeJg3NW9gCR/NOGYa1DKYDEQOJoZ1WwjZVuhdxd3wCpLKtqDLnyHTFWd3cnV/HHrmca3w==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2373,8 +2219,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-mathjax@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-c2bslbe+z/cRd46aRzD/EumCdUejP49sCwwTAxB7JWjwiDCWO882q/OICrrqjWk+j7qxBFe0lFQwRXWHthCPGg==} + /@mdit/plugin-mathjax@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-Sn3nYbkPftAF5tgemIJ1aClxgU4NnElHPV5PIgkMxwusaSsN4RB+GZ1NmTKrPUqVoIZi0pO1oYxy08TlIHcrPg==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2385,14 +2231,14 @@ packages: mathjax-full: optional: true dependencies: - '@mdit/plugin-tex': 0.6.5(markdown-it@13.0.2) + '@mdit/plugin-tex': 0.7.6(markdown-it@13.0.2) '@types/markdown-it': 13.0.7 markdown-it: 13.0.2 upath: 2.0.1 dev: false - /@mdit/plugin-stylize@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-qQJAzY4FpNeYZk9Wqb0qjtAaJd4aqllmXRts9TpfqGlpdH1HPiSPy+qAq4hs1OnMwimerlJ0tLtn1vFcc1CayQ==} + /@mdit/plugin-stylize@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-dhhYxo4KdnB66g1080qeuz8X/80q3h4Cpmwnwi2rCbQfl29Nv26H5tz5pp15NKQfdfVgrZnXXLsDskJeg5IcaQ==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2404,8 +2250,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-sub@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-ktzYk0eVHQ1pnZMELKuiI2AEFdCCjHgZNHO/rR2VOsF9OGWiLwtzUM0e+S6pbuY66ui/UxWpyXbZIpSnGhsBdA==} + /@mdit/plugin-sub@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-jo60gUC2KwnG4SqtyrbyI16hOcxb+Y1LwUKxXKfZRbZbcPcOfrzjE8q7XEq4MhmU51mfqY6EvCoB0yo49Zh2QA==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2417,8 +2263,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-sup@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-KYCz0PBdVRZn+ke1wiwNZV4ofJvUgad95/T5epwNNi7yW+CbVGVbKkEMVu0pxfNbFCokIy3J6MIWNUqXcacd5Q==} + /@mdit/plugin-sup@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-bCR1DxNuPAyYOaTtl3VkrRc7dMsJjrqt9HnM9T1ZiprW08uciaT37fLXF7DeUHWhGpcklI9dFtaU5cQkjUosTg==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2430,8 +2276,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-tab@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-QoyW3rUw3DBBjeoqp5bLsBzNXuqhZ+zY02MC7mKHqUrACgt+Ui3QKmCSwjbO0fL2k3eDERa85QeIFYjXoS/7iA==} + /@mdit/plugin-tab@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-kWwWmhv+PeeA9aC5InGyY4eJeIsCDDMhi1tbzyKW/wJ1eeFp+rpWpSfWwUe6QyTy/ZOhQ1nGXz0/uXI4xWz4Xw==} peerDependencies: markdown-it: ^13.0.2 peerDependenciesMeta: @@ -2442,8 +2288,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-tasklist@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-Eh5946hQrR+rOhvbOKN3lmFYK77R4UuLkE8NwZeyGrqaKvbZzdTKkPAr+Use87Fnxm7xOhcJiQuC62wQ+k+AKg==} + /@mdit/plugin-tasklist@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-ZsPHqQv/Cd9TUG3JfmrPOMRFR/SOG3/menWTz2kwE1HtJ1CUfBmoCRtfq2Sm7Rlqg/P6ZfWAd1t9bOwGkxD/5w==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2455,8 +2301,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-tex@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-Le8XCodPiN9+gH2dtWH1CKrH7/dMQuz0M8hAZk/2j2w7TTaMb0x622ELCvIgSlnq8xk0mdBphVa3iZ2AyS9evg==} + /@mdit/plugin-tex@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-TZfIJp98n7NI0TxDSxPs4Il1fqyJ/1GE3v8UZHA1DbfAdiVMxno/Dun9381ZxoJYibl+dnX3Kz7Ej3BDOceGGA==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -2468,8 +2314,8 @@ packages: markdown-it: 13.0.2 dev: false - /@mdit/plugin-uml@0.6.5(markdown-it@13.0.2): - resolution: {integrity: sha512-xWB03mUnzrHE13Rv7ke6Mlw6b33hTB/GNqb+Z5L6vYFHSM3tAbxhZQIlxJ69hQuAh/mJkrY59JYKSxIbk2u6XA==} + /@mdit/plugin-uml@0.7.6(markdown-it@13.0.2): + resolution: {integrity: sha512-P/aRntMnMfvtAEcLCkg6vhzNFEidj6jIno7VXr3HZNLitonr9ihnksM6jgrqG1rrMo4okBWUGFFGqsR8hHJk6g==} engines: {node: '>= 18'} peerDependencies: markdown-it: ^13.0.2 @@ -4252,10 +4098,6 @@ packages: '@types/istanbul-lib-report': 3.0.0 dev: false - /@types/js-yaml@4.0.9: - resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} - dev: false - /@types/json-schema@7.0.12: resolution: {integrity: sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==} @@ -4269,8 +4111,8 @@ packages: '@types/node': 20.10.5 dev: false - /@types/katex@0.16.6: - resolution: {integrity: sha512-rZYO1HInM99rAFYNwGqbYPxHZHxu2IwZYKj4bJ4oh6edVrm1UId8mmbHIZLBtG253qU6y3piag0XYe/joNnwzQ==} + /@types/katex@0.16.7: + resolution: {integrity: sha512-HMwFiRujE5PjrgwHQ25+bsLJgowjGjm5Z8FVSf0N6PwgJrwxH0QxzHYDcKsTfV3wva0vzrpqMTJS2jXPr5BMEQ==} dev: false /@types/linkify-it@3.0.2: @@ -6006,6 +5848,7 @@ packages: buffer: 6.0.3 inherits: 2.0.4 readable-stream: 3.6.0 + dev: false /blueimp-md5@2.19.0: resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} @@ -6126,6 +5969,7 @@ packages: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 + dev: false /bufrw@1.3.0: resolution: {integrity: sha512-jzQnSbdJqhIltU9O5KUiTtljP9ccw2u5ix59McQy4pV2xGhVLhRZIndY8GIrgh5HjXa6+QJ9AQhOd2QWQizJFQ==} @@ -6526,6 +6370,11 @@ packages: resolution: {integrity: sha512-4/aL9X3Wh0yiMQlE+eeRhWP6vclO3QRtw1JHKIT0FFUs5FjpFmESqtMvYZ0+lbzBw900b95mS0hohy+qn2VK/g==} engines: {node: '>=6'} + /cli-spinners@2.9.2: + resolution: {integrity: sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==} + engines: {node: '>=6'} + dev: true + /cli-truncate@3.1.0: resolution: {integrity: sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -7196,10 +7045,6 @@ packages: split2: 4.1.0 dev: true - /convert-source-map@2.0.0: - resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - dev: false - /cookie-es@1.0.0: resolution: {integrity: sha512-mWYvfOLrfEc996hlKcdABeIiPHUPC6DM2QYZdGGOvhOTbA3tjm2eBwqlJpoFdjC89NI4Qt6h0Pu06Mp+1Pj5OQ==} dev: false @@ -7535,8 +7380,8 @@ packages: '@babel/runtime': 7.21.5 dev: true - /date-fns@3.0.5: - resolution: {integrity: sha512-Q4Tq5c5s/Zl/zbgdWf6pejn9ru7UwdIlLfvEEg1hVsQNQ7LKt76qIduagIT9OPK7+JCv1mAKherdU6bOqGYDnw==} + /date-fns@3.0.6: + resolution: {integrity: sha512-W+G99rycpKMMF2/YD064b2lE7jJGUe+EjOES7Q8BIGY8sbNdbgcs9XFTZwvzc9Jx1f3k7LB7gZaZa7f8Agzljg==} dev: false /date-time@3.1.0: @@ -7999,6 +7844,7 @@ packages: /emoji-regex@10.2.1: resolution: {integrity: sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==} + dev: false /emoji-regex@10.3.0: resolution: {integrity: sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==} @@ -9451,11 +9297,6 @@ packages: wide-align: 1.1.5 dev: true - /gensync@1.0.0-beta.2: - resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} - engines: {node: '>=6.9.0'} - dev: false - /get-amd-module-type@5.0.0: resolution: {integrity: sha512-9mUVPLcOJ8n6VvW+9QOCdYC350Rmqg/hK2I+mFrqoV4KtBkZVGZDnINzN8Zo3s5VoxWk8/isVC48W02+auxDaQ==} engines: {node: '>=14'} @@ -9764,11 +9605,6 @@ packages: which: 1.3.1 dev: true - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: false - /globals@13.19.0: resolution: {integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==} engines: {node: '>=8'} @@ -10917,6 +10753,11 @@ packages: resolution: {integrity: sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==} engines: {node: '>=12'} + /is-unicode-supported@2.0.0: + resolution: {integrity: sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==} + engines: {node: '>=18'} + dev: true + /is-url-superb@4.0.0: resolution: {integrity: sha512-GI+WjezhPPcbM+tqE9LnmsY5qqjwHzTvjJ36wxYX5ujNXefSUJ/T17r5bqDV8yLhcgB59KTPNOc9O9cmHTPWsA==} engines: {node: '>=10'} @@ -11063,12 +10904,6 @@ packages: dependencies: argparse: 2.0.1 - /jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - dev: false - /json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} dev: false @@ -11613,6 +11448,15 @@ packages: dependencies: chalk: 5.3.0 is-unicode-supported: 1.3.0 + dev: false + + /log-symbols@6.0.0: + resolution: {integrity: sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==} + engines: {node: '>=18'} + dependencies: + chalk: 5.3.0 + is-unicode-supported: 1.3.0 + dev: true /log-update@5.0.1: resolution: {integrity: sha512-5UtUDQ/6edw4ofyljDNcOVJQ4c7OjDro4h3y8e1GQL5iYElYclVHJ3zeWchylvMaKnDbDilC8irOVyexnA/Slw==} @@ -11690,12 +11534,6 @@ packages: dependencies: semver: 7.5.4 - /lru-cache@5.1.1: - resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - dependencies: - yallist: 3.1.1 - dev: false - /lru-cache@6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -13065,6 +12903,22 @@ packages: stdin-discarder: 0.1.0 string-width: 6.1.0 strip-ansi: 7.1.0 + dev: false + + /ora@8.0.0: + resolution: {integrity: sha512-RUI+M9AFI9f0h+iPBxBIok+tWHSQYiMpp+NCdEOPFWrSGxl+IIJ4iCiXetSEoiP0AnNv1EcER6l/7t4mfkZjew==} + engines: {node: '>=18'} + dependencies: + chalk: 5.3.0 + cli-cursor: 4.0.0 + cli-spinners: 2.9.2 + is-interactive: 2.0.0 + is-unicode-supported: 2.0.0 + log-symbols: 6.0.0 + stdin-discarder: 0.2.0 + string-width: 7.0.0 + strip-ansi: 7.1.0 + dev: true /os-locale@1.4.0: resolution: {integrity: sha512-PRT7ZORmwu2MEFt4/fv3Q+mEfN4zetKxufQrkShY2oGvUms9r8otu5HfdyIFHkYXjO7laNsoVGmM2MANfuTA8g==} @@ -15163,6 +15017,12 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dependencies: bl: 5.1.0 + dev: false + + /stdin-discarder@0.2.0: + resolution: {integrity: sha512-ZWOBlQfhYyLvTDu8BneHv0UZA2FhNEIyiwrzMjWahPNzdCeLsfN0ScqTZoAXFeUEmx/X/sHd7SW3x7WBV+f51A==} + engines: {node: '>=18'} + dev: true /streamx@2.15.0: resolution: {integrity: sha512-HcxY6ncGjjklGs1xsP1aR71INYcsXFJet5CU1CHqihQ2J5nOsbd4OjgjHO42w/4QNv9gZb3BueV+Vxok5pLEXg==} @@ -15219,6 +15079,7 @@ packages: eastasianwidth: 0.2.0 emoji-regex: 10.2.1 strip-ansi: 7.1.0 + dev: false /string-width@7.0.0: resolution: {integrity: sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==} @@ -16512,14 +16373,14 @@ packages: typescript: 5.3.3 dev: false - /vuepress-plugin-comment2@2.0.0-rc.0(typescript@5.3.3): - resolution: {integrity: sha512-axgBwfMp1cd28S+PMKBnIPPCtuZqeUUu0ww6Sl29NB3QXyKWYfr+64TtVMkMTw5MrR3Cqhm2kOYdhqF3YU0/jQ==} + /vuepress-plugin-comment2@2.0.0-rc.5(typescript@5.3.3): + resolution: {integrity: sha512-EVYsUIIWLFUQoxrALdVcBPnSDPJfXWrsrpbryuWUFDkpjstm7gMHgNGJr6vkaqmP92BkysXcwJ2EuN4OweMtcA==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: - '@waline/client': ^2.15.8 + '@waline/client': ^2.15.8 || ^3.0.0-alpha.7 artalk: ^2.6.4 sass-loader: ^13.3.2 - twikoo: ^1.6.25 + twikoo: ^1.6.26 vuepress: 2.0.0-rc.0 vuepress-vite: 2.0.0-rc.0 vuepress-webpack: 2.0.0-rc.0 @@ -16545,25 +16406,28 @@ packages: giscus: 1.3.0 vue: 3.3.13(typescript@5.3.3) vue-router: 4.2.5(vue@3.3.13) - vuepress-plugin-sass-palette: 2.0.0-rc.0(typescript@5.3.3) - vuepress-shared: 2.0.0-rc.0(typescript@5.3.3) + vuepress-plugin-sass-palette: 2.0.0-rc.5(typescript@5.3.3) + vuepress-shared: 2.0.0-rc.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color - typescript dev: false - /vuepress-plugin-md-enhance@2.0.0-rc.0(@types/js-yaml@4.0.9)(typescript@5.3.3): - resolution: {integrity: sha512-sDP7gEp62phCkPuTtJaLwzKI53b94zqLQ2zajlPkDGTswPyxjOOvCdt2M3bcYM2gnSAV6szZhWuh7VCs1i5D7g==} + /vuepress-plugin-md-enhance@2.0.0-rc.5(markdown-it@13.0.2)(typescript@5.3.3): + resolution: {integrity: sha512-e7xiodPfKLIG8vVHZ9Guk97sc+7w4t0FzBlye6YYKTOd1Csm40hRqvBMp69WmDgzmp6zYdprifw1mC9do17dhw==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: - '@types/js-yaml': ^4.0.9 '@types/reveal.js': ^4.4.5 - '@vue/repl': ^2.7.0 + '@vue/repl': ^3.0.0 chart.js: ^4.4.0 echarts: ^5.4.3 - flowchart.ts: ^1.0.1 + flowchart.ts: ^2.0.0 katex: ^0.16.9 + kotlin-playground: ^1.29.0 + markmap-lib: ^0.15.7 + markmap-toolbar: ^0.15.6 + markmap-view: ^0.15.6 mathjax-full: ^3.2.2 mermaid: ^10.6.1 reveal.js: ^5.0.2 @@ -16584,6 +16448,14 @@ packages: optional: true katex: optional: true + kotlin-playground: + optional: true + markmap-lib: + optional: true + markmap-toolbar: + optional: true + markmap-view: + optional: true mathjax-full: optional: true mermaid: @@ -16599,28 +16471,27 @@ packages: vuepress-webpack: optional: true dependencies: - '@babel/core': 7.23.3 - '@mdit/plugin-align': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-attrs': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-container': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-demo': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-figure': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-footnote': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-img-lazyload': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-img-mark': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-img-size': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-include': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-katex': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-mark': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-mathjax': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-stylize': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-sub': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-sup': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-tab': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-tasklist': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-tex': 0.6.5(markdown-it@13.0.2) - '@mdit/plugin-uml': 0.6.5(markdown-it@13.0.2) - '@types/js-yaml': 4.0.9 + '@mdit/plugin-alert': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-align': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-attrs': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-container': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-demo': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-figure': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-footnote': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-img-lazyload': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-img-mark': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-img-size': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-include': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-katex': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-mark': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-mathjax': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-stylize': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-sub': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-sup': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-tab': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-tasklist': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-tex': 0.7.6(markdown-it@13.0.2) + '@mdit/plugin-uml': 0.7.6(markdown-it@13.0.2) '@types/markdown-it': 13.0.7 '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/shared': 2.0.0-rc.0 @@ -16628,19 +16499,19 @@ packages: '@vueuse/core': 10.7.0(vue@3.3.13) balloon-css: 1.2.0 js-yaml: 4.1.0 - markdown-it: 13.0.2 vue: 3.3.13(typescript@5.3.3) vue-router: 4.2.5(vue@3.3.13) - vuepress-plugin-sass-palette: 2.0.0-rc.0(typescript@5.3.3) - vuepress-shared: 2.0.0-rc.0(typescript@5.3.3) + vuepress-plugin-sass-palette: 2.0.0-rc.5(typescript@5.3.3) + vuepress-shared: 2.0.0-rc.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' + - markdown-it - supports-color - typescript dev: false - /vuepress-plugin-sass-palette@2.0.0-rc.0(typescript@5.3.3): - resolution: {integrity: sha512-dgvwBdUaAmuNwCnHdOcZ4LBA+W2RUP7zprz1rQWAn16YhgARTkXIkTO69r3AXT2QxrjKKH5r6fC7L1Zq6DMPrA==} + /vuepress-plugin-sass-palette@2.0.0-rc.5(typescript@5.3.3): + resolution: {integrity: sha512-ovAv5xGSu5T2+VlszjZpstDKKVH0wedVm13Vvt6RI6VJujh1fpQy+/g4yNK09U+HNd+sDMZoYCY7epF8CWXOXA==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: sass-loader: ^13.3.2 @@ -16661,15 +16532,15 @@ packages: '@vuepress/utils': 2.0.0-rc.0 chokidar: 3.5.3 sass: 1.69.5 - vuepress-shared: 2.0.0-rc.0(typescript@5.3.3) + vuepress-shared: 2.0.0-rc.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color - typescript dev: false - /vuepress-plugin-seo2@2.0.0-rc.0(typescript@5.3.3): - resolution: {integrity: sha512-V0jMT/Lv2ktOoe2wssMG/zip07wd0GKxJyXY9qEc9B5OOw8KZRYO9frD85YprUCOHEYjwu+sHbI+kUQRaSb+eg==} + /vuepress-plugin-seo2@2.0.0-rc.5(typescript@5.3.3): + resolution: {integrity: sha512-VwnBF1zuIjwrIQzAKQQm2l0QucZ/MqEnm3l5Hdg/katGuSna4AjEnhVDswwr4plHliNYWNzcu9V2o0tqEaRouw==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: vuepress: 2.0.0-rc.0 @@ -16685,15 +16556,15 @@ packages: dependencies: '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - vuepress-shared: 2.0.0-rc.0(typescript@5.3.3) + vuepress-shared: 2.0.0-rc.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color - typescript dev: false - /vuepress-plugin-sitemap2@2.0.0-rc.0(typescript@5.3.3): - resolution: {integrity: sha512-TyG4PzuYnEVV4hQVRzJYYWMmvknJz3+bJ2aoEEYvNfGXxMgi4H2FvVlMunRO/Tkh8qC7QKg8vz/ArEzxG4HwuQ==} + /vuepress-plugin-sitemap2@2.0.0-rc.5(typescript@5.3.3): + resolution: {integrity: sha512-b1ylNdPLsmhQ+R0NzyaIXHaAybFf0sB47TnYc43X9O8Ql+O8TI6jpBcF8DID7pWp5scQIdf3BIQ1yd/Q0wQgnw==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: vuepress: 2.0.0-rc.0 @@ -16710,15 +16581,15 @@ packages: '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 sitemap: 7.1.1 - vuepress-shared: 2.0.0-rc.0(typescript@5.3.3) + vuepress-shared: 2.0.0-rc.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color - typescript dev: false - /vuepress-shared@2.0.0-rc.0(typescript@5.3.3): - resolution: {integrity: sha512-Rr5n/A1o8qnyvZEWkrI8is9ktQhTc+6P56QjHM3bCI2XRDFfwnUNi8hCSl4KA0/MQOESMHmWnL4izRD7Jprh5A==} + /vuepress-shared@2.0.0-rc.5(typescript@5.3.3): + resolution: {integrity: sha512-J+N3/sb966uI5wSs4k6QLrwxSE78Z77hBRdNKNN9HrhTXQX5SqIV5gqqnS24OfI5GxEWrl4Eba40ECwJk9hKlA==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: vuepress: 2.0.0-rc.0 @@ -17225,10 +17096,6 @@ packages: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} - /yallist@3.1.1: - resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} - dev: false - /yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} diff --git a/theme/package.json b/theme/package.json index 1289c858..f5fc3110 100644 --- a/theme/package.json +++ b/theme/package.json @@ -67,17 +67,16 @@ "@vuepress/shared": "2.0.0-rc.0", "@vuepress/utils": "2.0.0-rc.0", "@vueuse/core": "^10.7.0", - "date-fns": "^3.0.5", + "date-fns": "^3.0.6", "lodash.merge": "^4.6.2", "nanoid": "^5.0.4", "ts-debounce": "^4.0.0", "vue": "^3.3.13", "vue-router": "4.2.5", - "vuepress-plugin-comment2": "2.0.0-rc.0", - "vuepress-plugin-md-enhance": "2.0.0-rc.0", - "vuepress-plugin-seo2": "2.0.0-rc.0", - "vuepress-plugin-sitemap2": "2.0.0-rc.0", - "windicss": "^3.5.6" + "vuepress-plugin-comment2": "2.0.0-rc.5", + "vuepress-plugin-md-enhance": "2.0.0-rc.5", + "vuepress-plugin-seo2": "2.0.0-rc.5", + "vuepress-plugin-sitemap2": "2.0.0-rc.5" }, "devDependencies": { "@types/lodash.merge": "^4.6.9" diff --git a/theme/src/client/components/Flyout/MenuLink.vue b/theme/src/client/components/Flyout/MenuLink.vue index f30ce824..9d2311e1 100644 --- a/theme/src/client/components/Flyout/MenuLink.vue +++ b/theme/src/client/components/Flyout/MenuLink.vue @@ -48,11 +48,11 @@ const page = usePageData() } .link:hover { - color: var(--vp-c-brand); - background-color: var(--vp-c-bg-elv-mute); + color: var(--vp-c-brand-1); + background-color: var(--vp-c-default-soft); } .link.active { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } diff --git a/theme/src/client/components/Flyout/index.vue b/theme/src/client/components/Flyout/index.vue index 6bcc3106..4fc3c2b9 100644 --- a/theme/src/client/components/Flyout/index.vue +++ b/theme/src/client/components/Flyout/index.vue @@ -69,7 +69,7 @@ export default { } .flyout-wrapper:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); transition: color 0.25s; } @@ -82,11 +82,11 @@ export default { } .flyout-wrapper.active .text { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .flyout-wrapper.active:hover .text { - color: var(--vp-c-brand-dark); + color: var(--vp-c-brand-2); } .flyout-wrapper:hover .menu, diff --git a/theme/src/client/components/LocalNav.vue b/theme/src/client/components/LocalNav.vue index ff5a8e5b..70cb4b39 100644 --- a/theme/src/client/components/LocalNav.vue +++ b/theme/src/client/components/LocalNav.vue @@ -72,6 +72,7 @@ const classes = computed(() => { display: flex; justify-content: space-between; align-items: center; + border-top: 1px solid var(--vp-c-gutter); border-bottom: 1px solid var(--vp-c-gutter); padding-top: var(--vp-layout-top-height, 0px); width: 100%; diff --git a/theme/src/client/components/LocalNavOutlineDropdown.vue b/theme/src/client/components/LocalNavOutlineDropdown.vue index d5c60f6e..bc58bfdb 100644 --- a/theme/src/client/components/LocalNavOutlineDropdown.vue +++ b/theme/src/client/components/LocalNavOutlineDropdown.vue @@ -120,7 +120,7 @@ function scrollToTop() { right: 16px; left: 16px; display: grid; - /* gap: 1px; */ + gap: 1px; border: 1px solid var(--vp-c-border); border-radius: 8px; background-color: var(--vp-c-gutter); diff --git a/theme/src/client/components/Nav/NavBarMenuLink.vue b/theme/src/client/components/Nav/NavBarMenuLink.vue index f96723e3..29ec2619 100644 --- a/theme/src/client/components/Nav/NavBarMenuLink.vue +++ b/theme/src/client/components/Nav/NavBarMenuLink.vue @@ -42,10 +42,10 @@ const page = usePageData() } .navbar-menu-link.active { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .navbar-menu-link:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } diff --git a/theme/src/client/components/Nav/NavBarSearch.vue b/theme/src/client/components/Nav/NavBarSearch.vue index a5e071ac..0a313531 100644 --- a/theme/src/client/components/Nav/NavBarSearch.vue +++ b/theme/src/client/components/Nav/NavBarSearch.vue @@ -24,7 +24,7 @@ } .DocSearch { - --docsearch-primary-color: var(--vp-c-brand); + --docsearch-primary-color: var(--vp-c-brand-1); --docsearch-highlight-color: var(--docsearch-primary-color); --docsearch-text-color: var(--vp-c-text-1); --docsearch-muted-color: var(--vp-c-text-2); @@ -41,7 +41,7 @@ --docsearch-modal-shadow: none; --docsearch-footer-shadow: none; --docsearch-logo-color: var(--vp-c-text-2); - --docsearch-hit-background: var(--vp-c-bg-soft-mute); + --docsearch-hit-background: var(--vp-c-default-soft); --docsearch-hit-color: var(--vp-c-text-2); --docsearch-hit-shadow: none; } @@ -83,7 +83,7 @@ } .DocSearch-Button:hover { - border-color: var(--vp-c-brand); + border-color: var(--vp-c-brand-1); background: var(--vp-c-bg-alt); } } @@ -200,11 +200,11 @@ } .DocSearch-Form { - border: 1px solid var(--vp-c-brand); + border: 1px solid var(--vp-c-brand-1); background-color: var(--vp-c-white); } .dark .DocSearch-Form { - background-color: var(--vp-c-bg-soft-mute); + background-color: var(--vp-c-bg-soft); } diff --git a/theme/src/client/components/Nav/NavScreenMenuGroup.vue b/theme/src/client/components/Nav/NavScreenMenuGroup.vue index ef2c0bc9..141529c1 100644 --- a/theme/src/client/components/Nav/NavScreenMenuGroup.vue +++ b/theme/src/client/components/Nav/NavScreenMenuGroup.vue @@ -81,7 +81,7 @@ function toggle() { .nav-screen-menu-group.open .button { padding-bottom: 6px; - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .nav-screen-menu-group.open .button-icon { @@ -103,7 +103,7 @@ function toggle() { } .button:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .button-text i { diff --git a/theme/src/client/components/Nav/NavScreenMenuGroupLink.vue b/theme/src/client/components/Nav/NavScreenMenuGroupLink.vue index a1a767ef..864e1c4d 100644 --- a/theme/src/client/components/Nav/NavScreenMenuGroupLink.vue +++ b/theme/src/client/components/Nav/NavScreenMenuGroupLink.vue @@ -34,6 +34,6 @@ const closeScreen = inject('close-screen') as () => void } .nav-screen-menu-group-link:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } diff --git a/theme/src/client/components/Nav/NavScreenMenuLink.vue b/theme/src/client/components/Nav/NavScreenMenuLink.vue index 77d9f85a..fab1a638 100644 --- a/theme/src/client/components/Nav/NavScreenMenuLink.vue +++ b/theme/src/client/components/Nav/NavScreenMenuLink.vue @@ -31,6 +31,6 @@ const closeScreen = inject('close-screen') as () => void } .nav-screen-menu-link:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } diff --git a/theme/src/client/components/Page.vue b/theme/src/client/components/Page.vue index c480a120..e057046a 100644 --- a/theme/src/client/components/Page.vue +++ b/theme/src/client/components/Page.vue @@ -3,6 +3,7 @@ import { usePageData } from '@vuepress/client' import type { PlumeThemePageData } from '../../shared/index.js' import { useDarkMode, useSidebar } from '../composables/index.js' import PageAside from './PageAside.vue' +import PageFooter from './PageFooter.vue' import PageMeta from './PageMeta.vue' const { hasSidebar, hasAside } = useSidebar() @@ -32,6 +33,7 @@ const page = usePageData()
+
diff --git a/theme/src/client/components/PageAside.vue b/theme/src/client/components/PageAside.vue index 35c42525..4cea0a63 100644 --- a/theme/src/client/components/PageAside.vue +++ b/theme/src/client/components/PageAside.vue @@ -81,7 +81,7 @@ function handleClick({ target: el }: Event) { opacity: 0; width: 1px; height: 18px; - background-color: var(--vp-c-brand); + background-color: var(--vp-c-brand-1); transition: top 0.25s cubic-bezier(0, 1, 0.5, 1), background-color 0.5s, opacity 0.25s; } diff --git a/theme/src/client/components/PageFooter.vue b/theme/src/client/components/PageFooter.vue new file mode 100644 index 00000000..d0bd76bf --- /dev/null +++ b/theme/src/client/components/PageFooter.vue @@ -0,0 +1,190 @@ + + + + + diff --git a/theme/src/client/components/PageMeta.vue b/theme/src/client/components/PageMeta.vue index 8b33f988..3c1f0173 100644 --- a/theme/src/client/components/PageMeta.vue +++ b/theme/src/client/components/PageMeta.vue @@ -65,7 +65,7 @@ const hasMeta = computed(() => tags.value.length || createTime.value) font-size: 16px; font-weight: 400; margin-bottom: 2rem; - border-left: solid 4px var(--vp-c-brand); + border-left: solid 4px var(--vp-c-brand-1); padding-left: 1rem; } @@ -75,7 +75,7 @@ const hasMeta = computed(() => tags.value.length || createTime.value) } .page-category-wrapper .category:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .page-category-wrapper .dot { diff --git a/theme/src/client/components/PostItem.vue b/theme/src/client/components/PostItem.vue index 5b3676b2..e9c2df9a 100644 --- a/theme/src/client/components/PostItem.vue +++ b/theme/src/client/components/PostItem.vue @@ -78,7 +78,7 @@ const createTime = computed(() => { } h3:hover { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); .sticky { color: var(--vp-c-text-2); @@ -100,7 +100,7 @@ const createTime = computed(() => { line-height: 1; font-size: 13px; color: var(--vp-c-text-2); - background-color: var(--vp-c-bg-soft-mute); + background-color: var(--vp-c-default-soft); } } diff --git a/theme/src/client/components/SidebarItem.vue b/theme/src/client/components/SidebarItem.vue index 29c50385..0de0c974 100644 --- a/theme/src/client/components/SidebarItem.vue +++ b/theme/src/client/components/SidebarItem.vue @@ -137,7 +137,7 @@ function onCaretClick() { .sidebar-item.level-3.is-active > .item > .indicator, .sidebar-item.level-4.is-active > .item > .indicator, .sidebar-item.level-5.is-active > .item > .indicator { - background-color: var(--vp-c-brand); + background-color: var(--vp-c-brand-1); } .link { @@ -173,7 +173,7 @@ function onCaretClick() { .sidebar-item.level-3.is-link > .item > .link:hover .text, .sidebar-item.level-4.is-link > .item > .link:hover .text, .sidebar-item.level-5.is-link > .item > .link:hover .text { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .sidebar-item.level-0.has-active > .item > .link > .text, @@ -191,7 +191,7 @@ function onCaretClick() { .sidebar-item.level-3.is-active > .item .link > .text, .sidebar-item.level-4.is-active > .item .link > .text, .sidebar-item.level-5.is-active > .item .link > .text { - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); } .caret { diff --git a/theme/src/client/components/SkipLink.vue b/theme/src/client/components/SkipLink.vue index 3fdab9cf..ca343fca 100644 --- a/theme/src/client/components/SkipLink.vue +++ b/theme/src/client/components/SkipLink.vue @@ -50,7 +50,7 @@ function focusOnTargetAnchor({ target }: Event) { font-size: 12px; font-weight: bold; text-decoration: none; - color: var(--vp-c-brand); + color: var(--vp-c-brand-1); box-shadow: var(--vp-shadow-3); background-color: var(--vp-c-bg); } diff --git a/theme/src/client/components/Switch.vue b/theme/src/client/components/Switch.vue index b754b2d0..690d0424 100644 --- a/theme/src/client/components/Switch.vue +++ b/theme/src/client/components/Switch.vue @@ -22,7 +22,7 @@ } .switch-wrapper:hover { - border-color: var(--vp-input-hover-border-color); + border-color: var(--vp-c-brand-1); } .check { diff --git a/theme/src/client/components/global/Badge.vue b/theme/src/client/components/global/Badge.vue index 7155e377..9a791457 100644 --- a/theme/src/client/components/global/Badge.vue +++ b/theme/src/client/components/global/Badge.vue @@ -28,18 +28,24 @@ withDefaults(defineProps(), { transform: translateY(-2px); } -h1 .badge-view, -h2 .badge-view, -h3 .badge-view, +h1 .badge-view { + margin-top: 4px; + vertical-align: top; +} +h2 .badge-view { + margin-top: 3px; + padding: 0 8px; + vertical-align: top; +} +h3 .badge-view { + vertical-align: middle; +} + h4 .badge-view, h5 .badge-view, h6 .badge-view { - vertical-align: top; -} - -h2 .badge-view { - border-radius: 11px; - line-height: 20px; + vertical-align: middle; + line-height: 18px; } .badge-view.info { diff --git a/theme/src/client/composables/index.ts b/theme/src/client/composables/index.ts index 124f8dbe..ae7aa372 100644 --- a/theme/src/client/composables/index.ts +++ b/theme/src/client/composables/index.ts @@ -4,3 +4,4 @@ export * from './themeData.js' export * from './useResolveRouteWithRedirect.js' export * from './sidebar.js' export * from './aside.js' +export * from './page.js' diff --git a/theme/src/client/composables/page.ts b/theme/src/client/composables/page.ts new file mode 100644 index 00000000..f6fb6ecb --- /dev/null +++ b/theme/src/client/composables/page.ts @@ -0,0 +1,215 @@ +import { usePageData, usePageFrontmatter, usePageLang } from '@vuepress/client' +import { isArray, isPlainObject, isString } from '@vuepress/shared' +import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client' +import type { NotesSidebarItem } from '@vuepress-plume/plugin-notes-data' +import { computed } from 'vue' +import type { ComputedRef, Ref } from 'vue' +import { useRoute } from 'vue-router' +import type { + NavItemWithLink, + PlumeThemeBlogPostItem, + PlumeThemePageData, + PlumeThemePageFrontmatter, +} from '../../shared/index.js' +import { useNavLink, useSidebar, useThemeLocaleData } from '../composables/index.js' +import { resolveEditLink } from '../utils/index.js' + +export const useEditNavLink = (): ComputedRef => { + const themeLocale = useThemeLocaleData() + const page = usePageData() + const frontmatter = usePageFrontmatter() + + return computed(() => { + const showEditLink = + frontmatter.value.editLink ?? themeLocale.value.editLink ?? true + if (!showEditLink) { + return null + } + + const { + repo, + docsRepo = repo, + docsBranch = 'main', + docsDir = '', + editLinkText, + } = themeLocale.value + + if (!docsRepo) return null + + const editLink = resolveEditLink({ + docsRepo, + docsBranch, + docsDir, + filePathRelative: page.value.filePathRelative, + editLinkPattern: + frontmatter.value.editLinkPattern ?? themeLocale.value.editLinkPattern, + }) + + if (!editLink) return null + + return { + text: editLinkText ?? 'Edit this page', + link: editLink, + } + }) +} + +export const useLastUpdated = (): ComputedRef => { + const themeLocale = useThemeLocaleData() + const page = usePageData() + const frontmatter = usePageFrontmatter() + + return computed(() => { + const showLastUpdated = + frontmatter.value.lastUpdated ?? themeLocale.value.lastUpdated ?? true + + if (!showLastUpdated) return null + + if (!page.value.git?.updatedTime) return null + + const updatedDate = new Date(page.value.git?.updatedTime) + + return updatedDate.toLocaleString() + }) +} + +export const useContributors = (): ComputedRef< + null | Required['contributors'] +> => { + const themeLocale = useThemeLocaleData() + const page = usePageData() + const frontmatter = usePageFrontmatter() + + return computed(() => { + const showContributors = + frontmatter.value.contributors ?? themeLocale.value.contributors ?? true + + if (!showContributors) return null + + return page.value.git?.contributors ?? null + }) +} + +/** + * Resolve `prev` or `next` config from frontmatter + */ +const resolveFromFrontmatterConfig = ( + conf: unknown, +): null | false | NavItemWithLink => { + if (conf === false) { + return null + } + + if (isString(conf)) { + return useNavLink(conf) + } + + if (isPlainObject(conf)) { + return conf + } + + return false +} + +const flatSidebar = ( + sidebar: NotesSidebarItem[], + res: NavItemWithLink[] = [] +): NavItemWithLink[] => { + for (const item of sidebar) { + if (item.link) { + res.push({ link: item.link, text: item.text || item.dir || '' }) + } + if (isArray(item.items) && item.items.length) { + flatSidebar(item.items as NotesSidebarItem[], res) + } + } + + return res +} + +/** + * Resolve `prev` or `next` config from sidebar items + */ +const resolveFromSidebarItems = ( + sidebarItems: NavItemWithLink[], + currentPath: string, + offset: number, +): null | NavItemWithLink => { + const index = sidebarItems.findIndex((item) => item.link === currentPath) + if (index !== -1) { + const targetItem = sidebarItems[index + offset] + if (targetItem?.link) { + return { + link: targetItem.link, + text: targetItem.text, + } + } + } + + return null +} + +const resolveFromBlogPostData = ( + postList: PlumeThemeBlogPostItem[], + currentPath: string, + offset: number, +): null | NavItemWithLink => { + const index = postList.findIndex((item) => item.path === currentPath) + if (index !== -1) { + const targetItem = postList[index + offset] + if (!targetItem?.path) { + return null + } + return { + link: targetItem.path, + text: targetItem.title, + } + } + return null +} + +export const usePageNav = () => { + const route = useRoute() + const page = usePageData() + const frontmatter = usePageFrontmatter() + const { sidebar } = useSidebar() + const postList = useBlogPostData() as unknown as Ref + const locale = usePageLang() + + const prevNavList = computed(() => { + const prevConfig = resolveFromFrontmatterConfig(frontmatter.value.prev) + if (prevConfig !== false) { + return prevConfig + } + if (page.value.isBlogPost) { + return resolveFromBlogPostData( + postList.value.filter(item => item.lang === locale.value), + route.path, + -1 + ) + } else { + return resolveFromSidebarItems(flatSidebar(sidebar.value), route.path, -1) + } + }) + + const nextNavList = computed(() => { + const nextConfig = resolveFromFrontmatterConfig(frontmatter.value.next) + if (nextConfig !== false) { + return nextConfig + } + if (page.value.isBlogPost) { + return resolveFromBlogPostData( + postList.value.filter(item => item.lang === locale.value), + route.path, + 1 + ) + } else { + return resolveFromSidebarItems(flatSidebar(sidebar.value), route.path, 1) + } + }) + + return { + prev: prevNavList, + next: nextNavList, + } +} diff --git a/theme/src/client/composables/useResolveRouteWithRedirect.ts b/theme/src/client/composables/useResolveRouteWithRedirect.ts index 297b0e95..8dc3c25a 100644 --- a/theme/src/client/composables/useResolveRouteWithRedirect.ts +++ b/theme/src/client/composables/useResolveRouteWithRedirect.ts @@ -1,6 +1,13 @@ import { isFunction, isString } from '@vuepress/shared' import { useRouter } from 'vue-router' import type { Router } from 'vue-router' +import type { NavItemWithLink } from '../../shared/index.js' + +declare module 'vue-router' { + interface RouteMeta { + title?: string + } +} /** * Resolve a route with redirection @@ -26,3 +33,21 @@ export const useResolveRouteWithRedirect = ( ...resolvedRedirectObj, }) } + +/** + * Resolve NavLink props from string + * + * @example + * - Input: '/README.md' + * - Output: { text: 'Home', link: '/' } + */ +export const useNavLink = (item: string): NavItemWithLink => { + // the route path of vue-router is url-encoded, and we expect users are using + // non-url-encoded string in theme config, so we need to url-encode it first to + // resolve the route correctly + const resolved = useResolveRouteWithRedirect(encodeURI(item)) + return { + text: resolved.meta.title || item, + link: resolved.name === '404' ? item : resolved.fullPath, + } +} diff --git a/theme/src/client/styles/code.scss b/theme/src/client/styles/code.scss index c021d0ab..8fd4fe2b 100644 --- a/theme/src/client/styles/code.scss +++ b/theme/src/client/styles/code.scss @@ -6,7 +6,7 @@ } html:not(.dark) .vp-code span { - color: var(--shiki-light, rgba(60, 60, 67, 0.92)); + color: var(--shiki-light, rgba(60, 60, 67, 0.78)); } code[class*='language-'], @@ -65,20 +65,6 @@ pre[class*='language-'] { scrollbar-color: var(--c-brand) var(--c-border); font-size: 14px; - &::-webkit-scrollbar { - width: 7px; - height: 7px; - } - - &::-webkit-scrollbar-track { - background-color: var(--vp-code-block-bg); - } - - &::-webkit-scrollbar-thumb { - background-color: rgba(220, 220, 220, 0.35); - border-radius: 3px; - } - code { color: #fff; padding: 0; @@ -139,7 +125,7 @@ div[class*='language-'] { line-height: 1.5; .highlight-line { - background-color: rgba(142, 150, 170, 0.14); + background-color: var(--vp-c-default-soft); } } diff --git a/theme/src/client/styles/content.scss b/theme/src/client/styles/content.scss index 48773a41..f0a33a07 100644 --- a/theme/src/client/styles/content.scss +++ b/theme/src/client/styles/content.scss @@ -26,7 +26,6 @@ letter-spacing: -0.02em; line-height: 32px; font-size: 24px; - transition: all var(--t-color); } .plume-content h2:first-of-type { @@ -116,13 +115,16 @@ .plume-content a { font-weight: 500; - color: var(--vp-c-brand); - text-decoration-style: dotted; - transition: color 0.25s; + color: var(--vp-c-brand-1); + text-decoration: underline; + text-underline-offset: 2px; + transition: + color 0.25s, + opacity 0.25s; } .plume-content a:hover { - color: var(--vp-c-brand-dark); + color: var(--vp-c-brand-2); } .plume-content strong { @@ -168,6 +170,7 @@ } .plume-content tr { + background-color: var(--vp-c-bg); border-top: 1px solid var(--vp-c-divider); transition: background-color 0.5s; } @@ -254,15 +257,15 @@ /* inline code */ .plume-content :not(pre, h1, h2, h3, h4, h5, h6) > code { font-size: var(--vp-code-font-size); + color: var(--vp-code-color); } .plume-content :not(pre) > code { border-radius: 4px; padding: 3px 6px; - color: var(--vp-c-text-code); - background-color: var(--vp-c-mute); + background-color: var(--vp-code-bg); transition: - color 0.5s, + color 0.25s, background-color 0.5s; } @@ -273,254 +276,13 @@ } .plume-content a > code { - color: var(--vp-c-brand); - transition: color 0.25s; + color: var(--vp-code-link-color); } .plume-content a:hover > code { - color: var(--vp-c-brand-dark); + color: var(--vp-code-link-hover-color); } .plume-content .vp-code-tabs-nav { margin: 0.85rem 0 0; } - -// .plume-content div[class*='language-'] { -// position: relative; -// margin: 16px -24px; -// background-color: var(--vp-code-block-bg); -// overflow-x: auto; -// transition: background-color 0.5s; -// } - -// @media (min-width: 640px) { -// .plume-content div[class*='language-'] { -// border-radius: 8px; -// margin: 16px 0; -// } -// } - -// @media (max-width: 639px) { -// .plume-content li div[class*='language-'] { -// border-radius: 8px 0 0 8px; -// } -// } - -// .plume-content div[class*='language-'] + div[class*='language-'], -// .plume-content div[class$='-api'] + div[class*='language-'], -// .plume-content -// div[class*='language-'] -// + div[class$='-api'] -// > div[class*='language-'] { -// margin-top: -8px; -// } - -// .plume-content [class*='language-'] pre, -// .plume-content [class*='language-'] code { -// /*rtl:ignore*/ -// direction: ltr; -// /*rtl:ignore*/ -// text-align: left; -// white-space: pre; -// word-spacing: normal; -// word-break: normal; -// word-wrap: normal; -// -moz-tab-size: 4; -// -o-tab-size: 4; -// tab-size: 4; -// -webkit-hyphens: none; -// -moz-hyphens: none; -// -ms-hyphens: none; -// hyphens: none; -// } - -// .plume-content [class*='language-'] pre { -// position: relative; -// z-index: 1; -// margin: 0; -// padding: 16px 0; -// background: transparent; -// overflow-x: auto; -// } - -// .plume-content [class*='language-'] code { -// display: block; -// padding: 0 24px; -// width: fit-content; -// min-width: 100%; -// line-height: var(--vp-code-line-height); -// font-size: var(--vp-code-font-size); -// color: var(--vp-code-block-color); -// transition: color 0.5s; -// } - -// .plume-content [class*='language-'] code .highlighted { -// background-color: var(--vp-code-line-highlight-color); -// transition: background-color 0.5s; -// margin: 0 -24px; -// padding: 0 24px; -// width: calc(100% + 2 * 24px); -// display: inline-block; -// } - -// .plume-content [class*='language-'] code .highlighted.error { -// background-color: var(--vp-code-line-error-color); -// } - -// .plume-content [class*='language-'] code .highlighted.warning { -// background-color: var(--vp-code-line-warning-color); -// } - -// .plume-content [class*='language-'] code .diff { -// transition: background-color 0.5s; -// margin: 0 -24px; -// padding: 0 24px; -// width: calc(100% + 2 * 24px); -// display: inline-block; -// } - -// .plume-content [class*='language-'] code .diff::before { -// position: absolute; -// left: 10px; -// } - -// .plume-content [class*='language-'] .has-focused-lines .line:not(.has-focus) { -// filter: blur(0.095rem); -// opacity: 0.4; -// transition: filter 0.35s, opacity 0.35s; -// } - -// .plume-content [class*='language-'] .has-focused-lines .line:not(.has-focus) { -// opacity: 0.7; -// transition: filter 0.35s, opacity 0.35s; -// } - -// .plume-content -// [class*='language-']:hover -// .has-focused-lines -// .line:not(.has-focus) { -// filter: blur(0); -// opacity: 1; -// } - -// .plume-content [class*='language-'] code .diff.remove { -// background-color: var(--vp-code-line-diff-remove-color); -// opacity: 0.7; -// } - -// .plume-content [class*='language-'] code .diff.remove::before { -// content: '-'; -// color: var(--vp-code-line-diff-remove-symbol-color); -// } - -// .plume-content [class*='language-'] code .diff.add { -// background-color: var(--vp-code-line-diff-add-color); -// } - -// .plume-content [class*='language-'] code .diff.add::before { -// content: '+'; -// color: var(--vp-code-line-diff-add-symbol-color); -// } - -// .plume-content div[class*='language-'].line-numbers-mode { -// /*rtl:ignore*/ -// padding-left: 32px; -// } - -// .plume-content .line-numbers { -// position: absolute; -// top: 0; -// bottom: 0; -// /*rtl:ignore*/ -// left: 0; -// z-index: 3; -// /*rtl:ignore*/ -// border-right: 1px solid var(--vp-code-block-divider-color); -// padding-top: 16px; -// width: 32px; -// text-align: center; -// font-family: var(--vp-font-family-mono); -// line-height: var(--vp-code-line-height); -// font-size: var(--vp-code-font-size); -// color: var(--vp-code-line-number-color); -// transition: border-color 0.5s, color 0.5s; -// } - -// .plume-content [class*='language-'] > button.copy { -// /*rtl:ignore*/ -// direction: ltr; -// position: absolute; -// top: 8px; -// /*rtl:ignore*/ -// right: 8px; -// z-index: 3; -// display: block; -// justify-content: center; -// align-items: center; -// border-radius: 4px; -// width: 40px; -// height: 40px; -// background-color: var(--vp-code-block-bg); -// opacity: 0; -// cursor: pointer; -// background-image: var(--vp-icon-copy); -// background-position: 50%; -// background-size: 20px; -// background-repeat: no-repeat; -// transition: opacity 0.4s; -// } - -// .plume-content [class*='language-']:hover > button.copy, -// .plume-content [class*='language-'] > button.copy:focus { -// opacity: 1; -// } - -// .plume-content [class*='language-'] > button.copy:hover { -// background-color: var(--vp-code-copy-code-hover-bg); -// } - -// .plume-content [class*='language-'] > button.copy.copied, -// .plume-content [class*='language-'] > button.copy:hover.copied { -// /*rtl:ignore*/ -// border-radius: 0 4px 4px 0; -// background-color: var(--vp-code-copy-code-hover-bg); -// background-image: var(--vp-icon-copied); -// } - -// .plume-content [class*='language-'] > button.copy.copied::before, -// .plume-content [class*='language-'] > button.copy:hover.copied::before { -// position: relative; -// /*rtl:ignore*/ -// left: -65px; -// display: flex; -// justify-content: center; -// align-items: center; -// /*rtl:ignore*/ -// border-radius: 4px 0 0 4px; -// width: 64px; -// height: 40px; -// text-align: center; -// font-size: 12px; -// font-weight: 500; -// color: var(--vp-code-copy-code-active-text); -// background-color: var(--vp-code-copy-code-hover-bg); -// white-space: nowrap; -// content: 'Copied'; -// } - -// .plume-content [class*='language-'] > span.lang { -// position: absolute; -// top: 6px; -// /*rtl:ignore*/ -// right: 12px; -// z-index: 2; -// font-size: 12px; -// font-weight: 500; -// color: var(--vp-c-text-dark-3); -// transition: color 0.4s, opacity 0.4s; -// } - -// .plume-content [class*='language-']:hover > button.copy + span.lang, -// .plume-content [class*='language-'] > button.copy:focus + span.lang { -// opacity: 0; -// } diff --git a/theme/src/client/styles/index.scss b/theme/src/client/styles/index.scss index e33c5be3..1862dbe9 100644 --- a/theme/src/client/styles/index.scss +++ b/theme/src/client/styles/index.scss @@ -5,5 +5,6 @@ @use 'utils'; @use 'content'; @use 'code'; +@use 'md-enhance'; @use '@vuepress/plugin-palette/style'; diff --git a/theme/src/client/styles/md-enhance.scss b/theme/src/client/styles/md-enhance.scss new file mode 100644 index 00000000..0dbad564 --- /dev/null +++ b/theme/src/client/styles/md-enhance.scss @@ -0,0 +1,90 @@ +.plume-content .hint-container { + border-radius: 8px; + padding: 16px 16px 8px; + line-height: 24px; + font-size: var(--vp-custom-block-font-size); + color: var(--vp-c-text-2); +} + +.plume-content .hint-container .hint-container-title { + font-weight: 600; + margin-top: 0; +} + +.hint-container.note { + color: var(--vp-custom-block-info-text); +} + +.hint-container.tip { + color: var(--vp-custom-block-tip-text); +} + +.hint-container.warning { + color: var(--vp-custom-block-warning-text); +} + +.hint-container.caution { + color: var(--vp-custom-block-danger-text); +} + +.hint-container.detail { + color: var(--vp-custom-block-detail-text); +} + +.plume-content .hint-container.details summary { + margin: -1.5rem -1.5rem -1.1rem; + font-weight: 700; + cursor: pointer; + color: var(--vp-c-text-1); +} + +.plume-content .hint-container.details summary + p { + margin: 8px 0; +} + +.plume-content .hint-container p + p { + margin: 8px 0; +} + +.plume-content .hint-container code { + font-size: var(--vp-custom-block-code-font-size); +} + +.plume-content .hint-container { + &.note, + &.tip, + &.detail, + &.important { + a, + code { + color: var(--vp-c-brand-1); + } + a:hover { + color: var(--vp-c-brand-2); + } + } + &.warning { + a, + code { + color: var(--vp-c-warning-1); + } + a:hover { + color: var(--vp-c-warning-2); + } + } + &.caution { + a, + code { + color: var(--vp-c-danger-1); + } + a:hover { + color: var(--vp-c-danger-2); + } + } + + th, + blockquote > p { + font-size: var(--vp-custom-block-font-size); + color: inherit; + } +} diff --git a/theme/src/client/styles/normalize.scss b/theme/src/client/styles/normalize.scss index 0a41c4ee..c74c801c 100644 --- a/theme/src/client/styles/normalize.scss +++ b/theme/src/client/styles/normalize.scss @@ -256,3 +256,12 @@ p { vite-error-overlay { z-index: 9999; } + +mjx-container { + display: inline-block; + margin: auto 2px -2px; +} + +mjx-container > svg { + margin: auto; +} diff --git a/theme/src/client/styles/vars.scss b/theme/src/client/styles/vars.scss index 5c05d544..6fe762cf 100644 --- a/theme/src/client/styles/vars.scss +++ b/theme/src/client/styles/vars.scss @@ -1,155 +1,233 @@ /** - * Colors Base - * - * These are the pure base color presets. Most of the time, you should not be - * using these colors directly in the theme but rather use "Colors Theme" - * instead because those are "Theme (light or dark)" dependant. + * Colors: Solid * -------------------------------------------------------------------------- */ :root { --vp-c-white: #ffffff; --vp-c-black: #000000; - --vp-c-gray: #8e8e93; + --vp-c-neutral: var(--vp-c-black); + --vp-c-neutral-inverse: var(--vp-c-white); +} - --vp-c-text-light-1: rgba(60, 60, 67, 0.92); - --vp-c-text-light-2: rgba(60, 60, 67, 0.7); - --vp-c-text-light-3: rgba(60, 60, 67, 0.33); +.dark { + --vp-c-neutral: var(--vp-c-white); + --vp-c-neutral-inverse: var(--vp-c-black); +} - --vp-c-text-dark-1: rgba(255, 255, 245, 0.86); - --vp-c-text-dark-2: rgba(235, 235, 245, 0.6); - --vp-c-text-dark-3: rgba(235, 235, 245, 0.38); +/** + * Colors: Palette + * + * The primitive colors used for accent colors. These colors are referenced + * by functional colors such as "Text", "Background", or "Brand". + * + * Each colors have exact same color scale system with 3 levels of solid + * colors with different brightness, and 1 soft color. + * + * - `XXX-1`: The most solid color used mainly for colored text. It must + * satisfy the contrast ratio against when used on top of `XXX-soft`. + * + * - `XXX-2`: The color used mainly for hover state of the button. + * + * - `XXX-3`: The color for solid background, such as bg color of the button. + * It must satisfy the contrast ratio with pure white (#ffffff) text on + * top of it. + * + * - `XXX-soft`: The color used for subtle background such as custom container + * or badges. It must satisfy the contrast ratio when putting `XXX-1` colors + * on top of it. + * + * The soft color must be semi transparent alpha channel. This is crucial + * because it allows adding multiple "soft" colors on top of each other + * to create a accent, such as when having inline code block inside + * custom containers. + * -------------------------------------------------------------------------- */ - --vp-c-green: #10b981; - --vp-c-green-light: #34d399; - --vp-c-green-lighter: #6ee7b7; - --vp-c-green-dark: #059669; - --vp-c-green-darker: #047857; - --vp-c-green-dimm-1: rgba(16, 185, 129, 0.05); - --vp-c-green-dimm-2: rgba(16, 185, 129, 0.2); - --vp-c-green-dimm-3: rgba(16, 185, 129, 0.5); +:root { + --vp-c-gray-1: #dddde3; + --vp-c-gray-2: #e4e4e9; + --vp-c-gray-3: #ebebef; + --vp-c-gray-soft: rgba(142, 150, 170, 0.14); - --vp-c-yellow: #eab308; - --vp-c-yellow-light: #facc15; - --vp-c-yellow-lighter: #fde047; - --vp-c-yellow-dark: #ca8a04; - --vp-c-yellow-darker: #a16207; - --vp-c-yellow-dimm-1: rgba(234, 179, 8, 0.05); - --vp-c-yellow-dimm-2: rgba(234, 179, 8, 0.2); - --vp-c-yellow-dimm-3: rgba(234, 179, 8, 0.5); + --vp-c-turquoise-1: #5086a1; + --vp-c-turquoise-2: #6aa1b7; + --vp-c-turquoise-3: #8cccd5; + --vp-c-turquoise-soft: rgba(131, 208, 218, 0.314); - --vp-c-red: #f43f5e; - --vp-c-red-light: #fb7185; - --vp-c-red-lighter: #fda4af; - --vp-c-red-dark: #e11d48; - --vp-c-red-darker: #be123c; - --vp-c-red-dimm-1: rgba(244, 63, 94, 0.05); - --vp-c-red-dimm-2: rgba(244, 63, 94, 0.2); - --vp-c-red-dimm-3: rgba(244, 63, 94, 0.5); + --vp-c-green-1: #18794e; + --vp-c-green-2: #299764; + --vp-c-green-3: #30a46c; + --vp-c-green-soft: rgba(16, 185, 129, 0.14); + + --vp-c-yellow-1: #915930; + --vp-c-yellow-2: #946300; + --vp-c-yellow-3: #9f6a00; + --vp-c-yellow-soft: rgba(234, 179, 8, 0.14); + + --vp-c-red-1: #b8272c; + --vp-c-red-2: #d5393e; + --vp-c-red-3: #e0575b; + --vp-c-red-soft: rgba(244, 63, 94, 0.14); --vp-c-sponsor: #db2777; } +.dark { + --vp-c-gray-1: #515c67; + --vp-c-gray-2: #414853; + --vp-c-gray-3: #32363f; + --vp-c-gray-soft: rgba(101, 117, 133, 0.16); + + --vp-c-turquoise-1: #8cccd5; + --vp-c-turquoise-2: #6aa1b7; + --vp-c-turquoise-3: #5086a1; + --vp-c-turquoise-soft: rgba(131, 208, 218, 0.314); + + --vp-c-green-1: #3dd68c; + --vp-c-green-2: #30a46c; + --vp-c-green-3: #298459; + --vp-c-green-soft: rgba(16, 185, 129, 0.16); + + --vp-c-yellow-1: #f9b44e; + --vp-c-yellow-2: #da8b17; + --vp-c-yellow-3: #a46a0a; + --vp-c-yellow-soft: rgba(234, 179, 8, 0.16); + + --vp-c-red-1: #f66f81; + --vp-c-red-2: #f14158; + --vp-c-red-3: #b62a3c; + --vp-c-red-soft: rgba(244, 63, 94, 0.16); +} + /** - * Colors Theme + * Colors: Background + * + * - `bg`: The bg color used for main screen. + * + * - `bg-alt`: The alternative bg color used in places such as "sidebar", + * or "code block". + * + * - `bg-elv`: The elevated bg color. This is used at parts where it "floats", + * such as "dialog". + * + * - `bg-soft`: The bg color to slightly distinguish some components from + * the page. Used for things like "carbon ads" or "table". * -------------------------------------------------------------------------- */ :root { --vp-c-bg: #ffffff; - - --vp-c-bg-elv: #ffffff; - --vp-c-bg-elv-up: #ffffff; - --vp-c-bg-elv-down: #f6f6f7; - --vp-c-bg-elv-mute: #f6f6f7; - - --vp-c-bg-soft: #f6f6f7; - --vp-c-bg-soft-up: #ffffff; - --vp-c-bg-soft-down: #e3e3e5; - --vp-c-bg-soft-mute: #e3e3e5; - --vp-c-bg-alt: #f6f6f7; - - --vp-c-border: rgba(60, 60, 67, 0.29); - --vp-c-divider: rgba(60, 60, 67, 0.12); - --vp-c-gutter: rgba(60, 60, 67, 0.12); - - --vp-c-neutral: var(--vp-c-black); - --vp-c-neutral-inverse: var(--vp-c-white); - - --vp-c-text-1: var(--vp-c-text-light-1); - --vp-c-text-2: var(--vp-c-text-light-2); - --vp-c-text-3: var(--vp-c-text-light-3); - - --vp-c-text-inverse-1: var(--vp-c-text-dark-1); - --vp-c-text-inverse-2: var(--vp-c-text-dark-2); - --vp-c-text-inverse-3: var(--vp-c-text-dark-3); - - --vp-c-text-hero-name: var(--vp-c-text-dark-1); - --vp-c-text-hero-tagline: var(--vp-c-text-dark-2); - --vp-c-text-hero-text: var(--vp-c-text-dark-1); - - --vp-c-text-code: #476582; - - --vp-c-brand: var(--vp-c-green); - --vp-c-brand-light: var(--vp-c-green-light); - --vp-c-brand-lighter: var(--vp-c-green-lighter); - --vp-c-brand-dark: var(--vp-c-green-dark); - --vp-c-brand-darker: var(--vp-c-green-darker); - - --vp-c-mute: #f6f6f7; - --vp-c-mute-light: #f9f9fc; - --vp-c-mute-lighter: #ffffff; - --vp-c-mute-dark: #e3e3e5; - --vp-c-mute-darker: #d7d7d9; - - --search-bg-color: var(--vp-c-bg-elv-mute); - --search-text-color: var(--vp-c-text-2); - --search-item-text-color: var(--vp-c-text-1); - --search-item-focus-bg-color: var(--vp-c-bg-alt); - --search-input-width: 8rem; - --search-result-width: 20rem; - --search-border-color: var(--vp-c-divider); - - --c-brand: var(--vp-c-brand); + --vp-c-bg-elv: #ffffff; + --vp-c-bg-soft: #f6f6f7; } -html.dark { - --vp-c-bg: #1e1e20; - - --vp-c-bg-elv: #252529; - --vp-c-bg-elv-up: #313136; - --vp-c-bg-elv-down: #1e1e20; - --vp-c-bg-elv-mute: #313136; - - --vp-c-bg-soft: #252529; - --vp-c-bg-soft-up: #313136; - --vp-c-bg-soft-down: #1e1e20; - --vp-c-bg-soft-mute: #313136; - +.dark { + --vp-c-bg: #1b1b1f; --vp-c-bg-alt: #161618; + --vp-c-bg-elv: #202127; + --vp-c-bg-soft: #202127; +} - --vp-c-border: rgba(82, 82, 89, 0.68); - --vp-c-divider: rgba(82, 82, 89, 0.32); +/** + * Colors: Borders + * + * - `divider`: This is used for separators. This is used to divide sections + * within the same components, such as having separator on "h2" heading. + * + * - `border`: This is designed for borders on interactive components. + * For example this should be used for a button outline. + * + * - `gutter`: This is used to divide components in the page. For example + * the header and the lest of the page. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-border: #c2c2c4; + --vp-c-divider: #e2e2e3; + --vp-c-gutter: #e2e2e3; +} + +.dark { + --vp-c-border: #3c3f44; + --vp-c-divider: #2e2e32; --vp-c-gutter: #000000; +} - --vp-c-neutral: var(--vp-c-white); - --vp-c-neutral-inverse: var(--vp-c-black); +/** + * Colors: Text + * + * - `text-1`: Used for primary text. + * + * - `text-2`: Used for muted texts, such as "inactive menu" or "info texts". + * + * - `text-3`: Used for subtle texts, such as "placeholders" or "caret icon". + * -------------------------------------------------------------------------- */ - --vp-c-text-1: var(--vp-c-text-dark-1); - --vp-c-text-2: var(--vp-c-text-dark-2); - --vp-c-text-3: var(--vp-c-text-dark-3); +:root { + --vp-c-text-1: rgba(60, 60, 67); + --vp-c-text-2: rgba(60, 60, 67, 0.78); + --vp-c-text-3: rgba(60, 60, 67, 0.56); - --vp-c-text-inverse-1: var(--vp-c-text-light-1); - --vp-c-text-inverse-2: var(--vp-c-text-light-2); - --vp-c-text-inverse-3: var(--vp-c-text-light-3); + --vp-c-text-dark-1: rgba(255, 255, 245, 0.86); + --vp-c-text-dark-2: rgba(235, 235, 245, 0.6); + --vp-c-text-dark-3: rgba(235, 235, 245, 0.38); +} - --vp-c-text-code: #c9def1; +.dark { + --vp-c-text-1: rgba(255, 255, 245, 0.86); + --vp-c-text-2: rgba(235, 235, 245, 0.6); + --vp-c-text-3: rgba(235, 235, 245, 0.38); +} - --vp-c-mute: #313136; - --vp-c-mute-light: #3a3a3c; - --vp-c-mute-lighter: #505053; - --vp-c-mute-dark: #2c2c30; - --vp-c-mute-darker: #252529; +/** + * Colors: Function + * + * - `default`: The color used purely for subtle indication without any + * special meanings attached to it such as bg color for menu hover state. + * + * - `brand`: Used for primary brand colors, such as link text, button with + * brand theme, etc. + * + * - `tip`: Used to indicate useful information. The default theme uses the + * brand color for this by default. + * + * - `warning`: Used to indicate warning to the users. Used in custom + * container, badges, etc. + * + * - `danger`: Used to show error, or dangerous message to the users. Used + * in custom container, badges, etc. + * + * To understand the scaling system, refer to "Colors: Palette" section. + * -------------------------------------------------------------------------- */ + +:root { + --vp-c-default-1: var(--vp-c-gray-1); + --vp-c-default-2: var(--vp-c-gray-2); + --vp-c-default-3: var(--vp-c-gray-3); + --vp-c-default-soft: var(--vp-c-gray-soft); + + --vp-c-brand-1: var(--vp-c-turquoise-1); + --vp-c-brand-2: var(--vp-c-turquoise-2); + --vp-c-brand-3: var(--vp-c-turquoise-3); + --vp-c-brand-soft: var(--vp-c-turquoise-soft); + + /* DEPRECATED: Use `--vp-c-brand-1` instead. */ + --vp-c-brand: var(--vp-c-brand-1); + + --vp-c-tip-1: var(--vp-c-brand-1); + --vp-c-tip-2: var(--vp-c-brand-2); + --vp-c-tip-3: var(--vp-c-brand-3); + --vp-c-tip-soft: var(--vp-c-brand-soft); + + --vp-c-warning-1: var(--vp-c-yellow-1); + --vp-c-warning-2: var(--vp-c-yellow-2); + --vp-c-warning-3: var(--vp-c-yellow-3); + --vp-c-warning-soft: var(--vp-c-yellow-soft); + + --vp-c-danger-1: var(--vp-c-red-1); + --vp-c-danger-2: var(--vp-c-red-2); + --vp-c-danger-3: var(--vp-c-red-3); + --vp-c-danger-soft: var(--vp-c-red-soft); } /** @@ -182,21 +260,12 @@ html.dark { * -------------------------------------------------------------------------- */ :root { - --vp-z-index-local-nav: 10; - --vp-z-index-nav: 20; - --vp-z-index-layout-top: 30; - --vp-z-index-backdrop: 40; - --vp-z-index-sidebar: 50; - --vp-z-index-footer: 60; -} - -/** - * Icons - * -------------------------------------------------------------------------- */ - -:root { - --vp-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2'/%3E%3C/svg%3E"); - --vp-icon-copied: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' height='20' width='20' stroke='rgba(128,128,128,1)' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 5H7a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-2M9 5a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2M9 5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2m-6 9 2 2 4-4'/%3E%3C/svg%3E"); + --vp-z-index-footer: 10; + --vp-z-index-local-nav: 20; + --vp-z-index-nav: 30; + --vp-z-index-layout-top: 40; + --vp-z-index-backdrop: 50; + --vp-z-index-sidebar: 60; } /** @@ -207,6 +276,14 @@ html.dark { --vp-layout-max-width: 1440px; } +/** + * Component: Header Anchor + * -------------------------------------------------------------------------- */ + +:root { + --vp-header-anchor-symbol: '#'; +} + /** * Component: Code * -------------------------------------------------------------------------- */ @@ -214,46 +291,42 @@ html.dark { :root { --vp-code-line-height: 1.7; --vp-code-font-size: 0.875em; + --vp-code-color: var(--vp-c-brand-1); + --vp-code-link-color: var(--vp-c-brand-1); + --vp-code-link-hover-color: var(--vp-c-brand-2); + --vp-code-bg: var(--vp-c-default-soft); - --vp-code-block-color: var(--vp-c-text-dark-1); - // --vp-code-block-bg: #292b30; - --vp-code-block-bg: #f6f6f7; - --vp-code-block-divider-color: #e2e2e3; + --vp-code-block-color: var(--vp-c-text-2); + --vp-code-block-bg: var(--vp-c-bg-alt); + --vp-code-block-divider-color: var(--vp-c-gutter); - --code-tabs-nav-text-color: var(--vp-c-text-light-2); - --code-tabs-nav-bg-color: #e6e6e7; - --code-tabs-nav-hover-color: var(--vp-code-block-bg); + --vp-code-lang-color: var(--vp-c-text-3); - --vp-code-line-highlight-color: rgba(142, 150, 170, 0.14); - --vp-code-line-number-color: var(--vp-c-text-light-3); + --vp-code-line-highlight-color: var(--vp-c-default-soft); + --vp-code-line-number-color: var(--vp-c-text-3); - --vp-code-line-diff-add-color: var(--vp-c-green-dimm-2); - --vp-code-line-diff-add-symbol-color: var(--vp-c-green); + --vp-code-line-diff-add-color: var(--vp-c-green-soft); + --vp-code-line-diff-add-symbol-color: var(--vp-c-green-1); - --vp-code-line-diff-remove-color: var(--vp-c-red-dimm-2); - --vp-code-line-diff-remove-symbol-color: var(--vp-c-red); + --vp-code-line-diff-remove-color: var(--vp-c-red-soft); + --vp-code-line-diff-remove-symbol-color: var(--vp-c-red-1); - --vp-code-line-warning-color: var(--vp-c-yellow-dimm-2); - --vp-code-line-error-color: var(--vp-c-red-dimm-2); + --vp-code-line-warning-color: var(--vp-c-yellow-soft); + --vp-code-line-error-color: var(--vp-c-red-soft); - --vp-code-copy-code-hover-bg: rgba(255, 255, 255, 0.05); - --vp-code-copy-code-active-text: var(--vp-c-text-dark-2); + --vp-code-copy-code-border-color: var(--vp-c-divider); + --vp-code-copy-code-bg: var(--vp-c-bg-soft); + --vp-code-copy-code-hover-border-color: var(--vp-c-divider); + --vp-code-copy-code-hover-bg: var(--vp-c-bg); + --vp-code-copy-code-active-text: var(--vp-c-text-2); + --vp-code-copy-copied-text-content: 'Copied'; --vp-code-tab-divider: var(--vp-code-block-divider-color); - --vp-code-tab-text-color: var(--vp-c-text-dark-2); + --vp-code-tab-text-color: var(--vp-c-text-2); --vp-code-tab-bg: var(--vp-code-block-bg); - --vp-code-tab-hover-text-color: var(--vp-c-text-dark-1); - --vp-code-tab-active-text-color: var(--vp-c-text-dark-1); - --vp-code-tab-active-bar-color: var(--vp-c-brand); -} - -html.dark { - --vp-code-block-bg: #161618; - --vp-code-block-divider-color: #000000; - --vp-code-line-number-color: var(--vp-c-text-dark-3); - --code-tabs-nav-text-color: var(--vp-c-text-dark-2); - --code-tabs-nav-bg-color: #3a404c; - --code-tabs-nav-hover-color: #434a57; + --vp-code-tab-hover-text-color: var(--vp-c-text-1); + --vp-code-tab-active-text-color: var(--vp-c-text-1); + --vp-code-tab-active-bar-color: var(--vp-c-brand-1); } /** @@ -261,28 +334,28 @@ html.dark { * -------------------------------------------------------------------------- */ :root { - --vp-button-brand-border: var(--vp-c-brand-lighter); + --vp-button-brand-border: transparent; --vp-button-brand-text: var(--vp-c-white); - --vp-button-brand-bg: var(--vp-c-brand); - --vp-button-brand-hover-border: var(--vp-c-brand-lighter); + --vp-button-brand-bg: var(--vp-c-brand-1); + --vp-button-brand-hover-border: transparent; --vp-button-brand-hover-text: var(--vp-c-white); - --vp-button-brand-hover-bg: var(--vp-c-brand-dark); - --vp-button-brand-active-border: var(--vp-c-brand-lighter); + --vp-button-brand-hover-bg: var(--vp-c-brand-2); + --vp-button-brand-active-border: transparent; --vp-button-brand-active-text: var(--vp-c-white); - --vp-button-brand-active-bg: var(--vp-c-brand-darker); + --vp-button-brand-active-bg: var(--vp-c-brand-1); - --vp-button-alt-border: var(--vp-c-border); - --vp-button-alt-text: var(--vp-c-neutral); - --vp-button-alt-bg: var(--vp-c-mute); - --vp-button-alt-hover-border: var(--vp-c-border); - --vp-button-alt-hover-text: var(--vp-c-neutral); - --vp-button-alt-hover-bg: var(--vp-c-mute-dark); - --vp-button-alt-active-border: var(--vp-c-border); - --vp-button-alt-active-text: var(--vp-c-neutral); - --vp-button-alt-active-bg: var(--vp-c-mute-darker); + --vp-button-alt-border: transparent; + --vp-button-alt-text: var(--vp-c-text-1); + --vp-button-alt-bg: var(--vp-c-default-3); + --vp-button-alt-hover-border: transparent; + --vp-button-alt-hover-text: var(--vp-c-text-1); + --vp-button-alt-hover-bg: var(--vp-c-default-2); + --vp-button-alt-active-border: transparent; + --vp-button-alt-active-text: var(--vp-c-text-1); + --vp-button-alt-active-bg: var(--vp-c-default-1); - --vp-button-sponsor-border: var(--vp-c-gray-light-3); - --vp-button-sponsor-text: var(--vp-c-text-light-2); + --vp-button-sponsor-border: var(--vp-c-text-2); + --vp-button-sponsor-text: var(--vp-c-text-2); --vp-button-sponsor-bg: transparent; --vp-button-sponsor-hover-border: var(--vp-c-sponsor); --vp-button-sponsor-hover-text: var(--vp-c-sponsor); @@ -292,9 +365,10 @@ html.dark { --vp-button-sponsor-active-bg: transparent; } -html.dark { - --vp-button-sponsor-border: var(--vp-c-gray-dark-1); - --vp-button-sponsor-text: var(--vp-c-text-dark-2); +.dark { + --vp-button-brand-bg: var(--vp-c-brand-2); + --vp-button-brand-hover-bg: var(--vp-c-brand-1); + --vp-button-brand-active-bg: var(--vp-c-brand-3); } /** @@ -305,30 +379,30 @@ html.dark { --vp-custom-block-font-size: 14px; --vp-custom-block-code-font-size: 13px; - --vp-custom-block-info-border: var(--vp-c-border); - --vp-custom-block-info-text: var(--vp-c-text-2); - --vp-custom-block-info-bg: var(--vp-c-bg-soft); - --vp-custom-block-info-code-bg: var(--vp-c-mute); + --vp-custom-block-info-border: transparent; + --vp-custom-block-info-text: var(--vp-c-text-1); + --vp-custom-block-info-bg: var(--vp-c-default-soft); + --vp-custom-block-info-code-bg: var(--vp-c-default-soft); - --vp-custom-block-tip-border: var(--vp-c-green-dimm-3); - --vp-custom-block-tip-text: var(--vp-c-green); - --vp-custom-block-tip-bg: var(--vp-c-green-dimm-1); - --vp-custom-block-tip-code-bg: var(--vp-custom-block-tip-bg); + --vp-custom-block-tip-border: transparent; + --vp-custom-block-tip-text: var(--vp-c-text-1); + --vp-custom-block-tip-bg: var(--vp-c-brand-soft); + --vp-custom-block-tip-code-bg: var(--vp-c-brand-soft); - --vp-custom-block-warning-border: var(--vp-c-yellow-dimm-3); - --vp-custom-block-warning-text: var(--vp-c-yellow); - --vp-custom-block-warning-bg: var(--vp-c-yellow-dimm-1); - --vp-custom-block-warning-code-bg: var(--vp-custom-block-warning-bg); + --vp-custom-block-warning-border: transparent; + --vp-custom-block-warning-text: var(--vp-c-text-1); + --vp-custom-block-warning-bg: var(--vp-c-warning-soft); + --vp-custom-block-warning-code-bg: var(--vp-c-warning-soft); - --vp-custom-block-danger-border: var(--vp-c-red-dimm-3); - --vp-custom-block-danger-text: var(--vp-c-red); - --vp-custom-block-danger-bg: var(--vp-c-red-dimm-1); - --vp-custom-block-danger-code-bg: var(--vp-custom-block-danger-bg); + --vp-custom-block-danger-border: transparent; + --vp-custom-block-danger-text: var(--vp-c-text-1); + --vp-custom-block-danger-bg: var(--vp-c-danger-soft); + --vp-custom-block-danger-code-bg: var(--vp-c-danger-soft); --vp-custom-block-details-border: var(--vp-custom-block-info-border); --vp-custom-block-details-text: var(--vp-custom-block-info-text); --vp-custom-block-details-bg: var(--vp-custom-block-info-bg); - --vp-custom-block-details-code-bg: var(--vp-custom-block-details-bg); + --vp-custom-block-details-code-bg: var(--vp-custom-block-info-code-bg); } /** @@ -338,9 +412,8 @@ html.dark { :root { --vp-input-border-color: var(--vp-c-border); --vp-input-bg-color: var(--vp-c-bg-alt); - --vp-input-hover-border-color: var(--vp-c-gray); - --vp-input-switch-bg-color: var(--vp-c-mute); + --vp-input-switch-bg-color: var(--vp-c-gray-soft); } /** @@ -351,6 +424,15 @@ html.dark { --vp-nav-height: 64px; --vp-nav-bg-color: var(--vp-c-bg); --vp-nav-screen-bg-color: var(--vp-c-bg); + --vp-nav-logo-height: 24px; +} + +.hide-nav { + --vp-nav-height: 0px; +} + +.hide-nav .VPSidebar { + --vp-nav-height: 22px; } /** @@ -383,11 +465,15 @@ html.dark { * -------------------------------------------------------------------------- */ :root { - --vp-home-hero-name-color: var(--vp-c-brand); + --vp-home-hero-name-color: var(--vp-c-brand-1); --vp-home-hero-name-background: transparent; --vp-home-hero-image-background-image: none; --vp-home-hero-image-filter: none; + + --vp-c-text-hero-name: var(--vp-c-text-dark-1); + --vp-c-text-hero-tagline: var(--vp-c-text-dark-2); + --vp-c-text-hero-text: var(--vp-c-text-dark-1); } /** @@ -395,33 +481,114 @@ html.dark { * -------------------------------------------------------------------------- */ :root { - --vp-badge-info-border: var(--vp-c-border); + --vp-badge-info-border: transparent; --vp-badge-info-text: var(--vp-c-text-2); - --vp-badge-info-bg: var(--vp-c-bg-soft); + --vp-badge-info-bg: var(--vp-c-default-soft); - --vp-badge-tip-border: var(--vp-c-green-dark); - --vp-badge-tip-text: var(--vp-c-green); - --vp-badge-tip-bg: var(--vp-c-green-dimm-1); + --vp-badge-tip-border: transparent; + --vp-badge-tip-text: var(--vp-c-brand-1); + --vp-badge-tip-bg: var(--vp-c-brand-soft); - --vp-badge-warning-border: var(--vp-c-yellow-dark); - --vp-badge-warning-text: var(--vp-c-yellow); - --vp-badge-warning-bg: var(--vp-c-yellow-dimm-1); + --vp-badge-warning-border: transparent; + --vp-badge-warning-text: var(--vp-c-warning-1); + --vp-badge-warning-bg: var(--vp-c-warning-soft); - --vp-badge-danger-border: var(--vp-c-red-dark); - --vp-badge-danger-text: var(--vp-c-red); - --vp-badge-danger-bg: var(--vp-c-red-dimm-1); + --vp-badge-danger-border: transparent; + --vp-badge-danger-text: var(--vp-c-danger-1); + --vp-badge-danger-bg: var(--vp-c-danger-soft); } /** - * Component: CarbonAds + * Component: Carbon Ads * -------------------------------------------------------------------------- */ +// :root { +// --vp-carbon-ads-text-color: var(--vp-c-text-1); +// --vp-carbon-ads-poweredby-color: var(--vp-c-text-2); +// --vp-carbon-ads-bg-color: var(--vp-c-bg-soft); +// --vp-carbon-ads-hover-text-color: var(--vp-c-brand-1); +// --vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1); +// } + +/** + * Component: Local Search + * -------------------------------------------------------------------------- */ + :root { - --vp-carbon-ads-text-color: var(--vp-c-text-1); - --vp-carbon-ads-poweredby-color: var(--vp-c-text-2); - --vp-carbon-ads-bg-color: var(--vp-c-bg-soft); - --vp-carbon-ads-hover-text-color: var(--vp-c-brand); - --vp-carbon-ads-hover-poweredby-color: var(--vp-c-text-1); + --vp-local-search-bg: var(--vp-c-bg); + --vp-local-search-result-bg: var(--vp-c-bg); + --vp-local-search-result-border: var(--vp-c-divider); + --vp-local-search-result-selected-bg: var(--vp-c-bg); + --vp-local-search-result-selected-border: var(--vp-c-brand-1); + --vp-local-search-highlight-bg: var(--vp-c-brand-1); + --vp-local-search-highlight-text: var(--vp-c-neutral-inverse); +} + +/** Component: Search **/ +:root { + --search-bg-color: var(--vp-c-bg-elv); + --search-text-color: var(--vp-c-text-2); + --search-item-text-color: var(--vp-c-text-1); + --search-item-focus-bg-color: var(--vp-c-bg-alt); + --search-input-width: 8rem; + --search-result-width: 20rem; + --search-border-color: var(--vp-c-divider); + --search-accent-color: var(--vp-c-brand-2); +} + +/* md enhance code-tabs */ +:root { + --code-tabs-nav-text-color: var(--vp-c-text-1); + --code-tabs-nav-bg-color: #e6e6e7; + --code-tabs-nav-hover-color: var(--vp-code-block-bg); +} + +.dark { + --code-tabs-nav-bg-color: #3a404c; + --code-tabs-nav-hover-color: #434a57; +} + +/* md enhance hints */ +:root { + // important + --important-title-color: var(--vp-c-text-1); + --important-bg-color: #f4eefe; + --important-border-color: #f4eefe; + --important-code-bg-color: rgb(163 113 247 / 10%); + // info + --info-title-color: var(--vp-c-text-1); + --info-bg-color: var(--vp-custom-block-info-bg); + --info-border-color: var(--vp-custom-block-info-border); + --info-code-bg-color: var(--vp-custom-block-info-code-bg); + + // note + --note-title-color: var(--vp-c-text-3); + --note-bg-color: var(--vp-c-bg-elv); + --note-border-color: var(--vp-c-divider); + --note-code-bg-color: var(--vp-c-default-soft); + + // tip + --tip-title-color: var(--vp-c-text-1); + --tip-bg-color: var(--vp-custom-block-tip-bg); + --tip-border-color: var(--vp-custom-block-tip-border); + --tip-code-bg-color: var(--vp-custom-block-tip-code-bg); + + // warning + --warning-title-color: var(--vp-c-text-1); + --warning-bg-color: var(--vp-custom-block-warning-bg); + --warning-border-color: var(--vp-custom-block-warning-border); + --warning-code-bg-color: var(--vp-custom-block-warning-code-bg); + + // caution + --caution-title-color: var(--vp-c-text-1); + --caution-bg-color: var(--vp-custom-block-danger-bg); + --caution-border-color: var(--vp-custom-block-danger-border); + --caution-code-bg-color: var(--vp-custom-block-danger-code-bg); + + // detail + --detail-bg-color: var(--vp-custom-block-details-bg); + --detail-text-color: inherit; + --detail-code-bg-color: var(--vp-custom-block-details-code-bg); } :root { diff --git a/theme/src/client/utils/index.ts b/theme/src/client/utils/index.ts index 7d319f6e..3961eb76 100644 --- a/theme/src/client/utils/index.ts +++ b/theme/src/client/utils/index.ts @@ -2,3 +2,5 @@ export * from './shared.js' export * from './normalizeLink.js' export * from './socialIcons.js' export * from './dom.js' +export * from './resolveEditLink.js' +export * from './resolveRepoType.js' diff --git a/theme/src/client/utils/resolveEditLink.ts b/theme/src/client/utils/resolveEditLink.ts new file mode 100644 index 00000000..7694786e --- /dev/null +++ b/theme/src/client/utils/resolveEditLink.ts @@ -0,0 +1,64 @@ +import { + isLinkHttp, + removeEndingSlash, + removeLeadingSlash, +} from '@vuepress/shared' +import { resolveRepoType } from './resolveRepoType.js' +import type { RepoType } from './resolveRepoType.js' + +export const editLinkPatterns: Record, string> = { + GitHub: ':repo/edit/:branch/:path', + GitLab: ':repo/-/edit/:branch/:path', + Gitee: ':repo/edit/:branch/:path', + Bitbucket: + ':repo/src/:branch/:path?mode=edit&spa=0&at=:branch&fileviewer=file-view-default', +} + +const resolveEditLinkPatterns = ({ + docsRepo, + editLinkPattern, +}: { + docsRepo: string + editLinkPattern?: string +}): string | null => { + if (editLinkPattern) { + return editLinkPattern + } + + const repoType = resolveRepoType(docsRepo) + if (repoType !== null) { + return editLinkPatterns[repoType] + } + + return null +} + +export const resolveEditLink = ({ + docsRepo, + docsBranch, + docsDir, + filePathRelative, + editLinkPattern, +}: { + docsRepo: string + docsBranch: string + docsDir: string + filePathRelative: string | null + editLinkPattern?: string +}): string | null => { + if (!filePathRelative) return null + + const pattern = resolveEditLinkPatterns({ docsRepo, editLinkPattern }) + if (!pattern) return null + + return pattern + .replace( + /:repo/, + isLinkHttp(docsRepo) ? docsRepo : `https://github.com/${docsRepo}`, + ) + .replace(/:branch/, docsBranch) + .replace( + /:path/, + removeLeadingSlash(`${removeEndingSlash(docsDir)}/${filePathRelative}`), + ) +} diff --git a/theme/src/client/utils/resolveRepoType.ts b/theme/src/client/utils/resolveRepoType.ts new file mode 100644 index 00000000..c63b5d22 --- /dev/null +++ b/theme/src/client/utils/resolveRepoType.ts @@ -0,0 +1,11 @@ +import { isLinkHttp } from '@vuepress/shared' + +export type RepoType = 'GitHub' | 'GitLab' | 'Gitee' | 'Bitbucket' | null + +export const resolveRepoType = (repo: string): RepoType => { + if (!isLinkHttp(repo) || /github\.com/.test(repo)) return 'GitHub' + if (/bitbucket\.org/.test(repo)) return 'Bitbucket' + if (/gitlab\.com/.test(repo)) return 'GitLab' + if (/gitee\.com/.test(repo)) return 'Gitee' + return null +} diff --git a/theme/src/node/plugins.ts b/theme/src/node/plugins.ts index 08a6efb8..63233d6d 100644 --- a/theme/src/node/plugins.ts +++ b/theme/src/node/plugins.ts @@ -97,9 +97,9 @@ export const setupPlugins = ( options.git !== false ? gitPlugin({ - createdTime: true, - updatedTime: true, - contributors: false, + createdTime: false, + updatedTime: localeOptions.lastUpdated !== false, + contributors: localeOptions.contributors !== false, }) : [], @@ -141,7 +141,10 @@ export const setupPlugins = ( ? docsearchPlugin(options.docsearch!) : [], - options.shikiji !== false ? shikijiPlugin(options.shikiji) : [], + options.shikiji !== false ? shikijiPlugin({ + theme: { light: 'vitesse-light', dark: 'vitesse-dark' }, + ...(options.shikiji ?? {}), + }) : [], options.copyCode !== false ? copyCodePlugin({ @@ -154,7 +157,7 @@ export const setupPlugins = ( ? mdEnhancePlugin( Object.assign( { - container: true, // info note tip warning danger details + hint: true, // info note tip warning danger details d codetabs: true, tabs: true, align: true, diff --git a/theme/src/node/theme.ts b/theme/src/node/theme.ts index 86e09aee..8f5f0391 100644 --- a/theme/src/node/theme.ts +++ b/theme/src/node/theme.ts @@ -34,6 +34,8 @@ export const plumeTheme = ({ plugins: setupPlugins(app, themePlugins, localeOptions), onInitialized: async (app) => await setupPage(app, localeOptions), extendsPage: (page: Page) => { + page.data.filePathRelative = page.filePathRelative + page.routeMeta.title = page.title autoCategory(app, page, localeOptions) pageContentRendered(page) }, diff --git a/theme/src/shared/frontmatter.ts b/theme/src/shared/frontmatter.ts index f39a80f0..8ed637c8 100644 --- a/theme/src/shared/frontmatter.ts +++ b/theme/src/shared/frontmatter.ts @@ -1,3 +1,5 @@ +import type { NavItemWithLink } from "."; + export interface PlumeThemeHomeFrontmatter { home?: true banner?: string @@ -15,7 +17,17 @@ export interface PlumeThemeHeroAction { text: string link?: string } -export interface PlumeThemePostFrontmatter { + +export interface PlumeThemePageFrontmatter { + editLink?: boolean + editLinkPattern?: string + lastUpdated?: boolean + contributors?: boolean + prev?: string | NavItemWithLink + next?: string | NavItemWithLink +} + +export interface PlumeThemePostFrontmatter extends PlumeThemePageFrontmatter { createTime?: string author?: string tags?: string[] @@ -24,6 +36,6 @@ export interface PlumeThemePostFrontmatter { banner?: string } -export interface PlumeThemeNoteFrontmatter { +export interface PlumeThemeNoteFrontmatter extends PlumeThemePageFrontmatter { createTime?: string } diff --git a/theme/src/shared/options/locale.ts b/theme/src/shared/options/locale.ts index 2e148b33..cb2261a1 100644 --- a/theme/src/shared/options/locale.ts +++ b/theme/src/shared/options/locale.ts @@ -160,11 +160,11 @@ export interface PlumeThemeLocaleData extends LocaleData { /** * repository of navbar */ - // repo?: null | string + repo?: null | string /** * repository text of navbar */ - // repoLabel?: string + repoLabel?: string /** * Navbar config @@ -172,6 +172,76 @@ export interface PlumeThemeLocaleData extends LocaleData { * Set to `false` to disable navbar in current locale */ navbar?: false | NavItem[] + /** + * Page meta - edit link config + * + * Whether to show "Edit this page" or not + */ + editLink?: boolean + + /** + * Page meta - edit link config + * + * The text to replace the default "Edit this page" + */ + editLinkText?: string + + /** + * Page meta - edit link config + * + * Pattern of edit link + * + * @example ':repo/edit/:branch/:path' + */ + editLinkPattern?: string + /** + * Page meta - edit link config + * + * Use `repo` config by default + * + * Set this config if your docs is placed in a different repo + */ + docsRepo?: string + + /** + * Page meta - edit link config + * + * Set this config if the branch of your docs is not 'main' + */ + docsBranch?: string + + /** + * Page meta - edit link config + * + * Set this config if your docs is placed in sub dir of your `docsRepo` + */ + docsDir?: string + /** + * Page meta - last updated config + * + * Whether to show "Last Updated" or not + */ + lastUpdated?: boolean + + /** + * Page meta - last updated config + * + * The text to replace the default "Last Updated" + */ + lastUpdatedText?: string + + /** + * Page meta - contributors config + * + * Whether to show "Contributors" or not + */ + contributors?: boolean + /** + * Page meta - contributors config + * + * The text to replace the default "Contributors" + */ + contributorsText?: string /** * 外部链接打开方式 */ @@ -191,6 +261,10 @@ export interface PlumeThemeLocaleData extends LocaleData { outlineLabel?: string + prevPageLabel?: string + + nextPageLabel?: string + footer?: | false | { diff --git a/theme/src/shared/page.ts b/theme/src/shared/page.ts index 0af684f0..90e4c1b3 100644 --- a/theme/src/shared/page.ts +++ b/theme/src/shared/page.ts @@ -1,11 +1,10 @@ -export interface PlumeThemePageData { - git: { - createTime: number - updateTime: number - } +import type { GitPluginPageData } from '@vuepress/plugin-git' + +export interface PlumeThemePageData extends GitPluginPageData { isBlogPost: boolean type: 'blog' | 'product' categoryList?: PageCategoryData[] + filePathRelative: string | null } export interface PageCategoryData { diff --git a/tsconfig.json b/tsconfig.json index 5ffe0625..92cae2f3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,10 @@ ], "@internal/*": ["./docs/.vuepress/.temp/internal/*"], "@vuepress-plume/*": ["./plugins/*/src/node/index.ts"], - "vuepress-theme-plume": ["./theme/src/node/index.ts"] + "vuepress-theme-plume": ["./theme/src/node/index.ts"], + "vuepress-plugin-netlify-functions": [ + "./plugins/plugin-netlify-functions/src/node/index.ts" + ] }, "types": ["webpack-env", "vite/client"] },