diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..05561720 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + "recommendations": [ + "vue.volar", + "Vue.vscode-typescript-vue-plugin", + "dbaeumer.vscode-eslint" + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json index 4f9c2a67..43e6ae96 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -11,6 +11,36 @@ "css.validate": false, "scss.validate": false, "typescript.tsdk": "node_modules/typescript/lib", + "eslint.experimental.useFlatConfig": true, + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off" }, + { "rule": "*-indent", "severity": "off" }, + { "rule": "*-spacing", "severity": "off" }, + { "rule": "*-spaces", "severity": "off" }, + { "rule": "*-order", "severity": "off" }, + { "rule": "*-dangle", "severity": "off" }, + { "rule": "*-newline", "severity": "off" }, + { "rule": "*quotes", "severity": "off" }, + { "rule": "*semi", "severity": "off" } + ], + "editor.codeActionsOnSave": { + "source.fixAll": "explicit", + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + "editor.formatOnPaste": true, + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml" + ], "cSpell.words": [ "bumpp", "caniuse", @@ -23,6 +53,7 @@ "gsap", "iarna", "iconify", + "katex", "leancloud", "nprogress", "pnpm", diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index b60b350d..6e42db82 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -3,8 +3,7 @@ import process from 'node:process' import { viteBundler } from '@vuepress/bundler-vite' import { webpackBundler } from '@vuepress/bundler-webpack' import { defineUserConfig } from '@vuepress/cli' -import themePlume from 'vuepress-theme-plume' -import { enNotes, zhNotes } from './notes.js' +import { theme } from './theme.js' export default defineUserConfig({ base: '/', @@ -14,117 +13,9 @@ export default defineUserConfig({ source: path.resolve(__dirname, '../'), public: path.resolve(__dirname, 'public'), locales: { - '/': { - title: 'Plume主题', - description: '', - lang: 'zh-CN', - }, - '/en/': { - title: 'Plume Theme', - description: '', - lang: 'en', - }, + '/': { title: 'Plume主题', description: '', lang: 'zh-CN' }, + '/en/': { title: 'Plume Theme', description: '', lang: 'en' }, }, - - bundler: - process.env.DOCS_BUNDLER === 'webpack' ? webpackBundler() : viteBundler(), - - 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', - name: 'Plume Theme', - description: 'The Theme for Vuepress 2.0', - }, - social: [{ icon: 'github', link: 'https://github.com/pengzhanbo' }], - notes: zhNotes, - navbar: [ - { text: '首页', link: '/', icon: 'material-symbols:home-outline' }, - { - text: '博客', - link: '/blog/', - icon: 'material-symbols:article-outline', - }, - { - text: 'VuePress', - icon: 'vscode-icons:file-type-vue', - items: [ - { - text: 'theme-plume', - link: '/note/vuepress-theme-plume/', - icon: 'icon-park-outline:theme', - }, - { - text: '插件', - icon: 'mingcute:plugin-2-line', - items: [ - { - text: 'caniuse', - link: '/note/vuepress-plugin/caniuse/', - icon: 'tabler:brand-css3', - }, - { - text: 'netlify-functions', - link: '/note/vuepress-plugin/netlify-functions/', - icon: 'teenyicons:netlify-outline', - }, - ], - }, - ], - }, - { text: '友情链接', link: '/friends/', icon: 'emojione-monotone:roller-coaster' }, - ], - footer: { - copyright: 'Copyright © 2022-present pengzhanbo', - }, - themePlugins: { - markdownEnhance: { katex: true }, - search: { - locales: { - '/': { - placeholder: '搜索', - }, - }, - }, - }, - locales: { - '/': { selectLanguageName: '简体中文', selectLanguageText: '选择语言' }, - '/en/': { - selectLanguageName: 'English', - selectLanguageText: 'Language', - notes: enNotes, - navbar: [ - { text: 'Home', link: '/en/', icon: 'material-symbols:home-outline' }, - { - text: 'Blog', - link: '/en/blog/', - icon: 'material-symbols:article-outline', - }, - { - text: 'VuePress', - icon: 'vscode-icons:file-type-vue', - items: [ - { - text: 'Plugin', - icon: 'mingcute:plugin-2-line', - items: [ - { - text: 'caniuse', - link: '/en/note/vuepress-plugin/caniuse/', - icon: 'tabler:brand-css3', - }, - ], - }, - ], - }, - ], - }, - }, - }), + bundler: process.env.DOCS_BUNDLER === 'webpack' ? webpackBundler() : viteBundler(), + theme, }) diff --git a/docs/.vuepress/navbar.ts b/docs/.vuepress/navbar.ts new file mode 100644 index 00000000..70aec5ae --- /dev/null +++ b/docs/.vuepress/navbar.ts @@ -0,0 +1,64 @@ +import type { NavItem } from 'vuepress-theme-plume' + +export const zhNavbar = [ + { text: '首页', link: '/', icon: 'material-symbols:home-outline' }, + { + text: '博客', + link: '/blog/', + icon: 'material-symbols:article-outline', + }, + { + text: 'VuePress', + icon: 'vscode-icons:file-type-vue', + items: [ + { + text: 'theme-plume', + link: '/note/vuepress-theme-plume/', + icon: 'icon-park-outline:theme', + }, + { + text: '插件', + icon: 'mingcute:plugin-2-line', + items: [ + { + text: 'caniuse', + link: '/note/vuepress-plugin/caniuse/', + icon: 'tabler:brand-css3', + }, + { + text: 'netlify-functions', + link: '/note/vuepress-plugin/netlify-functions/', + icon: 'teenyicons:netlify-outline', + }, + ], + }, + ], + }, + { text: '友情链接', link: '/friends/', icon: 'emojione-monotone:roller-coaster' }, +] as NavItem[] + +export const enNavbar = [ + { text: 'Home', link: '/en/', icon: 'material-symbols:home-outline' }, + { + text: 'Blog', + link: '/en/blog/', + icon: 'material-symbols:article-outline', + }, + { + text: 'VuePress', + icon: 'vscode-icons:file-type-vue', + items: [ + { + text: 'Plugin', + icon: 'mingcute:plugin-2-line', + items: [ + { + text: 'caniuse', + link: '/en/note/vuepress-plugin/caniuse/', + icon: 'tabler:brand-css3', + }, + ], + }, + ], + }, +] as NavItem[] diff --git a/docs/.vuepress/notes.ts b/docs/.vuepress/notes.ts index c12d2afa..174f8d00 100644 --- a/docs/.vuepress/notes.ts +++ b/docs/.vuepress/notes.ts @@ -5,7 +5,6 @@ export const zhNotes = definePlumeNotesConfig({ link: '/note', notes: [ { - text: '', dir: 'vuepress-theme-plume', link: '/vuepress-theme-plume/', sidebar: [ @@ -34,7 +33,6 @@ export const zhNotes = definePlumeNotesConfig({ }, { dir: 'vuepress-plugin', - text: '', link: '/vuepress-plugin/', sidebar: [ 'caniuse/README', @@ -50,12 +48,11 @@ export const zhNotes = definePlumeNotesConfig({ }) export const enNotes = definePlumeNotesConfig({ - dir: 'notes', - link: '/note', + dir: 'en/notes', + link: '/en/note', notes: [ { dir: 'vuepress-plugin', - text: '', link: '/vuepress-plugin/', sidebar: ['caniuse/README'], }, diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts new file mode 100644 index 00000000..cd2552ec --- /dev/null +++ b/docs/.vuepress/theme.ts @@ -0,0 +1,49 @@ +import themePlume from 'vuepress-theme-plume' +import { enNotes, zhNotes } from './notes.js' +import { enNavbar, zhNavbar } from './navbar.js' + +export const 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: '在 GitHub 编辑此页', + appearance: true, + avatar: { + url: '/images/blogger.jpg', + name: 'Plume Theme', + description: 'The Theme for Vuepress 2.0', + }, + social: [{ icon: 'github', link: 'https://github.com/pengzhanbo' }], + footer: { copyright: 'Copyright © 2022-present pengzhanbo' }, + + locales: { + '/': { + selectLanguageName: '简体中文', + selectLanguageText: '选择语言', + notes: zhNotes, + navbar: zhNavbar, + }, + '/en/': { + selectLanguageName: 'English', + selectLanguageText: 'Language', + editLinkText: 'Edit this page on GitHub', + notes: enNotes, + navbar: enNavbar, + }, + }, + plugins: { + markdownEnhance: { katex: true }, + search: { + locales: { + '/': { + placeholder: '搜索', + }, + '/en/': { + placeholder: 'Search', + }, + }, + }, + }, +}) diff --git a/docs/package.json b/docs/package.json index 90945cc6..560048c0 100644 --- a/docs/package.json +++ b/docs/package.json @@ -17,9 +17,9 @@ "anywhere": "^1.6.0", "katex": "^0.16.9", "leancloud-storage": "^4.15.2", - "sass": "^1.69.6", + "sass": "^1.69.7", "sass-loader": "^13.3.3", - "vue": "^3.4.3", + "vue": "^3.4.5", "vuepress-theme-plume": "workspace:*" } } diff --git a/package.json b/package.json index f5442e59..71396ef2 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "version": "1.0.0-rc.13", "private": true, - "packageManager": "pnpm@8.13.1", + "packageManager": "pnpm@8.14.0", "author": "pengzhanbo", "license": "MIT", "keywords": [ @@ -19,7 +19,7 @@ }, "scripts": { "build": "pnpm run build:package", - "build:package": "pnpm --filter=!vuepress-theme-plume-monorepo --filter=!docs run -r --stream build", + "build:package": "pnpm --filter=!vuepress-theme-plume-monorepo --filter=!docs --filter=!plugin-page-collection run -r --stream build", "commit": "cz", "dev": "concurrently \"pnpm run dev:package\" \"pnpm run docs\"", "dev:package": "pnpm --filter=!vuepress-theme-plume-monorepo --filter=!docs --parallel dev", @@ -38,8 +38,8 @@ "release:version": "bumpp package.json plugins/*/package.json theme/package.json --execute=\"pnpm release:changelog\" --commit \"build: publish v%s\" --all --tag --push" }, "devDependencies": { - "@commitlint/cli": "^18.4.3", - "@commitlint/config-conventional": "^18.4.3", + "@commitlint/cli": "^18.4.4", + "@commitlint/config-conventional": "^18.4.4", "@pengzhanbo/eslint-config-vue": "^1.5.1", "@types/minimist": "^1.2.5", "@types/node": "20.9.1", @@ -60,7 +60,7 @@ "lint-staged": "^15.2.0", "minimist": "^1.2.8", "ora": "^8.0.1", - "pnpm": "^8.13.1", + "pnpm": "^8.14.0", "rimraf": "^5.0.5", "sort-package-json": "^2.6.0", "taze": "^0.13.1", diff --git a/plugins/plugin-blog-data/package.json b/plugins/plugin-blog-data/package.json index 6b7f60c7..50ad09a8 100644 --- a/plugins/plugin-blog-data/package.json +++ b/plugins/plugin-blog-data/package.json @@ -42,7 +42,7 @@ "@vuepress/utils": "2.0.0-rc.0", "chokidar": "^3.5.3", "create-filter": "^1.0.1", - "vue": "^3.4.3" + "vue": "^3.4.5" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-content-update/package.json b/plugins/plugin-content-update/package.json index 55f2abae..4f417056 100644 --- a/plugins/plugin-content-update/package.json +++ b/plugins/plugin-content-update/package.json @@ -39,7 +39,7 @@ "@vuepress/client": "2.0.0-rc.0", "@vuepress/core": "2.0.0-rc.0", "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.4.3", + "vue": "^3.4.5", "vue-router": "4.2.5" }, "publishConfig": { diff --git a/plugins/plugin-copy-code/package.json b/plugins/plugin-copy-code/package.json index b1be7e3e..d3bf4bd2 100644 --- a/plugins/plugin-copy-code/package.json +++ b/plugins/plugin-copy-code/package.json @@ -41,7 +41,7 @@ "@vuepress/core": "2.0.0-rc.0", "@vuepress/shared": "2.0.0-rc.0", "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.4.3" + "vue": "^3.4.5" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-iconify/package.json b/plugins/plugin-iconify/package.json index d64d7931..5501b284 100644 --- a/plugins/plugin-iconify/package.json +++ b/plugins/plugin-iconify/package.json @@ -41,7 +41,7 @@ "@vuepress/core": "2.0.0-rc.0", "@vuepress/shared": "2.0.0-rc.0", "@vuepress/utils": "2.0.0-rc.0", - "vue": "^3.4.3" + "vue": "^3.4.5" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-netlify-functions/package.json b/plugins/plugin-netlify-functions/package.json index 03b8a8ed..999bcc92 100644 --- a/plugins/plugin-netlify-functions/package.json +++ b/plugins/plugin-netlify-functions/package.json @@ -51,7 +51,7 @@ "dotenv": "^16.3.1", "esbuild": "^0.19.11", "execa": "^8.0.1", - "netlify-cli": "^17.10.2", + "netlify-cli": "^17.11.0", "portfinder": "^1.0.32" }, "devDependencies": { diff --git a/plugins/plugin-notes-data/package.json b/plugins/plugin-notes-data/package.json index 0adf3460..86d47dab 100644 --- a/plugins/plugin-notes-data/package.json +++ b/plugins/plugin-notes-data/package.json @@ -43,7 +43,7 @@ "@vuepress/utils": "2.0.0-rc.0", "chokidar": "^3.5.3", "create-filter": "^1.0.1", - "vue": "^3.4.3" + "vue": "^3.4.5" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-notes-data/src/node/plugin.ts b/plugins/plugin-notes-data/src/node/plugin.ts index 4adde7f9..3e9ddeeb 100644 --- a/plugins/plugin-notes-data/src/node/plugin.ts +++ b/plugins/plugin-notes-data/src/node/plugin.ts @@ -3,7 +3,7 @@ import { getDirname, path } from '@vuepress/utils' import type { NotesDataOptions } from '../shared/index.js' import { prepareNotesData, watchNotesData } from './prepareNotesData.js' -export function notesDataPlugin(options: NotesDataOptions): Plugin { +export function notesDataPlugin(options: NotesDataOptions | NotesDataOptions[]): Plugin { return (app: App) => { return { name: '@vuepress-plume/plugin-notes-data', diff --git a/plugins/plugin-notes-data/src/node/prepareNotesData.ts b/plugins/plugin-notes-data/src/node/prepareNotesData.ts index 87da8959..976ba6aa 100644 --- a/plugins/plugin-notes-data/src/node/prepareNotesData.ts +++ b/plugins/plugin-notes-data/src/node/prepareNotesData.ts @@ -5,7 +5,7 @@ import { createFilter } from 'create-filter' import type { NotesData, NotesDataOptions, - NotesItem, + NotesItemOptions, NotesSidebar, NotesSidebarItem, } from '../shared/index.js' @@ -32,10 +32,11 @@ interface NotePage { link: string } -export async function prepareNotesData(app: App, { include, exclude, notes, dir, link }: NotesDataOptions) { +function resolvedNotesData(app: App, options: NotesDataOptions, result: NotesData) { + const { include, exclude, notes, dir: _dir, link } = options if (!notes || notes.length === 0) return - dir = normalizePath(dir) + const dir = normalizePath(_dir) const filter = createFilter(ensureArray(include), ensureArray(exclude), { resolve: false, }) @@ -47,23 +48,27 @@ export async function prepareNotesData(app: App, { include, exclude, notes, dir, && page.filePathRelative.startsWith(dir) && filter(page.filePathRelative), ) - .map((page) => { - return { - relativePath: page.filePathRelative?.replace(DIR_PATTERN, '') || '', - title: page.title, - link: page.path, - } - }) - - const notesData: NotesData = {} + .map(page => ({ + relativePath: page.filePathRelative?.replace(DIR_PATTERN, '') || '', + title: page.title, + link: page.path, + })) notes.forEach((note) => { - notesData[normalizePath(path.join('/', link, note.link))] = initSidebar( + result[normalizePath(path.join('/', link, note.link))] = initSidebar( note, notesPageList.filter(page => page.relativePath.startsWith(note.dir.trim().replace(/^\/|\/$/g, '')), ), ) }) +} + +export async function prepareNotesData(app: App, options: NotesDataOptions | NotesDataOptions[]) { + const notesData: NotesData = {} + const allOptions = ensureArray(options) + + allOptions.forEach(option => resolvedNotesData(app, option, notesData)) + let content = ` export const notesData = ${JSON.stringify(notesData, null, 2)} ` @@ -73,22 +78,25 @@ export const notesData = ${JSON.stringify(notesData, null, 2)} await app.writeTemp('internal/notesData.js', content) } -export function watchNotesData(app: App, watchers: any[], options: NotesDataOptions): void { - if (!options.notes || options.notes.length === 0 || !options.dir) - return - const dir = path.join('pages', options.dir, '**/*') +export function watchNotesData(app: App, watchers: any[], options: NotesDataOptions | NotesDataOptions[]): void { + const allOptions = ensureArray(options) + const [firstLink, ...links] = allOptions.map(option => option.link) + + const dir = path.join('pages', firstLink, '**/*') const watcher = chokidar.watch(dir, { cwd: app.dir.temp(), ignoreInitial: true, }) + links.length && watcher.add(links.map(link => path.join('pages', link, '**/*'))) + watcher.on('add', () => prepareNotesData(app, options)) watcher.on('change', () => prepareNotesData(app, options)) watcher.on('unlink', () => prepareNotesData(app, options)) watchers.push(watcher) } -function initSidebar(note: NotesItem, pages: NotePage[]): NotesSidebarItem[] { +function initSidebar(note: NotesItemOptions, pages: NotePage[]): NotesSidebarItem[] { if (!note.sidebar) return [] if (note.sidebar === 'auto') @@ -97,7 +105,7 @@ function initSidebar(note: NotesItem, pages: NotePage[]): NotesSidebarItem[] { } function initSidebarByAuto( - note: NotesItem, + note: NotesItemOptions, pages: NotePage[], ): NotesSidebarItem[] { pages = pages.sort((prev, next) => { @@ -135,7 +143,7 @@ function initSidebarByAuto( } function initSidebarByConfig( - { text, dir, sidebar }: NotesItem, + { text, dir, sidebar }: NotesItemOptions, pages: NotePage[], ): NotesSidebarItem[] { return (sidebar as NotesSidebar).map((item) => { diff --git a/plugins/plugin-notes-data/src/shared/index.ts b/plugins/plugin-notes-data/src/shared/index.ts index 8596556a..fc894874 100644 --- a/plugins/plugin-notes-data/src/shared/index.ts +++ b/plugins/plugin-notes-data/src/shared/index.ts @@ -3,9 +3,11 @@ export interface NotesDataOptions { link: string include?: string | string[] exclude?: string | string[] - notes: NotesItem[] + notes: NotesItemOptions[] } +export type NotesItemOptions = (Omit & { text?: string }) + export interface NotesItem { dir: string link: string diff --git a/plugins/plugin-page-collection/package.json b/plugins/plugin-page-collection/package.json index fe68839c..fa20c540 100644 --- a/plugins/plugin-page-collection/package.json +++ b/plugins/plugin-page-collection/package.json @@ -37,7 +37,7 @@ "@vuepress/shared": "2.0.0-rc.0", "@vuepress/utils": "2.0.0-rc.0", "leancloud-storage": "^4.15.2", - "vue": "^3.4.3", + "vue": "^3.4.5", "vue-router": "4.2.5", "vuepress-plugin-netlify-functions": "workspace:*" }, diff --git a/plugins/plugin-shikiji/package.json b/plugins/plugin-shikiji/package.json index ba72e6ee..11619245 100644 --- a/plugins/plugin-shikiji/package.json +++ b/plugins/plugin-shikiji/package.json @@ -36,8 +36,8 @@ "@vuepress/utils": "2.0.0-rc.0", "nanoid": "^5.0.4", "picocolors": "^1.0.0", - "shikiji": "^0.9.16", - "shikiji-transformers": "^0.9.16" + "shikiji": "^0.9.17", + "shikiji-transformers": "^0.9.17" }, "publishConfig": { "access": "public" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 41cc59b9..b550f5f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: devDependencies: '@commitlint/cli': - specifier: ^18.4.3 - version: 18.4.3(typescript@5.3.3) + specifier: ^18.4.4 + version: 18.4.4(@types/node@20.9.1)(typescript@5.3.3) '@commitlint/config-conventional': - specifier: ^18.4.3 - version: 18.4.3 + specifier: ^18.4.4 + version: 18.4.4 '@pengzhanbo/eslint-config-vue': specifier: ^1.5.1 version: 1.5.1(@vue/compiler-sfc@3.4.3)(eslint-plugin-format@0.1.0)(eslint@8.56.0)(typescript@5.3.3) @@ -75,8 +75,8 @@ importers: specifier: ^8.0.1 version: 8.0.1 pnpm: - specifier: ^8.13.1 - version: 8.13.1 + specifier: ^8.14.0 + version: 8.14.0 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -94,13 +94,13 @@ importers: version: 5.3.3 vite: specifier: ^5.0.10 - version: 5.0.10(@types/node@20.9.1)(sass@1.69.6) + version: 5.0.10(@types/node@20.9.1)(sass@1.69.7) docs: dependencies: '@vuepress/bundler-vite': specifier: 2.0.0-rc.0 - version: 2.0.0-rc.0(@types/node@20.9.1)(sass@1.69.6)(typescript@5.3.3) + version: 2.0.0-rc.0(@types/node@20.9.1)(sass@1.69.7)(typescript@5.3.3) '@vuepress/bundler-webpack': specifier: 2.0.0-rc.0 version: 2.0.0-rc.0(@vue/compiler-sfc@3.4.3)(typescript@5.3.3) @@ -123,14 +123,14 @@ importers: specifier: ^4.15.2 version: 4.15.2 sass: - specifier: ^1.69.6 - version: 1.69.6 + specifier: ^1.69.7 + version: 1.69.7 sass-loader: specifier: ^13.3.3 - version: 13.3.3(sass@1.69.6) + version: 13.3.3(sass@1.69.7) vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) vuepress-theme-plume: specifier: workspace:* version: link:../theme @@ -186,8 +186,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) plugins/plugin-caniuse: dependencies: @@ -220,11 +220,11 @@ importers: specifier: 2.0.0-rc.0 version: 2.0.0-rc.0 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) vue-router: specifier: 4.2.5 - version: 4.2.5(vue@3.4.3) + version: 4.2.5(vue@3.4.5) plugins/plugin-copy-code: dependencies: @@ -244,14 +244,14 @@ importers: specifier: 2.0.0-rc.0 version: 2.0.0-rc.0 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) plugins/plugin-iconify: dependencies: '@iconify/vue': specifier: ^4.1.1 - version: 4.1.1(vue@3.4.3) + version: 4.1.1(vue@3.4.5) '@vuepress/client': specifier: 2.0.0-rc.0 version: 2.0.0-rc.0(typescript@5.3.3) @@ -265,8 +265,8 @@ importers: specifier: 2.0.0-rc.0 version: 2.0.0-rc.0 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) plugins/plugin-netlify-functions: dependencies: @@ -304,8 +304,8 @@ importers: specifier: ^8.0.1 version: 8.0.1 netlify-cli: - specifier: ^17.10.2 - version: 17.10.2(@types/node@20.10.6) + specifier: ^17.11.0 + version: 17.11.0(@types/node@20.10.6) portfinder: specifier: ^1.0.32 version: 1.0.32 @@ -338,8 +338,8 @@ importers: specifier: ^1.0.1 version: 1.0.1 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) plugins/plugin-page-collection: dependencies: @@ -362,11 +362,11 @@ importers: specifier: ^4.15.2 version: 4.15.2 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) vue-router: specifier: 4.2.5 - version: 4.2.5(vue@3.4.3) + version: 4.2.5(vue@3.4.5) vuepress-plugin-netlify-functions: specifier: workspace:* version: link:../plugin-netlify-functions @@ -386,11 +386,11 @@ importers: specifier: ^1.0.0 version: 1.0.0 shikiji: - specifier: ^0.9.16 - version: 0.9.16 + specifier: ^0.9.17 + version: 0.9.17 shikiji-transformers: - specifier: ^0.9.16 - version: 0.9.16 + specifier: ^0.9.17 + version: 0.9.17 theme: dependencies: @@ -471,31 +471,31 @@ importers: version: 2.0.0-rc.0 '@vueuse/core': specifier: ^10.7.1 - version: 10.7.1(vue@3.4.3) + version: 10.7.1(vue@3.4.5) date-fns: specifier: ^3.0.6 version: 3.0.6 + katex: + specifier: ^0.16.9 + version: 0.16.9 lodash.merge: specifier: ^4.6.2 version: 4.6.2 nanoid: specifier: ^5.0.4 version: 5.0.4 - ts-debounce: - specifier: ^4.0.0 - version: 4.0.0 vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) vue-router: specifier: 4.2.5 - version: 4.2.5(vue@3.4.3) + version: 4.2.5(vue@3.4.5) vuepress-plugin-comment2: specifier: 2.0.0-rc.10 version: 2.0.0-rc.10(typescript@5.3.3) vuepress-plugin-md-enhance: specifier: 2.0.0-rc.10 - version: 2.0.0-rc.10(markdown-it@13.0.2)(typescript@5.3.3) + version: 2.0.0-rc.10(katex@0.16.9)(markdown-it@13.0.2)(typescript@5.3.3) vuepress-plugin-reading-time2: specifier: 2.0.0-rc.10 version: 2.0.0-rc.10(typescript@5.3.3) @@ -798,27 +798,28 @@ packages: engines: {node: '>=0.1.90'} dev: false - /@commitlint/cli@18.4.3(typescript@5.3.3): - resolution: {integrity: sha512-zop98yfB3A6NveYAZ3P1Mb6bIXuCeWgnUfVNkH4yhIMQpQfzFwseadazOuSn0OOfTt0lWuFauehpm9GcqM5lww==} + /@commitlint/cli@18.4.4(@types/node@20.9.1)(typescript@5.3.3): + resolution: {integrity: sha512-Ro3wIo//fV3XiV1EkdpHog6huaEyNcUAVrSmtgKqYM5g982wOWmP4FXvEDFwRMVgz878CNBvvCc33dMZ5AQJ/g==} engines: {node: '>=v18'} hasBin: true dependencies: - '@commitlint/format': 18.4.3 - '@commitlint/lint': 18.4.3 - '@commitlint/load': 18.4.3(typescript@5.3.3) - '@commitlint/read': 18.4.3 - '@commitlint/types': 18.4.3 + '@commitlint/format': 18.4.4 + '@commitlint/lint': 18.4.4 + '@commitlint/load': 18.4.4(@types/node@20.9.1)(typescript@5.3.3) + '@commitlint/read': 18.4.4 + '@commitlint/types': 18.4.4 execa: 5.1.1 lodash.isfunction: 3.0.9 resolve-from: 5.0.0 resolve-global: 1.0.0 yargs: 17.7.2 transitivePeerDependencies: + - '@types/node' - typescript dev: true - /@commitlint/config-conventional@18.4.3: - resolution: {integrity: sha512-729eRRaNta7JZF07qf6SAGSghoDEp9mH7yHU0m7ff0q89W97wDrWCyZ3yoV3mcQJwbhlmVmZPTkPcm7qiAu8WA==} + /@commitlint/config-conventional@18.4.4: + resolution: {integrity: sha512-Bz3sPQSboBN+Et/KyZrR+OJ3z9PrHDw7Bls0/hv94PmuHBtMq1dCGxS9XzTGzxeMNlytCC4kxF083tbhPljl3Q==} engines: {node: '>=v18'} dependencies: conventional-changelog-conventionalcommits: 7.0.2 @@ -832,12 +833,21 @@ packages: '@commitlint/types': 18.4.3 ajv: 8.12.0 dev: true + optional: true - /@commitlint/ensure@18.4.3: - resolution: {integrity: sha512-MI4fwD9TWDVn4plF5+7JUyLLbkOdzIRBmVeNlk4dcGlkrVA+/l5GLcpN66q9LkFsFv6G2X31y89ApA3hqnqIFg==} + /@commitlint/config-validator@18.4.4: + resolution: {integrity: sha512-/QI8KIg/h7O0Eus36fPcEcO3QPBcdXuGfZeCF5m15k0EB2bcU8s6pHNTNEa6xz9PrAefHCL+yzRJj7w20T6Mow==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.4.3 + '@commitlint/types': 18.4.4 + ajv: 8.12.0 + dev: true + + /@commitlint/ensure@18.4.4: + resolution: {integrity: sha512-KjD19p6julB5WrQL+Cd8p+AePwpl1XzGAjB0jnuFMKWtji9L7ucCZUKDstGjlkBZGGzH/nvdB8K+bh5K27EVUg==} + engines: {node: '>=v18'} + dependencies: + '@commitlint/types': 18.4.4 lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 lodash.snakecase: 4.1.1 @@ -850,31 +860,37 @@ packages: engines: {node: '>=v18'} requiresBuild: true dev: true + optional: true - /@commitlint/format@18.4.3: - resolution: {integrity: sha512-8b+ItXYHxAhRAXFfYki5PpbuMMOmXYuzLxib65z2XTqki59YDQJGpJ/wB1kEE5MQDgSTQWtKUrA8n9zS/1uIDQ==} + /@commitlint/execute-rule@18.4.4: + resolution: {integrity: sha512-a37Nd3bDQydtg9PCLLWM9ZC+GO7X5i4zJvrggJv5jBhaHsXeQ9ZWdO6ODYR+f0LxBXXNYK3geYXJrCWUCP8JEg==} + engines: {node: '>=v18'} + dev: true + + /@commitlint/format@18.4.4: + resolution: {integrity: sha512-2v3V5hVlv0R3pe7p66IX5F7cjeVvGM5JqITRIbBCFvGHPJ/CG74rjTkAu0RBEiIhlk3eOaLjVGq3d5falPkLBA==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.4.3 + '@commitlint/types': 18.4.4 chalk: 4.1.2 dev: true - /@commitlint/is-ignored@18.4.3: - resolution: {integrity: sha512-ZseOY9UfuAI32h9w342Km4AIaTieeFskm2ZKdrG7r31+c6zGBzuny9KQhwI9puc0J3GkUquEgKJblCl7pMnjwg==} + /@commitlint/is-ignored@18.4.4: + resolution: {integrity: sha512-rXWes9owKBTjfTr6Od7YlflRg4N+ngkOH+dUZhk0qL/XQb26mHz0EgVgdixMVBac1OsohRwJaLmVHX+5F6vfmg==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.4.3 + '@commitlint/types': 18.4.4 semver: 7.5.4 dev: true - /@commitlint/lint@18.4.3: - resolution: {integrity: sha512-18u3MRgEXNbnYkMOWoncvq6QB8/90m9TbERKgdPqVvS+zQ/MsuRhdvHYCIXGXZxUb0YI4DV2PC4bPneBV/fYuA==} + /@commitlint/lint@18.4.4: + resolution: {integrity: sha512-SoyQstVxMY5Z4GnFRtRzy+NWYb+yVseXgir+7BxnpB59oH05C9XztRrhDw6OnkNeXhjINTpi1HLnuY7So+CaAQ==} engines: {node: '>=v18'} dependencies: - '@commitlint/is-ignored': 18.4.3 - '@commitlint/parse': 18.4.3 - '@commitlint/rules': 18.4.3 - '@commitlint/types': 18.4.3 + '@commitlint/is-ignored': 18.4.4 + '@commitlint/parse': 18.4.4 + '@commitlint/rules': 18.4.4 + '@commitlint/types': 18.4.4 dev: true /@commitlint/load@18.4.3(typescript@5.3.3): @@ -897,28 +913,48 @@ packages: transitivePeerDependencies: - typescript dev: true + optional: true - /@commitlint/message@18.4.3: - resolution: {integrity: sha512-ddJ7AztWUIoEMAXoewx45lKEYEOeOlBVWjk8hDMUGpprkuvWULpaXczqdjwVtjrKT3JhhN+gMs8pm5G3vB2how==} + /@commitlint/load@18.4.4(@types/node@20.9.1)(typescript@5.3.3): + resolution: {integrity: sha512-RaDIa9qwOw2xRJ3Jr2DBXd14rmnHJIX2XdZF4kmoF1rgsg/+7cvrExLSUNAkQUNimyjCn1b/bKX2Omm+GdY0XQ==} + engines: {node: '>=v18'} + dependencies: + '@commitlint/config-validator': 18.4.4 + '@commitlint/execute-rule': 18.4.4 + '@commitlint/resolve-extends': 18.4.4 + '@commitlint/types': 18.4.4 + chalk: 4.1.2 + cosmiconfig: 8.3.6(typescript@5.3.3) + cosmiconfig-typescript-loader: 5.0.0(@types/node@20.9.1)(cosmiconfig@8.3.6)(typescript@5.3.3) + lodash.isplainobject: 4.0.6 + lodash.merge: 4.6.2 + lodash.uniq: 4.5.0 + resolve-from: 5.0.0 + transitivePeerDependencies: + - '@types/node' + - typescript + dev: true + + /@commitlint/message@18.4.4: + resolution: {integrity: sha512-lHF95mMDYgAI1LBXveJUyg4eLaMXyOqJccCK3v55ZOEUsMPrDi8upqDjd/NmzWmESYihaOMBTAnxm+6oD1WoDQ==} engines: {node: '>=v18'} dev: true - /@commitlint/parse@18.4.3: - resolution: {integrity: sha512-eoH7CXM9L+/Me96KVcfJ27EIIbA5P9sqw3DqjJhRYuhaULIsPHFs5S5GBDCqT0vKZQDx0DgxhMpW6AQbnKrFtA==} + /@commitlint/parse@18.4.4: + resolution: {integrity: sha512-99G7dyn/OoyNWXJni0Ki0K3aJd01pEb/Im/Id6y4X7PN+kGOahjz2z/cXYYHn7xDdooqFVdiVrVLeChfgpWZ2g==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.4.3 + '@commitlint/types': 18.4.4 conventional-changelog-angular: 7.0.0 conventional-commits-parser: 5.0.0 dev: true - /@commitlint/read@18.4.3: - resolution: {integrity: sha512-H4HGxaYA6OBCimZAtghL+B+SWu8ep4X7BwgmedmqWZRHxRLcX2q0bWBtUm5FsMbluxbOfrJwOs/Z0ah4roP/GQ==} + /@commitlint/read@18.4.4: + resolution: {integrity: sha512-r58JbWky4gAFPea/CZmvlqP9Ehbs+8gSEUqhIJOojKzTc3xlxFnZUDVPcEnnaqzQEEoV6C69VW7xuzdcBlu/FQ==} engines: {node: '>=v18'} dependencies: - '@commitlint/top-level': 18.4.3 - '@commitlint/types': 18.4.3 - fs-extra: 11.1.1 + '@commitlint/top-level': 18.4.4 + '@commitlint/types': 18.4.4 git-raw-commits: 2.0.11 minimist: 1.2.8 dev: true @@ -935,25 +971,38 @@ packages: resolve-from: 5.0.0 resolve-global: 1.0.0 dev: true + optional: true - /@commitlint/rules@18.4.3: - resolution: {integrity: sha512-8KIeukDf45BiY+Lul1T0imSNXF0sMrlLG6JpLLKolkmYVQ6PxxoNOriwyZ3UTFFpaVbPy0rcITaV7U9JCAfDTA==} + /@commitlint/resolve-extends@18.4.4: + resolution: {integrity: sha512-RRpIHSbRnFvmGifVk21Gqazf1QF/yeP+Kkg/e3PlkegcOKd/FGOXp/Kx9cvSO2K7ucSn4GD/oBvgasFoy+NCAw==} engines: {node: '>=v18'} dependencies: - '@commitlint/ensure': 18.4.3 - '@commitlint/message': 18.4.3 - '@commitlint/to-lines': 18.4.3 - '@commitlint/types': 18.4.3 + '@commitlint/config-validator': 18.4.4 + '@commitlint/types': 18.4.4 + import-fresh: 3.3.0 + lodash.mergewith: 4.6.2 + resolve-from: 5.0.0 + resolve-global: 1.0.0 + dev: true + + /@commitlint/rules@18.4.4: + resolution: {integrity: sha512-6Uzlsnl/GljEI+80NWjf4ThOfR8NIsbm18IfXYuCEchlwMHSxiuYG4rHSK5DNmG/+MIo8eR5VdQ0gQyt7kWzAA==} + engines: {node: '>=v18'} + dependencies: + '@commitlint/ensure': 18.4.4 + '@commitlint/message': 18.4.4 + '@commitlint/to-lines': 18.4.4 + '@commitlint/types': 18.4.4 execa: 5.1.1 dev: true - /@commitlint/to-lines@18.4.3: - resolution: {integrity: sha512-fy1TAleik4Zfru1RJ8ZU6cOSvgSVhUellxd3WZV1D5RwHZETt1sZdcA4mQN2y3VcIZsUNKkW0Mq8CM9/L9harQ==} + /@commitlint/to-lines@18.4.4: + resolution: {integrity: sha512-mwe2Roa59NCz/krniAdCygFabg7+fQCkIhXqBHw00XQ8Y7lw4poZLLxeGI3p3bLpcEOXdqIDrEGLwHmG5lBdwQ==} engines: {node: '>=v18'} dev: true - /@commitlint/top-level@18.4.3: - resolution: {integrity: sha512-E6fJPBLPFL5R8+XUNSYkj4HekIOuGMyJo3mIx2PkYc3clel+pcWQ7TConqXxNWW4x1ugigiIY2RGot55qUq1hw==} + /@commitlint/top-level@18.4.4: + resolution: {integrity: sha512-PBwW1drgeavl9CadB7IPRUk6rkUP/O8jEkxjlC+ofuh3pw0bzJdAT+Kw7M1Yc9KtTb9xTaqUB8uvRtaybHa/tQ==} engines: {node: '>=v18'} dependencies: find-up: 5.0.0 @@ -962,6 +1011,15 @@ packages: /@commitlint/types@18.4.3: resolution: {integrity: sha512-cvzx+vtY/I2hVBZHCLrpoh+sA0hfuzHwDc+BAFPimYLjJkpHnghQM+z8W/KyLGkygJh3BtI3xXXq+dKjnSWEmA==} engines: {node: '>=v18'} + requiresBuild: true + dependencies: + chalk: 4.1.2 + dev: true + optional: true + + /@commitlint/types@18.4.4: + resolution: {integrity: sha512-/FykLtodD8gKs3+VNkAUwofu4LBHankclj+I8fB2jTRvG6PV7k/OUt4P+VbM7ip853qS4F0g7Z6hLNa6JeMcAQ==} + engines: {node: '>=v18'} dependencies: chalk: 4.1.2 dev: true @@ -2026,13 +2084,13 @@ packages: resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} dev: false - /@iconify/vue@4.1.1(vue@3.4.3): + /@iconify/vue@4.1.1(vue@3.4.5): resolution: {integrity: sha512-RL85Bm/DAe8y6rT6pux7D2FJSiUEM/TPfyK7GrbAOfTSwrhvwJW+S5yijdGcmtXouA8MtuH9C7l4hiSE4mLMjg==} peerDependencies: vue: '>=3' dependencies: '@iconify/types': 2.0.0 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) dev: false /@import-maps/resolve@1.0.1: @@ -2416,7 +2474,7 @@ packages: upath: 2.0.1 dev: false - /@mdit/plugin-katex@0.7.6(markdown-it@13.0.2): + /@mdit/plugin-katex@0.7.6(katex@0.16.9)(markdown-it@13.0.2): resolution: {integrity: sha512-ZbPIks1SlgzS5R6YOL5s0J5vk20ROl5hF+Yj9o6CiEljodK2ln0ewpX36qM6POVrS/cu6E4Lx4X0fc5JTI6nAQ==} engines: {node: '>= 18'} peerDependencies: @@ -2431,6 +2489,7 @@ packages: '@mdit/plugin-tex': 0.7.6(markdown-it@13.0.2) '@types/katex': 0.16.7 '@types/markdown-it': 13.0.7 + katex: 0.16.9 markdown-it: 13.0.2 dev: false @@ -2736,6 +2795,39 @@ packages: - supports-color dev: false + /@netlify/edge-bundler@11.0.0: + resolution: {integrity: sha512-DPFkzQmdZR/1a3jUaZMbxk79N6PEtqhxEvx6x5wISegqkeM9DPNe+PQIBFXpsAwIeb9MB1RU7vliT1hIRt8DBg==} + engines: {node: ^14.16.0 || >=16.0.0} + dependencies: + '@import-maps/resolve': 1.0.1 + '@vercel/nft': 0.24.3(supports-color@9.2.2) + ajv: 8.12.0 + ajv-errors: 3.0.0(ajv@8.12.0) + better-ajv-errors: 1.2.0(ajv@8.12.0) + common-path-prefix: 3.0.0 + env-paths: 3.0.0 + esbuild: 0.19.9 + execa: 6.1.0 + find-up: 6.3.0 + get-package-name: 2.2.0 + get-port: 6.1.2 + is-path-inside: 4.0.0 + jsonc-parser: 3.2.0 + node-fetch: 3.3.2 + node-stream-zip: 1.15.0 + p-retry: 5.1.1 + p-wait-for: 4.1.0 + path-key: 4.0.0 + regexp-tree: 0.1.27 + semver: 7.5.4 + tmp-promise: 3.0.3 + urlpattern-polyfill: 8.0.2 + uuid: 9.0.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + /@netlify/framework-info@9.8.10: resolution: {integrity: sha512-VT8ejAaB/XU2xRpdpQinHUO1YL3+BMx6LJ49wJk2u9Yq/VI1/gYCi5VqbqTHBQXJUlOi84YuiRlrDBsLpPr8eg==} engines: {node: ^14.14.0 || >=16.0.0} @@ -4560,6 +4652,7 @@ packages: dependencies: undici-types: 5.26.5 dev: true + optional: true /@types/node@20.10.6: resolution: {integrity: sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==} @@ -4884,15 +4977,15 @@ packages: - supports-color dev: false - /@vitejs/plugin-vue@4.5.0(vite@5.0.10)(vue@3.4.3): + /@vitejs/plugin-vue@4.5.0(vite@5.0.10)(vue@3.4.5): resolution: {integrity: sha512-a2WSpP8X8HTEww/U00bU4mX1QpLINNuz/2KMNpLsdu3BzOpak3AGI1CJYBTXcc4SPhaD0eNRUp7IyQK405L5dQ==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 || ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.0.10(@types/node@20.9.1)(sass@1.69.6) - vue: 3.4.3(typescript@5.3.3) + vite: 5.0.10(@types/node@20.9.1)(sass@1.69.7) + vue: 3.4.5(typescript@5.3.3) dev: false /@vue/compiler-core@3.4.3: @@ -4904,12 +4997,29 @@ packages: estree-walker: 2.0.2 source-map-js: 1.0.2 + /@vue/compiler-core@3.4.5: + resolution: {integrity: sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==} + dependencies: + '@babel/parser': 7.23.6 + '@vue/shared': 3.4.5 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.0.2 + dev: false + /@vue/compiler-dom@3.4.3: resolution: {integrity: sha512-oGF1E9/htI6JWj/lTJgr6UgxNCtNHbM6xKVreBWeZL9QhRGABRVoWGAzxmtBfSOd+w0Zi5BY0Es/tlJrN6WgEg==} dependencies: '@vue/compiler-core': 3.4.3 '@vue/shared': 3.4.3 + /@vue/compiler-dom@3.4.5: + resolution: {integrity: sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==} + dependencies: + '@vue/compiler-core': 3.4.5 + '@vue/shared': 3.4.5 + dev: false + /@vue/compiler-sfc@3.4.3: resolution: {integrity: sha512-NuJqb5is9I4uzv316VRUDYgIlPZCG8D+ARt5P4t5UDShIHKL25J3TGZAUryY/Aiy0DsY7srJnZL5ryB6DD63Zw==} dependencies: @@ -4923,45 +5033,66 @@ packages: postcss: 8.4.32 source-map-js: 1.0.2 + /@vue/compiler-sfc@3.4.5: + resolution: {integrity: sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==} + dependencies: + '@babel/parser': 7.23.6 + '@vue/compiler-core': 3.4.5 + '@vue/compiler-dom': 3.4.5 + '@vue/compiler-ssr': 3.4.5 + '@vue/shared': 3.4.5 + estree-walker: 2.0.2 + magic-string: 0.30.5 + postcss: 8.4.32 + source-map-js: 1.0.2 + dev: false + /@vue/compiler-ssr@3.4.3: resolution: {integrity: sha512-wnYQtMBkeFSxgSSQbYGQeXPhQacQiog2c6AlvMldQH6DB+gSXK/0F6DVXAJfEiuBSgBhUc8dwrrG5JQcqwalsA==} dependencies: '@vue/compiler-dom': 3.4.3 '@vue/shared': 3.4.3 + /@vue/compiler-ssr@3.4.5: + resolution: {integrity: sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==} + dependencies: + '@vue/compiler-dom': 3.4.5 + '@vue/shared': 3.4.5 + dev: false + /@vue/devtools-api@6.5.1: resolution: {integrity: sha512-+KpckaAQyfbvshdDW5xQylLni1asvNSGme1JFs8I1+/H5pHEhqUKMEQD/qn3Nx5+/nycBq11qAEi8lk+LXI2dA==} dev: false - /@vue/reactivity@3.4.3: - resolution: {integrity: sha512-q5f9HLDU+5aBKizXHAx0w4whkIANs1Muiq9R5YXm0HtorSlflqv9u/ohaMxuuhHWCji4xqpQ1eL04WvmAmGnFg==} + /@vue/reactivity@3.4.5: + resolution: {integrity: sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==} dependencies: - '@vue/shared': 3.4.3 + '@vue/shared': 3.4.5 dev: false - /@vue/runtime-core@3.4.3: - resolution: {integrity: sha512-C1r6QhB1qY7D591RCSFhMULyzL9CuyrGc+3PpB0h7dU4Qqw6GNyo4BNFjHZVvsWncrUlKX3DIKg0Y7rNNr06NQ==} + /@vue/runtime-core@3.4.5: + resolution: {integrity: sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==} dependencies: - '@vue/reactivity': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/reactivity': 3.4.5 + '@vue/shared': 3.4.5 dev: false - /@vue/runtime-dom@3.4.3: - resolution: {integrity: sha512-wrsprg7An5Ec+EhPngWdPuzkp0BEUxAKaQtN9dPU/iZctPyD9aaXmVtehPJerdQxQale6gEnhpnfywNw3zOv2A==} + /@vue/runtime-dom@3.4.5: + resolution: {integrity: sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==} dependencies: - '@vue/runtime-core': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/runtime-core': 3.4.5 + '@vue/shared': 3.4.5 csstype: 3.1.3 dev: false - /@vue/server-renderer@3.4.3(vue@3.4.3): - resolution: {integrity: sha512-BUxt8oVGMKKsqSkM1uU3d3Houyfy4WAc2SpSQRebNd+XJGATVkW/rO129jkyL+kpB/2VRKzE63zwf5RtJ3XuZw==} + /@vue/server-renderer@3.4.5(vue@3.4.5): + resolution: {integrity: sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==} peerDependencies: - vue: 3.4.3 + vue: 3.4.5 dependencies: - '@vue/compiler-ssr': 3.4.3 - '@vue/shared': 3.4.3 - vue: 3.4.3(typescript@5.3.3) + '@vue/compiler-ssr': 3.4.5 + '@vue/shared': 3.4.5 + vue: 3.4.5(typescript@5.3.3) dev: false /@vue/shared@3.3.13: @@ -4971,10 +5102,14 @@ packages: /@vue/shared@3.4.3: resolution: {integrity: sha512-rIwlkkP1n4uKrRzivAKPZIEkHiuwY5mmhMJ2nZKCBLz8lTUlE73rQh4n1OnnMurXt1vcUNyH4ZPfdh8QweTjpQ==} - /@vuepress/bundler-vite@2.0.0-rc.0(@types/node@20.9.1)(sass@1.69.6)(typescript@5.3.3): + /@vue/shared@3.4.5: + resolution: {integrity: sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==} + dev: false + + /@vuepress/bundler-vite@2.0.0-rc.0(@types/node@20.9.1)(sass@1.69.7)(typescript@5.3.3): resolution: {integrity: sha512-rX8S8IYpqqlJfNPstS/joorpxXx/4WuE7+gDM31i2HUrxOKGZVzq8ZsRRRU2UdoTwHZSd3LpUS4sMtxE5xLK1A==} dependencies: - '@vitejs/plugin-vue': 4.5.0(vite@5.0.10)(vue@3.4.3) + '@vitejs/plugin-vue': 4.5.0(vite@5.0.10)(vue@3.4.5) '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/shared': 2.0.0-rc.0 @@ -4984,9 +5119,9 @@ packages: postcss: 8.4.31 postcss-load-config: 4.0.1(postcss@8.4.31) rollup: 4.4.1 - vite: 5.0.10(@types/node@20.9.1)(sass@1.69.6) - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vite: 5.0.10(@types/node@20.9.1)(sass@1.69.7) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@types/node' - '@vue/composition-api' @@ -5022,9 +5157,9 @@ packages: postcss-csso: 6.0.1(postcss@8.4.31) postcss-loader: 7.3.3(postcss@8.4.31)(webpack@5.89.0) style-loader: 3.3.3(webpack@5.89.0) - vue: 3.4.3(typescript@5.3.3) - vue-loader: 17.3.1(@vue/compiler-sfc@3.4.3)(vue@3.4.3)(webpack@5.89.0) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-loader: 17.3.1(@vue/compiler-sfc@3.4.3)(vue@3.4.5)(webpack@5.89.0) + vue-router: 4.2.5(vue@3.4.5) webpack: 5.89.0 webpack-chain: 6.5.1 webpack-dev-server: 4.15.1(webpack@5.89.0) @@ -5065,9 +5200,9 @@ packages: dependencies: '@vue/devtools-api': 6.5.1 '@vuepress/shared': 2.0.0-rc.0 - '@vueuse/core': 10.7.1(vue@3.4.3) - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + '@vueuse/core': 10.7.1(vue@3.4.5) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - typescript @@ -5080,7 +5215,7 @@ packages: '@vuepress/markdown': 2.0.0-rc.0 '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5117,8 +5252,8 @@ packages: '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/utils': 2.0.0-rc.0 ts-debounce: 4.0.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5151,10 +5286,10 @@ packages: '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - '@vueuse/core': 10.7.1(vue@3.4.3) + '@vueuse/core': 10.7.1(vue@3.4.5) ts-debounce: 4.0.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -5174,7 +5309,7 @@ packages: '@vuepress/markdown': 2.0.0-rc.0 '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5200,7 +5335,7 @@ packages: '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/utils': 2.0.0-rc.0 medium-zoom: 1.1.0 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5213,8 +5348,8 @@ packages: '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/utils': 2.0.0-rc.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5241,8 +5376,8 @@ packages: '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 chokidar: 3.5.3 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5257,7 +5392,7 @@ packages: '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5270,8 +5405,8 @@ packages: '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/core': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/utils': 2.0.0-rc.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -5303,13 +5438,13 @@ packages: - supports-color dev: false - /@vueuse/core@10.7.1(vue@3.4.3): + /@vueuse/core@10.7.1(vue@3.4.5): resolution: {integrity: sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==} dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.7.1 - '@vueuse/shared': 10.7.1(vue@3.4.3) - vue-demi: 0.14.6(vue@3.4.3) + '@vueuse/shared': 10.7.1(vue@3.4.5) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -5319,10 +5454,10 @@ packages: resolution: {integrity: sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==} dev: false - /@vueuse/shared@10.7.1(vue@3.4.3): + /@vueuse/shared@10.7.1(vue@3.4.5): resolution: {integrity: sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==} dependencies: - vue-demi: 0.14.6(vue@3.4.3) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -6344,7 +6479,7 @@ packages: dev: false /bytes@3.0.0: - resolution: {integrity: sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw==} + resolution: {integrity: sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=} engines: {node: '>= 0.8'} dev: false @@ -6479,7 +6614,7 @@ packages: resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} dependencies: pascal-case: 3.1.2 - tslib: 2.5.3 + tslib: 2.6.2 dev: false /camelcase-keys@6.2.2: @@ -7467,6 +7602,22 @@ packages: jiti: 1.20.0 typescript: 5.3.3 dev: true + optional: true + + /cosmiconfig-typescript-loader@5.0.0(@types/node@20.9.1)(cosmiconfig@8.3.6)(typescript@5.3.3): + resolution: {integrity: sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==} + engines: {node: '>=v16'} + requiresBuild: true + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=8.2' + typescript: '>=4' + dependencies: + '@types/node': 20.9.1 + cosmiconfig: 8.3.6(typescript@5.3.3) + jiti: 1.20.0 + typescript: 5.3.3 + dev: true /cosmiconfig@8.2.0: resolution: {integrity: sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ==} @@ -8068,7 +8219,7 @@ packages: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 - entities: 4.4.0 + entities: 4.5.0 dev: false /domelementtype@2.3.0: @@ -8109,7 +8260,7 @@ packages: resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} dependencies: no-case: 3.0.4 - tslib: 2.5.3 + tslib: 2.6.2 dev: false /dot-prop@5.3.0: @@ -8224,11 +8375,6 @@ packages: engines: {node: '>=0.12'} dev: false - /entities@4.4.0: - resolution: {integrity: sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==} - engines: {node: '>=0.12'} - dev: false - /entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} @@ -11847,7 +11993,7 @@ packages: /lower-case@2.0.2: resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} dependencies: - tslib: 2.5.3 + tslib: 2.6.2 dev: false /lowercase-keys@3.0.0: @@ -12550,8 +12696,8 @@ packages: resolution: {integrity: sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==} dev: false - /netlify-cli@17.10.2(@types/node@20.10.6): - resolution: {integrity: sha512-pKXL+w5/vm4ld6IUotBEse3KvN4+WCComLP6a73OiOvy8uM6uxtDUiuL+uAhRaozohjjaU/Ym4q1TqwbqWF5rA==} + /netlify-cli@17.11.0(@types/node@20.10.6): + resolution: {integrity: sha512-EIdKpkc6yw9T3uPe7kuQSOa+fai0uCBPvXxRZNQkcJ8Wo0T8fwM+gBehH4tAyBk13RehppGklIcOsa+Ym1wMRg==} engines: {node: '>=18.14.0'} hasBin: true requiresBuild: true @@ -12562,7 +12708,7 @@ packages: '@netlify/build': 29.31.0(@types/node@20.10.6)(debug@4.3.4) '@netlify/build-info': 7.11.3 '@netlify/config': 20.10.0 - '@netlify/edge-bundler': 10.1.3(supports-color@9.2.2) + '@netlify/edge-bundler': 11.0.0 '@netlify/local-functions-proxy': 1.1.1 '@netlify/zip-it-and-ship-it': 9.28.1(supports-color@9.2.2) '@octokit/rest': 19.0.13 @@ -12734,7 +12880,7 @@ packages: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} dependencies: lower-case: 2.0.2 - tslib: 2.5.3 + tslib: 2.6.2 dev: false /node-abi@3.51.0: @@ -13483,7 +13629,7 @@ packages: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} dependencies: dot-case: 3.0.4 - tslib: 2.5.3 + tslib: 2.6.2 dev: false /parent-module@1.0.1: @@ -13573,7 +13719,7 @@ packages: resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} dependencies: no-case: 3.0.4 - tslib: 2.5.3 + tslib: 2.6.2 dev: false /pascalcase@0.1.1: @@ -13722,8 +13868,8 @@ packages: engines: {node: '>=4'} dev: true - /pnpm@8.13.1: - resolution: {integrity: sha512-dYvrxpictkYsUTgSmEAZOxDCWN3NsKtD7g753Yd4S8IY1uQctb7qw2K4zjPx+LCAJbWZkzwLzoIFCpo2uEdNQw==} + /pnpm@8.14.0: + resolution: {integrity: sha512-XUv5ezSfrxpRMYqhuoh+mdnDbiA9vLVZOKkf3dJFQkbLAHI9ZkL1TUY6D1KicB2t+N4AKjf8YTyc3JTtVnXdzg==} engines: {node: '>=16.14'} hasBin: true dev: true @@ -14689,7 +14835,7 @@ packages: /safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - /sass-loader@13.3.3(sass@1.69.6): + /sass-loader@13.3.3(sass@1.69.7): resolution: {integrity: sha512-mt5YN2F1MOZr3d/wBRcZxeFgwgkH44wVc2zohO2YF6JiOMkiXe4BYRZpSu2sO1g71mo/j16txzUhsKZlqjVGzA==} engines: {node: '>= 14.15.0'} peerDependencies: @@ -14711,11 +14857,11 @@ packages: optional: true dependencies: neo-async: 2.6.2 - sass: 1.69.6 + sass: 1.69.7 dev: false - /sass@1.69.6: - resolution: {integrity: sha512-qbRr3k9JGHWXCvZU77SD2OTwUlC+gNT+61JOLcmLm+XqH4h/5D+p4IIsxvpkB89S9AwJOyb5+rWNpIucaFxSFQ==} + /sass@1.69.7: + resolution: {integrity: sha512-rzj2soDeZ8wtE2egyLXgOOHQvaC2iosZrkF6v3EUG+tBwEvhqUCzm0VP3k9gHF9LXbSrRhT5SksoI56Iw8NPnQ==} engines: {node: '>=14.0.0'} hasBin: true dependencies: @@ -14918,20 +15064,20 @@ packages: /shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - /shikiji-core@0.9.16: - resolution: {integrity: sha512-eJIK8/IpzvAGnbckCE2Qf/fOSfpjVLSosUfI3pQAnbphGXagEqiRcT/gyVtL4llqmBh0nexqRdJKMFZF3A6ayw==} + /shikiji-core@0.9.17: + resolution: {integrity: sha512-r1FWTXk6SO2aYqfWgcsJ11MuVQ1ymPSdXzJjK7q8EXuyqu8yc2N5qrQy5+BL6gTVOaF4yLjbxFjF+KTRM1Sp8Q==} dev: false - /shikiji-transformers@0.9.16: - resolution: {integrity: sha512-DcvhYtLc3Xtme070vgyyeHX0XrNK0zHrKIiPk8wcptFbFUuS65qYDd/UFl68+R8KhdoSFTM9EXlBa9MhrGlbaw==} + /shikiji-transformers@0.9.17: + resolution: {integrity: sha512-2CCG9qSLS6Bn/jbeUTEuvC6YSuP8gm8VyX5VjmCvDKyCPGhlLJbH1k/kg9wfRt7cJqpYjhdMDgT5rkdYrOZnsA==} dependencies: - shikiji: 0.9.16 + shikiji: 0.9.17 dev: false - /shikiji@0.9.16: - resolution: {integrity: sha512-QeSwiW88gHke9deQ5Av1f6CEVPGW/riRMPT3vMDGPnASCOhBZK4TYk5ZRoa2qYLncPZS5kXKwcggccQvg3+U7Q==} + /shikiji@0.9.17: + resolution: {integrity: sha512-0z/1NfkhBkm3ijrfFeHg3G9yDNuHhXdAGbQm7tRxj4WQ5z2y0XDbnagFyKyuV2ebCTS1Mwy1I3n0Fzcc/4xdmw==} dependencies: - shikiji-core: 0.9.16 + shikiji-core: 0.9.17 dev: false /shimmer@1.2.1: @@ -16034,10 +16180,10 @@ packages: /tslib@2.5.3: resolution: {integrity: sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==} + dev: true /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - dev: true /tsutils@3.21.0(typescript@5.3.3): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} @@ -16498,7 +16644,7 @@ packages: engines: {node: '>= 0.8'} dev: false - /vite@5.0.10(@types/node@20.9.1)(sass@1.69.6): + /vite@5.0.10(@types/node@20.9.1)(sass@1.69.7): resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -16530,11 +16676,11 @@ packages: esbuild: 0.19.10 postcss: 8.4.32 rollup: 4.4.1 - sass: 1.69.6 + sass: 1.69.7 optionalDependencies: fsevents: 2.3.3 - /vue-demi@0.14.6(vue@3.4.3): + /vue-demi@0.14.6(vue@3.4.5): resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} engines: {node: '>=12'} hasBin: true @@ -16546,7 +16692,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) dev: false /vue-eslint-parser@9.3.2(eslint@8.56.0): @@ -16567,7 +16713,7 @@ packages: - supports-color dev: true - /vue-loader@17.3.1(@vue/compiler-sfc@3.4.3)(vue@3.4.3)(webpack@5.89.0): + /vue-loader@17.3.1(@vue/compiler-sfc@3.4.3)(vue@3.4.5)(webpack@5.89.0): resolution: {integrity: sha512-nmVu7KU8geOyzsStyyaxID/uBGDMS8BkPXb6Lu2SNkMawriIbb+hYrNtgftHMKxOSkjjjTF5OSSwPo3KP59egg==} peerDependencies: '@vue/compiler-sfc': '*' @@ -16584,33 +16730,33 @@ packages: '@vue/compiler-sfc': 3.4.3 chalk: 4.1.2 hash-sum: 2.0.0 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) watchpack: 2.4.0 webpack: 5.89.0 dev: false - /vue-router@4.2.5(vue@3.4.3): + /vue-router@4.2.5(vue@3.4.5): resolution: {integrity: sha512-DIUpKcyg4+PTQKfFPX88UWhlagBEBEfJ5A8XDXRJLUnZOvcpMF8o/dnL90vpVkGaPbjvXazV/rC1qBKrZlFugw==} peerDependencies: vue: ^3.2.0 dependencies: '@vue/devtools-api': 6.5.1 - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) dev: false - /vue@3.4.3(typescript@5.3.3): - resolution: {integrity: sha512-GjN+culMAGv/mUbkIv8zMKItno8npcj5gWlXkSxf1SPTQf8eJ4A+YfHIvQFyL1IfuJcMl3soA7SmN1fRxbf/wA==} + /vue@3.4.5(typescript@5.3.3): + resolution: {integrity: sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.4.3 - '@vue/compiler-sfc': 3.4.3 - '@vue/runtime-dom': 3.4.3 - '@vue/server-renderer': 3.4.3(vue@3.4.3) - '@vue/shared': 3.4.3 + '@vue/compiler-dom': 3.4.5 + '@vue/compiler-sfc': 3.4.5 + '@vue/runtime-dom': 3.4.5 + '@vue/server-renderer': 3.4.5(vue@3.4.5) + '@vue/shared': 3.4.5 typescript: 5.3.3 dev: false @@ -16645,8 +16791,8 @@ packages: '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 giscus: 1.4.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) vuepress-plugin-sass-palette: 2.0.0-rc.10(typescript@5.3.3) vuepress-shared: 2.0.0-rc.10(typescript@5.3.3) transitivePeerDependencies: @@ -16655,7 +16801,7 @@ packages: - typescript dev: false - /vuepress-plugin-md-enhance@2.0.0-rc.10(markdown-it@13.0.2)(typescript@5.3.3): + /vuepress-plugin-md-enhance@2.0.0-rc.10(katex@0.16.9)(markdown-it@13.0.2)(typescript@5.3.3): resolution: {integrity: sha512-bZJs7MWv8GdGdC3OxjEU1kAnmOp9odiq+jYKr85mS4TkqH7aVYRrhuJcUErRKCSO7shBhBFpm1zVwnIGkx41Jw==} engines: {node: '>=18.16.0', npm: '>=8', pnpm: '>=7', yarn: '>=2'} peerDependencies: @@ -16723,7 +16869,7 @@ packages: '@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-katex': 0.7.6(katex@0.16.9)(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) @@ -16737,11 +16883,12 @@ packages: '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - '@vueuse/core': 10.7.1(vue@3.4.3) + '@vueuse/core': 10.7.1(vue@3.4.5) balloon-css: 1.2.0 js-yaml: 4.1.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + katex: 0.16.9 + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) vuepress-plugin-sass-palette: 2.0.0-rc.10(typescript@5.3.3) vuepress-shared: 2.0.0-rc.10(typescript@5.3.3) transitivePeerDependencies: @@ -16767,7 +16914,7 @@ packages: optional: true dependencies: '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) vuepress-shared: 2.0.0-rc.10(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' @@ -16796,7 +16943,7 @@ packages: '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 chokidar: 3.5.3 - sass: 1.69.6 + sass: 1.69.7 vuepress-shared: 2.0.0-rc.10(typescript@5.3.3) transitivePeerDependencies: - '@vue/composition-api' @@ -16871,7 +17018,7 @@ packages: '@vuepress/client': 2.0.0-rc.0(typescript@5.3.3) '@vuepress/shared': 2.0.0-rc.0 '@vuepress/utils': 2.0.0-rc.0 - '@vueuse/core': 10.7.1(vue@3.4.3) + '@vueuse/core': 10.7.1(vue@3.4.5) cheerio: 1.0.0-rc.12 dayjs: 1.11.10 execa: 8.0.1 @@ -16879,8 +17026,8 @@ packages: gray-matter: 4.0.3 semver: 7.5.4 striptags: 3.2.0 - vue: 3.4.3(typescript@5.3.3) - vue-router: 4.2.5(vue@3.4.3) + vue: 3.4.5(typescript@5.3.3) + vue-router: 4.2.5(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - supports-color @@ -16999,7 +17146,7 @@ packages: spdy: 4.0.2 webpack: 5.89.0 webpack-dev-middleware: 5.3.3(webpack@5.89.0) - ws: 8.13.0 + ws: 8.14.2 transitivePeerDependencies: - bufferutil - debug @@ -17253,19 +17400,6 @@ packages: async-limiter: 1.0.1 dev: false - /ws@8.13.0: - resolution: {integrity: sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - dev: false - /ws@8.14.2: resolution: {integrity: sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==} engines: {node: '>=10.0.0'} diff --git a/theme/package.json b/theme/package.json index 67ece894..5311d3b3 100644 --- a/theme/package.json +++ b/theme/package.json @@ -2,7 +2,7 @@ "name": "vuepress-theme-plume", "type": "module", "version": "1.0.0-rc.13", - "description": "A Blog Theme for VuePress 2.0", + "description": "A Blog&Document Theme for VuePress 2.0", "author": "pengzhanbo (https://github.com/pengzhanbo/)", "license": "MIT", "homepage": "https://pengzhanbo.cn/note/vuepress-theme-plume", @@ -15,7 +15,7 @@ }, "keywords": [ "VuePress", - "Theme", + "theme", "plume", "vuepress-theme", "vuepress-theme-plume", @@ -79,10 +79,10 @@ "@vuepress/utils": "2.0.0-rc.0", "@vueuse/core": "^10.7.1", "date-fns": "^3.0.6", + "katex": "^0.16.9", "lodash.merge": "^4.6.2", "nanoid": "^5.0.4", - "ts-debounce": "^4.0.0", - "vue": "^3.4.3", + "vue": "^3.4.5", "vue-router": "4.2.5", "vuepress-plugin-comment2": "2.0.0-rc.10", "vuepress-plugin-md-enhance": "2.0.0-rc.10", diff --git a/theme/src/client/components/Nav/NavBarTranslations.vue b/theme/src/client/components/Nav/NavBarTranslations.vue index a35a1c2f..c3b362f0 100644 --- a/theme/src/client/components/Nav/NavBarTranslations.vue +++ b/theme/src/client/components/Nav/NavBarTranslations.vue @@ -14,7 +14,7 @@ const { currentLang, localeLinks } = useLangs() v-if="localeLinks.length && currentLang.label" class="navbar-translations" :icon="IconLanguages" - :label="theme.selectLanguageText || 'change language'" + :label="theme.selectLanguageText || 'Change Language'" >

diff --git a/theme/src/client/composables/blog.ts b/theme/src/client/composables/blog.ts index deca7db4..ab6957bc 100644 --- a/theme/src/client/composables/blog.ts +++ b/theme/src/client/composables/blog.ts @@ -1,16 +1,20 @@ import { usePageLang } from '@vuepress/client' import { useBlogPostData } from '@vuepress-plume/plugin-blog-data/client' import { computed, ref } from 'vue' -import type { Ref } from 'vue' import type { PlumeThemeBlogPostItem } from '../../shared/index.js' import { useLocaleLink, useThemeLocaleData } from '../composables/index.js' import { getRandomColor, toArray } from '../utils/index.js' -export function usePostListControl() { +export function useLocalePostList() { const locale = usePageLang() + const list = useBlogPostData() + return computed(() => list.value.filter(item => item.lang === locale.value)) +} + +export function usePostListControl() { const themeData = useThemeLocaleData() - const list = useBlogPostData() as unknown as Ref + const list = useLocalePostList() const blog = computed(() => themeData.value.blog || {}) const pagination = computed(() => blog.value.pagination || {}) @@ -29,7 +33,7 @@ export function usePostListControl() { return next.sticky > prev.sticky ? 1 : -1 }), ...otherList, - ].filter(item => item.lang === locale.value) + ] }) const page = ref(1) @@ -109,15 +113,10 @@ export function useBlogExtract() { export type ShortPostItem = Pick export function useTags() { - const locale = usePageLang() - const list = useBlogPostData() as unknown as Ref - const filteredList = computed(() => - list.value.filter(item => item.lang === locale.value), - ) - + const list = useLocalePostList() const tags = computed(() => { const tagMap: Record = {} - filteredList.value.forEach((item) => { + list.value.forEach((item) => { if (item.tags) { toArray(item.tags).forEach((tag) => { if (tagMap[tag]) @@ -139,7 +138,7 @@ export function useTags() { const handleTagClick = (tag: string) => { currentTag.value = tag - postList.value = filteredList.value.filter((item) => { + postList.value = list.value.filter((item) => { if (item.tags) return toArray(item.tags).includes(tag) @@ -160,15 +159,11 @@ export function useTags() { } export function useArchives() { - const locale = usePageLang() - const list = useBlogPostData() as unknown as Ref - const filteredList = computed(() => - list.value.filter(item => item.lang === locale.value), - ) + const list = useLocalePostList() const archives = computed(() => { const archives: { label: string, list: ShortPostItem[] }[] = [] - filteredList.value.forEach((item) => { + list.value.forEach((item) => { const createTime = item.createTime.split(' ')[0] const year = createTime.split('/')[0] let current = archives.find(archive => archive.label === year) @@ -186,7 +181,5 @@ export function useArchives() { return archives }) - return { - archives, - } + return { archives } } diff --git a/theme/src/client/composables/langs.ts b/theme/src/client/composables/langs.ts index 5e6182d8..b1df741c 100644 --- a/theme/src/client/composables/langs.ts +++ b/theme/src/client/composables/langs.ts @@ -3,6 +3,7 @@ import { computed } from 'vue' import type { PlumeThemePageData } from '../../shared/index.js' import { ensureStartingSlash } from '../utils/index.js' import { useThemeData } from './themeData.js' +import { normalizePath } from './sidebar.js' export function useLangs({ removeCurrent = true, @@ -20,18 +21,34 @@ export function useLangs({ } }) + const addPath = computed(() => { + if (page.value.frontmatter.home || (page.value.type && page.value.type !== 'friends')) + return true + + return correspondingLink + }) + + const getBlogLink = (locale: string) => { + const blog = theme.value.locales?.[`/${locale}/`]?.blog + const defaultBlog = theme.value.locales?.['/']?.blog ?? theme.value.blog + const link = blog?.link ? blog.link : normalizePath(`${locale}${defaultBlog?.link || 'blog/'}`) + return link + } + const localeLinks = computed(() => Object.entries(theme.value.locales || {}).flatMap(([key, value]) => removeCurrent && currentLang.value.label === value.selectLanguageName ? [] : { text: value.selectLanguageName, - link: normalizeLink( - key, - correspondingLink, - page.value.path.slice(currentLang.value.link.length - 1), - true, - ), + link: page.value.isBlogPost + ? getBlogLink(key) + : normalizeLink( + key, + addPath.value, + page.value.path.slice(currentLang.value.link.length - 1), + true, + ), }, ), ) diff --git a/theme/src/node/autoFrontmatter.ts b/theme/src/node/autoFrontmatter.ts index b042c525..28cc2532 100644 --- a/theme/src/node/autoFrontmatter.ts +++ b/theme/src/node/autoFrontmatter.ts @@ -13,6 +13,8 @@ import type { PlumeThemePluginOptions, } from '../shared/index.js' import { getCurrentDirname, getPackage, nanoid, pathJoin } from './utils.js' +import { resolveNotesList } from './resolveNotesList.js' +import { resolveLocaleOptions } from './resolveLocaleOptions.js' export default function autoFrontmatter( app: App, @@ -21,18 +23,12 @@ export default function autoFrontmatter( ): AutoFrontmatterOptions { const sourceDir = app.dir.source() const pkg = getPackage() - const { locales = {}, avatar, article: articlePrefix = '/article/' } = localeOption + const { locales = {}, article: articlePrefix = '/article/' } = localeOption const { frontmatter } = options - - const localesNotesDirs = Object.keys(app.siteData.locales || {}) - .map((locale) => { - // fixed: #15 - const notes = locales[locale]?.notes - if (!notes) - return '' - - return notes.dir ? pathJoin(locale, notes.dir).replace(/^\//, '') : '' - }) + const avatar = resolveLocaleOptions(localeOption, 'avatar') + const notesList = resolveNotesList(localeOption) + const localesNotesDirs = notesList + .map(notes => notes.dir?.replace(/^\//, '')) .filter(Boolean) const baseFrontmatter: FrontmatterObject = { @@ -58,7 +54,7 @@ export default function autoFrontmatter( return resolveLocalePath(localeOption.locales!, file) } const notesByLocale = (locale: string) => { - const notes = locales[locale]?.notes || localeOption.notes + const notes = resolveLocaleOptions(localeOption, 'notes', locale) if (notes === false) return undefined return notes @@ -162,7 +158,13 @@ export default function autoFrontmatter( if (permalink) return permalink const locale = resolveLocale(filepath) - return pathJoin(locale, articlePrefix, nanoid(), '/') + const prefix = resolveLocaleOptions(localeOption, 'article', locale, false) + const args: string[] = [] + prefix + ? args.push(prefix) + : args.push(locale, articlePrefix) + + return pathJoin(...args, nanoid(), '/') }, }, }, diff --git a/theme/src/node/defineConfig.ts b/theme/src/node/defineConfig.ts index 6d52433d..3e45bb2f 100644 --- a/theme/src/node/defineConfig.ts +++ b/theme/src/node/defineConfig.ts @@ -1,12 +1,23 @@ import type { NotesDataOptions, - NotesItem, + NotesItemOptions, } from '@vuepress-plume/plugin-notes-data' +import type { NavItem } from '../shared/index.js' export function definePlumeNotesConfig(notes: NotesDataOptions): NotesDataOptions { return notes } -export const definePlumeNotesItemConfig = (item: NotesItem): NotesItem => item +export function definePlumeNotesItemConfig(item: NotesItemOptions): NotesItemOptions { + return item +} -export type { NotesDataOptions, NotesItem } +export function defineNavbar(navbar: NavItem[]): NavItem[] { + return navbar +} + +export type { + NotesDataOptions, + NotesItemOptions, + NotesItemOptions as NotesItem, +} diff --git a/theme/src/node/plugins.ts b/theme/src/node/plugins.ts index e30d7311..8c3e7c94 100644 --- a/theme/src/node/plugins.ts +++ b/theme/src/node/plugins.ts @@ -1,4 +1,3 @@ -import path from 'node:path' import type { App, PluginConfig } from '@vuepress/core' import { activeHeaderLinksPlugin } from '@vuepress/plugin-active-header-links' import { docsearchPlugin } from '@vuepress/plugin-docsearch' @@ -28,62 +27,56 @@ import type { PlumeThemePluginOptions, } from '../shared/index.js' import autoFrontmatter from './autoFrontmatter.js' +import { resolveLocaleOptions } from './resolveLocaleOptions.js' +import { pathJoin } from './utils.js' +import { resolveNotesList } from './resolveNotesList.js' -export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeOptions: PlumeThemeLocaleOptions): PluginConfig { +export function setupPlugins( + app: App, + options: PlumeThemePluginOptions, + localeOptions: PlumeThemeLocaleOptions, +): PluginConfig { const isProd = !app.env.isDev - const locales = (localeOptions.locales || {}) as PlumeThemeLocaleOptions - const localeNotesDirs = Object.keys(locales) - .map((locale) => { - const dir = locales[locale].notes?.dir || '' - return dir - ? path.join(locale, dir, '**').replace(/\\+/g, '/').replace(/^\//, '') - : '' - }) + const notesList = resolveNotesList(localeOptions) + const notesDirList = notesList + .map(notes => notes.dir && pathJoin(notes.dir, '**').replace(/^\//, '')) .filter(Boolean) + const blog = resolveLocaleOptions(localeOptions, 'blog') + const plugins: PluginConfig = [ palettePlugin({ preset: 'sass' }), - themeDataPlugin({ - themeData: { - ...localeOptions, - notes: localeOptions.notes - ? { dir: localeOptions.notes.dir, link: localeOptions.notes.link } - : undefined, - } as any, - }), + themeDataPlugin({ themeData: localeOptions }), autoFrontmatterPlugin(autoFrontmatter(app, options, localeOptions)), blogDataPlugin({ - include: localeOptions.blog?.include ?? ['**/*.md'], + include: blog?.include ?? ['**/*.md'], exclude: [ '**/{README,readme,index}.md', '.vuepress/', 'node_modules/', - ...(localeOptions.blog?.exclude ?? []), - ...localeNotesDirs, + ...(blog?.exclude ?? []), + ...notesDirList, ].filter(Boolean), sortBy: 'createTime', excerpt: true, - pageFilter(page: any) { - if (page.frontmatter.article !== undefined) - return !!page.frontmatter.article - - return true - }, - extendBlogData(page: any) { - return { - categoryList: page.data.categoryList, - tags: page.frontmatter.tags, - sticky: page.frontmatter.sticky, - createTime: page.data.frontmatter.createTime, - lang: page.lang, - } - }, + 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, + }), }), + notesDataPlugin(notesList), + iconifyPlugin(), contentUpdatePlugin(), @@ -99,37 +92,27 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO if (options.readingTime !== false) plugins.push(readingTimePlugin(options.readingTime || {})) - if (localeOptions.notes) - plugins.push(notesDataPlugin(localeOptions.notes)) - if (options.nprogress !== false) plugins.push(nprogressPlugin()) if (options.git !== false) { plugins.push(gitPlugin({ createdTime: false, - updatedTime: localeOptions.lastUpdated !== false, - contributors: localeOptions.contributors !== false, + updatedTime: resolveLocaleOptions(localeOptions, 'lastUpdated') !== false, + contributors: resolveLocaleOptions(localeOptions, 'contributors') !== false, })) } if (options.mediumZoom !== false) { plugins.push(mediumZoomPlugin({ selector: '.plume-content > img, .plume-content :not(a) > img', - zoomOptions: { - background: 'var(--vp-c-bg)', - }, + zoomOptions: { background: 'var(--vp-c-bg)' }, delay: 300, })) } - if (options.caniuse !== false) { - plugins.push(caniusePlugin( - options.caniuse || { - mode: 'embed', - }, - )) - } + if (options.caniuse !== false) + plugins.push(caniusePlugin(options.caniuse || { mode: 'embed' })) if (options.externalLinkIcon !== false) { plugins.push(externalLinkIconPlugin({ @@ -150,14 +133,11 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO plugins.push(searchPlugin(options.search)) if (options.docsearch !== false && !options.search) { - if (options.docsearch?.appId && options.docsearch?.apiKey) { + if (options.docsearch?.appId && options.docsearch?.apiKey) plugins.push(docsearchPlugin(options.docsearch)) - } - else { - console.error( - 'docsearch plugin: appId and apiKey are both required', - ) - } + + else + console.error('docsearch plugin: appId and apiKey are both required') } if (options.shikiji !== false) { @@ -180,7 +160,6 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO { hint: true, // info note tip warning danger details codetabs: true, - tabs: true, align: true, mark: true, tasklist: true, @@ -188,6 +167,7 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO attrs: true, sup: true, sub: true, + katex: true, } as MarkdownEnhanceOptions, options.markdownEnhance || {}, ), @@ -200,16 +180,15 @@ export function setupPlugins(app: App, options: PlumeThemePluginOptions, localeO if (options.baiduTongji !== false && options.baiduTongji?.key) plugins.push(baiduTongjiPlugin(options.baiduTongji)) - if (options.sitemap !== false && localeOptions.hostname && isProd) { - plugins.push(sitemapPlugin({ - hostname: localeOptions.hostname, - })) - } + const hostname = resolveLocaleOptions(localeOptions, 'hostname') - if (options.seo !== false && localeOptions.hostname && isProd) { + if (options.sitemap !== false && hostname && isProd) + plugins.push(sitemapPlugin({ hostname })) + + if (options.seo !== false && hostname && isProd) { plugins.push(seoPlugin({ - hostname: localeOptions.hostname || '', - author: localeOptions.avatar?.name, + hostname, + author: resolveLocaleOptions(localeOptions, 'avatar')?.name, })) } diff --git a/theme/src/node/resolveLocaleOptions.ts b/theme/src/node/resolveLocaleOptions.ts new file mode 100644 index 00000000..ed21b3cb --- /dev/null +++ b/theme/src/node/resolveLocaleOptions.ts @@ -0,0 +1,26 @@ +import type { PlumeThemeLocaleOptions } from '../shared/index.js' +import { normalizePath } from './utils.js' + +export function resolveLocaleOptions< + T extends PlumeThemeLocaleOptions = PlumeThemeLocaleOptions, + K extends Exclude = Exclude, +>(options: T, key: K, locale = '', fallback = true): T[K] | undefined { + const locales = options.locales + + if (!locales) + return options[key] + + locale = !locale || locale === '/' ? '/' : normalizePath(`/${locale}/`) + + const localeOptions = locales[locale] + const fallbackLocaleOptions = locales['/'] + if (!localeOptions) + return fallback ? options[key] : undefined + + const _key = key as keyof typeof localeOptions + const fallbackData = (fallbackLocaleOptions[_key] ?? options[key]) as T[K] + + const value = localeOptions[_key] as T[K] + + return value ?? (fallback ? fallbackData : undefined) +} diff --git a/theme/src/node/resolveNotesList.ts b/theme/src/node/resolveNotesList.ts new file mode 100644 index 00000000..fa348af0 --- /dev/null +++ b/theme/src/node/resolveNotesList.ts @@ -0,0 +1,15 @@ +import type { NotesDataOptions } from '@vuepress-plume/plugin-notes-data' +import type { PlumeThemeLocaleOptions } from '../shared/index.js' +import { resolveLocaleOptions } from './resolveLocaleOptions.js' + +export function resolveNotesList(options: PlumeThemeLocaleOptions) { + const locales = options.locales || {} + const notesList: NotesDataOptions[] = [] + + for (const locale of Object.keys(locales)) { + const notes = resolveLocaleOptions(options, 'notes', locale, false) + notes && notesList.push(notes) + } + + return notesList +} diff --git a/theme/src/node/setupPages.ts b/theme/src/node/setupPages.ts index 45526f0a..12f61687 100644 --- a/theme/src/node/setupPages.ts +++ b/theme/src/node/setupPages.ts @@ -7,15 +7,16 @@ import type { PlumeThemePageData, } from '../shared/index.js' import { pathJoin } from './utils.js' +import { resolveLocaleOptions } from './resolveLocaleOptions.js' export async function setupPage( app: App, localeOption: PlumeThemeLocaleOptions, ) { const locales = Object.keys(app.siteData.locales || {}) + const defaultBlog = resolveLocaleOptions(localeOption, 'blog') for (const [, locale] of locales.entries()) { - const blog = localeOption.locales?.[locale]?.blog - const defaultBlog = localeOption.blog + const blog = resolveLocaleOptions(localeOption, 'blog', locale, false) const link = blog?.link ? blog.link : pathJoin('/', locale, defaultBlog?.link || '/blog/') diff --git a/theme/src/node/theme.ts b/theme/src/node/theme.ts index 5308a2a7..7af76c53 100644 --- a/theme/src/node/theme.ts +++ b/theme/src/node/theme.ts @@ -1,47 +1,35 @@ -import type { App, Page, Theme } from '@vuepress/core' -import { fs, getDirname, path, templateRenderer } from '@vuepress/utils' +import type { Page, Theme } from '@vuepress/core' +import { templateRenderer } from '@vuepress/utils' import type { PlumeThemeOptions, PlumeThemePageData } from '../shared/index.js' import { mergeLocaleOptions } from './defaultOptions.js' import { setupPlugins } from './plugins.js' import { extendsPageData, setupPage } from './setupPages.js' +import { getThemePackage, resolve, templates } from './utils.js' -const __dirname = getDirname(import.meta.url) -const name = 'vuepress-theme-plume' -const resolve = (...args: string[]) => path.resolve(__dirname, '../', ...args) -const templates = (url: string) => resolve('../templates', url) - -function getThemePackage() { - let pkg = {} as any - try { - const content = fs.readFileSync(resolve('../package.json'), 'utf-8') - pkg = JSON.parse(content) - } - catch {} - return pkg -} +const THEME_NAME = 'vuepress-theme-plume' export function plumeTheme({ - themePlugins = {}, + themePlugins, + plugins, ...localeOptions }: PlumeThemeOptions = {}): Theme { localeOptions = mergeLocaleOptions(localeOptions) + const pluginsOptions = plugins ?? themePlugins ?? {} const pkg = getThemePackage() - return (app: App) => { - return { - name, - templateBuild: templates('build.html'), - clientConfigFile: resolve('client/config.js'), - plugins: setupPlugins(app, themePlugins, localeOptions), - onInitialized: app => setupPage(app, localeOptions), - extendsPage: (page: Page) => - extendsPageData(app, page, localeOptions), - templateBuildRenderer(template, context) { - template = template - .replace('{{ themeVersion }}', pkg.version || '') - .replace(/^\s+|\s+$/gm, '') - .replace(/\n/g, '') - return templateRenderer(template, context) - }, - } - } + + return app => ({ + name: THEME_NAME, + templateBuild: templates('build.html'), + clientConfigFile: resolve('client/config.js'), + plugins: setupPlugins(app, pluginsOptions, localeOptions), + onInitialized: app => setupPage(app, localeOptions), + extendsPage: page => extendsPageData(app, page as Page, localeOptions), + templateBuildRenderer(template, context) { + template = template + .replace('{{ themeVersion }}', pkg.version || '') + .replace(/^\s+|\s+$/gm, '') + .replace(/\n/g, '') + return templateRenderer(template, context) + }, + }) } diff --git a/theme/src/node/utils.ts b/theme/src/node/utils.ts index dd9abbf9..4b2e5b93 100644 --- a/theme/src/node/utils.ts +++ b/theme/src/node/utils.ts @@ -2,6 +2,12 @@ import fs from 'node:fs' import path from 'node:path' import process from 'node:process' import { customAlphabet } from 'nanoid' +import { getDirname } from '@vuepress/utils' + +const __dirname = getDirname(import.meta.url) + +export const resolve = (...args: string[]) => path.resolve(__dirname, '../', ...args) +export const templates = (url: string) => resolve('../templates', url) export const nanoid = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyz', 8) @@ -15,7 +21,17 @@ export function getPackage() { return pkg } -const RE_SLASH = /\\+/g +export function getThemePackage() { + let pkg = {} as any + try { + const content = fs.readFileSync(resolve('../package.json'), 'utf-8') + pkg = JSON.parse(content) + } + catch {} + return pkg +} + +const RE_SLASH = /(\\|\/)+/g export function normalizePath(dir: string) { return dir.replace(RE_SLASH, '/') } diff --git a/theme/src/shared/options/index.ts b/theme/src/shared/options/index.ts index 28680523..4e1582db 100644 --- a/theme/src/shared/options/index.ts +++ b/theme/src/shared/options/index.ts @@ -5,8 +5,15 @@ import type { PlumeThemePluginOptions } from './plugins.js' export interface PlumeThemeOptions extends PlumeThemeLocaleOptions { /** * 对主题内部使用的插件进行配置 + * @deprecated 配置项迁移至 `plugins` */ themePlugins?: PlumeThemePluginOptions + + /** + * 对主题内部使用的插件进行配置 + */ + plugins?: PlumeThemePluginOptions + } export type PlumeThemeLocaleOptions = PlumeThemeData diff --git a/theme/src/shared/options/plugins.ts b/theme/src/shared/options/plugins.ts index 85d97f5d..90c4a60b 100644 --- a/theme/src/shared/options/plugins.ts +++ b/theme/src/shared/options/plugins.ts @@ -30,8 +30,14 @@ export interface PlumeThemePluginOptions { */ docsearch?: false | DocsearchOptions + /** + * 代码高亮 配置 + */ shikiji?: false | ShikijiPluginOptions + /** + * git 插件 配置 + */ git?: false nprogress?: false