diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts index 4297e650..ab688ba6 100644 --- a/docs/.vuepress/theme.ts +++ b/docs/.vuepress/theme.ts @@ -1,8 +1,9 @@ import themePlume from 'vuepress-theme-plume' +import type { Theme } from 'vuepress' import { enNotes, zhNotes } from './notes.js' import { enNavbar, zhNavbar } from './navbar.js' -export const theme = themePlume({ +export const theme: Theme = themePlume({ logo: 'https://pengzhanbo.cn/g.gif', hostname: 'https://pengzhanbo.cn', repo: 'https://github.com/pengzhanbo/vuepress-theme-plume', @@ -15,6 +16,7 @@ export const theme = themePlume({ }, social: [{ icon: 'github', link: 'https://github.com/pengzhanbo' }], + footer: { copyright: 'Copyright © 2022-present pengzhanbo' }, locales: { diff --git a/plugins/plugin-auto-frontmatter/package.json b/plugins/plugin-auto-frontmatter/package.json index 776bb065..4cb3eb20 100644 --- a/plugins/plugin-auto-frontmatter/package.json +++ b/plugins/plugin-auto-frontmatter/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-auto-frontmatter", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - auto frontmatter", "author": "pengzhanbo ", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-auto-frontmatter" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-baidu-tongji/package.json b/plugins/plugin-baidu-tongji/package.json index bc9d8d83..2cde277e 100644 --- a/plugins/plugin-baidu-tongji/package.json +++ b/plugins/plugin-baidu-tongji/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-baidu-tongji", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - baidu tongji", "author": "pengzhanbo (https://github.com/pengzhanbo/)", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-baidu-tongji" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-blog-data/package.json b/plugins/plugin-blog-data/package.json index f5fdfad2..5cc11f19 100644 --- a/plugins/plugin-blog-data/package.json +++ b/plugins/plugin-blog-data/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-blog-data", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - blog data", "author": "pengzhanbo ", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-blog-data" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-blog-data/src/client/blogPostData.d.ts b/plugins/plugin-blog-data/src/client/blogPostData.d.ts index 52fa5598..abda7c79 100644 --- a/plugins/plugin-blog-data/src/client/blogPostData.d.ts +++ b/plugins/plugin-blog-data/src/client/blogPostData.d.ts @@ -2,6 +2,7 @@ import type { BlogPostData } from '../shared/index.js' declare module '@internal/blogData' { const blogPostData: BlogPostData + const extraBlogData: Record - export { blogPostData } + export { blogPostData, extraBlogData } } diff --git a/plugins/plugin-blog-data/src/client/composables/useBlogPostData.ts b/plugins/plugin-blog-data/src/client/composables/useBlogPostData.ts index f146b15a..29df8ec3 100644 --- a/plugins/plugin-blog-data/src/client/composables/useBlogPostData.ts +++ b/plugins/plugin-blog-data/src/client/composables/useBlogPostData.ts @@ -1,4 +1,7 @@ -import { blogPostData as blogPostDataRaw } from '@internal/blogData' +import { + blogPostData as blogPostDataRaw, + extraBlogData as extraBlogDataRaw, +} from '@internal/blogData' import { ref } from 'vue' import type { Ref } from 'vue' import type { BlogPostData } from '../../shared/index.js' @@ -15,8 +18,19 @@ export function useBlogPostData< return blogPostData as BlogDataRef } +export type ExtraBlogDataRef = Ref> + +export const extraBlogData: ExtraBlogDataRef = ref(extraBlogDataRaw) + +export function useExtraBlogData(): ExtraBlogDataRef { + return extraBlogData as ExtraBlogDataRef +} + if (__VUEPRESS_DEV__ && (import.meta.webpackHot || import.meta.hot)) { __VUE_HMR_RUNTIME__.updateBlogData = (data: BlogPostData) => { blogPostData.value = data } + __VUE_HMR_RUNTIME__.updateExtraBlogData = (data: Record) => { + extraBlogData.value = data + } } diff --git a/plugins/plugin-blog-data/src/node/prepareBlogData.ts b/plugins/plugin-blog-data/src/node/prepareBlogData.ts index e712ab69..ec19139d 100644 --- a/plugins/plugin-blog-data/src/node/prepareBlogData.ts +++ b/plugins/plugin-blog-data/src/node/prepareBlogData.ts @@ -8,11 +8,15 @@ if (import.meta.webpackHot) { if (__VUE_HMR_RUNTIME__.updateBlogData) { __VUE_HMR_RUNTIME__.updateBlogData(blogPostData) } + if (__VUE_HMR_RUNTIME__.updateExtraBlogData) { + __VUE_HMR_RUNTIME__.updateExtraBlogData(extraBlogData) + } } if (import.meta.hot) { - import.meta.hot.accept(({ blogPostData }) => { + import.meta.hot.accept(({ blogPostData, extraBlogData }) => { __VUE_HMR_RUNTIME__.updateBlogData(blogPostData) + __VUE_HMR_RUNTIME__.updateExtraBlogData(extraBlogData) }) } ` @@ -47,10 +51,15 @@ export async function preparedBlogData(app: App, pageFilter: (id: string) => boo }) } + const extraBlogData: Record = {} + + if (typeof options.extraBlogData === 'function') + options.extraBlogData(extraBlogData) + const blogData: BlogPostData = pages.map((page: Page) => { let extended: Partial = {} if (typeof options.extendBlogData === 'function') - extended = options.extendBlogData(page) + extended = options.extendBlogData(page, extraBlogData) const data = { path: page.path, @@ -69,7 +78,10 @@ export async function preparedBlogData(app: App, pageFilter: (id: string) => boo let content = `\ export const blogPostData = JSON.parse(${JSON.stringify( JSON.stringify(blogData), - )}) + )}); +export const extraBlogData = JSON.parse(${JSON.stringify( + JSON.stringify(extraBlogData), +)}); ` // inject HMR code diff --git a/plugins/plugin-blog-data/src/shared/index.ts b/plugins/plugin-blog-data/src/shared/index.ts index 86af918c..1ef0a0ba 100644 --- a/plugins/plugin-blog-data/src/shared/index.ts +++ b/plugins/plugin-blog-data/src/shared/index.ts @@ -5,8 +5,10 @@ export interface BlogDataPluginOptions { exclude?: string | string[] sortBy?: 'createTime' | false | ((prev: T, next: T) => boolean) excerpt?: boolean - extendBlogData?: (page: T) => Record + extendBlogData?: (page: T, extra: Record) => Record pageFilter?: (page: Page) => boolean + + extraBlogData?: (extra: Record) => void } export type BlogPostData = BlogPostDataItem[] diff --git a/plugins/plugin-caniuse/package.json b/plugins/plugin-caniuse/package.json index 71264482..f4407e75 100644 --- a/plugins/plugin-caniuse/package.json +++ b/plugins/plugin-caniuse/package.json @@ -8,7 +8,8 @@ "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-caniuse" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-content-update/package.json b/plugins/plugin-content-update/package.json index 698d1c6c..750c6ecc 100644 --- a/plugins/plugin-content-update/package.json +++ b/plugins/plugin-content-update/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-content-update", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - content update", "author": "pengzhanbo ", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-content-update" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-copy-code/package.json b/plugins/plugin-copy-code/package.json index 3adfdd4d..3a958ad8 100644 --- a/plugins/plugin-copy-code/package.json +++ b/plugins/plugin-copy-code/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-copy-code", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - copy code", "author": "pengzhanbo ", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-copy-code" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-iconify/package.json b/plugins/plugin-iconify/package.json index 83ae1a86..7afd7156 100644 --- a/plugins/plugin-iconify/package.json +++ b/plugins/plugin-iconify/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-iconify", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - iconify", "author": "pengzhanbo ", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-iconify" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-netlify-functions/package.json b/plugins/plugin-netlify-functions/package.json index d264537c..5b13e554 100644 --- a/plugins/plugin-netlify-functions/package.json +++ b/plugins/plugin-netlify-functions/package.json @@ -8,7 +8,8 @@ "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-netlify-functions" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-notes-data/package.json b/plugins/plugin-notes-data/package.json index f243b7d8..91a5c62c 100644 --- a/plugins/plugin-notes-data/package.json +++ b/plugins/plugin-notes-data/package.json @@ -2,13 +2,14 @@ "name": "@vuepress-plume/plugin-notes-data", "type": "module", "version": "1.0.0-rc.30", - "description": "The Plugin for VuePres 2", + "description": "The Plugin for VuePres 2 - notes data", "author": "pengzhanbo ", "license": "MIT", "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-notes-data" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" diff --git a/plugins/plugin-shikiji/package.json b/plugins/plugin-shikiji/package.json index 715baab2..c188cca8 100644 --- a/plugins/plugin-shikiji/package.json +++ b/plugins/plugin-shikiji/package.json @@ -8,7 +8,8 @@ "homepage": "https://github.com/pengzhanbo/vuepress-theme-plume#readme", "repository": { "type": "git", - "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git" + "url": "git+https://github.com/pengzhanbo/vuepress-theme-plume.git", + "directory": "plugins/plugin-shikiji" }, "bugs": { "url": "https://github.com/pengzhanbo/vuepress-theme-plume/issues" @@ -35,11 +36,11 @@ "vuepress": "2.0.0-rc.2" }, "dependencies": { - "@shikijs/transformers": "1.0.0-beta.0", - "@shikijs/twoslash": "1.0.0-beta.0", + "@shikijs/transformers": "1.0.0-beta.3", + "@shikijs/twoslash": "1.0.0-beta.3", "nanoid": "^5.0.4", "picocolors": "^1.0.0", - "shiki": "1.0.0-beta.0" + "shiki": "1.0.0-beta.3" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-shikiji/src/node/index.ts b/plugins/plugin-shikiji/src/node/index.ts index 6aca3b80..228e2bdb 100644 --- a/plugins/plugin-shikiji/src/node/index.ts +++ b/plugins/plugin-shikiji/src/node/index.ts @@ -1,6 +1,6 @@ -import { shikijiPlugin } from './shikijiPlugin.js' +import { shikiPlugin } from './shikijiPlugin.js' export * from './shikijiPlugin.js' export * from './types.js' -export default shikijiPlugin +export default shikiPlugin diff --git a/plugins/plugin-shikiji/src/node/shikijiPlugin.ts b/plugins/plugin-shikiji/src/node/shikijiPlugin.ts index 49a76a70..91254c08 100644 --- a/plugins/plugin-shikiji/src/node/shikijiPlugin.ts +++ b/plugins/plugin-shikiji/src/node/shikijiPlugin.ts @@ -2,9 +2,9 @@ import type { Plugin } from 'vuepress/core' import { highlight } from './highlight.js' import type { HighlighterOptions } from './types' -export type ShikijiPluginOptions = HighlighterOptions +export type ShikiPluginOptions = HighlighterOptions -export function shikijiPlugin(options: ShikijiPluginOptions = {}): Plugin { +export function shikiPlugin(options: ShikiPluginOptions = {}): Plugin { return { name: '@vuepress-plume/plugin-shikiji', diff --git a/plugins/plugin-shikiji/src/node/types.ts b/plugins/plugin-shikiji/src/node/types.ts index 091f1de2..7195ca3c 100644 --- a/plugins/plugin-shikiji/src/node/types.ts +++ b/plugins/plugin-shikiji/src/node/types.ts @@ -20,13 +20,17 @@ export interface HighlighterOptions { * * You can also pass an object with `light` and `dark` themes to support dual themes. * + * You can use an existing theme. + * + * @see https://shiki.style/themes + * + * Or add your own theme. + * + * @see https://shiki.style/guide/load-theme + * * @example { theme: 'github-dark' } * @example { theme: { light: 'github-light', dark: 'github-dark' } } * - * You can use an existing theme. - * @see https://shiki.style/themes - * Or add your own theme. - * @see https://shiki.style/guide/load-theme */ theme?: ThemeOptions /** diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 27110e95..fd804260 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,11 +280,11 @@ importers: plugins/plugin-shikiji: dependencies: '@shikijs/transformers': - specifier: 1.0.0-beta.0 - version: 1.0.0-beta.0 + specifier: 1.0.0-beta.3 + version: 1.0.0-beta.3 '@shikijs/twoslash': - specifier: 1.0.0-beta.0 - version: 1.0.0-beta.0(typescript@5.3.3) + specifier: 1.0.0-beta.3 + version: 1.0.0-beta.3(typescript@5.3.3) nanoid: specifier: ^5.0.4 version: 5.0.4 @@ -292,8 +292,8 @@ importers: specifier: ^1.0.0 version: 1.0.0 shiki: - specifier: 1.0.0-beta.0 - version: 1.0.0-beta.0 + specifier: 1.0.0-beta.3 + version: 1.0.0-beta.3 vuepress: specifier: 2.0.0-rc.2 version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) @@ -331,38 +331,44 @@ importers: specifier: workspace:* version: link:../plugins/plugin-shikiji '@vuepress/plugin-active-header-links': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-container': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(vuepress@2.0.0-rc.2) '@vuepress/plugin-docsearch': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-external-link-icon': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-git': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(vuepress@2.0.0-rc.2) '@vuepress/plugin-medium-zoom': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-nprogress': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-palette': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(vuepress@2.0.0-rc.2) '@vuepress/plugin-search': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) + '@vuepress/plugin-seo': + specifier: 2.0.0-rc.6 + version: 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) + '@vuepress/plugin-sitemap': + specifier: 2.0.0-rc.6 + version: 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-theme-data': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vuepress/plugin-toc': - specifier: 2.0.0-rc.1 - version: 2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.3 + version: 2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vueuse/core': specifier: ^10.7.2 version: 10.7.2(vue@3.4.15) @@ -388,20 +394,14 @@ importers: specifier: 2.0.0-rc.2 version: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) vuepress-plugin-comment2: - specifier: 2.0.0-rc.16 - version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.18 + version: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) vuepress-plugin-md-enhance: - specifier: 2.0.0-rc.16 - version: 2.0.0-rc.16(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.18 + version: 2.0.0-rc.18(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2) vuepress-plugin-reading-time2: - specifier: 2.0.0-rc.16 - version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) - vuepress-plugin-seo2: - specifier: 2.0.0-rc.16 - version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) - vuepress-plugin-sitemap2: - specifier: 2.0.0-rc.16 - version: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) + specifier: 2.0.0-rc.18 + version: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) packages: @@ -3059,20 +3059,20 @@ packages: dev: false optional: true - /@shikijs/core@1.0.0-beta.0: - resolution: {integrity: sha512-uicyrkx379Q5sxQuGV3kduHPWIAkjxmeA5A4J6syscx8wiEyIV06i/Q6s9GeKLCb857Hi90H8e/FoFSbcjnZsw==} + /@shikijs/core@1.0.0-beta.3: + resolution: {integrity: sha512-SCwPom2Wn8XxNlEeqdzycU93SKgzYeVsedjqDsgZaz4XiiPpZUzlHt2NAEQTwTnPcHNZapZ6vbkwJ8P11ggL3Q==} dev: false - /@shikijs/transformers@1.0.0-beta.0: - resolution: {integrity: sha512-OvIO6RxQ7YaQhp34uXVKUPZDRdTcGwBgX3zn26haSvqPwrTQcxdPgT47sr4u3sz1+RwN3RO9AGxCJFRKNpB+Qw==} + /@shikijs/transformers@1.0.0-beta.3: + resolution: {integrity: sha512-ASQQQqxW4dANxMGw4yGkTjtMSsUaRhImv/lzJEdfJ3/eP8TVlVYnohOFQVgpLjBBYGy9P0l0oKrlbjiGosTJ/Q==} dependencies: - shiki: 1.0.0-beta.0 + shiki: 1.0.0-beta.3 dev: false - /@shikijs/twoslash@1.0.0-beta.0(typescript@5.3.3): - resolution: {integrity: sha512-zil9WA4aCs2yJ+1vwt1El8+xp8up9ikh48ksTl7Un8/+dHDAVKjkRD20W+G071cl7NOEEWEynnIMkqqVITNlfA==} + /@shikijs/twoslash@1.0.0-beta.3(typescript@5.3.3): + resolution: {integrity: sha512-lHksLOuWNaU5rZsbJ3ViBn3U8P5f+CGKIcPDuggNczEAyT/nT1CFAHSusE08lJSclAFTNHIkEUE4btUUkxx3Wg==} dependencies: - '@shikijs/core': 1.0.0-beta.0 + '@shikijs/core': 1.0.0-beta.3 twoslash: 0.1.0(typescript@5.3.3) transitivePeerDependencies: - supports-color @@ -4036,6 +4036,22 @@ packages: - typescript dev: false + /@vuepress/helper@2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-Q4NzyrlZ0ZgEboo7HtrQiXBBLf3EEsqqQLeMFzTcTlDujxkh0Erxp+o1LCWr4wFno3sO6W7OCjM2HeUTiZ5NGQ==} + engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} + peerDependencies: + vuepress: 2.0.0-rc.2 + dependencies: + '@vue/shared': 3.4.15 + cheerio: 1.0.0-rc.12 + fflate: 0.8.1 + gray-matter: 4.0.3 + vue: 3.4.15(typescript@5.3.3) + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) + transitivePeerDependencies: + - typescript + dev: false + /@vuepress/markdown@2.0.0-rc.2(patch_hash=wvnafiipiin2b7vjmkvdw5vom4): resolution: {integrity: sha512-5/RmJnap+MGKxDhSO+Mv6zB8PoPHhhBujnNKKO3PnyfPrj0LyL0AuTm8m3Ea271wMp9956WINjw8jlpn+Z1sBg==} dependencies: @@ -4060,8 +4076,8 @@ packages: dev: false patched: true - /@vuepress/plugin-active-header-links@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-Ra5exai0mWH9uihzoVH8pje9XXll8zcICmDilTaYhir+KFw1VvKUFGLxLlEXuAMc06K4i25To2BzUVyce1Fijg==} + /@vuepress/plugin-active-header-links@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-ddr8VIrYA/kpWGWx80GeWclSvQoYR9QjXvkx//AMbl5mQqX70GTZrgv5Rbnp6MC8mBxVg6Izy/9eqaJELE+A3g==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4073,8 +4089,8 @@ packages: - typescript dev: false - /@vuepress/plugin-container@2.0.0-rc.1(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-60dPvy5u/qp0siE3MWAP/HU+FXKcTzml3/pQRuP1aBEiscUKW1DTD+2KpVT/wC3afHH2yAqDFaxKrVV5dC4+Zw==} + /@vuepress/plugin-container@2.0.0-rc.3(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-wwwtQQYiA21JKKYM4TCjDWxS2p91RPiv62NoWp+Q6BG+E+qnwaA1sOrd36CsEOS2IbIcJdBeHY/zskL0aWKEoQ==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4084,8 +4100,8 @@ packages: vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) dev: false - /@vuepress/plugin-docsearch@2.0.0-rc.1(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-oawNWGYm4JIeRH6o97muiHQVG+JvFPLX7v5LGD7N4uUm92GYJXIlLqzJer7jekkHhq7VigSWqvXFybCqI2R53w==} + /@vuepress/plugin-docsearch@2.0.0-rc.3(@algolia/client-search@4.20.0)(search-insights@2.7.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-3kf05fviNAahFXNLCOcQEgn/cjJLshCEf6oiezA8Jr6ABj6Q38Ky+nFjX/AjCaoWsyiG4BfbRRxuqxYvsDEimQ==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4107,8 +4123,8 @@ packages: - typescript dev: false - /@vuepress/plugin-external-link-icon@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-6zGt5qAnPn+sFJdOpSYAQfq/OV8vRfynTfwtSZVU0QiLVk1GDTTssGjZ32GKxmPPilXF0tiSMTcITfFllnNUmA==} + /@vuepress/plugin-external-link-icon@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-DX4Dn2uj2rAEausB2tz5fe/Ra3oR/B9uR67+yG2lQzZqcZZDW5txsXpZaM0FkXHijzNoS4NKP7k/7qNVe5WvcQ==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4118,8 +4134,8 @@ packages: - typescript dev: false - /@vuepress/plugin-git@2.0.0-rc.1(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-k3bS/wxJ5xpxg2Hzy7FEaskpYTKohazP+Dg6z7GUI+rnxfh6H+pMeIWXg/eTTqTC6Zbq1+pNfzuYvZ64GMHpQw==} + /@vuepress/plugin-git@2.0.0-rc.3(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-BQoDWmksC+aSc5V933OuNeU7mfrP4hryhckIFadAhKLVRl6CSXDb96SGVTBxcO1gIgKzItdE67UzMw4T9JJN6A==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4127,8 +4143,8 @@ packages: vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) dev: false - /@vuepress/plugin-medium-zoom@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-5d19cu5z0adXf/HDqFHYcM2dBMlBgK90CAr7YnKgj/nmv2dl6bQ2AtHENUNxOx35c4F3TGgvit9fl+MIaQmrVg==} + /@vuepress/plugin-medium-zoom@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-qRdUt914tQGfmxcqOwnoC6paZLsAJf2S7kllvf59dDKIDg2JlYsAuOq13wps4/hfuUySe9RDlitl6KcqWfvKfw==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4139,8 +4155,8 @@ packages: - typescript dev: false - /@vuepress/plugin-nprogress@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-omCUxzWrOrm0c45+0MENY65mUWh+VmUAhckEqQir3waE9Ql7wD4drZ/fdUyfgHarBjSzdSCB6QguQMLwt9OOQw==} + /@vuepress/plugin-nprogress@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-UkbMLvkRps56KF2fsIXtJ0ylRacuPRW9qA1PYwq7XkDqNr4FE5aZsnRHuYIMPUxuhU5t3hRx/zeKOwbctzd2Yw==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4151,8 +4167,8 @@ packages: - typescript dev: false - /@vuepress/plugin-palette@2.0.0-rc.1(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-oe/lTE/qcb2lTF3KqQbX/k8oyitM9fo7sKiodPpjxQtjh4cee3BeQhDSNS5NjajDDcj950WBS6gRD6ha5JuuRw==} + /@vuepress/plugin-palette@2.0.0-rc.3(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-BCP2SMEPmaqg4/oHsfA7lpp79iQDZvgeGQCYyWRP2aB5LZ2IiFdyRfZMFOUVzbetsqX7ciOFX3ELG9U59lCOjw==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4160,8 +4176,8 @@ packages: vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) dev: false - /@vuepress/plugin-search@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-zON1YS6udFcDFox/ypbFWNGdpQEDvku/wjlVnwlwBiuhyjWZsjMUIBypjjJx5Q3barWhpPCFJA43YBYCpieTcA==} + /@vuepress/plugin-search@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-dTxOYKPNziWX2vx+RO0PLwj/auABlCCAZT42wQt65R5y5RBA7eptFlqF/jmRXKG+CPvSMUOrIo1FrCTvB3yFig==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4173,8 +4189,31 @@ packages: - typescript dev: false - /@vuepress/plugin-theme-data@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-PaVGCY4wsaFFUgue4b7yK5lGoQk4PTx6WwukbTR4cbRqY9kxX2Abpgp5EDoRBrcRbNzt85DV9voMQJr3Vx/BIg==} + /@vuepress/plugin-seo@2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-MIzt1V4wnp5EYBvRt6W54+poguKf2w2YRpyDNa3DkjM/rhrjfSsD7EYP7syp4gzwnIDoxUP3pnENh1mYY9g9bQ==} + peerDependencies: + vuepress: 2.0.0-rc.2 + dependencies: + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) + transitivePeerDependencies: + - typescript + dev: false + + /@vuepress/plugin-sitemap@2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-yvRSTADF9RHa6JzFeIAxY0BP7wKy+F+naig9BgE0ushC4IQkpjh3VrBtdXhlRKzSMGlLfgmc2kezsObvjvz31w==} + peerDependencies: + vuepress: 2.0.0-rc.2 + dependencies: + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) + sitemap: 7.1.1 + vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) + transitivePeerDependencies: + - typescript + dev: false + + /@vuepress/plugin-theme-data@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-Uiso+0b2sIaHtPVftjpCEIT+/T4/E9ZpTCL0fnUEa8APnrP7SiIBqph7+KZENvXGg+0B5+MtZROOfFksFfMyFw==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -4185,8 +4224,8 @@ packages: - typescript dev: false - /@vuepress/plugin-toc@2.0.0-rc.1(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-LbhSRNUrKu94ERtTBa/H741LiXDDtM9Hye69DkB89Fl1g50WQiMV+txIRV84qMC8yHHN+ho0DgcDwJdaV1qCfg==} + /@vuepress/plugin-toc@2.0.0-rc.3(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-cxlJ1iaIHBVEWjZvhYBgZxZTlgQ+1F7xxG13htnn35vVxzflNrqCIXHA54+FDsITHn2T5ATCES90tyywZ6mrbw==} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: @@ -13178,10 +13217,10 @@ packages: /shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - /shiki@1.0.0-beta.0: - resolution: {integrity: sha512-CcP0IhEDQ3LWfJC44cfxfId9pjJi9Nephl8DxgrL4tKWprI/oz6deZyL0vB+XWxhTx/1uonzWQKaSQPwKx5dTA==} + /shiki@1.0.0-beta.3: + resolution: {integrity: sha512-z7cHTNSSvwGx2DfeLwjSNLo+HcVxifgNIzLm6Ye52eXcIwNHXT0wHbhy7FDOKSKveuEHBwt9opfj3Hoc8LE1Yg==} dependencies: - '@shikijs/core': 1.0.0-beta.0 + '@shikijs/core': 1.0.0-beta.3 dev: false /side-channel@1.0.4: @@ -13659,10 +13698,6 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false - /striptags@3.2.0: - resolution: {integrity: sha512-g45ZOGzHDMe2bdYMdIvdAfCQkCTDMGBazSw1ypMowwGIee7ZQ5dU0rBJ8Jqgl+jAKIv4dbeE1jscZq9wid1Tkw==} - dev: false - /strtok3@7.0.0: resolution: {integrity: sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==} engines: {node: '>=14.16'} @@ -14863,8 +14898,8 @@ packages: typescript: 5.3.3 dev: false - /vuepress-plugin-comment2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-uZD31oDfEPNrJYG2tuxHI8g3HBVLlbOtiOoZljs9RGCaKqup+MLsSIBNKg/P2uzLkfKybVIUZaTvAEH+QazYeg==} + /vuepress-plugin-comment2@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-iSCX6aYsf2e6YwzMdygekixARdRPixkgDlFDzDpQTuyr5wdsdp+nMSAS6F4uYtKXFzZgASagbfBMjzN9JLT+Zg==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: '@waline/client': ^2.15.8 || ^3.0.0-alpha.11 @@ -14882,19 +14917,20 @@ packages: twikoo: optional: true dependencies: + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) giscus: 1.4.0 vue: 3.4.15(typescript@5.3.3) vue-router: 4.2.5(vue@3.4.15) vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) - vuepress-plugin-sass-palette: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) - vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress-plugin-sass-palette: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) transitivePeerDependencies: - '@vue/composition-api' - typescript dev: false - /vuepress-plugin-md-enhance@2.0.0-rc.16(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-3XfVUnTBoOk7c77LLZ79keQm2cKVZmGEEggOwpLnmZDr/qZQ5KFDqE1U0OturUwF/tfiyTB8Z9phpuuJ52u6lg==} + /vuepress-plugin-md-enhance@2.0.0-rc.18(katex@0.16.9)(markdown-it@14.0.0)(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-smn8Uagbhyeim+JtOeOdSMio+YXHhHk3RXRjj1z7PLFkY7zcY44v/BvChUDeWV/I4/aaOGWashmSud0Hi1Cs0g==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: '@types/reveal.js': ^4.4.5 @@ -14967,6 +15003,7 @@ packages: '@mdit/plugin-tex': 0.8.0(markdown-it@14.0.0) '@mdit/plugin-uml': 0.8.0(markdown-it@14.0.0) '@types/markdown-it': 13.0.7 + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vueuse/core': 10.7.2(vue@3.4.15) balloon-css: 1.2.0 js-yaml: 4.1.0 @@ -14974,30 +15011,31 @@ packages: vue: 3.4.15(typescript@5.3.3) vue-router: 4.2.5(vue@3.4.15) vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) - vuepress-plugin-sass-palette: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) - vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress-plugin-sass-palette: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) transitivePeerDependencies: - '@vue/composition-api' - markdown-it - typescript dev: false - /vuepress-plugin-reading-time2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-7XzyyoR/qV/3an6KWl91+NSBIhSn10HbIXDG7AnblS5aVVz8FHRJPtnmJryVRVIPZNwIk8QSfnczR3GVwbaSyg==} + /vuepress-plugin-reading-time2@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-Sj245CYGo0F5Axz6JN6nslcvyZ+1HtfraIPC7MNfPzJgOR/Tc6JKtQcNZhgyCL3aKx1wevs8T7X/nCeTToArsQ==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) vue: 3.4.15(typescript@5.3.3) vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) - vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) transitivePeerDependencies: - '@vue/composition-api' - typescript dev: false - /vuepress-plugin-sass-palette@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-fwhCSarn19JO8xGR+AIRsFkRVrbwOqjKwUB9XmTdTLqKCT5onvBZkjBrd2b47Zs+BhySL5nsuIW4H2tDwfFqBw==} + /vuepress-plugin-sass-palette@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-DYmHANdKkz+jwAU7dpP72NYjPGOpWrY/2eTs4NPDDBNKELcav5W6oDM4T9gPGpk9kncEW8LC4NTS6z2Jkep2Ig==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: sass-loader: ^14.0.0 @@ -15006,48 +15044,23 @@ packages: sass-loader: optional: true dependencies: + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) chokidar: 3.5.3 sass: 1.70.0 vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) - vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) + vuepress-shared: 2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2) transitivePeerDependencies: - '@vue/composition-api' - typescript dev: false - /vuepress-plugin-seo2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-WGtoaR98chMiq6C14rmtRNHC9XVS0fSqSOeti6b1k8SjW6ESTmILq5o0vp4Vojc0Qo5DA/nN7Cw0cLaKVVgX8A==} - engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} - peerDependencies: - vuepress: 2.0.0-rc.2 - dependencies: - vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) - vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) - transitivePeerDependencies: - - '@vue/composition-api' - - typescript - dev: false - - /vuepress-plugin-sitemap2@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-7hGlrwACCSZijuGFyc4Yh+3IXh8f9dFK0iekjlMbC2TxNbDHHmsLHnsGfEmd6H1xsQtaTC1fwXw158jiXwE1fA==} - engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} - peerDependencies: - vuepress: 2.0.0-rc.2 - dependencies: - sitemap: 7.1.1 - vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) - vuepress-shared: 2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2) - transitivePeerDependencies: - - '@vue/composition-api' - - typescript - dev: false - - /vuepress-shared@2.0.0-rc.16(typescript@5.3.3)(vuepress@2.0.0-rc.2): - resolution: {integrity: sha512-gsiqo9tr6dHCVQTPw1d+oiJyNGzc6nmrGRBWkLb3ZxD15q1k/iv2flBwPdb1RasU827oMgZ2DuOzbHcGjRKjSA==} + /vuepress-shared@2.0.0-rc.18(typescript@5.3.3)(vuepress@2.0.0-rc.2): + resolution: {integrity: sha512-oFY8hWYrMQHQMe+YKZvjfzdHK/wvghyhWa4IJuLBwRm6j9AhXOJEAvSzQQKpERkpGS4vZ+pY5tWAodfv2Fhztw==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: vuepress: 2.0.0-rc.2 dependencies: + '@vuepress/helper': 2.0.0-rc.6(typescript@5.3.3)(vuepress@2.0.0-rc.2) '@vueuse/core': 10.7.2(vue@3.4.15) cheerio: 1.0.0-rc.12 dayjs: 1.11.10 @@ -15055,7 +15068,6 @@ packages: fflate: 0.8.1 gray-matter: 4.0.3 semver: 7.5.4 - striptags: 3.2.0 vue: 3.4.15(typescript@5.3.3) vue-router: 4.2.5(vue@3.4.15) vuepress: 2.0.0-rc.2(@vuepress/bundler-vite@2.0.0-rc.2)(@vuepress/bundler-webpack@2.0.0-rc.2)(typescript@5.3.3)(vue@3.4.15) diff --git a/readme.md b/readme.md index b19e8ed6..575d3270 100644 --- a/readme.md +++ b/readme.md @@ -4,6 +4,8 @@ 开箱即用,仅需少量配置即可使用,让您更专注于 内容的创作,更好的表达你的想法,形成你的知识笔记。 +内置了丰富的强大的功能,旨在让内容更具有表现力。 + [![npm version](https://img.shields.io/npm/v/vuepress-theme-plume?color=32A9C3&labelColor=1B3C4A&label=npm)](https://www.npmjs.com/package/vuepress-theme-plume) [![npm beta download](https://img.shields.io/npm/dt/@vuepress-plume/vuepress-theme-plume?color=32A9C3&labelColor=1B3C4A&label=beta%20downloads)](https://www.npmjs.com/package/vuepress-theme-plume) [![npm download](https://img.shields.io/npm/dy/vuepress-theme-plume?color=32A9C3&labelColor=1B3C4A&label=downloads)](https://www.npmjs.com/package/vuepress-theme-plume) diff --git a/theme/package.json b/theme/package.json index ec351f46..35b05b09 100644 --- a/theme/package.json +++ b/theme/package.json @@ -65,17 +65,19 @@ "@vuepress-plume/plugin-iconify": "workspace:*", "@vuepress-plume/plugin-notes-data": "workspace:*", "@vuepress-plume/plugin-shikiji": "workspace:*", - "@vuepress/plugin-active-header-links": "2.0.0-rc.1", - "@vuepress/plugin-container": "2.0.0-rc.1", - "@vuepress/plugin-docsearch": "2.0.0-rc.1", - "@vuepress/plugin-external-link-icon": "2.0.0-rc.1", - "@vuepress/plugin-git": "2.0.0-rc.1", - "@vuepress/plugin-medium-zoom": "2.0.0-rc.1", - "@vuepress/plugin-nprogress": "2.0.0-rc.1", - "@vuepress/plugin-palette": "2.0.0-rc.1", - "@vuepress/plugin-search": "2.0.0-rc.1", - "@vuepress/plugin-theme-data": "2.0.0-rc.1", - "@vuepress/plugin-toc": "2.0.0-rc.1", + "@vuepress/plugin-active-header-links": "2.0.0-rc.3", + "@vuepress/plugin-container": "2.0.0-rc.3", + "@vuepress/plugin-docsearch": "2.0.0-rc.3", + "@vuepress/plugin-external-link-icon": "2.0.0-rc.3", + "@vuepress/plugin-git": "2.0.0-rc.3", + "@vuepress/plugin-medium-zoom": "2.0.0-rc.3", + "@vuepress/plugin-nprogress": "2.0.0-rc.3", + "@vuepress/plugin-palette": "2.0.0-rc.3", + "@vuepress/plugin-search": "2.0.0-rc.3", + "@vuepress/plugin-seo": "2.0.0-rc.6", + "@vuepress/plugin-sitemap": "2.0.0-rc.6", + "@vuepress/plugin-theme-data": "2.0.0-rc.3", + "@vuepress/plugin-toc": "2.0.0-rc.3", "@vueuse/core": "^10.7.2", "date-fns": "^3.3.1", "katex": "^0.16.9", @@ -83,10 +85,8 @@ "nanoid": "^5.0.4", "vue": "^3.4.15", "vue-router": "4.2.5", - "vuepress-plugin-comment2": "2.0.0-rc.16", - "vuepress-plugin-md-enhance": "2.0.0-rc.16", - "vuepress-plugin-reading-time2": "2.0.0-rc.16", - "vuepress-plugin-seo2": "2.0.0-rc.16", - "vuepress-plugin-sitemap2": "2.0.0-rc.16" + "vuepress-plugin-comment2": "2.0.0-rc.18", + "vuepress-plugin-md-enhance": "2.0.0-rc.18", + "vuepress-plugin-reading-time2": "2.0.0-rc.18" } } diff --git a/theme/src/client/components/Archives.vue b/theme/src/client/components/Archives.vue index c9ad6caf..7bdbf90d 100644 --- a/theme/src/client/components/Archives.vue +++ b/theme/src/client/components/Archives.vue @@ -63,4 +63,36 @@ const { archives } = useArchives() font-size: 18px; font-weight: 700; } + +@media (min-width: 768px) { + .archives-wrapper { + padding: 32px 0; + margin-left: 20px; + } + + .archives-title { + display: none; + } + + .archive { + padding: 20px; + margin-bottom: 24px; + background-color: var(--vp-c-bg); + border-bottom: none; + border-radius: 8px; + box-shadow: var(--vp-shadow-2); + } + + .archive-title { + padding-bottom: 10px; + margin-top: 0; + border-bottom: solid 1px var(--vp-c-divider); + } +} + +@media (min-width: 960px) { + .archives-wrapper { + margin-left: auto; + } +} diff --git a/theme/src/client/components/BackToTop.vue b/theme/src/client/components/BackToTop.vue index 1752c5d7..c8600f5a 100644 --- a/theme/src/client/components/BackToTop.vue +++ b/theme/src/client/components/BackToTop.vue @@ -77,8 +77,8 @@ function handleClick() { .back-to-top-button { position: fixed; inset-inline-end: 1rem; - right: 20px; - bottom: 64px; + right: 24px; + bottom: calc(var(--vp-footer-height, 82px) - 18px); z-index: var(--vp-z-index-back-to-top); width: 36px; height: 36px; @@ -140,6 +140,7 @@ function handleClick() { @media (min-width: 768px) { .back-to-top-button { + bottom: calc(var(--vp-footer-height, 88px) - 24px); width: 48px; height: 48px; } diff --git a/theme/src/client/components/Blog.vue b/theme/src/client/components/Blog.vue index 0688ce61..4cf21ca9 100644 --- a/theme/src/client/components/Blog.vue +++ b/theme/src/client/components/Blog.vue @@ -12,16 +12,22 @@ const page = usePageData() diff --git a/theme/src/client/components/Flyout/index.vue b/theme/src/client/components/Flyout/index.vue index b2f7bbc0..96aa49f5 100644 --- a/theme/src/client/components/Flyout/index.vue +++ b/theme/src/client/components/Flyout/index.vue @@ -129,7 +129,7 @@ export default { display: flex; align-items: center; height: var(--vp-nav-height); - padding: 0 12px; + padding: 0 10px; color: var(--vp-c-text-1); transition: color 0.5s; } diff --git a/theme/src/client/components/Friends.vue b/theme/src/client/components/Friends.vue index 33b115b0..482b9f03 100644 --- a/theme/src/client/components/Friends.vue +++ b/theme/src/client/components/Friends.vue @@ -45,11 +45,18 @@ const list = computed(() => matter.value.list || []) diff --git a/theme/src/client/components/VFooter.vue b/theme/src/client/components/VFooter.vue index 60e98be7..479c8d03 100644 --- a/theme/src/client/components/VFooter.vue +++ b/theme/src/client/components/VFooter.vue @@ -1,14 +1,25 @@ diff --git a/theme/src/client/composables/blog.ts b/theme/src/client/composables/blog.ts index 5c42891b..8c4b87cd 100644 --- a/theme/src/client/composables/blog.ts +++ b/theme/src/client/composables/blog.ts @@ -1,9 +1,16 @@ import { usePageLang } from 'vuepress/client' -import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client' -import { computed } from 'vue' +import { useExtraBlogData as _useExtraBlogData, useBlogPostData } from '@vuepress-plume/plugin-blog-data/client' +import { type Ref, computed } from 'vue' import type { PlumeThemeBlogPostItem } from '../../shared/index.js' import { useLocaleLink, useRouteQuery, useThemeLocaleData } from '../composables/index.js' -import { getRandomColor, toArray } from '../utils/index.js' +import { toArray } from '../utils/index.js' + +export const useExtraBlogData = _useExtraBlogData as () => Ref<{ + tagsColorsPreset: (readonly [string, string, string])[] + tagsColors: Record +}> + +const DEFAULT_PER_PAGE = 10 export function useLocalePostList() { const locale = usePageLang() @@ -49,7 +56,7 @@ export function usePostListControl() { const totalPage = computed(() => { if (blog.value.pagination === false) return 0 - const perPage = blog.value.pagination?.perPage || 20 + const perPage = blog.value.pagination?.perPage || DEFAULT_PER_PAGE return Math.ceil(postList.value.length / perPage) }) const isLastPage = computed(() => page.value >= totalPage.value) @@ -60,7 +67,7 @@ export function usePostListControl() { if (blog.value.pagination === false) return postList.value - const perPage = blog.value.pagination?.perPage || 20 + const perPage = blog.value.pagination?.perPage || DEFAULT_PER_PAGE if (postList.value.length <= perPage) return postList.value @@ -96,6 +103,8 @@ const extractLocales: Record = { export function useBlogExtract() { const theme = useThemeLocaleData() const locale = usePageLang() + const postList = useLocalePostList() + const { tags: tagsList } = useTags() const hasBlogExtract = computed(() => theme.value.blog?.archives !== false || theme.value.blog?.tags !== false) const tagsLink = useLocaleLink('blog/tags/') @@ -104,11 +113,13 @@ export function useBlogExtract() { const tags = computed(() => ({ link: tagsLink.value, text: extractLocales[locale.value]?.tags || extractLocales.en.tags, + total: tagsList.value.length, })) const archives = computed(() => ({ link: archiveLink.value, text: extractLocales[locale.value]?.archives || extractLocales.en.archives, + total: postList.value.length, })) return { @@ -122,6 +133,9 @@ export type ShortPostItem = Pick { const tagMap: Record = {} list.value.forEach((item) => { @@ -137,7 +151,7 @@ export function useTags() { return Object.keys(tagMap).map(tag => ({ name: tag, count: tagMap[tag] > 99 ? '99+' : tagMap[tag], - color: getRandomColor(), + colors: extraData.value.tagsColorsPreset[extraData.value.tagsColors[tag]], })) }) diff --git a/theme/src/client/composables/readingTime.ts b/theme/src/client/composables/readingTime.ts index 5c04c551..0d917bac 100644 --- a/theme/src/client/composables/readingTime.ts +++ b/theme/src/client/composables/readingTime.ts @@ -17,13 +17,13 @@ export const readingTimeLocales = { 'zh-CN': { word: '约$word字', less1Minute: '小于1分钟', - time: '大约$time分钟', + time: '约$time分钟', }, 'zh-TW': { word: '約$word字', less1Minute: '小於1分鐘', - time: '大约$time分鐘', + time: '约$time分鐘', }, 'de': { diff --git a/theme/src/client/styles/vars.scss b/theme/src/client/styles/vars.scss index 3d8fea8c..93621e65 100644 --- a/theme/src/client/styles/vars.scss +++ b/theme/src/client/styles/vars.scss @@ -273,7 +273,6 @@ "Liberation Mono", "Courier New", monospace; - --vp-header-anchor-symbol: "#"; } /** diff --git a/theme/src/client/utils/index.ts b/theme/src/client/utils/index.ts index 938922a1..14a67353 100644 --- a/theme/src/client/utils/index.ts +++ b/theme/src/client/utils/index.ts @@ -5,4 +5,3 @@ export * from './dom.js' export * from './resolveEditLink.js' export * from './resolveRepoType.js' export * from './base.js' -export * from './color.js' diff --git a/theme/src/node/blogTags.ts b/theme/src/node/blogTags.ts new file mode 100644 index 00000000..81b490e6 --- /dev/null +++ b/theme/src/node/blogTags.ts @@ -0,0 +1,40 @@ +import { hasOwn, random, toArray } from '@pengzhanbo/utils' +export type BlogTagsColorsItem = readonly [ + string, // normal color + string, // hover color + string, // background color +] + +export const BLOG_TAGS_COLORS_PRESET: BlogTagsColorsItem[] = [ + ['#6aa1b7', '#5086a1', 'rgba(131, 208, 218, 0.314)'], + ['#299764', '#18794e', 'rgba(16, 185, 129, 0.14)'], + ['#946300', '#915930', 'rgba(234, 179, 8, 0.14)'], + ['#d5393e', '#b8272c', 'rgba(244, 63, 94, 0.14)'], + ['#7e4cc9', '#6f42c1', 'rgba(159, 122, 234, 0.14)'], + ['#3a5ccc', '#3451b2', 'rgba(100, 108, 255, 0.14)'], + ['#f1c40f', '#f39c12', 'rgba(255, 213, 0, 0.14)'], + ['#cc6699', '#c75191', 'rgba(255, 153, 204, 0.14)'], +] + +const len = BLOG_TAGS_COLORS_PRESET.length +let prevIndex: number[] = [] + +function getRandom() { + let index: number + do + index = random(0, len - 1) + while (prevIndex.includes(index)) + prevIndex.push(index) + prevIndex = prevIndex.slice(-5) + return index +} + +export function generateBlogTagsColors(map: Record, tags?: string[]) { + if (!tags || tags.length === 0) + return + + toArray(tags).forEach((tag) => { + if (!hasOwn(map, tag)) + map[tag] = getRandom() + }) +} diff --git a/theme/src/node/plugins.ts b/theme/src/node/plugins.ts index a4623cf8..1c9b882d 100644 --- a/theme/src/node/plugins.ts +++ b/theme/src/node/plugins.ts @@ -15,12 +15,12 @@ import { caniusePlugin } from '@vuepress-plume/plugin-caniuse' import { copyCodePlugin } from '@vuepress-plume/plugin-copy-code' import { iconifyPlugin } from '@vuepress-plume/plugin-iconify' import { notesDataPlugin } from '@vuepress-plume/plugin-notes-data' -import { shikijiPlugin } from '@vuepress-plume/plugin-shikiji' +import { shikiPlugin } from '@vuepress-plume/plugin-shikiji' import { commentPlugin } from 'vuepress-plugin-comment2' import { type MarkdownEnhanceOptions, mdEnhancePlugin } from 'vuepress-plugin-md-enhance' import { readingTimePlugin } from 'vuepress-plugin-reading-time2' -import { seoPlugin } from 'vuepress-plugin-seo2' -import { sitemapPlugin } from 'vuepress-plugin-sitemap2' +import { seoPlugin } from '@vuepress/plugin-seo' +import { sitemapPlugin } from '@vuepress/plugin-sitemap' import { contentUpdatePlugin } from '@vuepress-plume/plugin-content-update' import type { PlumeThemeLocaleOptions, @@ -32,6 +32,7 @@ import { pathJoin } from './utils.js' import { resolveNotesList } from './resolveNotesList.js' import { resolvedDocsearchOption, resolvedSearchOptions } from './searchPluginOptions.js' import { customContainers } from './container.js' +import { BLOG_TAGS_COLORS_PRESET, generateBlogTagsColors } from './blogTags.js' export function setupPlugins( app: App, @@ -68,13 +69,21 @@ export function setupPlugins( pageFilter: (page: any) => page.frontmatter.article !== undefined ? !!page.frontmatter.article : true, - extendBlogData: (page: any) => ({ - categoryList: page.data.categoryList, - tags: page.frontmatter.tags, - sticky: page.frontmatter.sticky, - createTime: page.data.frontmatter.createTime, - lang: page.lang, - }), + extraBlogData(extra) { + extra.tagsColorsPreset = BLOG_TAGS_COLORS_PRESET + extra.tagsColors = {} + }, + extendBlogData: (page: any, extra) => { + const tags = page.frontmatter.tags + generateBlogTagsColors(extra.tagsColors, tags) + return { + categoryList: page.data.categoryList, + tags, + sticky: page.frontmatter.sticky, + createTime: page.data.frontmatter.createTime, + lang: page.lang, + } + }, }), notesDataPlugin(notesList), @@ -144,10 +153,11 @@ export function setupPlugins( plugins.push(searchPlugin(resolvedSearchOptions(app, options.search))) } - if (options.shikiji !== false) { - plugins.push(shikijiPlugin({ + const shikiOption = options.shiki || options.shikiji + if (shikiOption !== false) { + plugins.push(shikiPlugin({ theme: { light: 'vitesse-light', dark: 'vitesse-dark' }, - ...(options.shikiji ?? {}), + ...(shikiOption ?? {}), })) } diff --git a/theme/src/shared/options/locale.ts b/theme/src/shared/options/locale.ts index 8e007c03..ec7470b3 100644 --- a/theme/src/shared/options/locale.ts +++ b/theme/src/shared/options/locale.ts @@ -15,6 +15,10 @@ export interface PlumeThemeAvatar { * 描述 */ description?: string + /** + * 是否显示为圆形头像 + */ + circle?: boolean } export interface SocialLink { diff --git a/theme/src/shared/options/plugins.ts b/theme/src/shared/options/plugins.ts index 90c4a60b..d8f1861f 100644 --- a/theme/src/shared/options/plugins.ts +++ b/theme/src/shared/options/plugins.ts @@ -4,7 +4,7 @@ import type { AutoFrontmatterOptions } from '@vuepress-plume/plugin-auto-frontma import type { BaiduTongjiOptions } from '@vuepress-plume/plugin-baidu-tongji' import type { CanIUsePluginOptions } from '@vuepress-plume/plugin-caniuse' import type { CopyCodeOptions } from '@vuepress-plume/plugin-copy-code' -import type { ShikijiPluginOptions } from '@vuepress-plume/plugin-shikiji' +import type { ShikiPluginOptions } from '@vuepress-plume/plugin-shikiji' import type { CommentPluginOptions } from 'vuepress-plugin-comment2' import type { MarkdownEnhanceOptions } from 'vuepress-plugin-md-enhance' import type { ReadingTimeOptions } from 'vuepress-plugin-reading-time2' @@ -31,9 +31,15 @@ export interface PlumeThemePluginOptions { docsearch?: false | DocsearchOptions /** + * @deprecated move to `shiki` * 代码高亮 配置 */ - shikiji?: false | ShikijiPluginOptions + shikiji?: false | ShikiPluginOptions + + /** + * 代码高亮 配置 + */ + shiki?: false | ShikiPluginOptions /** * git 插件 配置