diff --git a/cli/src/generate.ts b/cli/src/generate.ts index 77e2184b..b48a6325 100644 --- a/cli/src/generate.ts +++ b/cli/src/generate.ts @@ -1,12 +1,12 @@ +import fs from 'node:fs' import path from 'node:path' import process from 'node:process' -import fs from 'node:fs' import { execaCommand } from 'execa' +import { DeployType, Mode } from './constants.js' import { createPackageJson } from './packageJson.js' import { createRender } from './render.js' import { getTemplate, readFiles, readJsonFile, writeFiles } from './utils/index.js' import type { File, ResolvedData } from './types.js' -import { DeployType, Mode } from './constants.js' export async function generate(mode: Mode, data: ResolvedData): Promise { const cwd = process.cwd() diff --git a/cli/src/index.ts b/cli/src/index.ts index d7d14ffe..8291f080 100644 --- a/cli/src/index.ts +++ b/cli/src/index.ts @@ -1,6 +1,6 @@ import cac from 'cac' -import { run } from './run.js' import { Mode } from './constants.js' +import { run } from './run.js' declare const __CLI_VERSION__: string diff --git a/cli/src/locales/index.ts b/cli/src/locales/index.ts index 133b7b48..952b5551 100644 --- a/cli/src/locales/index.ts +++ b/cli/src/locales/index.ts @@ -1,6 +1,6 @@ -import type { Langs, Locale } from '../types.js' import { en } from './en.js' import { zh } from './zh.js' +import type { Langs, Locale } from '../types.js' export const locales: Record = { 'zh-CN': zh, diff --git a/cli/src/packageJson.ts b/cli/src/packageJson.ts index ab6093c5..95bae4a8 100644 --- a/cli/src/packageJson.ts +++ b/cli/src/packageJson.ts @@ -1,13 +1,14 @@ -import { execaCommand } from 'execa' import { kebabCase } from '@pengzhanbo/utils' +import { execaCommand } from 'execa' +import { Mode } from './constants.js' import { getDependenciesVersion, readJsonFile, resolve } from './utils/index.js' import type { File, ResolvedData } from './types.js' -import { Mode } from './constants.js' export async function createPackageJson( mode: Mode, pkg: Record, { + packageManager, docsDir, siteName, siteDescription, @@ -20,11 +21,20 @@ export async function createPackageJson( pkg.type = 'module' pkg.version = '1.0.0' pkg.description = siteDescription + + if (packageManager !== 'npm') { + const version = await getPackageManagerVersion(packageManager) + if (version) { + pkg.packageManager = `${packageManager}@${version}` + } + } + const userInfo = await getUserInfo() if (userInfo) { pkg.author = userInfo.username + (userInfo.email ? ` <${userInfo.email}>` : '') } pkg.license = 'MIT' + pkg.engines = { node: '^18.20.0 || >=20.0.0' } } if (injectNpmScripts) { @@ -77,3 +87,13 @@ async function getUserInfo() { return null } } + +async function getPackageManagerVersion(pkg: string) { + try { + const { stdout } = await execaCommand(`${pkg} -v`) + return stdout + } + catch { + return null + } +} diff --git a/cli/src/prompt.ts b/cli/src/prompt.ts index 7d048ea4..ebca1587 100644 --- a/cli/src/prompt.ts +++ b/cli/src/prompt.ts @@ -1,9 +1,9 @@ -import process from 'node:process' import { createRequire } from 'node:module' +import process from 'node:process' import { cancel, confirm, group, select, text } from '@clack/prompts' +import { bundlerOptions, deployOptions, DeployType, languageOptions, Mode } from './constants.js' import { setLang, t } from './translate.js' import type { Bundler, Langs, Options, PromptResult } from './types.js' -import { DeployType, Mode, bundlerOptions, deployOptions, languageOptions } from './constants.js' const require = createRequire(process.cwd()) diff --git a/cli/src/render.ts b/cli/src/render.ts index 99de1e4f..04371fe2 100644 --- a/cli/src/render.ts +++ b/cli/src/render.ts @@ -1,5 +1,5 @@ -import handlebars from 'handlebars' import { kebabCase } from '@pengzhanbo/utils' +import handlebars from 'handlebars' import type { ResolvedData } from './types.js' export interface RenderData extends ResolvedData { diff --git a/cli/src/run.ts b/cli/src/run.ts index 06544d98..a31d1189 100644 --- a/cli/src/run.ts +++ b/cli/src/run.ts @@ -1,14 +1,14 @@ -import process from 'node:process' import path from 'node:path' +import process from 'node:process' import { intro, outro, spinner } from '@clack/prompts' import { execaCommand } from 'execa' import colors from 'picocolors' -import { prompt } from './prompt.js' -import { generate } from './generate.js' -import { t } from './translate.js' import { Mode } from './constants.js' -import type { PromptResult, ResolvedData } from './types.js' +import { generate } from './generate.js' +import { prompt } from './prompt.js' +import { t } from './translate.js' import { getPackageManager } from './utils/index.js' +import type { PromptResult, ResolvedData } from './types.js' export async function run(mode: Mode, root?: string) { intro(colors.cyan('Welcome to VuePress and vuepress-theme-plume !')) diff --git a/cli/src/translate.ts b/cli/src/translate.ts index 9fdf0aa4..1feeac11 100644 --- a/cli/src/translate.ts +++ b/cli/src/translate.ts @@ -1,5 +1,5 @@ -import type { Langs, Locale } from './types.js' import { locales } from './locales/index.js' +import type { Langs, Locale } from './types.js' function createTranslate(lang?: Langs) { let current: Langs = lang || 'en-US' diff --git a/cli/src/utils/fs.ts b/cli/src/utils/fs.ts index ef4f2ce6..b83c8db0 100644 --- a/cli/src/utils/fs.ts +++ b/cli/src/utils/fs.ts @@ -1,5 +1,5 @@ -import path from 'node:path' import fs from 'node:fs/promises' +import path from 'node:path' import type { File } from '../types.js' export async function readFiles(root: string): Promise { diff --git a/cli/src/utils/index.ts b/cli/src/utils/index.ts index 311366a3..5d48509b 100644 --- a/cli/src/utils/index.ts +++ b/cli/src/utils/index.ts @@ -1,5 +1,5 @@ -import { fileURLToPath } from 'node:url' import path from 'node:path' +import { fileURLToPath } from 'node:url' export const __dirname = path.dirname(fileURLToPath(import.meta.url)) @@ -7,6 +7,6 @@ export const resolve = (...args: string[]) => path.resolve(__dirname, '../', ... export const getTemplate = (dir: string) => resolve('templates', dir) -export * from './fs.js' export * from './depsVersion.js' +export * from './fs.js' export * from './getPackageManager.js' diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index 4788225a..71f2aeba 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -1,9 +1,9 @@ import { type ClientConfig, defineClientConfig } from 'vuepress/client' -import HeroTintPlateConfig from './themes/components/HeroTintPlateConfig.vue' import CanIUseConfig from './themes/components/CanIUseConfig.vue' -import Demos from './themes/components/Demos.vue' -import ThemeColors from './themes/components/ThemeColors.vue' import Contributors from './themes/components/Contributors.vue' +import Demos from './themes/components/Demos.vue' +import HeroTintPlateConfig from './themes/components/HeroTintPlateConfig.vue' +import ThemeColors from './themes/components/ThemeColors.vue' import { setupThemeColors } from './themes/composables/theme-colors.js' export default defineClientConfig({ diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 67ddda33..c3609e6a 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -1,7 +1,7 @@ import * as path from 'node:path' -import { type UserConfig, defineUserConfig } from 'vuepress' import { viteBundler } from '@vuepress/bundler-vite' import { addViteOptimizeDepsInclude, addViteSsrExternal } from '@vuepress/helper' +import { defineUserConfig, type UserConfig } from 'vuepress' import { peerDependencies } from '../package.json' import { theme } from './theme.js' diff --git a/docs/.vuepress/navbar.ts b/docs/.vuepress/navbar.ts index e71e78db..24c9a5bd 100644 --- a/docs/.vuepress/navbar.ts +++ b/docs/.vuepress/navbar.ts @@ -16,13 +16,13 @@ export const zhNavbar = [ link: '/notes/theme/config/配置说明.md', activeMatch: '^/config/', }, - { - text: '插件', - icon: 'clarity:plugin-line', - // link: '/plugins/', - link: '/notes/plugins/README.md', - activeMatch: '^/plugins/', - }, + // { + // text: '插件', + // icon: 'clarity:plugin-line', + // // link: '/plugins/', + // link: '/notes/plugins/README.md', + // activeMatch: '^/plugins/', + // }, { text: '博客', link: '/blog/', diff --git a/docs/.vuepress/notes/zh/index.ts b/docs/.vuepress/notes/zh/index.ts index fed5583d..c2116c11 100644 --- a/docs/.vuepress/notes/zh/index.ts +++ b/docs/.vuepress/notes/zh/index.ts @@ -1,7 +1,7 @@ import { defineNotesConfig } from 'vuepress-theme-plume' -import { themeGuide } from './theme-guide' -import { themeConfig } from './theme-config' import { plugins } from './plugins' +import { themeConfig } from './theme-config' +import { themeGuide } from './theme-guide' import { tools } from './tools' export const zhNotes = defineNotesConfig({ diff --git a/docs/.vuepress/notes/zh/theme-config.ts b/docs/.vuepress/notes/zh/theme-config.ts index 5eb18f45..9cc27679 100644 --- a/docs/.vuepress/notes/zh/theme-config.ts +++ b/docs/.vuepress/notes/zh/theme-config.ts @@ -38,7 +38,6 @@ export const themeConfig = defineNoteConfig({ '阅读统计', 'markdown增强', 'markdownPower', - '百度统计', '水印', ], }, diff --git a/docs/.vuepress/notes/zh/theme-guide.ts b/docs/.vuepress/notes/zh/theme-guide.ts index beab6f91..f87b55c3 100644 --- a/docs/.vuepress/notes/zh/theme-guide.ts +++ b/docs/.vuepress/notes/zh/theme-guide.ts @@ -16,6 +16,7 @@ export const themeGuide = defineNoteConfig({ '编写文章', '国际化', '部署', + '构建优化', ], }, { @@ -121,6 +122,7 @@ export const themeGuide = defineNoteConfig({ '首页布局容器', 'repoCard', 'npmBadge', + '轮播图', ], }, { diff --git a/docs/.vuepress/plume.config.ts b/docs/.vuepress/plume.config.ts index c835f5e7..f6011830 100644 --- a/docs/.vuepress/plume.config.ts +++ b/docs/.vuepress/plume.config.ts @@ -1,6 +1,6 @@ import { defineThemeConfig } from 'vuepress-theme-plume' -import { enNotes, zhNotes } from './notes/index.js' import { enNavbar, zhNavbar } from './navbar.js' +import { enNotes, zhNotes } from './notes/index.js' export default defineThemeConfig({ logo: '/plume.png', diff --git a/docs/.vuepress/theme.ts b/docs/.vuepress/theme.ts index ad061289..94c7025b 100644 --- a/docs/.vuepress/theme.ts +++ b/docs/.vuepress/theme.ts @@ -17,6 +17,7 @@ export const theme: Theme = plumeTheme({ flowchart: true, }, markdownPower: { + imageSize: 'all', pdf: true, caniuse: true, plot: true, diff --git a/docs/.vuepress/themes/components/ColorPick.vue b/docs/.vuepress/themes/components/ColorPick.vue index a1292026..38b9bd69 100644 --- a/docs/.vuepress/themes/components/ColorPick.vue +++ b/docs/.vuepress/themes/components/ColorPick.vue @@ -1,6 +1,6 @@ diff --git a/docs/.vuepress/themes/components/CustomTintPlate.vue b/docs/.vuepress/themes/components/CustomTintPlate.vue index fbd10999..919882e2 100644 --- a/docs/.vuepress/themes/components/CustomTintPlate.vue +++ b/docs/.vuepress/themes/components/CustomTintPlate.vue @@ -1,6 +1,6 @@ diff --git a/docs/.vuepress/themes/composables/caniuse.ts b/docs/.vuepress/themes/composables/caniuse.ts index bead1ff9..04b97078 100644 --- a/docs/.vuepress/themes/composables/caniuse.ts +++ b/docs/.vuepress/themes/composables/caniuse.ts @@ -1,5 +1,5 @@ -import { type Ref, computed, onMounted, readonly, ref, watch } from 'vue' import { onClickOutside, useDebounceFn, useEventListener, useLocalStorage } from '@vueuse/core' +import { computed, onMounted, readonly, type Ref, ref, watch } from 'vue' interface Feature { label: string diff --git a/docs/.vuepress/themes/composables/theme-colors.ts b/docs/.vuepress/themes/composables/theme-colors.ts index 5572c854..085f3046 100644 --- a/docs/.vuepress/themes/composables/theme-colors.ts +++ b/docs/.vuepress/themes/composables/theme-colors.ts @@ -1,5 +1,5 @@ -import { type InjectionKey, type Ref, inject, provide, watch } from 'vue' import { useSessionStorage, useStyleTag } from '@vueuse/core' +import { inject, type InjectionKey, provide, type Ref, watch } from 'vue' export interface ThemeColor { name: string diff --git a/docs/README.md b/docs/README.md index 9ec23893..ba6300ed 100644 --- a/docs/README.md +++ b/docs/README.md @@ -169,6 +169,16 @@ export default defineUserConfig({ ### 贡献者 - + diff --git a/docs/notes/plugins/caniuse.md b/docs/notes/plugins/caniuse.md index bf66ddae..6be59f49 100644 --- a/docs/notes/plugins/caniuse.md +++ b/docs/notes/plugins/caniuse.md @@ -49,8 +49,8 @@ pnpm add @vuepress-plume/plugin-caniuse @tab .vuepress/config.ts ``` ts -import { defineUserConfig } from 'vuepress' import { caniusePlugin } from '@vuepress-plume/plugin-caniuse' +import { defineUserConfig } from 'vuepress' export default defineUserConfig({ plugins: [ diff --git a/docs/notes/plugins/content-updated.md b/docs/notes/plugins/content-updated.md index 84e00f9e..1ae07e30 100644 --- a/docs/notes/plugins/content-updated.md +++ b/docs/notes/plugins/content-updated.md @@ -56,8 +56,8 @@ yarn add @vuepress-plume/plugin-content-update @tab .vuepress/config.ts ``` ts -import { defineUserConfig } from 'vuepress' import { contentUpdatePlugin } from '@vuepress-plume/plugin-content-update' +import { defineUserConfig } from 'vuepress' export default defineUserConfig({ plugins: [ @@ -86,8 +86,8 @@ onContentUpdated(() => { ```vue + + + +``` + +注册为全局组件: + +::: code-tabs +@tab .vuepress/client.ts + +```ts +import { defineClientConfig } from 'vuepress/client' +import Swiper from 'vuepress-theme-plume/features/Swiper.vue' + +export default defineClientConfig({ + enhance({ app }) { + app.component('Swiper', Swiper) + }, +}) +``` + +::: + +全局组件可在 其他任意 markdown 文件中使用 + +```md + +``` + + + +**示例:** + + + +## Props + +| 名称 | 类型 | 默认值 | 说明 | +| ----------------- | ---------------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------- | +| items | `string \| { link: string; href?: string; alt?: string}[]` | `[]` | 图片链接数组,传入对象时,`link`表示图片链接,`href`表示跳转链接,`alt`表示图片描述 | +| width | `number \| string` | `100%` | 轮播区域宽度 | +| height | `number \| string` | `100%` | 轮播区域高度 | +| mode | `'banner' \| 'carousel' \| 'broadcast'` | `'banner'` | 轮播模式, `banner`: 轮播图; `carousel`: 走马灯; `broadcast`: 信息展播 | +| navigation | `boolean` | `true` | 是否显示导航按钮 | +| effect | `'slide' \| 'fade' \| 'cube' \| 'coverflow' \| 'flip' \| 'cards' \| 'creative'` | `'slide'` | 轮播效果 | +| delay | `number` | `3000` | 轮播间隔时间, 仅当 `mode: 'banner'` 时生效,单位 `ms` | +| speed | `number` | `300` | 动画持续时间,单位 `ms` | +| loop | `boolean` | `true` | 是否循环 | +| pauseOnMouseEnter | `boolean` | `false` | 是否鼠标悬停时暂停轮播 | +| swipe | `boolean` | `true` | 是否开启手势滑动 | + +更多 props 请参考 [Swiper 文档](https://swiperjs.com/swiper-api#parameters) + +## 参考示例 + +### 预设动画效果 + +**cube:** + + + +:::details 查看代码 + +```md + +``` + +::: + +**fade:** + + + +:::details 查看代码 + +```md + +``` + +::: + +**coverflow:** + + + +:::details 查看代码 + +```md + +``` + +::: + +**flip:** + + + +:::details 查看代码 + +```md + +``` + +::: + +**cards:** + + + +:::details 查看代码 + +```md + +``` + +::: + +### 自定义动画效果 + +**示例 1:** + + + +::: details 查看代码 + +```md + +``` + +::: + +**示例 2:** + + + +:::details 查看代码 + +```md + +``` + +::: + +**示例 3:** + + + +:::details 查看代码 + +```md + +``` + +::: + +**示例 4:** + + + +:::details 查看代码 + +```md + +``` + +::: + +### 走马灯 + + + +:::details 查看代码 + +```md + +``` + +::: + +### 信息展播 + + + +:::details 查看代码 + +```md + +``` + +::: diff --git a/docs/notes/theme/guide/组件覆写.md b/docs/notes/theme/guide/组件覆写.md index a32da440..6c22a5f4 100644 --- a/docs/notes/theme/guide/组件覆写.md +++ b/docs/notes/theme/guide/组件覆写.md @@ -24,9 +24,9 @@ permalink: /guide/component-overrides/ 如果你想要覆写 `VPFooter.vue` 组件,只需要在配置文件 `.vuepress/config.ts` 中覆盖这个别名即可: ```ts -import { plumeTheme } from 'vuepress-theme-plume' -import { getDirname, path } from 'vuepress/utils' import { defineUserConfig } from 'vuepress' +import { getDirname, path } from 'vuepress/utils' +import { plumeTheme } from 'vuepress-theme-plume' const __dirname = getDirname(import.meta.url) diff --git a/docs/notes/theme/guide/自定义样式.md b/docs/notes/theme/guide/自定义样式.md index e67fa20d..986e55bf 100644 --- a/docs/notes/theme/guide/自定义样式.md +++ b/docs/notes/theme/guide/自定义样式.md @@ -21,10 +21,10 @@ permalink: /guide/custom-style/ @tab .vuepress/client.ts ```ts {1} -import './styles/index.css' - import { defineClientConfig } from 'vuepress/client' +import './styles/index.css' + export default defineClientConfig({ // ... }) diff --git a/docs/notes/theme/snippet/include-1.snippet.md b/docs/notes/theme/snippet/include-1.snippet.md index 8f9ae492..3c0b0c3a 100644 --- a/docs/notes/theme/snippet/include-1.snippet.md +++ b/docs/notes/theme/snippet/include-1.snippet.md @@ -49,8 +49,8 @@ cupiditate sequi. @tab TS ```ts -import MarkdownIt from 'markdown-it' import { include } from '@mdit/plugin-include' +import MarkdownIt from 'markdown-it' // #region snippet const mdIt = MarkdownIt().use(include, { @@ -66,8 +66,8 @@ mdIt.render('', { @tab JS ```js -const MarkdownIt = require('markdown-it') const { include } = require('@mdit/plugin-include') +const MarkdownIt = require('markdown-it') // #region snippet const mdIt = MarkdownIt().use(include, { diff --git a/docs/package.json b/docs/package.json index c8c95e76..483f7e03 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,15 +12,16 @@ "vuepress": "2.0.0-rc.15" }, "dependencies": { - "@iconify/json": "^2.2.245", + "@iconify/json": "^2.2.247", "@simonwep/pickr": "^1.9.1", "@vuepress/bundler-vite": "2.0.0-rc.15", "chart.js": "^4.4.4", "echarts": "^5.5.1", "flowchart.ts": "^3.0.1", "http-server": "^14.1.1", - "mermaid": "^11.1.1", - "vue": "^3.5.3", + "mermaid": "^11.2.0", + "swiper": "^11.1.12", + "vue": "^3.5.4", "vuepress-theme-plume": "workspace:*" }, "devDependencies": { diff --git a/docs/sponsor.md b/docs/sponsor.md index cfb57d70..9cd4b0a9 100644 --- a/docs/sponsor.md +++ b/docs/sponsor.md @@ -31,5 +31,3 @@ readingTime: false | **锋 | 2024-04-18 | 6.88 | 支持下作者,加油! | | *杰 | 2024-05-25 | 6.00 | 请你喝杯茶,加油 | | **党 | 2024-08-22 | 8.80 | 感谢开源,加油 | - -1 diff --git a/package.json b/package.json index 18bc328a..99b9d6f8 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "type": "module", "version": "1.0.0-rc.97", "private": true, - "packageManager": "pnpm@9.9.0", + "packageManager": "pnpm@9.10.0", "author": "pengzhanbo (https://github.com/pengzhanbo/)", "license": "MIT", "keywords": [ @@ -38,10 +38,10 @@ "release:version": "bumpp package.json plugins/*/package.json theme/package.json cli/package.json --execute=\"pnpm release:changelog\" --commit \"build: publish v%s\" --all --tag --push" }, "devDependencies": { - "@commitlint/cli": "^19.4.1", - "@commitlint/config-conventional": "^19.4.1", - "@pengzhanbo/eslint-config-vue": "^1.15.0", - "@pengzhanbo/stylelint-config": "^1.15.0", + "@commitlint/cli": "^19.5.0", + "@commitlint/config-conventional": "^19.5.0", + "@pengzhanbo/eslint-config-vue": "^1.16.0", + "@pengzhanbo/stylelint-config": "^1.16.0", "@types/lodash.merge": "^4.6.9", "@types/node": "20.12.10", "@types/webpack-env": "^1.18.5", @@ -51,14 +51,14 @@ "cpx2": "^7.0.1", "cz-conventional-changelog": "^3.3.0", "eslint": "^9.10.0", - "husky": "^9.1.5", + "husky": "^9.1.6", "lint-staged": "^15.2.10", "rimraf": "^6.0.1", "stylelint": "^16.9.0", - "tsconfig-vuepress": "^5.0.0", + "tsconfig-vuepress": "^5.2.0", "tsup": "^8.2.4", - "typescript": "^5.5.4", - "wait-on": "^8.0.0" + "typescript": "^5.6.2", + "wait-on": "^8.0.1" }, "lint-staged": { "*": "eslint --fix", diff --git a/plugins/plugin-content-update/package.json b/plugins/plugin-content-update/package.json index c8dd1da0..b2353832 100644 --- a/plugins/plugin-content-update/package.json +++ b/plugins/plugin-content-update/package.json @@ -40,7 +40,7 @@ "vuepress": "2.0.0-rc.15" }, "dependencies": { - "vue": "^3.5.3" + "vue": "^3.5.4" }, "publishConfig": { "access": "public" diff --git a/plugins/plugin-content-update/src/node/plugin.ts b/plugins/plugin-content-update/src/node/plugin.ts index cff5534a..cf8a076e 100644 --- a/plugins/plugin-content-update/src/node/plugin.ts +++ b/plugins/plugin-content-update/src/node/plugin.ts @@ -1,5 +1,5 @@ -import type { Plugin } from 'vuepress/core' import { getDirname, path } from 'vuepress/utils' +import type { Plugin } from 'vuepress/core' const __dirname = getDirname(import.meta.url) diff --git a/plugins/plugin-content-update/tsup.config.ts b/plugins/plugin-content-update/tsup.config.ts index 0e2f5dc4..54e96623 100644 --- a/plugins/plugin-content-update/tsup.config.ts +++ b/plugins/plugin-content-update/tsup.config.ts @@ -1,4 +1,4 @@ -import { type Options, defineConfig } from 'tsup' +import { defineConfig, type Options } from 'tsup' const clientExternal: (string | RegExp)[] = [ /.*\.vue$/, diff --git a/plugins/plugin-fonts/src/node/plugin.ts b/plugins/plugin-fonts/src/node/plugin.ts index 6da2682f..ee82dd5c 100644 --- a/plugins/plugin-fonts/src/node/plugin.ts +++ b/plugins/plugin-fonts/src/node/plugin.ts @@ -1,5 +1,5 @@ -import type { Plugin } from 'vuepress/core' import { getDirname, path } from 'vuepress/utils' +import type { Plugin } from 'vuepress/core' export function fontsPlugin(): Plugin { return { diff --git a/plugins/plugin-fonts/tsup.config.ts b/plugins/plugin-fonts/tsup.config.ts index 339fd4bc..8391a704 100644 --- a/plugins/plugin-fonts/tsup.config.ts +++ b/plugins/plugin-fonts/tsup.config.ts @@ -1,4 +1,4 @@ -import { type Options, defineConfig } from 'tsup' +import { defineConfig, type Options } from 'tsup' const clientExternal: (string | RegExp)[] = [ /.*\.vue$/, diff --git a/plugins/plugin-md-power/package.json b/plugins/plugin-md-power/package.json index 710ab7ed..b4daa667 100644 --- a/plugins/plugin-md-power/package.json +++ b/plugins/plugin-md-power/package.json @@ -45,10 +45,10 @@ "image-size": "^1.1.1", "markdown-it-container": "^4.0.0", "nanoid": "^5.0.7", - "shiki": "^1.16.2", + "shiki": "^1.17.0", "tm-grammars": "^1.17.18", "tm-themes": "^1.8.1", - "vue": "^3.5.3" + "vue": "^3.5.4" }, "devDependencies": { "@types/markdown-it": "^14.1.2" diff --git a/plugins/plugin-md-power/src/client/components/CanIUse.vue b/plugins/plugin-md-power/src/client/components/CanIUse.vue index 00cf14d6..f8a9e7b4 100644 --- a/plugins/plugin-md-power/src/client/components/CanIUse.vue +++ b/plugins/plugin-md-power/src/client/components/CanIUse.vue @@ -1,6 +1,6 @@ @@ -45,6 +54,15 @@ onMounted(() => { transition: border var(--t-color), background-color var(--t-color); } +.vp-file-tree .vp-file-tree-title { + padding-left: 16px; + margin: -16px -16px 0; + font-weight: bold; + color: var(--vp-c-text-1); + border-bottom: solid 1px var(--vp-c-divider); + transition: color var(--t-color), border-color var(--t-color); +} + .vp-file-tree ul { padding: 0 !important; margin: 0 !important; diff --git a/plugins/plugin-md-power/src/client/components/PDFViewer.vue b/plugins/plugin-md-power/src/client/components/PDFViewer.vue index 1c496d47..66018224 100644 --- a/plugins/plugin-md-power/src/client/components/PDFViewer.vue +++ b/plugins/plugin-md-power/src/client/components/PDFViewer.vue @@ -1,8 +1,8 @@