diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 8383caf3a1..c96916d623 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -10,7 +10,7 @@ on: workflow_dispatch: jobs: - check: + build-check: runs-on: ubuntu-latest steps: @@ -42,11 +42,45 @@ jobs: - name: Unit Test run: pnpm test:unit + bundle-check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Build + run: pnpm bundle + + - name: Linter Test + run: pnpm lint + + - name: Docs Test + run: | + pnpm --filter @vuepress/ecosystem-docs docs:build + pnpm --filter @vuepress/ecosystem-docs docs:build-webpack + + - name: Unit Test + run: pnpm test:unit + check-result: if: ${{ always() }} name: check result runs-on: ubuntu-latest - needs: [check] + needs: + - build-check + - bundle-check steps: - if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }} run: exit 1 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1b69986afa..2b839c46ea 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Build Project - run: pnpm build + run: pnpm bundle - name: Docs build env: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 5e953de830..bddd99648e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -2,7 +2,6 @@ name: e2e on: push: - branches: pull_request: branches: - main @@ -37,7 +36,7 @@ jobs: run: pnpm playwright install chromium - name: Build source files - run: pnpm build + run: pnpm bundle - name: E2E test (base /) run: pnpm test:e2e diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 687974186c..7631252c9d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: run: pnpm install --frozen-lockfile - name: Build Project - run: pnpm build + run: pnpm bundle - name: Update npmrc run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 56f3ea9e0c..e2277aadd5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,81 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.53](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.52...v2.0.0-rc.53) (2024-09-30) + +### Bug Fixes + +- **plugin-comment:** fix rollup config ([7ba0244](https://github.com/vuepress/ecosystem/commit/7ba0244ba39ab3abcf0eaf01bd2b98e3a7c3ca57)) + +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Bug Fixes + +- **plugin-comment:** add missing style import for Waline ([f976a5c](https://github.com/vuepress/ecosystem/commit/f976a5ca619f0e870e40f7ef87b0b83d199b3e20)) +- **plugin-markdown-math:** improve font-size in katex ([4add5f1](https://github.com/vuepress/ecosystem/commit/4add5f14a18a83d352419cd2d3863beb5434fb97)) +- **plugin-markdown-math:** prevent scrollbar with mathjax ([c73b86f](https://github.com/vuepress/ecosystem/commit/c73b86f684605fede21b0879c4826baaf2d37bbb)) +- **plugin-pwa:** fix config file ([4295c5d](https://github.com/vuepress/ecosystem/commit/4295c5d2bd8e64a51916909337eb9597ef9befb3)) +- **plugin-redirect:** respect config option from command line ([790731a](https://github.com/vuepress/ecosystem/commit/790731aafa31a4aa68b720632d2f33453e18bfab)) +- **plugin-rtl:** add missing client entry ([da8be48](https://github.com/vuepress/ecosystem/commit/da8be487d81b8b0c5c4e7c5ed455c63667efe369)) +- **plugin-rtl:** fix client imports ([39b43f1](https://github.com/vuepress/ecosystem/commit/39b43f10cdef760708575e360ed643fda6a9ba95)) + +### Features + +- **helper:** improve header anchor normalize ([ef2c444](https://github.com/vuepress/ecosystem/commit/ef2c444dd432b89dd49655e11bd678f3d73400bd)) +- **helper:** sync mergeViteConfig with vite ([6e17c80](https://github.com/vuepress/ecosystem/commit/6e17c809daf6cd5f633051fbd29b1988e14e82df)) +- **plugin-copyright:** provide composables ([a9b6e98](https://github.com/vuepress/ecosystem/commit/a9b6e98ac9300c9a485cb317afb050b0a3e4d9eb)) +- **plugin-feed:** add app as second argument in getter ([08dbf87](https://github.com/vuepress/ecosystem/commit/08dbf87df02cd9764bfe09d9316dba9872411254)) +- **plugin-markdown-hint:** improve hint container outlook ([#264](https://github.com/vuepress/ecosystem/issues/264)) ([340fff5](https://github.com/vuepress/ecosystem/commit/340fff5ced3f720f2d6204a230ed320031f9faa9)) +- **plugin-markdown-math:** add macros option for katex by default, close [#261](https://github.com/vuepress/ecosystem/issues/261) ([c5568ca](https://github.com/vuepress/ecosystem/commit/c5568ca84ed82e05407a38423b900c7782769073)) +- **plugin-markdown-tab:** provide client entry ([a1ed50b](https://github.com/vuepress/ecosystem/commit/a1ed50bb738bb8b510a1471c797ffc5d8731f683)) +- **plugin-pwa:** improve style tree shaking ([aed3060](https://github.com/vuepress/ecosystem/commit/aed3060c104b872cd6f337202abd36090648faac)) +- **plugin-pwa:** prevent defining variables ([ec0d8d0](https://github.com/vuepress/ecosystem/commit/ec0d8d0cc5223b90b53c337079a1a1c5d5dbbf2b)) +- **plugin-redirect:** reduce runtime size ([#268](https://github.com/vuepress/ecosystem/issues/268)) ([1adfab9](https://github.com/vuepress/ecosystem/commit/1adfab9dcf5589dd391c387aa46930b836941941)) +- **plugin-rtl:** provide composables ([3d0e4a1](https://github.com/vuepress/ecosystem/commit/3d0e4a18263a9daa0a2b49b1d40fccc219357997)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.51](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.50...v2.0.0-rc.51) (2024-09-23) + +### Features + +- **plugin-redirect:** add remember my choice, close [#253](https://github.com/vuepress/ecosystem/issues/253) ([#259](https://github.com/vuepress/ecosystem/issues/259)) ([8805d9c](https://github.com/vuepress/ecosystem/commit/8805d9c95611facabc3c02cb50d6ee9dafdac852)) +- **plugin-sass-palette:** remove variables staring with underscore in generator ([f329800](https://github.com/vuepress/ecosystem/commit/f329800e357e5a27eb1107252977dd98b29affed)) + +# [2.0.0-rc.50](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.49...v2.0.0-rc.50) (2024-09-23) + +**Note:** Version bump only for package @vuepress/ecosystem + +# [2.0.0-rc.49](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2024-09-23) + +### Bug Fixes + +- **plugin-markdown-math:** incorrect import css path ([#256](https://github.com/vuepress/ecosystem/issues/256)) ([4e61424](https://github.com/vuepress/ecosystem/commit/4e6142496e2e80472d377d58cfbf538e5a51a981)) + +### Features + +- **plugin-prismjs:** improve highlight color generation ([492cd27](https://github.com/vuepress/ecosystem/commit/492cd2746821e1e3554f8a46de14042c107bb68b)) + +# [2.0.0-rc.48](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.47...v2.0.0-rc.48) (2024-09-22) + +### Bug Fixes + +- **plugin-revealjs:** fix embed mode and keyboard events ([5d98506](https://github.com/vuepress/ecosystem/commit/5d985061c232037dc48329e3b8ce28ba15f75e1d)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Bug Fixes + +- **plugin-comment:** avoid resolving issues in pnpm ([2e319fe](https://github.com/vuepress/ecosystem/commit/2e319fe75f67419321372c1931419030fa227e1c)) +- **theme-default:** fix hero action button color ([12a8d5d](https://github.com/vuepress/ecosystem/commit/12a8d5dc44198f58999c6ad88c750c775aba4950)) + +### Features + +- add plugin-markdown-tab ([#250](https://github.com/vuepress/ecosystem/issues/250)) ([49ea97c](https://github.com/vuepress/ecosystem/commit/49ea97cf10f07ad3e20b2528d17efc3b6576ac7a)) +- add plugin-revealjs ([#251](https://github.com/vuepress/ecosystem/issues/251)) ([253b959](https://github.com/vuepress/ecosystem/commit/253b959cca19fd8ef9eff5d90f21a147c916899a)) +- **plugin-docsearch:** improve search box appearance ([5282d3b](https://github.com/vuepress/ecosystem/commit/5282d3b3c5ca63170d2c915e76054cb326c00e11)) +- **plugin-markdown-hint:** toggle all details block open before print ([4cb99de](https://github.com/vuepress/ecosystem/commit/4cb99dee940441d030d23d92bf9c6749678e3cd6)) +- **plugin-redirect:** appear target language first ([4ca960a](https://github.com/vuepress/ecosystem/commit/4ca960a90de9dce54c2b45038eec11e3fe9e5d7e)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Bug Fixes diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index fe18e2022f..c1a9789e12 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -8,10 +8,12 @@ import { catalogPlugin } from '@vuepress/plugin-catalog' import { commentPlugin } from '@vuepress/plugin-comment' import { docsearchPlugin } from '@vuepress/plugin-docsearch' import { feedPlugin } from '@vuepress/plugin-feed' +import { markdownChartPlugin } from '@vuepress/plugin-markdown-chart' import { markdownImagePlugin } from '@vuepress/plugin-markdown-image' import { markdownMathPlugin } from '@vuepress/plugin-markdown-math' import { redirectPlugin } from '@vuepress/plugin-redirect' import { registerComponentsPlugin } from '@vuepress/plugin-register-components' +import { revealJsPlugin } from '@vuepress/plugin-revealjs' import { shikiPlugin } from '@vuepress/plugin-shiki' import { defineUserConfig } from 'vuepress' import { getDirname, path } from 'vuepress/utils' @@ -54,15 +56,18 @@ export default defineUserConfig({ // handle @vuepress packages import path if (importPath.startsWith('@vuepress/')) { const packageName = importPath.match(/^(@vuepress\/[^/]*)/)![1] - return importPath - .replace( - packageName, - path.dirname( - getRealPath(`${packageName}/package.json`, import.meta.url), - ), - ) - .replace('/src/', '/lib/') - .replace(/hotKey\.ts$/, 'hotKey.d.ts') + const realPath = importPath.replace( + packageName, + path.dirname( + getRealPath(`${packageName}/package.json`, import.meta.url), + ), + ) + + return realPath.endsWith('vars.css') + ? realPath + : realPath + .replace('/src/', '/lib/') + .replace(/hotKey\.ts$/, 'hotKey.d.ts') } return importPath }, @@ -87,15 +92,42 @@ export default defineUserConfig({ json: true, rss: true, }), + markdownChartPlugin({ + chartjs: true, + echarts: true, + flowchart: true, + markmap: true, + mermaid: true, + plantuml: true, + }), markdownImagePlugin({ figure: true, mark: true, size: true, }), - markdownMathPlugin(), + markdownMathPlugin({ + type: 'katex', + }), redirectPlugin({ switchLocale: 'modal', }), + revealJsPlugin({ + plugins: ['highlight', 'math', 'search', 'notes', 'zoom'], + themes: [ + 'auto', + 'beige', + 'black', + 'blood', + 'league', + 'moon', + 'night', + 'serif', + 'simple', + 'sky', + 'solarized', + 'white', + ], + }), registerComponentsPlugin({ componentsDir: path.resolve(__dirname, './components'), }), diff --git a/docs/.vuepress/configs/sidebar/en.ts b/docs/.vuepress/configs/sidebar/en.ts index 405d113900..f9c25a813d 100644 --- a/docs/.vuepress/configs/sidebar/en.ts +++ b/docs/.vuepress/configs/sidebar/en.ts @@ -102,8 +102,15 @@ export const sidebarEn: SidebarOptions = { 'markdown-image', 'markdown-hint', 'markdown-math', + 'markdown-tab', 'links-check', 'prismjs', + { + text: 'revealjs', + prefix: 'revealjs/', + link: 'revealjs/', + children: ['', 'demo', 'themes'], + }, 'shiki', ], diff --git a/docs/.vuepress/configs/sidebar/zh.ts b/docs/.vuepress/configs/sidebar/zh.ts index b22e82c8b3..88c71831cf 100644 --- a/docs/.vuepress/configs/sidebar/zh.ts +++ b/docs/.vuepress/configs/sidebar/zh.ts @@ -102,8 +102,15 @@ export const sidebarZh: SidebarOptions = { 'markdown-image', 'markdown-hint', 'markdown-math', + 'markdown-tab', 'links-check', 'prismjs', + { + text: 'revealjs', + prefix: 'revealjs/', + link: 'revealjs/', + children: ['', 'demo', 'themes'], + }, 'shiki', ], diff --git a/docs/package.json b/docs/package.json index a6207f6842..fa4895000d 100644 --- a/docs/package.json +++ b/docs/package.json @@ -10,8 +10,8 @@ }, "dependencies": { "@mdit/plugin-footnote": "0.13.1", - "@vuepress/bundler-vite": "2.0.0-rc.15", - "@vuepress/bundler-webpack": "2.0.0-rc.15", + "@vuepress/bundler-vite": "2.0.0-rc.17", + "@vuepress/bundler-webpack": "2.0.0-rc.17", "@vuepress/plugin-back-to-top": "workspace:*", "@vuepress/helper": "workspace:*", "@vuepress/plugin-catalog": "workspace:*", @@ -19,22 +19,33 @@ "@vuepress/plugin-copy-code": "workspace:*", "@vuepress/plugin-docsearch": "workspace:*", "@vuepress/plugin-feed": "workspace:*", + "@vuepress/plugin-markdown-chart": "workspace:*", "@vuepress/plugin-markdown-image": "workspace:*", "@vuepress/plugin-markdown-math": "workspace:*", + "@vuepress/plugin-markdown-tab": "workspace:*", "@vuepress/plugin-medium-zoom": "workspace:*", "@vuepress/plugin-nprogress": "workspace:*", "@vuepress/plugin-photo-swipe": "workspace:*", "@vuepress/plugin-pwa": "workspace:*", "@vuepress/plugin-redirect": "workspace:*", "@vuepress/plugin-register-components": "workspace:*", + "@vuepress/plugin-revealjs": "workspace:*", "@vuepress/plugin-search": "workspace:*", "@vuepress/plugin-shiki": "workspace:*", "@vuepress/plugin-cache": "workspace:*", "@vuepress/theme-default": "workspace:*", - "mathjax-full": "3.2.2", - "sass-embedded": "1.79.2", + "chart.js": "^4.4.4", + "echarts": "^5.5.1", + "flowchart.ts": "^3.0.1", + "katex": "0.16.11", + "markmap-lib": "^0.17.2", + "markmap-toolbar": "^0.17.2", + "markmap-view": "^0.17.2", + "mathjax-full": "^3.2.2", + "mermaid": "^11.2.1", + "sass-embedded": "^1.79.4", "sass-loader": "^16.0.2", - "vue": "^3.5.7", - "vuepress": "2.0.0-rc.15" + "vue": "^3.5.10", + "vuepress": "2.0.0-rc.17" } } diff --git a/docs/plugins/blog/feed/getter.md b/docs/plugins/blog/feed/getter.md index 16965c621c..1ee93e30f5 100644 --- a/docs/plugins/blog/feed/getter.md +++ b/docs/plugins/blog/feed/getter.md @@ -4,19 +4,19 @@ You can take full control of feed items generation by setting `getter` in the pl ## getter.title -- Type: `(page: Page) => string` +- Type: `(page: Page, app: App) => string` Item title getter ## getter.link -- Type: `(page: Page) => string` +- Type: `(page: Page, app: App) => string` Item link getter ## getter.description -- Type: `(page: Page) => string | undefined` +- Type: `(page: Page, app: App) => string | undefined` Item description getter @@ -28,13 +28,13 @@ Due to Atom support HTML in summary, so you can return HTML content here if poss ## getter.content -- Type: `(page: Page) => string` +- Type: `(page: Page, app: App) => string` Item content getter ## getter.author -- Type: `(page: Page) => FeedAuthor[]` +- Type: `(page: Page, app: App) => FeedAuthor[]` Item author getter. @@ -76,7 +76,7 @@ interface FeedAuthor { ## getter.category -- Type: `(page: Page) => FeedCategory[] | undefined` +- Type: `(page: Page, app: App) => FeedCategory[] | undefined` Item category getter. @@ -109,7 +109,7 @@ interface FeedCategory { ## getter.enclosure -- Type: `(page: Page) => FeedEnclosure | undefined` +- Type: `(page: Page, app: App) => FeedEnclosure | undefined` Item enclosure getter. @@ -142,19 +142,19 @@ interface FeedEnclosure { ## getter.publishDate -- Type: `(page: Page) => Date | undefined` +- Type: `(page: Page, app: App) => Date | undefined` Item release date getter ## getter.lastUpdateDate -- Type: `(page: Page) => Date` +- Type: `(page: Page, app: App) => Date` Item last update date getter ## getter.image -- Type: `(page: Page) => string` +- Type: `(page: Page, app: App) => string` Item Image Getter @@ -164,7 +164,7 @@ Item Image Getter ## getter.contributor -- Type: `(page: Page) => FeedContributor[]` +- Type: `(page: Page, app: App) => FeedContributor[]` Item Contributor Getter @@ -206,6 +206,6 @@ interface FeedContributor { ## getter.copyright -- Type: `(page: Page) => string | undefined` +- Type: `(page: Page, app: App) => string | undefined` Item copyright getter diff --git a/docs/plugins/development/active-header-links.md b/docs/plugins/development/active-header-links.md index 54b32e8ec4..8d2f015cb1 100644 --- a/docs/plugins/development/active-header-links.md +++ b/docs/plugins/development/active-header-links.md @@ -30,7 +30,7 @@ export default { - Type: `string` -- Default: `'a.sidebar-item'` +- Default: `'a.vp-sidebar-item'` - Details: diff --git a/docs/plugins/development/sass-palette/guide.md b/docs/plugins/development/sass-palette/guide.md index 8dff1f9b17..5b554ce12a 100644 --- a/docs/plugins/development/sass-palette/guide.md +++ b/docs/plugins/development/sass-palette/guide.md @@ -30,11 +30,11 @@ This will allow you to: - With different ID, plugins and theme won't affect others. We recommend you to set the `id` variable with your plugin name. - With the default settings, users will set your plugin style under `.vuepress/styles` directory with Sass files starting with your ID prefix. And you can access the variables you need with `${id}-config`. + With the default settings, users will set your plugin style under `.vuepress/styles` directory with Sass files starting with your ID prefix. And you can access the variables you need with `${id}-config` and `${id}-paleete`. ::: tip Example - `vuepress-theme-hope` is using ID `"hope"`, and just imagine a `vuepress-plugin-abc` is using `"abc"`. They can get their own variables with module name `hope-config` and `abc-config`. + `vuepress-theme-hope` is using ID `"hope"`, and just imagine a `vuepress-plugin-abc` is using `"abc"`. They can get their own variables with module name `hope-config` `hope-palette` and `abc-config` `abc-palette`. ::: @@ -48,7 +48,7 @@ This will allow you to: ## Config -Config file is used for Sass variable only. It holds Sass variables which can be used in other files later. +Config file is used for Sass variable only. It holds Sass variables which can be used via `${id}-config` in other files later. You can specify a file (probably in `.vuepress/styles/` directory) as user config file. So you can get the module containing every variable later in Sass files. Also, you are able to provide a default config files where you can place fallback values for variables with `!default`. @@ -101,8 +101,6 @@ If the Scss file is not imported directly, but is imported through `@use` or `@i Palette files are used for CSS variable injection, where each variable will be injected in to root with kebab-name of variable name. -Same as config file, any variables in palette will be injected into `${id}-config` module, just in case you want to use them in Sass files. - You can specify a file (probably in `.vuepress/styles/` directory) as user palette file, and the default filename is `${id}-palette.scss`. Also, you are able to provide a default palette files where you can place fallback values for variables with `!default`. ::: details An example @@ -140,6 +138,8 @@ Then the below CSS variables will be available under root selector: ::: +Like config file, palette file provides a module named `${$id}-palette` (also including generator values), and it is also limited by `additionalData` option, so you should import the module manually if you want to use it in other Sass files. + ### Color Settings Since the default theme is providing darkmode, so you probably want different colors under lightmode and darkmode. @@ -218,9 +218,11 @@ You can use this helper with `@sass-palette/helper` alias and call its function ## Generator -Generator file is facing developers to generate derivative values with config or palette file variables. +A generator file is facing developers to generate derived values based on palette file variables. + +You can access variables from palette file directly in this file and generate new values based on them. -Generator variables will be also injected as CSS variables like palette, and also they are available in config module. +Variables in generator file will be also injected as CSS variables like palette, and they will be available in palette module. ::: details Example @@ -228,8 +230,6 @@ You may want a `$theme-color-light` based on `$theme-color`. So you can write a ```scss @use 'sass:color'; -@use 'sass:list'; -@use 'sass:map'; @use '@sass-palette/helper'; $theme-color-light: ( @@ -238,6 +238,17 @@ $theme-color-light: ( ) !default; ``` +You can also generate values based on variables provided by config files by importing it: + +```scss +// generator with id "abc" +@use 'sass:color'; +@use '@sass-palette/abc-config'; +@use '@sass-palette/helper'; + +$code-c-bg: abc-config.$highlighter == 'shiki'? #fff: #f8f8f8; +``` + ::: ## User Styles diff --git a/docs/plugins/features/copy-code.md b/docs/plugins/features/copy-code.md index bc57c6592e..c632b1ec1c 100644 --- a/docs/plugins/features/copy-code.md +++ b/docs/plugins/features/copy-code.md @@ -4,7 +4,7 @@ This plugin will automatically add a copy button to the top right corner of each code block on PC devices. -The default selector matches `@vuepress/theme-default`, so you might need to change it when integrating your own theme. +This plugin has been integrated into the default theme. ## Usage diff --git a/docs/plugins/markdown/markdown-chart/README.md b/docs/plugins/markdown/markdown-chart/README.md index 21916b80d6..f1afb6ad2b 100644 --- a/docs/plugins/markdown/markdown-chart/README.md +++ b/docs/plugins/markdown/markdown-chart/README.md @@ -8,11 +8,11 @@ This plugin provides 6 ways to let you insert charts into your markdown file. - chart.js: A lightweight, easy-to-use, highly customizable chart library. - chart.js is lighter comparing to eCharts. + chart.js is lighter comparing to echarts. -- eCharts: A powerful, interactive charting and visualization library for browser. +- echarts: A powerful, interactive charting and visualization library for browser. - eCharts is more powerful comparing to chart.js. + echarts is more powerful comparing to chart.js. - Flowchart: A simple markdown extension to generate flowcharts and sequence diagrams. @@ -43,7 +43,7 @@ export default { plugins: [ markdownChartPlugin({ // Enable chart.js - chartJs: true, + chartjs: true, // Enable echarts echarts: true, // Enable flowchart.ts diff --git a/docs/plugins/markdown/markdown-chart/chartjs.md b/docs/plugins/markdown/markdown-chart/chartjs.md index 8586e84293..e3c0befb2a 100644 --- a/docs/plugins/markdown/markdown-chart/chartjs.md +++ b/docs/plugins/markdown/markdown-chart/chartjs.md @@ -44,7 +44,7 @@ export default { plugins: [ markdownChartPlugin({ // Enable chart.js - chartJs: true, + chartjs: true, }), ], } diff --git a/docs/plugins/markdown/markdown-hint.md b/docs/plugins/markdown/markdown-hint.md index 83c081ec16..f8544f66e5 100644 --- a/docs/plugins/markdown/markdown-hint.md +++ b/docs/plugins/markdown/markdown-hint.md @@ -4,6 +4,8 @@ Add gfm alerts and hint containers to your VuePress site. +This plugin has been integrated into the default theme. + ## Usage ```bash diff --git a/docs/plugins/markdown/markdown-tab.md b/docs/plugins/markdown/markdown-tab.md new file mode 100644 index 0000000000..7cf011f346 --- /dev/null +++ b/docs/plugins/markdown/markdown-tab.md @@ -0,0 +1,406 @@ +# markdown-tab + + + +Add tabs and code tabs to your VuePress site. + +This plugin has been integrated into the default theme. + +## Usage + +```bash +npm i -D @vuepress/plugin-markdown-tab@next +``` + +```ts +import { markdownTabPlugin } from '@vuepress/plugin-markdown-tab' + +export default { + plugins: [ + markdownTabPlugin({ + // Enable code tabs + codeTabs: true, + // Enable tabs + tabs: true, + }), + ], +} +``` + +## Tabs Guide + +You need to wrap your tabs in `tabs` container. + +You can add an id suffix in `tabs` container, which will be used as tab id. All tabs with same id will share same switch event. + +```md + + +::: tabs#fruit + + + +::: +``` + +Inside this container, you should use `@tab` marker to mark and separate tab contents. + +Behind `@tab` marker, you can add text `:active` to activate the tab by default, and the text will be resolved as tab title. + +```md +::: tabs + +@tab title 1 + + + +@tab title 2 + + + + + +@tab:active title 3 + + + +::: +``` + +By default, the title will be used as value of tab, but you can override it using id suffix. + +```md +::: tabs + + + +@tab title 1 + + + + + +@tab title 2#value2 + + + +::: +``` + +You can use Vue syntax and components in each tab, and you can access `value` and `isActive`, indicating the tab's binding value and whether the tab is active. + +### Switching together and persisting choice + +If you want to make some tab groups switch together, you can use tab ids to bind them. Also, each tab id's choice will be stored and persisted. + +Here is an example: + +Choose a package manager: + +::: tabs#shell + +@tab npm + +npm should be installed with Node.js. + +@tab pnpm + +```bash +corepack enable +corepack use pnpm@latest +``` + +::: + +Install `vuepress`: + +::: tabs#shell + +@tab Using npm#npm + +```bash +npm i -D vuepress +``` + +@tab Using pnpm#pnpm + +```bash +pnpm add -D vuepress +``` + +::: + +::: details Code + +````md +Choose a package manager: + +::: tabs#shell + +@tab npm + +npm should be installed with Node.js. + +@tab pnpm + +```bash +corepack enable +corepack use pnpm@latest +``` + +::: + +Install `vuepress`: + +::: tabs#shell + +@tab Using npm#npm + +```bash +npm i -D vuepress +``` + +@tab Using pnpm#pnpm + +```bash +pnpm add -D vuepress +``` + +::: +```` + +:::: + +## Code Tabs Guide + +This is the same as [tabs](#tabs-guide), but it's special built for code blocks. + +Only the first code fence after `@tab` marker is rendered inside code tabs, other Markdown content will be ignored. + +## Demo + +A tab of fruit: + +::: tabs#fruit + +@tab apple#apple + +Apple + +@tab banana#banana + +Banana + +::: + +Another tab of fruit: + +::: tabs#fruit + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: + +A tab of fruit without id: + +::: tabs + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: + +:::: details Code + +```md +A tab of fruit: + +::: tabs#fruit + +@tab apple#apple + +Apple + +@tab banana#banana + +Banana + +::: + +Another tab of fruit: + +::: tabs#fruit + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: + +A tab of fruit without id: + +::: tabs + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: +``` + +:::: + +Install VuePress: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D vuepress +``` + +@tab yarn + +```bash +yarn add -D vuepress +``` + +@tab:active npm + +```bash +npm i -D vuepress +``` + +::: + +Install VuePress Tabs Plugin: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D @vuepress/plugin-markdown-tab +``` + +@tab yarn + +```bash +yarn add -D @vuepress/plugin-markdown-tab +``` + +@tab:active npm + +```bash +npm i -D @vuepress/plugin-markdown-tab +``` + +::: + +:::: details Code + +````md +Install VuePress: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D vuepress +``` + +@tab yarn + +```bash +yarn add -D vuepress +``` + +@tab:active npm + +```bash +npm i -D vuepress +``` + +::: + +Install VuePress Tabs Plugin: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D @vuepress/plugin-markdown-tab +``` + +@tab yarn + +```bash +yarn add -D @vuepress/plugin-markdown-tab +``` + +@tab:active npm + +```bash +npm i -D @vuepress/plugin-markdown-tab +``` + +::: +```` + +:::: + +## Options + +### tabs + +- Type: `boolean` +- Details: Whether enable tabs. + +### codeTabs + +- Type: `boolean` +- Details: Whether enable code tabs. + +## Styles + +You can customize the style via CSS variables: + +@[code css](@vuepress/plugin-markdown-tab/src/client/styles/vars.css) diff --git a/docs/plugins/markdown/revealjs/README.md b/docs/plugins/markdown/revealjs/README.md new file mode 100644 index 0000000000..2cea1564cb --- /dev/null +++ b/docs/plugins/markdown/revealjs/README.md @@ -0,0 +1,214 @@ +# revealjs + + + +Add presentation in your VuePress site via Reveal.js. + + + +## Usage + +```bash +npm i -D @vuepress/plugin-prismjs@next +``` + +```js {7} title=".vuepress/config.js" +import { revealJsPlugin } from '@vuepress/plugin-revealjs' + +export default { + plugins: [ + revealJsPlugin({ + // plugin options + }), + ], +} +``` + +## Slide Syntax + +- Use `---` to split slides +- Use `--` to split the slides second time (vertical display) + +```md +@slidestart + + + +--- + + + +--- + + + +@slideend +``` + +::: details A basic demo + +@slidestart + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +````md +@slidestart + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend +```` + +::: + +By default, we use `auto` theme to render the presentation, but you can also use other themes with `@slidestart THEME_NAME`. + +You can enable the following themes in reveal.js via `themes` in plugin options: + +- `auto` (Default) +- `black` +- `white` +- `league` +- `beige` +- `sky` +- `night` +- `serif` +- `simple` +- `solarized` +- `blood` +- `moon` + +For the appearance of each theme, see [Themes demo](themes.md). + +## Slide Layout + +By default, the plugin registers a layout named `SlidePage` for you to render "a slides page". + +In pages using this layout, you should only include a single slide syntax and no other contents to avoid rendering problems. + +```md +--- +layout: SlidePage +--- + +@slidestart + + + +@slideend +``` + +You can customize this behavior via `layout` in plugin options with `false` to disable it or another layout name. + +## Demo + +Please see [Slides Demo](demo.md) + +## Customize Reveal.js + +### Built-in Plugins + +You can enable built-in plugins in reveal.js via `plugins` in plugin options. It accepts an array of the following plugin names: + +- `highlight` +- `math` +- `search` +- `notes` +- `zoom` + +::: note + +`markdown` plugin is enabled anyway to support markdown grammar. + +::: + +### Advanced Configuration + +You can also import and call `defineRevealJsConfig` in [client config file][client-config] to customize reveal.js: + +```js title=".vuepress/client.js" +import { defineRevealJsConfig } from '@vuepress/plugin-revealjs/client' + +defineRevealJsConfig({ + // reveal.js options here +}) +``` + +::: note + +Reveal.js also provides [more plugins](https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware), you can add them via `plugin` option in `defineRevealJsConfig`. Built-in plugins you request at node side will be added automatically. + +::: + +### Per Page Configuration + +You can also set `revealJs` to pass options to reveal.js per page in frontmatter. + +For reveal.js options, see [reveal.js config](https://revealjs.com/config/). For reveal.js usage, see [reveal.js documentation](https://revealjs.com/) + +## Options + +### plugins + +- Type: `RevealJsPlugin[]` +- Details: Built-in reveal plugins to enable + + Available values: `highlight`, `math`, `search`, `notes`, `zoom` + +### themes + +- Type: `RevealJsTheme[]` +- Default: `['auto']` +- Details: Themes to enable + + Available values: `auto`, `black`, `white`, `league`, `beige`, `sky`, `night`, `serif`, `simple`, `solarized`, `blood`, `moon` + +### layout + +- Type: `string | false` +- Default: `'SlidePage'` +- Details: Layout component name to render slides + +### delay + +- Type: `number` +- Default: `800` +- Details: Delay time to render slides + +## Styles + +You can customize the style via CSS variables: + +@[code css](@vuepress/plugin-revealjs/src/client/styles/vars.css) + +[client-config]: https://vuejs.press/guide/configuration.html#client-config-file diff --git a/docs/plugins/markdown/revealjs/demo.md b/docs/plugins/markdown/revealjs/demo.md new file mode 100644 index 0000000000..1738d63a25 --- /dev/null +++ b/docs/plugins/markdown/revealjs/demo.md @@ -0,0 +1,430 @@ +--- +title: Slide Demo +layout: SlidePage +--- + +@slidestart + + + +## Slide Demo + + + +A simple slide demo and useful hints. + + + +> By Mr.Hope. Please scroll mouse wheel down to the next slide + +--- + + + +## Marking Slides + + + +[👇](#/1/1) + +-- + + + +## Marking Slides + + + +Use `---` to mark horizontal slides + + + +Use `--` to separate vertical slides in a horizontal slide. + + + +Use `` to add attributes to slide + + + +Use `` to add attributes to the previous HTML element + + + +--- + + + +## Markdown + + + +You can use all kinds of markup in slides. + + + +-- + + + +## Markdown + +You can use all kinds of markup in slides. + +### This is an H3 + +Headings will transform to UPPERCASE by default. + +Here is paragraph with some **bold**, _italic_, ~~strike-through~~ text and a [link](https://mister-hope.com), and it can auto break itself, so you don't need to worry the length. + +-- + + + +## Markdown + +You can use all kinds of markup in slides. + +List is `inline-block` by default. + +- Item +- Item +- Item + +1. Item 1 +1. Item 2 +1. Item 3 + +-- + + + +## Markdown + +You can use all kinds of markup in slides. + +Code block will get auto highlight if you enable `highlight` plugin. + +```js +const a = 1 +``` + +-- + + + +## Markdown + +You can use all kinds of markup in slides. + +You can also write math equation using tex syntax if you enable `math` plugin. + +$$ +J(\theta_0,\theta_1) = \sum_{i=0} +$$ + +-- + + + +## Markdown + +You can use all kinds of markup in slides. + +⚠**Note**: Table, hr and other nonstandard Markdown syntax is not supported. + +--- + + + +## Layout + + + +-- + + + +## Layout + + + +👆 The `r-fit-text` class makes text as large as possible without overflowing the slide. + +-- + + + +## Layout + +![Logo](https://theme-hope-assets.vuejs.press/logo.svg) + + + +👆 The `r-stretch` class helper lets you resize an element, like an image or video, to cover the remaining vertical space in a slide. + +-- + + + +## Layout + +### Background + +Custom background by adding `data-background` attribute to slide. + +--- + + + +## Fragment + + + +-- + + + +## Fragment + + + +Fragments are used to highlight or incrementally reveal individual elements on a slide. + +Add `fragment` and animation class to element. + +-- + + + +## Fragment + +### Animation class + +- `fade-in` + + +- `fade-out` + + +- `fade-up` + + + + +- `fade-down` + + +- `fade-left` + + +- `fade-right` + + + + +- `fade-in-then-out` + + +- `fade-in-then-semi-out` + + +-- + + + +## Fragment + +### Animation class + +- `grow` + + +- `shrink` + + +- `strike` + + + + +- `highlight-red` + + +- `highlight-green` + + +- `highlight-blue` + + + + +- `highlight-current-red` + + +- `highlight-current-green` + + +- `highlight-current-blue` + + +-- + + + +## Fragment + +### Multiple fragments + +Multiple fragments can be applied to the same element sequentially by wrapping it + + + + + Fade in > Turn red > Fade out + + + + +-- + + + +## Fragment + +### Order + +Order can be changed using the `data-fragment-index` attribute. + +Multiple elements can appear at the same index. + +- Appears last + + +- Appears second + + + + +- Appears first + + +- Appears second + + +--- + + + +## Transition + + + +-- + + + +## Transition + + + +Transition can be changed by setting the `transition` config option globally or `data-transition` attribute on slide. + +Possible values: + +- none +- fade +- slide + + + +- convex +- concave +- zoom + +-- + + + +## Transition + + + +### Auto animate + +`data-auto-animate` can be added on nearby slides to make an animation on unchanged elements. + +--- + + + +## Functions + + + +-- + + + +## Functions + + + +### Code + +By enabling `highlight` plugin, you can highlight code blocks. + +You can use `[a-b|c-d]` syntax to highlight lines by steps. + +```js [1-2|3|4] +const a = 1 +const b = 2 +const c = (x) => 1 + 2 + x +c(3) +``` + +-- + + + +## Functions + + + +### Overview + +Press `Esc` or `O` to enter overview mode when the slide is active + +-- + + + +## Functions + + + +### Full Screen + +Press `F` or `F11` to enter full-screen when the slide is active + +-- + + + +## Functions + + + +### Zoom + +Hold down the `alt` key (`ctrl` in Linux) and click on any element to zoom towards it. + +Click again to zoom back out. + +--- + + + +## The End + +@slideend diff --git a/docs/plugins/markdown/revealjs/themes.md b/docs/plugins/markdown/revealjs/themes.md new file mode 100644 index 0000000000..dc5237b0a3 --- /dev/null +++ b/docs/plugins/markdown/revealjs/themes.md @@ -0,0 +1,267 @@ +# Reveal.js Themes + +## `auto` + +> Based on theme mode. + +@slidestart + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `black` + +@slidestart black + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `white` + +@slidestart white + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `league` + +@slidestart league + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `beige` + +@slidestart beige + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `sky` + +@slidestart sky + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `night` + +@slidestart night + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `serif` + +@slidestart serif + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `simple` + +@slidestart simple + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `solarized` + +@slidestart solarized + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `blood` + +@slidestart blood + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `moon` + +@slidestart moon + +## Slide Title + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Highlight + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend diff --git a/docs/plugins/tools/redirect.md b/docs/plugins/tools/redirect.md index cb99ee7234..3d266c4eed 100644 --- a/docs/plugins/tools/redirect.md +++ b/docs/plugins/tools/redirect.md @@ -223,6 +223,71 @@ By default, the plugin will output to `.vuepress/redirect` directory under sourc - Default: the first locale - Details: Default locale path. +- Type: `RedirectPluginLocaleConfig` + + ```ts + interface RedirectPluginLocaleData { + /** + * Language name + */ + name: string + + /** + * Switch hint + */ + hint: string + + /** + * Switch button text + */ + switch: string + + /** + * Cancel button text + */ + cancel: string + + /** + * remember hint text + */ + remember: string + } + + interface RedirectPluginLocaleConfig { + [localePath: string]: RedirectPluginLocaleData + } + ``` + +- Required: No + +- Details: + + Locales config for redirect plugin. + +::: details Built-in Supported Languages + +- **Simplified Chinese** (zh-CN) +- **Traditional Chinese** (zh-TW) +- **English (United States)** (en-US) +- **German** (de-DE) +- **German (Australia)** (de-AT) +- **Russian** (ru-RU) +- **Ukrainian** (uk-UA) +- **Vietnamese** (vi-VN) +- **Portuguese (Brazil)** (pt-BR) +- **Polish** (pl-PL) +- **French** (fr-FR) +- **Spanish** (es-ES) +- **Slovak** (sk-SK) +- **Japanese** (ja-JP) +- **Turkish** (tr-TR) +- **Korean** (ko-KR) +- **Finnish** (fi-FI) +- **Indonesian** (id-ID) +- **Dutch** (nl-NL) + +::: + ## Frontmatter ### redirectFrom diff --git a/docs/themes/default/components.md b/docs/themes/default/components.md index ea1ebb41f0..25796ce21b 100644 --- a/docs/themes/default/components.md +++ b/docs/themes/default/components.md @@ -37,96 +37,3 @@ - VuePress - - VuePress - - VuePress - - -## CodeGroup - -- Details: - - Wrapper of the [CodeGroupItem](#codegroupitem) components. - -## CodeGroupItem - -- Props: - - - title - - Type: `string` - - Required: `true` - - active - - Type: `boolean` - - Default: `false` - -- Details: - - This component must be placed inside a [CodeGroup](#codegroup) component. - - Use the `active` prop to set the initial active item, or the first item will be activated by default. - -- Example: - -**Input** - -````md - - - -```bash:no-line-numbers -pnpm install -``` - - - - - -```bash:no-line-numbers -yarn install -``` - - - - - -```bash:no-line-numbers -npm install -``` - - - -```` - -**Output** - - - - -```bash:no-line-numbers -pnpm install -``` - - - - - -```bash:no-line-numbers -yarn install -``` - - - - - -```bash:no-line-numbers -npm install -``` - - - - -::: warning -You must add an empty line between the starting tag of `` and the code fence, otherwise the code fence will not be parsed correctly by Markdown. - -All content must be valid Markdown first, and then a Vue SFC. - -Learn more: [Cookbook > Markdown and Vue SFC](https://v2.vuepress.vuejs.org/advanced/cookbook/markdown-and-vue-sfc.html) - -Alternatively, you can use the [custom containers](./markdown.md#custom-containers). -::: diff --git a/docs/themes/default/markdown.md b/docs/themes/default/markdown.md index 85aa187dd9..88235b4dd9 100644 --- a/docs/themes/default/markdown.md +++ b/docs/themes/default/markdown.md @@ -100,64 +100,96 @@ console.log('Hello, VuePress!') ::: -## Custom Containers +## Code Tabs -- Usage: +**Input** - ```md - ::: [title] - [content] - ::: - ``` +````md +::: code-tabs - The `type` is required, and the `title` and `content` are optional. +@tab JavaScript - Supported `type` : +```js +const name = 'VuePress' +console.log(`Hello, ${name}!`) +``` - - Alias of [CodeGroup](./components.md#codegroup) and [CodeGroupItem](./components.md#codegroupitem): - - `code-group` - - `code-group-item` +@tab TypeScript -- Example: +```ts +const name: string = 'VuePress' -**Input** +console.log(`Hello, ${name}!`) +``` -````md -:::: code-group -::: code-group-item FOO +::: +```` + +**Output** + +::: code-tabs + +@tab JavaScript + +```js +const name = 'VuePress' +console.log(`Hello, ${name}!`) +``` + +@tab TypeScript ```ts -const foo = 'foo' +const name: string = 'VuePress' + +console.log(`Hello, ${name}!`) ``` ::: -::: code-group-item BAR +## Tabs -```ts -const bar = 'bar' +**Input** + +````md +::: tabs + +@tab Tab1 + +This is the content of Tab1. + +```js +console.log('Hello, VuePress!') ``` +@tab Tab2 + +This is the content of Tab2. + +- List item 1 +- List item 2 +- List item 3 + ::: -:::: ```` **Output** -:::: code-group -::: code-group-item FOO +::: tabs -```ts -const foo = 'foo' +@tab Tab1 + +This is the content of Tab1. + +```js +console.log('Hello, VuePress!') ``` -::: +@tab Tab2 -::: code-group-item BAR +This is the content of Tab2. -```ts -const bar = 'bar' -``` +- List item 1 +- List item 2 +- List item 3 ::: -:::: diff --git a/docs/themes/default/plugin.md b/docs/themes/default/plugin.md index 7ec953718a..026ddf8ca7 100644 --- a/docs/themes/default/plugin.md +++ b/docs/themes/default/plugin.md @@ -152,3 +152,17 @@ export default { Enable [@vuepress/plugin-sitemap](../../plugins/seo/sitemap/README.md) or not. Object value is supported as plugin options. + +## themePlugins.tab + +- Type: `MarkdownTabPluginOptions | boolean` + +- Default: `true` + +- Details: + + Enable [@vuepress/plugin-markdown-tab](../../plugins/markdown/markdown-tab.md) or not. + +- Also see: + - [Default Theme > Markdown > Code Tabs](./markdown.md#code-tabs) + - [Default Theme > Markdown > Tabs](./markdown.md#tabs) diff --git a/docs/zh/plugins/blog/feed/getter.md b/docs/zh/plugins/blog/feed/getter.md index 8eead387ee..3d1812418d 100644 --- a/docs/zh/plugins/blog/feed/getter.md +++ b/docs/zh/plugins/blog/feed/getter.md @@ -4,19 +4,19 @@ ## getter.title -- 类型:`(page: Page) => string` +- 类型:`(page: Page, app: App) => string` 项目标题获取器 ## getter.link -- 类型:`(page: Page) => string` +- 类型:`(page: Page, app: App) => string` 项目链接获取器 ## getter.description -- 类型:`(page: Page) => string | undefined` +- 类型:`(page: Page, app: App) => string | undefined` 项目描述获取器 @@ -28,13 +28,13 @@ ## getter.content -- 类型:`(page: Page) => string` +- 类型:`(page: Page, app: App) => string` 项目内容获取器 ## getter.author -- 类型:`(page: Page) => FeedAuthor[]` +- 类型:`(page: Page, app: App) => FeedAuthor[]` 项目作者获取器。 @@ -76,7 +76,7 @@ interface FeedAuthor { ## getter.category -- 类型:`(page: Page) => FeedCategory[] | undefined` +- 类型:`(page: Page, app: App) => FeedCategory[] | undefined` 项目分类获取器。 @@ -109,7 +109,7 @@ interface FeedCategory { ## getter.enclosure -- 类型:`(page: Page) => FeedEnclosure | undefined` +- 类型:`(page: Page, app: App) => FeedEnclosure | undefined` 项目附件获取器。 @@ -142,19 +142,19 @@ interface FeedEnclosure { ## getter.publishDate -- 类型:`(page: Page) => Date | undefined` +- 类型:`(page: Page, app: App) => Date | undefined` 项目发布日期获取器 ## getter.lastUpdateDate -- 类型:`(page: Page) => Date` +- 类型:`(page: Page, app: App) => Date` 项目最后更新日期获取器 ## getter.image -- 类型:`(page: Page) => string` +- 类型:`(page: Page, app: App) => string` 项目图片获取器 @@ -164,7 +164,7 @@ interface FeedEnclosure { ## getter.contributor -- 类型:`(page: Page) => FeedContributor[]` +- 类型:`(page: Page, app: App) => FeedContributor[]` 项目贡献者获取器 @@ -206,6 +206,6 @@ interface FeedContributor { ## getter.copyright -- 类型:`(page: Page) => string | undefined` +- 类型:`(page: Page, app: App) => string | undefined` 项目版权获取器 diff --git a/docs/zh/plugins/development/active-header-links.md b/docs/zh/plugins/development/active-header-links.md index 56a704cad4..6ffd23eedb 100644 --- a/docs/zh/plugins/development/active-header-links.md +++ b/docs/zh/plugins/development/active-header-links.md @@ -30,7 +30,7 @@ export default { - 类型: `string` -- 默认值: `'a.sidebar-item'` +- 默认值: `'a.vp-sidebar-item'` - 详情: diff --git a/docs/zh/plugins/development/sass-palette/guide.md b/docs/zh/plugins/development/sass-palette/guide.md index 80e9f5dd77..e0df528678 100644 --- a/docs/zh/plugins/development/sass-palette/guide.md +++ b/docs/zh/plugins/development/sass-palette/guide.md @@ -28,11 +28,11 @@ - 设置不同的 ID 时,插件们和主题之间互相完全独立。我们建议你使用你的插件名称设置 `id` 变量。 - 使用默认设置,用户将在 `.vuepress/styles` 文件夹下设置你的插件样式,其中 Sass 文件以你的 ID 前缀开头。你可以使用 `${id}-config` 访问所需的变量。 + 使用默认设置,用户将在 `.vuepress/styles` 文件夹下设置你的插件样式,其中 Sass 文件以你的 ID 前缀开头。你可以使用 `${id}-config` 和 `${id}-palette` 访问所需的变量。 ::: tip 示例 - `vuepress-theme-hope` 正在使用 ID `"hope"`,而假设 `vuepress-plugin-abc` 正在使用 `"abc"`。他们可以分别使用 `hope-config` 和 `abc-config` 模块名称获取自己的变量。 + `vuepress-theme-hope` 正在使用 ID `"hope"`,而假设 `vuepress-plugin-abc` 正在使用 `"abc"`。他们可以分别使用 `hope-config` `hope-palette` 和 `abc-config` `abc-palette` 模块名称获取自己的变量。 ::: @@ -46,7 +46,7 @@ ## 配置 -配置文件仅用于提供 Sass 变量。它所包含 Sass 变量可以在其他文件中使用。 +配置文件仅用于提供 Sass 变量。它所包含 Sass 变量可以在其他文件中通过 `${id}-config` 使用。 你可以指定一个文件作为用户配置文件。这样你可以稍后在插件 Sass 文件中访问包含每个变量的模块。此外,你还可以提供默认配置文件,你可以在其中使用 `!default` 为变量设置默认值。 @@ -99,8 +99,6 @@ $sidebar-width: 18rem !default; 调色板文件用于 CSS 变量注入,其中每个变量将被注入到 root 中,变量名称转换为 kebab-name 格式。 -与配置文件相同,调色板中的任何变量都将被注入到 `${id}-config` 模块中,以防万一你想在 SASS 文件中使用它们。 - 你可以指定一个文件作为用户调色板文件,默认文件名是 `${id}-palette.scss`。 此外,你还可以提供一个默认的调色板文件,你可以在其中使用 `!default` 为变量设置默认值。 ::: details 一个例子 @@ -138,6 +136,8 @@ $color-b: green !default; ::: +和配置文件一样,调色板文件提供了一个 `${$id}-palette` 模块 (也包含生成器的值),它也受 `additionalData` 选项的限制,因此如果你想在其他 Sass 文件中使用它,你应该手动导入模块。 + ### 颜色设置 由于默认主题支持深色模式,因此你可能希望在浅色模式和深色模式下使用不同的颜色。 @@ -218,7 +218,9 @@ $moveTransition: 'width 0.3s ease'; 生成器文件面向开发人员使用配置或调色板文件变量生成衍生值。 -生成器变量也将像调色板一样作为 CSS 变量注入,它们也可以在配置模块中使用。 +你可以在此文件中直接获取调色板的变量值,并生成基于它们的新值。 + +生成器变量也将像调色板一样作为 CSS 变量注入,它们也在调色板模块中可用。 ::: details 示例 @@ -226,8 +228,6 @@ $moveTransition: 'width 0.3s ease'; ```scss @use 'sass:color'; -@use 'sass:list'; -@use 'sass:map'; @use '@sass-palette/helper'; $theme-color-light: ( @@ -236,6 +236,17 @@ $theme-color-light: ( ) !default; ``` +你也可以通过导入配置文件来基于配置文件提供的变量生成值: + +```scss +// id 为 "abc" 的生成器 +@use 'sass:color'; +@use '@sass-palette/abc-config'; +@use '@sass-palette/helper'; + +$code-c-bg: abc-config.$highlighter == 'shiki'? #fff: #f8f8f8; +``` + ::: ## 用户样式 diff --git a/docs/zh/plugins/features/copy-code.md b/docs/zh/plugins/features/copy-code.md index fdb0acac17..bed721cb08 100644 --- a/docs/zh/plugins/features/copy-code.md +++ b/docs/zh/plugins/features/copy-code.md @@ -4,7 +4,7 @@ 此插件会自动在 PC 设备上为每个代码块右上角添加复制按钮。 -默认选择器匹配 `@vuepress/theme-default`,所以在你自己的主题中集成时可能需要调整它。 +该插件已经集成到默认主题中。 ## 使用 diff --git a/docs/zh/plugins/markdown/markdown-hint.md b/docs/zh/plugins/markdown/markdown-hint.md index 6b94061540..83a5606118 100644 --- a/docs/zh/plugins/markdown/markdown-hint.md +++ b/docs/zh/plugins/markdown/markdown-hint.md @@ -4,6 +4,8 @@ 向你的 VuePress 站点添加 GFM 警告和提示容器。 +该插件已经集成到默认主题中。 + ## 使用方法 ```bash diff --git a/docs/zh/plugins/markdown/markdown-tab.md b/docs/zh/plugins/markdown/markdown-tab.md new file mode 100644 index 0000000000..f8755a5abf --- /dev/null +++ b/docs/zh/plugins/markdown/markdown-tab.md @@ -0,0 +1,406 @@ +# markdown-tab + + + +在 VuePress 站点中添加选项卡和代码选项卡。 + +该插件已经集成到默认主题中。 + +## 使用 + +```bash +npm i -D @vuepress/plugin-markdown-tab@next +``` + +```ts +import { markdownTabPlugin } from '@vuepress/plugin-markdown-tab' + +export default { + plugins: [ + markdownTabPlugin({ + // 启用代码选项卡 + codeTabs: true, + // 启用选项卡 + tabs: true, + }), + ], +} +``` + +## 选项卡指南 + +你需要将选项卡包装在 `tabs` 容器中。 + +你可以在 `tabs` 容器中添加一个 id 后缀,该后缀将用作选项卡 id。 所有具有相同 id 的选项卡将共享相同的切换事件。 + +```md + + +::: tabs#fruit + + + +::: +``` + +在这个容器内,你应该使用 `@tab` 标记来标记和分隔选项卡内容。 + +在 `@tab` 标记后,你可以添加文本 `:active` 默认激活选项卡,之后的文本将被解析为选项卡标题。 + +```md +::: tabs + +@tab 标题 1 + + + +@tab 标题 2 + + + + + +@tab:active 标题 3 + + + +::: +``` + +默认情况下,标题将用作选项卡的值,但你可以使用 id 后缀覆盖它。 + +```md +::: tabs + + + +@tab 标题 1 + + + + + +@tab 标题 2#值 2 + + + +::: +``` + +你可以在每个选项卡中使用 Vue 语法和组件,并且你可以访问 `value` 和 `isActive`,表示选项卡的绑定值和选项卡是否处于激活状态。 + +### 同步切换并保持选择 + +如果你想让一些选项卡组一起切换,你可以使用相同的选项卡 ID 来绑定它们。针对每个选项卡 ID 的选择会被存储并进行持久化。 + +这是一个案例: + +选择包管理器: + +::: tabs#shell + +@tab npm + +npm 应该与 Node.js 被一同安装。 + +@tab pnpm + +```bash +corepack enable +corepack use pnpm@latest +``` + +::: + +安装 `vuepress`: + +::: tabs#shell + +@tab 使用 npm#npm + +```bash +npm i -D vuepress +``` + +@tab 使用 pnpm#pnpm + +```bash +pnpm add -D vuepress +``` + +::: + +:::: details 代码 + +````md +选择包管理器: + +::: tabs#shell + +@tab npm + +npm 应该与 Node.js 被一同安装。 + +@tab pnpm + +```bash +corepack enable +corepack use pnpm@latest +``` + +::: + +安装 `vuepress`: + +::: tabs#shell + +@tab 使用 npm#npm + +```bash +npm i -D vuepress +``` + +@tab 使用 pnpm#pnpm + +```bash +pnpm add -D vuepress +``` + +::: +```` + +:::: + +## 代码选项卡指南 + +此功能和 [选项卡](#选项卡指南) 相同,但它是专门为代码块构建的。 + +代码选项卡只会渲染 `@tab` 标记后的第一个代码块,其他 Markdown 内容将被忽略。 + +## 案例 + +一个水果选项卡列表: + +::: tabs#fruit + +@tab apple#apple + +Apple + +@tab banana#banana + +Banana + +::: + +另一个水果选项卡列表: + +::: tabs#fruit + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: + +一个没有绑定 id 的水果选项卡列表: + +::: tabs + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: + +:::: details 代码 + +```md +一个水果选项卡列表: + +::: tabs#fruit + +@tab apple#apple + +Apple + +@tab banana#banana + +Banana + +::: + +另一个水果选项卡列表: + +::: tabs#fruit + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: + +一个没有绑定 id 的水果选项卡列表: + +::: tabs + +@tab apple + +Apple + +@tab banana + +Banana + +@tab orange + +Orange + +::: +``` + +:::: + +安装 VuePress: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D vuepress +``` + +@tab yarn + +```bash +yarn add -D vuepress +``` + +@tab:active npm + +```bash +npm i -D vuepress +``` + +::: + +安装 VuePress 选项卡插件: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D @vuepress/plugin-markdown-tab +``` + +@tab yarn + +```bash +yarn add -D @vuepress/plugin-markdown-tab +``` + +@tab:active npm + +```bash +npm i -D @vuepress/plugin-markdown-tab +``` + +::: + +:::: details Code + +````md +安装 VuePress: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D vuepress +``` + +@tab yarn + +```bash +yarn add -D vuepress +``` + +@tab:active npm + +```bash +npm i -D vuepress +``` + +::: + +安装 VuePress 选项卡插件: + +::: code-tabs#shell + +@tab pnpm + +```bash +pnpm add -D @vuepress/plugin-markdown-tab +``` + +@tab yarn + +```bash +yarn add -D @vuepress/plugin-markdown-tab +``` + +@tab:active npm + +```bash +npm i -D @vuepress/plugin-markdown-tab +``` + +::: +```` + +:::: + +## 选项 + +### tabs + +- 类型: `boolean` +- 详情: 是否启用选项卡 + +### codeTabs + +- 类型: `boolean` +- 详情: 是否启用代码选项卡 + +## 样式 + +你可以通过 CSS 变量自定义样式: + +@[code css](@vuepress/plugin-markdown-tab/src/client/styles/vars.css) diff --git a/docs/zh/plugins/markdown/revealjs/README.md b/docs/zh/plugins/markdown/revealjs/README.md new file mode 100644 index 0000000000..f9c61f6b51 --- /dev/null +++ b/docs/zh/plugins/markdown/revealjs/README.md @@ -0,0 +1,214 @@ +# revealjs + + + +在你的 VuePress 站点中添加幻灯片。 + + + +## 使用 + +```bash +npm i -D @vuepress/plugin-prismjs@next +``` + +```js {7} title=".vuepress/config.js" +import { revealJsPlugin } from '@vuepress/plugin-revealjs' + +export default { + plugins: [ + revealJsPlugin({ + // 插件选项 + }), + ], +} +``` + +## 幻灯片语法 + +- 使用 `---` 分割幻灯片 +- 使用 `--` 对幻灯片进行二次分割(垂直显示) + +```md +@slidestart + + + +--- + + + +--- + + + +@slideend +``` + +::: details 示例 + +@slidestart + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +````md +@slidestart + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend +```` + +::: + +默认情况下,我们使用 `auto` 主题来渲染幻灯片,你也可以通过 `@slidestart 主题名称` 使用其他主题。 + +你可以通过插件选项中的 `themes` 启用以下主题: + +- `auto` (默认) +- `black` +- `white` +- `league` +- `beige` +- `sky` +- `night` +- `serif` +- `simple` +- `solarized` +- `blood` +- `moon` + +各主题的外观,详见 [幻灯片主题](themes.md) + +## 幻灯片布局 + +默认情况下,插件会注册一个 `SlidePage` 布局来供你渲染“幻灯片页”。 + +在使用此布局的页面中,你应该只包含单个幻灯片语法,不包含其他内容,以避免渲染问题: + +```md +--- +layout: SlidePage +--- + +@slidestart + + + +@slideend +``` + +你可以通过插件选项中的 `layout` 来自定义此行为,比如使用 `false` 来禁用它或填入其他布局名称。 + +## 演示 + +请见 [幻灯片演示](demo.md)。 + +## 自定义 Reveal.js + +### 内置插件 + +你可以通过插件选项中的 `plugins` 启用 reveal.js 中的内置插件。它接受以下插件名称的数组: + +- `highlight` +- `math` +- `search` +- `notes` +- `zoom` + +::: note + +为了支持 Markdown 语法,我们总会启用 `markdown` 插件。 + +::: + +### 高级配置 + +你也可以在[客户端配置文件][client-config]中导入并调用 `defineRevealJsConfig` 来自定义 reveal.js: + +```ts title=".vuepress/client.ts" +import { defineRevealJsConfig } from '@vuepress/plugin-revealjs/client' + +defineRevealJsConfig({ + // 在此设置 reveal.js 选项 +}) +``` + +::: note + +Reveal.js 还提供了[更多的插件](https://github.com/hakimel/reveal.js/wiki/Plugins,-Tools-and-Hardware),你可以通过 `plugin` 选项在 `defineRevealJsConfig` 中添加它们,这种自定义行为不会影响你声明的内置插件。 + +::: + +### 页面级配置 + +你也可以在 Frontmatter 设置 `revealJs` 以设置特定页面的 reveal.js 选项。 + +Reveal.js 选项,请参见[reveal.js config](https://revealjs.com/config/),Reveal.js 用法,请参阅 [reveal.js 文档](https://revealjs.com/)。 + +## 选项 + +### plugins + +- 类型: `RevealJsPlugin[]` +- 详情:需要启用 Reveal.js 内置的插件 + + 可用值:`highlight`、`math`、`search`、`notes`、`zoom` + +### themes + +- 类型: `RevealJsTheme[]` +- 默认值:`['auto']` +- 详情:需要启用的 Reveal.js 主题 + + 可用值:`auto`、`black`、`white`、`league`、`beige`、`sky`、`night`、`serif`、`simple`、`solarized`、`blood`、`moon` + +### layout + +- 类型: `string | false` +- 默认值:`'SlidePage'` +- 详情:用于渲染幻灯片的布局组件名称 + +### delay + +- 类型: `number` +- 默认值:`800` +- 详情:渲染幻灯片的延迟时间 + +## 样式 + +你可以通过 CSS 变量自定义样式: + +@[code css](@vuepress/plugin-revealjs/src/client/styles/vars.css) + +[client-config]: https://vuejs.press/zh/guide/configuration.html#%E5%AE%A2%E6%88%B7%E7%AB%AF%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6 diff --git a/docs/zh/plugins/markdown/revealjs/demo.md b/docs/zh/plugins/markdown/revealjs/demo.md new file mode 100644 index 0000000000..8508f38ec4 --- /dev/null +++ b/docs/zh/plugins/markdown/revealjs/demo.md @@ -0,0 +1,426 @@ +--- +title: 幻灯片演示 +layout: SlidePage +--- + +@slidestart + + + +## 幻灯片演示 + + + +一个简单的幻灯片演示与各种小贴士。 + + + +> 作者 Mr.Hope. 请滚动鼠标滚轮进入下一页 + +--- + +## 标注幻灯片 + + + +[👇](#/1/1) + +-- + +## 标注幻灯片 + + + +使用 `---` 标注水平幻灯片 + + + +在水平幻灯片中使用 `--` 分割垂直幻灯片 + + + +使用 `` 在幻灯片上添加属性 + + + +使用 `` 在前一个 HTML 元素上添加属性 + + + +--- + + + +## Markdown + + + +你可以在幻灯片中使用 Markdown 语法的各种标记. + + + +-- + + + +## Markdown + +你可以在幻灯片中使用 Markdown 语法的各种标记. + +### 这是一个 H3 + +标题默认会自动转换为大写。 + +这是一个有着 **粗体**, _斜体_, ~~删除线~~ 文字并包含 [一个链接](https://mister-hope.com) 的段落,并且它会自动换行。所以你无需担心它的长度。 + +-- + + + +## Markdown + +你可以在幻灯片中使用 Markdown 语法的各种标记. + +列表默认为 `inline-block` + +- 项目 +- 项目 +- 项目 + +1. 项目 1 +1. 项目 2 +1. 项目 3 + +-- + + + +## Markdown + +你可以在幻灯片中使用 Markdown 语法的各种标记. + +在你启用 `highlight` 插件后,代码块会自动高亮。 + +```js +const a = 1 +``` + +-- + + + +## Markdown + +你可以在幻灯片中使用 Markdown 语法的各种标记. + +在你启用 `math` 插件后,你也可以使用 TEX 格式使用数学公式。 + +$$ +J(\theta_0,\theta_1) = \sum_{i=0} +$$ + +-- + + + +## Markdown + +你可以在幻灯片中使用 Markdown 语法的各种标记. + +⚠**请注意**: 表格和分割线,以及所有不在 Markdown 标准语法中的内容均不受支持。 + +--- + + + +## 布局 + + + +-- + + + +## 布局 + + + +👆 `r-fit-text` class 会让文字在不超出幻灯片范围的情况下尽可能大。 + +-- + + + +## 布局 + +![Logo](https://theme-hope-assets.vuejs.press/logo.svg) + + + +👆 `r-stretch` class 帮助你控制注入图片或视频的大小,使它们填充满幻灯片垂直方向上的剩余空间。 + +-- + + + +## 布局 + +### 背景 + +你可以通过向特定幻灯片添加 `data-background` 属性自定义幻灯片背景. + +--- + + + +## 动画片段 + + + +-- + + + +## 动画片段 + + + +动画片段用于高亮或显隐幻灯片中的元素。 + +你需要在元素上添加 `fragment` 和动画 class。 + +-- + + + +## 动画片段 + +### 动画 class + +- `fade-in` + + +- `fade-out` + + +- `fade-up` + + + + +- `fade-down` + + +- `fade-left` + + +- `fade-right` + + + + +- `fade-in-then-out` + + +- `fade-in-then-semi-out` + + +-- + + + +## 动画片段 + +### 动画 class + +- `grow` + + +- `shrink` + + +- `strike` + + + + +- `highlight-red` + + +- `highlight-green` + + +- `highlight-blue` + + + + +- `highlight-current-red` + + +- `highlight-current-green` + + +- `highlight-current-blue` + + +-- + + + +## 动画片段 + +### 多个动画片段 + +你可以按照顺序包裹一个 HTML 元素使其拥有多个动画片段 + + + + + 渐入 > 变红 > 渐出 + + + + +-- + + + +## 动画片段 + +### 顺序 + +你可以使用 `data-fragment-index` 属性改变元素的动画顺序。 + +不同元素可以有相同的动画顺序。 + +- 最后显示 + + +- 第二个显示 + + + + +- 第一个显示 + + +- 第二个显示 + + +--- + + + +## 渐变 + + + +-- + + + +## 渐变 + + + +Transition 可以通过 reveal.js 中的 `transition` 选项全局设置,也可以通过在特定幻灯片添加 `data-transition` 属性局部设置. + +可能的值: + +- none +- fade +- slide + + + +- convex +- concave +- zoom + +-- + + + +## 渐变 + + + +### 过渡动画 + +你可以在相邻的幻灯片上添加 `data-auto-animate` 使相同的 HTML 元素产生过渡动画效果。 + +--- + + + +## 功能 + + + +-- + + + +## 功能 + + + +### 代码 + +通过启用 `highlight` 插件,你可以对代码块进行高亮。 + +你可以使用 `[a-b|c-d]` 语法来分布高亮特定行。 + +```js [1-2|3|4] +const a = 1 +const b = 2 +const c = (x) => 1 + 2 + x +c(3) +``` + +-- + + + +## 功能 + + + +### 预览模式 + +按下 `Esc` 或 `O` 即可在幻灯片获得焦点时进入预览模式。 + +-- + + + +## 功能 + + + +### 全屏模式 + +按下 `F` 或 `F11` 即可在幻灯片获得焦点时进入全屏模式。 + +-- + + + +## 功能 + + + +### 缩放 + +按下 `alt` (Linux 上使用 `ctrl`) 的同时点击幻灯片的任何元素,即可以向此元素进行放大。 + +再次点击即可缩小。 + +--- + + + +## 结束 + +@slideend diff --git a/docs/zh/plugins/markdown/revealjs/themes.md b/docs/zh/plugins/markdown/revealjs/themes.md new file mode 100644 index 0000000000..50c9f8ad17 --- /dev/null +++ b/docs/zh/plugins/markdown/revealjs/themes.md @@ -0,0 +1,267 @@ +# 幻灯片主题 + +## `auto` + +> 基于主题模式 + +@slidestart + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `black` + +@slidestart black + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `white` + +@slidestart white + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `league` + +@slidestart league + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `beige` + +@slidestart beige + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `sky` + +@slidestart sky + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `night` + +@slidestart night + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `serif` + +@slidestart serif + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `simple` + +@slidestart simple + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `solarized` + +@slidestart solarized + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `blood` + +@slidestart blood + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend + +## `moon` + +@slidestart moon + +## 幻灯片标题 + +一个拥有文字和 [链接](https://mister-hope.com) 的段落 + +--- + +## 代码高亮 + +```js [2-4|1-5] +const add = (a, b) => { + if (typeof b === 'undefined') return a + 1 + + return a + b +} +``` + +@slideend diff --git a/docs/zh/plugins/tools/redirect.md b/docs/zh/plugins/tools/redirect.md index 2eee862a6a..691b1292e0 100644 --- a/docs/zh/plugins/tools/redirect.md +++ b/docs/zh/plugins/tools/redirect.md @@ -229,6 +229,73 @@ Options: - 默认值: 首个语言路径 - 详情:默认语言路径 +### locales + +- 类型:`RedirectPluginLocaleConfig` + + ```ts + interface RedirectPluginLocaleData { + /** + * 语言名称 + */ + name: string + + /** + * 切换提示 + */ + hint: string + + /** + * 切换按钮文字 + */ + switch: string + + /** + * 取消按钮文字 + */ + cancel: string + + /** + * 记住提示文本 + */ + remember: string + } + + interface RedirectPluginLocaleConfig { + [localePath: string]: RedirectPluginLocaleData + } + ``` + +- 必填:否 + +- 详情: + + 重定向插件的国际化配置。 + +::: details 内置支持语言 + +- **简体中文** (zh-CN) +- **繁体中文** (zh-TW) +- **英文(美国)** (en-US) +- **德语** (de-DE) +- **德语(澳大利亚)** (de-AT) +- **俄语** (ru-RU) +- **乌克兰语** (uk-UA) +- **越南语** (vi-VN) +- **葡萄牙语(巴西)** (pt-BR) +- **波兰语** (pl-PL) +- **法语** (fr-FR) +- **西班牙语** (es-ES) +- **斯洛伐克** (sk-SK) +- **日语** (ja-JP) +- **土耳其语** (tr-TR) +- **韩语** (ko-KR) +- **芬兰语** (fi-FI) +- **印尼语** (id-ID) +- **荷兰语** (nl-NL) + +::: + ## Frontmatter ### redirectFrom diff --git a/docs/zh/themes/default/components.md b/docs/zh/themes/default/components.md index 1d151e6a98..bcd4f3de1c 100644 --- a/docs/zh/themes/default/components.md +++ b/docs/zh/themes/default/components.md @@ -37,96 +37,3 @@ - VuePress - - VuePress - - VuePress - - -## CodeGroup - -- 详情: - - [CodeGroupItem](#codegroupitem) 组件的 Wrapper 。 - -## CodeGroupItem - -- Props: - - - title - - 类型: `string` - - 是否必需: `true` - - active - - 类型: `boolean` - - 默认值: `false` - -- 详情: - - 该组件必须放置在 [CodeGroup](#codegroup) 组件的内部。 - - 可以通过 `active` Prop 来设置初始激活的元素。如果不设置,默认激活第一个元素。 - -- 示例: - -**输入** - -````md - - - -```bash:no-line-numbers -pnpm install -``` - - - - - -```bash:no-line-numbers -yarn install -``` - - - - - -```bash:no-line-numbers -npm install -``` - - - -```` - -**输出** - - - - -```bash:no-line-numbers -pnpm install -``` - - - - - -```bash:no-line-numbers -yarn install -``` - - - - - -```bash:no-line-numbers -npm install -``` - - - - -::: warning -你必须在 `` 的开始标签和代码块之间添加一个空行,否则代码块无法被 Markdown 正确解析。 - -所有内容首先都必须是合法的 Markdown ,然后才是一个 Vue SFC 。 - -了解更多: [Cookbook > Markdown 与 Vue SFC](https://v2.vuepress.vuejs.org/zh/advanced/cookbook/markdown-and-vue-sfc.html) - -或者你可以选择使用 [自定义容器](./markdown.md#自定义容器) 。 -::: diff --git a/docs/zh/themes/default/markdown.md b/docs/zh/themes/default/markdown.md index bff45e1da0..f6d693a745 100644 --- a/docs/zh/themes/default/markdown.md +++ b/docs/zh/themes/default/markdown.md @@ -100,64 +100,96 @@ console.log('你好,VuePress!') ::: -## 自定义容器 +## 代码选项卡 -- 使用: +**输入** - ```md - ::: [title] - [content] - ::: - ``` +````md +::: code-tabs - `type` 是必需的, `title` 和 `content` 是可选的。 +@tab JavaScript - 支持的 `type` 有: +```js +const name = 'VuePress' +console.log(`你好,${name}!`) +``` - - [CodeGroup](./components.md#codegroup) 和 [CodeGroupItem](./components.md#codegroupitem) 的别名: - - `code-group` - - `code-group-item` +@tab TypeScript -- 示例: +```ts +const name: string = 'VuePress' -**输入** +console.log(`你好,${name}!`) +``` -````md -:::: code-group -::: code-group-item FOO +::: +```` + +**输出** + +::: code-tabs + +@tab JavaScript + +```js +const name = 'VuePress' +console.log(`你好,${name}!`) +``` + +@tab TypeScript ```ts -const foo = 'foo' +const name: string = 'VuePress' + +console.log(`你好,${name}!`) ``` ::: -::: code-group-item BAR +## 选项卡 -```ts -const bar = 'bar' +**输入** + +````md +::: tabs + +@tab 选项卡 1 + +这是选项卡 1 的内容。 + +```js +console.log('你好,VuePress!') ``` +@tab 选项卡 2 + +这是选项卡 2 的内容。 + +- 列表项 1 +- 列表项 2 +- 列表项 3 + ::: -:::: ```` **输出** -:::: code-group -::: code-group-item FOO +::: tabs -```ts -const foo = 'foo' +@tab 选项卡 1 + +这是选项卡 1 的内容。 + +```js +console.log('你好,VuePress!') ``` -::: +@tab 选项卡 2 -::: code-group-item BAR +这是选项卡 2 的内容。 -```ts -const bar = 'bar' -``` +- 列表项 1 +- 列表项 2 +- 列表项 3 ::: -:::: diff --git a/docs/zh/themes/default/plugin.md b/docs/zh/themes/default/plugin.md index 0d24f3928b..f8ed385b34 100644 --- a/docs/zh/themes/default/plugin.md +++ b/docs/zh/themes/default/plugin.md @@ -152,3 +152,17 @@ export default { 是否启用 [@vuepress/plugin-sitemap](../../plugins/seo/sitemap/README.md) 。 支持对象格式以作为插件选项。 + +## themePlugins.tab + +- 类型: `MarkdownTabPluginOptions | boolean` + +- 默认值: `true` + +- 详情: + + 是否启用 [@vuepress/plugin-markdown-tab](../../plugins/markdown/markdown-tab.md)。 + +- 参考: + - [默认主题 > Markdown > 代码选项卡](./markdown.md#代码选项卡) + - [默认主题 > Markdown > 选项卡](./markdown.md#选项卡) diff --git a/e2e/docs/.vuepress/components/CssVariable.vue b/e2e/docs/.vuepress/components/CssVariable.vue new file mode 100644 index 0000000000..eb9092001f --- /dev/null +++ b/e2e/docs/.vuepress/components/CssVariable.vue @@ -0,0 +1,20 @@ + + + diff --git a/e2e/docs/.vuepress/config.ts b/e2e/docs/.vuepress/config.ts index 12c45b46ae..15281d090b 100644 --- a/e2e/docs/.vuepress/config.ts +++ b/e2e/docs/.vuepress/config.ts @@ -9,6 +9,7 @@ import { noticePlugin } from '@vuepress/plugin-notice' import { pwaPlugin } from '@vuepress/plugin-pwa' import { redirectPlugin } from '@vuepress/plugin-redirect' import { registerComponentsPlugin } from '@vuepress/plugin-register-components' +import { sassPalettePlugin } from '@vuepress/plugin-sass-palette' import { watermarkPlugin } from '@vuepress/plugin-watermark' import { defaultTheme } from '@vuepress/theme-default' import { defineUserConfig } from 'vuepress/cli' @@ -290,6 +291,12 @@ export default defineUserConfig({ componentsDir: path.resolve(__dirname, 'global-components/'), componentsPatterns: ['**/*.vue', '**/*.ts', '**/*.js'], }), + sassPalettePlugin({ + id: 'test', + defaultConfig: path.resolve(__dirname, './styles/default-config.scss'), + defaultPalette: path.resolve(__dirname, './styles/default-palette.scss'), + generator: path.resolve(__dirname, './styles/generator.scss'), + }), watermarkPlugin({ enabled: (page) => page.path.startsWith('/watermark/'), diff --git a/e2e/docs/.vuepress/styles/default-config.scss b/e2e/docs/.vuepress/styles/default-config.scss new file mode 100644 index 0000000000..dbc2a2d6a4 --- /dev/null +++ b/e2e/docs/.vuepress/styles/default-config.scss @@ -0,0 +1,3 @@ +$width: 2.5rem !default; +$height: 2.5rem !default; +$colors: #f00, #0f0, #00f !default; diff --git a/e2e/docs/.vuepress/styles/default-palette.scss b/e2e/docs/.vuepress/styles/default-palette.scss new file mode 100644 index 0000000000..7e9bbcf692 --- /dev/null +++ b/e2e/docs/.vuepress/styles/default-palette.scss @@ -0,0 +1,7 @@ +/* stylelint-disable scss/dollar-variable-pattern */ +$color: #f00 !default; +$snake_color: #f00 !default; +$kebab-color: #f00 !default; +$PascalColor: #f00 !default; +$length: 1rem !default; +$complex: '1s ease' !default; diff --git a/e2e/docs/.vuepress/styles/generator.scss b/e2e/docs/.vuepress/styles/generator.scss new file mode 100644 index 0000000000..4a45000c28 --- /dev/null +++ b/e2e/docs/.vuepress/styles/generator.scss @@ -0,0 +1,14 @@ +/* stylelint-disable */ +@use 'sass:color'; +@use 'sass:list'; +@use 'sass:map'; +@use '@sass-palette/helper'; +@use '@sass-palette/test-config'; + +$color-default: $kebab-color !default; +$color-user: $color !default; +$color-generator: #0ff !default; + +$config_colors: '#{test-config.$colors}'; +$_count: list.length(test-config.$colors); +$color-count: $_count; diff --git a/e2e/docs/.vuepress/styles/test-config.scss b/e2e/docs/.vuepress/styles/test-config.scss new file mode 100644 index 0000000000..10bd908106 --- /dev/null +++ b/e2e/docs/.vuepress/styles/test-config.scss @@ -0,0 +1,2 @@ +$width: 3.5rem; +$colors: #f00, #0f0, #00f; diff --git a/e2e/docs/.vuepress/styles/test-palette.scss b/e2e/docs/.vuepress/styles/test-palette.scss new file mode 100644 index 0000000000..0d21608581 --- /dev/null +++ b/e2e/docs/.vuepress/styles/test-palette.scss @@ -0,0 +1,3 @@ +$color: #00f; +$color-new: #00f; +$color-generator: #00f; diff --git a/e2e/docs/sass-palette/README.md b/e2e/docs/sass-palette/README.md new file mode 100644 index 0000000000..3bbc3a05fa --- /dev/null +++ b/e2e/docs/sass-palette/README.md @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/e2e/package.json b/e2e/package.json index 0a93a93037..3adc519425 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -15,8 +15,8 @@ "e2e:dev-webpack": "cross-env E2E_COMMAND=dev E2E_BUNDLER=webpack playwright test" }, "dependencies": { - "@vuepress/bundler-vite": "2.0.0-rc.15", - "@vuepress/bundler-webpack": "2.0.0-rc.15", + "@vuepress/bundler-vite": "2.0.0-rc.17", + "@vuepress/bundler-webpack": "2.0.0-rc.17", "@vuepress/plugin-blog": "workspace:*", "@vuepress/plugin-catalog": "workspace:*", "@vuepress/plugin-copyright": "workspace:*", @@ -25,15 +25,16 @@ "@vuepress/plugin-pwa": "workspace:*", "@vuepress/plugin-redirect": "workspace:*", "@vuepress/plugin-register-components": "workspace:*", + "@vuepress/plugin-sass-palette": "workspace:*", "@vuepress/plugin-theme-data": "workspace:*", "@vuepress/plugin-watermark": "workspace:*", "@vuepress/theme-default": "workspace:*", - "sass-embedded": "1.79.2", + "sass-embedded": "1.79.4", "sass-loader": "^16.0.2", - "vue": "^3.5.7", - "vuepress": "2.0.0-rc.15" + "vue": "^3.5.10", + "vuepress": "2.0.0-rc.17" }, "devDependencies": { - "@playwright/test": "^1.47.1" + "@playwright/test": "^1.47.2" } } diff --git a/e2e/tests/plugin-sass-palette/sass-palette.spec.ts b/e2e/tests/plugin-sass-palette/sass-palette.spec.ts new file mode 100644 index 0000000000..d37ef060ef --- /dev/null +++ b/e2e/tests/plugin-sass-palette/sass-palette.spec.ts @@ -0,0 +1,44 @@ +import { expect, test } from '@playwright/test' + +test.describe('plugin-sass-palette', () => { + test('palette value', async ({ page }) => { + await page.goto('sass-palette/') + + await expect(page.locator('#length')).toHaveText('1rem') + await expect(page.locator('#complex')).toHaveText('1s ease') + }) + + test('default palette', async ({ page }) => { + await page.goto('sass-palette/') + + await expect(page.locator('#snake-color')).toHaveText('#f00') + await expect(page.locator('#pascal-color')).toHaveText('#f00') + await expect(page.locator('#kebab-color')).toHaveText('#f00') + await expect(page.locator('#snake_color')).toBeEmpty() + await expect(page.locator('#PascalColor')).toBeEmpty() + }) + + test('user palette override', async ({ page }) => { + await page.goto('sass-palette/') + + await expect(page.locator('#color')).toHaveText('#00f') + }) + + test('user palette user', async ({ page }) => { + await page.goto('sass-palette/') + + await expect(page.locator('#color-new')).toHaveText('#00f') + }) + + test('generator', async ({ page }) => { + await page.goto('sass-palette/') + + await expect(page.locator('#color-default')).toHaveText('#f00') + await expect(page.locator('#color-user')).toHaveText('#00f') + await expect(page.locator('#color-generator')).toHaveText('#00f') + await expect(page.locator('#config-colors')).toHaveText('#f00, #0f0, #00f') + await expect(page.locator('#color-count')).toHaveText('3') + await expect(page.locator('#count')).toBeEmpty() + await expect(page.locator('#_count')).toBeEmpty() + }) +}) diff --git a/lerna.json b/lerna.json index c2ae9447a3..ace9008a5a 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "npmClient": "pnpm", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.53", "command": { "version": { "allowBranch": "main", diff --git a/package.json b/package.json index eb7004d452..4b5f241c19 100644 --- a/package.json +++ b/package.json @@ -4,9 +4,11 @@ "type": "module", "scripts": { "build": "pnpm build:tsc && pnpm build:copy && pnpm build:style", + "build:bundle": "pnpm -r --stream bundle", "build:copy": "pnpm --parallel --stream copy", "build:style": "pnpm --parallel --stream style", "build:tsc": "tsc -b tsconfig.build.json", + "bundle": "pnpm build:bundle && pnpm build:copy && pnpm build:style", "clean": "pnpm --parallel --stream clean", "format": "prettier --write .", "lint": "eslint . && prettier --check . && stylelint **/*.{css,html,scss,vue}", @@ -31,15 +33,17 @@ "devDependencies": { "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", - "@lerna-lite/cli": "^3.9.1", - "@lerna-lite/publish": "^3.9.1", - "@types/node": "^22.5.5", + "@lerna-lite/cli": "^3.9.2", + "@lerna-lite/publish": "^3.9.2", + "@rollup/plugin-commonjs": "^28.0.0", + "@rollup/plugin-node-resolve": "^15.3.0", + "@types/node": "^22.7.4", "@types/webpack-env": "^1.18.5", "@vitest/coverage-istanbul": "^2.1.1", "conventional-changelog-cli": "^5.0.0", "cpx2": "^7.0.1", "cross-env": "^7.0.3", - "eslint": "^9.11.0", + "eslint": "^9.11.1", "eslint-config-vuepress": "^5.2.0", "http-server": "^14.1.1", "husky": "^9.1.6", @@ -48,7 +52,11 @@ "prettier": "^3.3.3", "prettier-config-vuepress": "^5.0.0", "rimraf": "^6.0.1", - "sass-embedded": "1.79.2", + "rollup": "^4.22.5", + "rollup-plugin-dts": "^6.1.1", + "rollup-plugin-esbuild": "^6.1.1", + "rollup-plugin-resolve-shebang": "^1.0.1", + "sass-embedded": "1.79.4", "sort-package-json": "^2.10.1", "stylelint": "^16.9.0", "stylelint-config-hope": "^7.0.2", @@ -56,9 +64,9 @@ "tsconfig-vuepress": "^5.2.0", "tsx": "^4.19.1", "typescript": "^5.6.2", - "vite": "5.4.6", + "vite": "~5.4.8", "vitest": "^2.1.1", - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "packageManager": "pnpm@9.11.0", "engines": { diff --git a/plugins/analytics/plugin-baidu-analytics/CHANGELOG.md b/plugins/analytics/plugin-baidu-analytics/CHANGELOG.md index dc78c9377f..d3a5a0fcde 100644 --- a/plugins/analytics/plugin-baidu-analytics/CHANGELOG.md +++ b/plugins/analytics/plugin-baidu-analytics/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-baidu-analytics + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-baidu-analytics diff --git a/plugins/analytics/plugin-baidu-analytics/package.json b/plugins/analytics/plugin-baidu-analytics/package.json index bd88a3ae88..f619356298 100644 --- a/plugins/analytics/plugin-baidu-analytics/package.json +++ b/plugins/analytics/plugin-baidu-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-baidu-analytics", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - baidu-analytics", "keywords": [ "vuepress-plugin", @@ -37,14 +37,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/analytics/plugin-baidu-analytics/rollup.config.ts b/plugins/analytics/plugin-baidu-analytics/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/analytics/plugin-baidu-analytics/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/analytics/plugin-google-analytics/CHANGELOG.md b/plugins/analytics/plugin-google-analytics/CHANGELOG.md index e7b78be53d..ac1d2c1bc2 100644 --- a/plugins/analytics/plugin-google-analytics/CHANGELOG.md +++ b/plugins/analytics/plugin-google-analytics/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.42](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.41...v2.0.0-rc.42) (2024-08-22) **Note:** Version bump only for package @vuepress/plugin-google-analytics diff --git a/plugins/analytics/plugin-google-analytics/package.json b/plugins/analytics/plugin-google-analytics/package.json index ddbc1951ea..649b0f7861 100644 --- a/plugins/analytics/plugin-google-analytics/package.json +++ b/plugins/analytics/plugin-google-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-google-analytics", - "version": "2.0.0-rc.42", + "version": "2.0.0-rc.52", "description": "VuePress plugin - google-analytics", "keywords": [ "vuepress-plugin", @@ -33,10 +33,11 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/analytics/plugin-google-analytics/rollup.config.ts b/plugins/analytics/plugin-google-analytics/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/analytics/plugin-google-analytics/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/analytics/plugin-google-analytics/src/shared/index.ts b/plugins/analytics/plugin-google-analytics/src/shared/index.ts index fdc633235f..6b4b334c22 100644 --- a/plugins/analytics/plugin-google-analytics/src/shared/index.ts +++ b/plugins/analytics/plugin-google-analytics/src/shared/index.ts @@ -1 +1 @@ -export * from './types.js' +export type * from './types.js' diff --git a/plugins/analytics/plugin-umami-analytics/CHANGELOG.md b/plugins/analytics/plugin-umami-analytics/CHANGELOG.md index 1cbb37062e..e4f5fff6da 100644 --- a/plugins/analytics/plugin-umami-analytics/CHANGELOG.md +++ b/plugins/analytics/plugin-umami-analytics/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-umami-analytics + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-umami-analytics diff --git a/plugins/analytics/plugin-umami-analytics/package.json b/plugins/analytics/plugin-umami-analytics/package.json index 9f816c5ba5..fa05cc5ef0 100644 --- a/plugins/analytics/plugin-umami-analytics/package.json +++ b/plugins/analytics/plugin-umami-analytics/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-umami-analytics", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - umami-analytics", "keywords": [ "vuepress-plugin", @@ -37,14 +37,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/analytics/plugin-umami-analytics/rollup.config.ts b/plugins/analytics/plugin-umami-analytics/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/analytics/plugin-umami-analytics/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/analytics/plugin-umami-analytics/src/shared/index.ts b/plugins/analytics/plugin-umami-analytics/src/shared/index.ts index a66c7e8d47..65998b2a4f 100644 --- a/plugins/analytics/plugin-umami-analytics/src/shared/index.ts +++ b/plugins/analytics/plugin-umami-analytics/src/shared/index.ts @@ -1 +1 @@ -export * from './options.js' +export type * from './options.js' diff --git a/plugins/blog/plugin-blog/CHANGELOG.md b/plugins/blog/plugin-blog/CHANGELOG.md index 2b67c9a41d..02fa473063 100644 --- a/plugins/blog/plugin-blog/CHANGELOG.md +++ b/plugins/blog/plugin-blog/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-blog + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-blog diff --git a/plugins/blog/plugin-blog/package.json b/plugins/blog/plugin-blog/package.json index a39e540918..cbc5f59908 100644 --- a/plugins/blog/plugin-blog/package.json +++ b/plugins/blog/plugin-blog/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-blog", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - blog", "keywords": [ "vuepress-plugin", @@ -36,15 +36,16 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", "chokidar": "^3.6.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/blog/plugin-blog/rollup.config.ts b/plugins/blog/plugin-blog/rollup.config.ts new file mode 100644 index 0000000000..0c0e783ca8 --- /dev/null +++ b/plugins/blog/plugin-blog/rollup.config.ts @@ -0,0 +1,8 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['chokidar'], + }), + ...rollupBundle('client/index'), +] diff --git a/plugins/blog/plugin-blog/src/client/index.ts b/plugins/blog/plugin-blog/src/client/index.ts index 301276edf1..326fd71287 100644 --- a/plugins/blog/plugin-blog/src/client/index.ts +++ b/plugins/blog/plugin-blog/src/client/index.ts @@ -1,3 +1,3 @@ export * from './composables/index.js' -export * from './typings.js' -export * from '../shared/index.js' +export type * from './typings.js' +export type * from '../shared/index.js' diff --git a/plugins/blog/plugin-blog/src/shared/index.ts b/plugins/blog/plugin-blog/src/shared/index.ts index d6c95f8b07..783f272b9b 100644 --- a/plugins/blog/plugin-blog/src/shared/index.ts +++ b/plugins/blog/plugin-blog/src/shared/index.ts @@ -1,2 +1,2 @@ -export * from './frontmatter.js' -export * from './internal.js' +export type * from './frontmatter.js' +export type * from './internal.js' diff --git a/plugins/blog/plugin-comment/CHANGELOG.md b/plugins/blog/plugin-comment/CHANGELOG.md index 7d169e7542..b87d161f4a 100644 --- a/plugins/blog/plugin-comment/CHANGELOG.md +++ b/plugins/blog/plugin-comment/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.53](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.52...v2.0.0-rc.53) (2024-09-30) + +### Bug Fixes + +- **plugin-comment:** fix rollup config ([7ba0244](https://github.com/vuepress/ecosystem/commit/7ba0244ba39ab3abcf0eaf01bd2b98e3a7c3ca57)) + +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Bug Fixes + +- **plugin-comment:** add missing style import for Waline ([f976a5c](https://github.com/vuepress/ecosystem/commit/f976a5ca619f0e870e40f7ef87b0b83d199b3e20)) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Bug Fixes + +- **plugin-comment:** avoid resolving issues in pnpm ([2e319fe](https://github.com/vuepress/ecosystem/commit/2e319fe75f67419321372c1931419030fa227e1c)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Features diff --git a/plugins/blog/plugin-comment/package.json b/plugins/blog/plugin-comment/package.json index 83211a58e2..7287cbb367 100644 --- a/plugins/blog/plugin-comment/package.json +++ b/plugins/blog/plugin-comment/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-comment", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.53", "description": "VuePress plugin - comment", "keywords": [ "vuepress-plugin", @@ -42,19 +42,20 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, "dependencies": { "@vuepress/helper": "workspace:*", "giscus": "^1.5.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { "@waline/client": "^3.3.1", "artalk": "^2.9.0", "twikoo": "^1.6.39", - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "peerDependenciesMeta": { "@waline/client": { diff --git a/plugins/blog/plugin-comment/rollup.config.ts b/plugins/blog/plugin-comment/rollup.config.ts new file mode 100644 index 0000000000..80895f9dff --- /dev/null +++ b/plugins/blog/plugin-comment/rollup.config.ts @@ -0,0 +1,30 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +const COMMENT_PROVIDERS = ['Artalk', 'Giscus', 'Twikoo', 'Waline'] + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: [ + ...COMMENT_PROVIDERS.map((name) => `components/${name}Comment`), + 'pageview/artalk', + 'pageview/noop', + 'pageview/waline', + 'config', + 'index', + ], + }, + { + external: [ + '@vuepress/plugin-comment/service', + '@waline/client/component', + '@waline/client/pageview', + 'artalk/dist/Artalk.mjs', + 'giscus', + 'twikoo', + ], + }, + ), +] diff --git a/plugins/blog/plugin-comment/src/client/components/WalineComment.ts b/plugins/blog/plugin-comment/src/client/components/WalineComment.ts index c3f8b7ac01..277c528508 100644 --- a/plugins/blog/plugin-comment/src/client/components/WalineComment.ts +++ b/plugins/blog/plugin-comment/src/client/components/WalineComment.ts @@ -18,6 +18,7 @@ import type { import { useWalineOptions } from '../helpers/index.js' import '@waline/client/waline.css' +import '../styles/waline.css' declare const WALINE_META: boolean declare const WALINE_LOCALES: WalineLocaleConfig @@ -78,20 +79,19 @@ export default defineComponent({ walineOptions.value.delay, enablePageViews.value, ], - () => { + async () => { abort?.() + abort = null - if (enablePageViews.value) - void nextTick() - .then(() => wait(walineOptions.value.delay ?? 800)) - .then(() => { - setTimeout(() => { - abort = pageviewCount({ - serverURL: walineOptions.value.serverURL, - path: props.identifier, - }) - }) - }) + if (enablePageViews.value) { + await nextTick() + await wait(walineOptions.value.delay ?? 800) + + abort = pageviewCount({ + serverURL: walineOptions.value.serverURL, + path: props.identifier, + }) + } }, { immediate: true }, ) diff --git a/plugins/blog/plugin-comment/src/client/styles/waline.scss b/plugins/blog/plugin-comment/src/client/styles/waline.scss index 853a8940c4..140cdf75c6 100644 --- a/plugins/blog/plugin-comment/src/client/styles/waline.scss +++ b/plugins/blog/plugin-comment/src/client/styles/waline.scss @@ -1,4 +1,3 @@ -// plugin-comment .waline-wrapper { --waline-bg-color: var(--vp-c-bg); --waline-bg-color-light: var(--v-c-bg-alt); diff --git a/plugins/blog/plugin-comment/src/node/getProvider.ts b/plugins/blog/plugin-comment/src/node/getProvider.ts index 830ce63bb2..e245d0d63b 100644 --- a/plugins/blog/plugin-comment/src/node/getProvider.ts +++ b/plugins/blog/plugin-comment/src/node/getProvider.ts @@ -1,3 +1,4 @@ +import { getRealPath } from '@vuepress/helper' import type { CommentPluginOptions } from './options.js' import { CLIENT_FOLDER, PLUGIN_NAME, logger } from './utils.js' @@ -10,7 +11,7 @@ export const getServiceComponent = (provider = 'None'): string => { if (provider !== 'None') logger.error(`Invalid provider: ${provider}`) - return '@vuepress/helper/noopModule' + return getRealPath('@vuepress/helper/noopModule', import.meta.url) } export const getPageviewChunk = (provider = 'None'): string => diff --git a/plugins/blog/plugin-comment/src/node/index.ts b/plugins/blog/plugin-comment/src/node/index.ts index 3798dafd6a..f0685390bd 100644 --- a/plugins/blog/plugin-comment/src/node/index.ts +++ b/plugins/blog/plugin-comment/src/node/index.ts @@ -1,4 +1,4 @@ export * from './commentPlugin.js' export * from './locales.js' -export * from './options.js' -export * from '../shared/index.js' +export type * from './options.js' +export type * from '../shared/index.js' diff --git a/plugins/blog/plugin-comment/src/shared/index.ts b/plugins/blog/plugin-comment/src/shared/index.ts index d068bd8c9d..dd822833f4 100644 --- a/plugins/blog/plugin-comment/src/shared/index.ts +++ b/plugins/blog/plugin-comment/src/shared/index.ts @@ -1,2 +1,2 @@ -export * from './frontmatter.js' -export * from './options/index.js' +export type * from './frontmatter.js' +export type * from './options/index.js' diff --git a/plugins/blog/plugin-comment/src/shared/options/index.ts b/plugins/blog/plugin-comment/src/shared/options/index.ts index f16936da48..c40e180cf3 100644 --- a/plugins/blog/plugin-comment/src/shared/options/index.ts +++ b/plugins/blog/plugin-comment/src/shared/options/index.ts @@ -1,6 +1,6 @@ -export * from './artalk.js' -export * from './disable.js' -export * from './giscus.js' -export * from './options.js' -export * from './twikoo.js' -export * from './waline.js' +export type * from './artalk.js' +export type * from './disable.js' +export type * from './giscus.js' +export type * from './options.js' +export type * from './twikoo.js' +export type * from './waline.js' diff --git a/plugins/blog/plugin-feed/CHANGELOG.md b/plugins/blog/plugin-feed/CHANGELOG.md index 8074bc53be..786d3a0292 100644 --- a/plugins/blog/plugin-feed/CHANGELOG.md +++ b/plugins/blog/plugin-feed/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- **plugin-feed:** add app as second argument in getter ([08dbf87](https://github.com/vuepress/ecosystem/commit/08dbf87df02cd9764bfe09d9316dba9872411254)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-feed + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-feed diff --git a/plugins/blog/plugin-feed/package.json b/plugins/blog/plugin-feed/package.json index f4eff57cf8..22066b778a 100644 --- a/plugins/blog/plugin-feed/package.json +++ b/plugins/blog/plugin-feed/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-feed", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "Feed plugin for vuepress-theme-hope", "keywords": [ "vuepress", @@ -37,6 +37,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { @@ -47,7 +48,7 @@ "@vuepress/plugin-git": "workspace:*" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/blog/plugin-feed/rollup.config.ts b/plugins/blog/plugin-feed/rollup.config.ts new file mode 100644 index 0000000000..cb22405780 --- /dev/null +++ b/plugins/blog/plugin-feed/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['xml-js'], +}) diff --git a/plugins/blog/plugin-feed/src/node/feed/item.ts b/plugins/blog/plugin-feed/src/node/feed/item.ts index cb45472b93..1102c2c5b6 100644 --- a/plugins/blog/plugin-feed/src/node/feed/item.ts +++ b/plugins/blog/plugin-feed/src/node/feed/item.ts @@ -7,8 +7,7 @@ import { isLinkWithProtocol, isPlainObject, } from '@vuepress/helper' -import type { GitData } from '@vuepress/plugin-git' -import type { App, Page } from 'vuepress/core' +import type { App } from 'vuepress/core' import type { PageFrontmatter } from 'vuepress/shared' import { isString } from 'vuepress/shared' import type { @@ -19,6 +18,7 @@ import type { FeedEnclosure, FeedFrontmatterOption, FeedGetter, + FeedPage, FeedPluginFrontmatter, } from '../../typings/index.js' import type { ResolvedFeedOptions } from '../getFeedOptions.js' @@ -38,10 +38,7 @@ export class FeedItem { public constructor( private readonly app: App, private readonly options: ResolvedFeedOptions, - private readonly page: Page< - { excerpt?: string; git?: GitData }, - FeedPluginFrontmatter - >, + private readonly page: FeedPage, private readonly hostname: string, ) { this.base = this.app.options.base @@ -55,7 +52,8 @@ export class FeedItem { * Feed item title */ public get title(): string { - if (isFunction(this.getter.title)) return this.getter.title(this.page) + if (isFunction(this.getter.title)) + return this.getter.title(this.page, this.app) return this.pageOptions.title || this.page.title } @@ -64,7 +62,8 @@ export class FeedItem { * The URL of the item. */ public get link(): string { - if (isFunction(this.getter.link)) return this.getter.link(this.page) + if (isFunction(this.getter.link)) + return this.getter.link(this.page, this.app) return getUrl(this.hostname, this.base, this.page.path) } @@ -74,7 +73,7 @@ export class FeedItem { */ public get description(): string | null { if (isFunction(this.getter.description)) - return this.getter.description(this.page) + return this.getter.description(this.page, this.app) if (this.pageOptions.description) return this.pageOptions.description @@ -96,7 +95,8 @@ export class FeedItem { * Authors of feed item. */ public get author(): FeedAuthor[] { - if (isFunction(this.getter.author)) return this.getter.author(this.page) + if (isFunction(this.getter.author)) + return this.getter.author(this.page, this.app) if (isArray(this.pageOptions.author)) return this.pageOptions.author @@ -113,7 +113,8 @@ export class FeedItem { * Categories of feed item. */ public get category(): FeedCategory[] | null { - if (isFunction(this.getter.category)) return this.getter.category(this.page) + if (isFunction(this.getter.category)) + return this.getter.category(this.page, this.app) if (isArray(this.pageOptions.category)) return this.pageOptions.category @@ -132,7 +133,7 @@ export class FeedItem { */ public get enclosure(): FeedEnclosure | null { if (isFunction(this.getter.enclosure)) - return this.getter.enclosure(this.page) + return this.getter.enclosure(this.page, this.app) if (this.image) return { @@ -148,7 +149,7 @@ export class FeedItem { */ public get pubDate(): Date | null { if (isFunction(this.getter.publishDate)) - return this.getter.publishDate(this.page) + return this.getter.publishDate(this.page, this.app) const { time, date = time } = this.page.frontmatter @@ -166,7 +167,7 @@ export class FeedItem { */ public get lastUpdated(): Date | null { if (isFunction(this.getter.lastUpdateDate)) - return this.getter.lastUpdateDate(this.page) + return this.getter.lastUpdateDate(this.page, this.app) const { updatedTime } = this.page.data.git ?? {} @@ -177,7 +178,8 @@ export class FeedItem { * Feed item summary */ public get summary(): string | null { - if (isFunction(this.getter.excerpt)) return this.getter.excerpt(this.page) + if (isFunction(this.getter.excerpt)) + return this.getter.excerpt(this.page, this.app) if (this.pageOptions.summary) return this.pageOptions.summary @@ -191,7 +193,8 @@ export class FeedItem { */ public get content(): string { - if (isFunction(this.getter.content)) return this.getter.content(this.page) + if (isFunction(this.getter.content)) + return this.getter.content(this.page, this.app) if (this.pageOptions.content) return this.pageOptions.content @@ -208,7 +211,8 @@ export class FeedItem { * @description json format only */ public get image(): string | null { - if (isFunction(this.getter.image)) return this.getter.image(this.page) + if (isFunction(this.getter.image)) + return this.getter.image(this.page, this.app) const { hostname, base } = this const { banner, cover } = this.frontmatter @@ -243,7 +247,7 @@ export class FeedItem { */ public get contributor(): FeedContributor[] { if (isFunction(this.getter.contributor)) - return this.getter.contributor(this.page) + return this.getter.contributor(this.page, this.app) if (isArray(this.pageOptions.contributor)) return this.pageOptions.contributor @@ -261,7 +265,7 @@ export class FeedItem { */ public get copyright(): string | null { if (isFunction(this.getter.copyright)) - return this.getter.copyright(this.page) + return this.getter.copyright(this.page, this.app) if (isString(this.frontmatter.copyright)) return this.frontmatter.copyright const firstAuthor = this.author[0] diff --git a/plugins/blog/plugin-feed/src/node/getFeedFiles.ts b/plugins/blog/plugin-feed/src/node/getFeedFiles.ts index 131509be4e..75ea016783 100644 --- a/plugins/blog/plugin-feed/src/node/getFeedFiles.ts +++ b/plugins/blog/plugin-feed/src/node/getFeedFiles.ts @@ -1,8 +1,7 @@ import { entries, fromEntries } from '@vuepress/helper' -import type { GitData } from '@vuepress/plugin-git' -import type { App, Page } from 'vuepress/core' +import type { App } from 'vuepress/core' import { colors } from 'vuepress/utils' -import type { FeedConfig, FeedPluginFrontmatter } from '../typings/index.js' +import type { FeedConfig, FeedPage } from '../typings/index.js' import { FeedItem, FeedStore } from './feed/index.js' import { getAtomFeed } from './generator/atom/index.js' import { getJSONFeed } from './generator/json/index.js' @@ -49,7 +48,7 @@ export const getFeedFiles = ( const feedItem = new FeedItem( app, localeOptions, - page as Page<{ git?: GitData }, FeedPluginFrontmatter>, + page as FeedPage, hostname, ) diff --git a/plugins/blog/plugin-feed/src/typings/index.ts b/plugins/blog/plugin-feed/src/typings/index.ts index 32b0ed5f92..c0e49358c5 100644 --- a/plugins/blog/plugin-feed/src/typings/index.ts +++ b/plugins/blog/plugin-feed/src/typings/index.ts @@ -1,4 +1,5 @@ -export * from './feed.js' -export * from './frontmatter.js' -export * from './internal.js' -export * from './options.js' +export type * from './feed.js' +export type * from './frontmatter.js' +export type * from './internal.js' +export type * from './options.js' +export type * from './page.js' diff --git a/plugins/blog/plugin-feed/src/typings/options.ts b/plugins/blog/plugin-feed/src/typings/options.ts index 3297ed3fb0..f9de3a6830 100644 --- a/plugins/blog/plugin-feed/src/typings/options.ts +++ b/plugins/blog/plugin-feed/src/typings/options.ts @@ -1,4 +1,4 @@ -import type { Page } from 'vuepress/core' +import type { App, Page } from 'vuepress/core' import type { FeedAuthor, FeedCategory, @@ -27,6 +27,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string /** @@ -47,6 +48,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string /** @@ -67,6 +69,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string | null /** @@ -87,6 +90,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string | null /** @@ -107,6 +111,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string /** @@ -131,6 +136,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => FeedAuthor[] /** @@ -151,6 +157,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => FeedCategory[] | null /** @@ -171,6 +178,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => FeedEnclosure | null /** @@ -191,6 +199,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => Date | null /** @@ -211,6 +220,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => Date /** @@ -231,6 +241,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string /** @@ -251,6 +262,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => FeedContributor[] /** @@ -271,6 +283,7 @@ export interface FeedGetter { ExtraPageFrontmatter & FeedPluginFrontmatter, ExtraPageFields >, + app: App, ) => string | null } diff --git a/plugins/blog/plugin-feed/src/typings/page.ts b/plugins/blog/plugin-feed/src/typings/page.ts new file mode 100644 index 0000000000..256de05f97 --- /dev/null +++ b/plugins/blog/plugin-feed/src/typings/page.ts @@ -0,0 +1,8 @@ +import type { GitData } from '@vuepress/plugin-git' +import type { Page } from 'vuepress' +import type { FeedPluginFrontmatter } from './frontmatter.js' + +export type FeedPage = Page< + Record & { excerpt?: string; git?: GitData }, + FeedPluginFrontmatter +> diff --git a/plugins/development/plugin-active-header-links/CHANGELOG.md b/plugins/development/plugin-active-header-links/CHANGELOG.md index 71dcb10159..69c7e5c25b 100644 --- a/plugins/development/plugin-active-header-links/CHANGELOG.md +++ b/plugins/development/plugin-active-header-links/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-active-header-links + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-active-header-links diff --git a/plugins/development/plugin-active-header-links/package.json b/plugins/development/plugin-active-header-links/package.json index a3dd390afb..ac35c33b5a 100644 --- a/plugins/development/plugin-active-header-links/package.json +++ b/plugins/development/plugin-active-header-links/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-active-header-links", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - active header links", "keywords": [ "vuepress-plugin", @@ -33,14 +33,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vueuse/core": "^11.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-active-header-links/rollup.config.ts b/plugins/development/plugin-active-header-links/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/development/plugin-active-header-links/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/development/plugin-git/CHANGELOG.md b/plugins/development/plugin-git/CHANGELOG.md index d67f700e52..9b003a0373 100644 --- a/plugins/development/plugin-git/CHANGELOG.md +++ b/plugins/development/plugin-git/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.44](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.43...v2.0.0-rc.44) (2024-09-18) **Note:** Version bump only for package @vuepress/plugin-git diff --git a/plugins/development/plugin-git/package.json b/plugins/development/plugin-git/package.json index 8ddaa5bf60..a9e8b937e0 100644 --- a/plugins/development/plugin-git/package.json +++ b/plugins/development/plugin-git/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-git", - "version": "2.0.0-rc.44", + "version": "2.0.0-rc.52", "description": "VuePress plugin - git", "keywords": [ "vuepress-plugin", @@ -31,13 +31,14 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "execa": "^9.4.0" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-git/rollup.config.ts b/plugins/development/plugin-git/rollup.config.ts new file mode 100644 index 0000000000..8f6d855dee --- /dev/null +++ b/plugins/development/plugin-git/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['execa'], +}) diff --git a/plugins/development/plugin-git/src/node/types.ts b/plugins/development/plugin-git/src/node/types.ts index ae99c332c2..908bd0f262 100644 --- a/plugins/development/plugin-git/src/node/types.ts +++ b/plugins/development/plugin-git/src/node/types.ts @@ -1,8 +1,10 @@ -export interface GitPluginFrontmatter { +import type { PageFrontmatter } from 'vuepress' + +export interface GitPluginFrontmatter extends PageFrontmatter { gitInclude?: string[] } -export interface GitPluginPageData { +export interface GitPluginPageData extends Record { git: GitData } diff --git a/plugins/development/plugin-palette/CHANGELOG.md b/plugins/development/plugin-palette/CHANGELOG.md index 9245512664..9331c47491 100644 --- a/plugins/development/plugin-palette/CHANGELOG.md +++ b/plugins/development/plugin-palette/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-palette + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-palette diff --git a/plugins/development/plugin-palette/package.json b/plugins/development/plugin-palette/package.json index cb31482745..02260c467b 100644 --- a/plugins/development/plugin-palette/package.json +++ b/plugins/development/plugin-palette/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-palette", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - palette", "keywords": [ "vuepress-plugin", @@ -36,14 +36,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", - "chokidar": "^4.0.0" + "chokidar": "^4.0.1" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-palette/rollup.config.ts b/plugins/development/plugin-palette/rollup.config.ts new file mode 100644 index 0000000000..2c083ff01d --- /dev/null +++ b/plugins/development/plugin-palette/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['chokidar'], +}) diff --git a/plugins/development/plugin-reading-time/CHANGELOG.md b/plugins/development/plugin-reading-time/CHANGELOG.md index aa4bdc74b2..3f13630881 100644 --- a/plugins/development/plugin-reading-time/CHANGELOG.md +++ b/plugins/development/plugin-reading-time/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-reading-time + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-reading-time diff --git a/plugins/development/plugin-reading-time/package.json b/plugins/development/plugin-reading-time/package.json index a83e6a4d0d..31145212d4 100644 --- a/plugins/development/plugin-reading-time/package.json +++ b/plugins/development/plugin-reading-time/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-reading-time", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - reading-time", "keywords": [ "vuepress-plugin", @@ -37,14 +37,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-reading-time/rollup.config.ts b/plugins/development/plugin-reading-time/rollup.config.ts new file mode 100644 index 0000000000..e2307c6888 --- /dev/null +++ b/plugins/development/plugin-reading-time/rollup.config.ts @@ -0,0 +1,10 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + dtsExternal: ['@vuepress/helper/shared'], + }), + ...rollupBundle('client/index', { + dtsExternal: ['@vuepress/helper/shared'], + }), +] diff --git a/plugins/development/plugin-reading-time/src/shared/index.ts b/plugins/development/plugin-reading-time/src/shared/index.ts index df5acc3f0a..201ace95ef 100644 --- a/plugins/development/plugin-reading-time/src/shared/index.ts +++ b/plugins/development/plugin-reading-time/src/shared/index.ts @@ -1,2 +1,2 @@ -export * from './data.js' -export * from './locales.js' +export type * from './data.js' +export type * from './locales.js' diff --git a/plugins/development/plugin-rtl/CHANGELOG.md b/plugins/development/plugin-rtl/CHANGELOG.md index 386addbcee..1feaf4d614 100644 --- a/plugins/development/plugin-rtl/CHANGELOG.md +++ b/plugins/development/plugin-rtl/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Bug Fixes + +- **plugin-rtl:** add missing client entry ([da8be48](https://github.com/vuepress/ecosystem/commit/da8be487d81b8b0c5c4e7c5ed455c63667efe369)) +- **plugin-rtl:** fix client imports ([39b43f1](https://github.com/vuepress/ecosystem/commit/39b43f10cdef760708575e360ed643fda6a9ba95)) + +### Features + +- **plugin-rtl:** provide composables ([3d0e4a1](https://github.com/vuepress/ecosystem/commit/3d0e4a18263a9daa0a2b49b1d40fccc219357997)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-rtl + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-rtl diff --git a/plugins/development/plugin-rtl/package.json b/plugins/development/plugin-rtl/package.json index bd200afac9..28b5bcd494 100644 --- a/plugins/development/plugin-rtl/package.json +++ b/plugins/development/plugin-rtl/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-rtl", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - rtl", "keywords": [ "vuepress-plugin", @@ -26,6 +26,7 @@ "type": "module", "exports": { ".": "./lib/node/index.js", + "./client": "./lib/client/index.js", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -35,13 +36,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { - "vue": "^3.5.7" + "@vuepress/helper": "workspace:*", + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-rtl/rollup.config.ts b/plugins/development/plugin-rtl/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/development/plugin-rtl/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/development/plugin-rtl/src/client/composables/index.ts b/plugins/development/plugin-rtl/src/client/composables/index.ts new file mode 100644 index 0000000000..10a321cb53 --- /dev/null +++ b/plugins/development/plugin-rtl/src/client/composables/index.ts @@ -0,0 +1 @@ +export * from './useRtl.js' diff --git a/plugins/development/plugin-rtl/src/client/composables/useRtl.ts b/plugins/development/plugin-rtl/src/client/composables/useRtl.ts new file mode 100644 index 0000000000..db62cb675b --- /dev/null +++ b/plugins/development/plugin-rtl/src/client/composables/useRtl.ts @@ -0,0 +1,51 @@ +import { entries } from '@vuepress/helper/client' +import { onMounted, watch } from 'vue' +import { useRouteLocale } from 'vuepress/client' +import { getElement } from '../utils/index.js' + +/** + * + * @param rtlLocalePaths rtl locale paths + * @param selectorOptions rtl selector options + */ +export const useRtl = ( + rtlLocalePaths: string[], + selectorOptions?: Record>, +): void => { + const routeLocale = useRouteLocale() + + const toggleRTL = (localePath: string): void => { + if (rtlLocalePaths.includes(localePath)) { + entries( + selectorOptions ?? { + html: { dir: 'rtl' }, + }, + ).forEach(([selector, attrs = {}]) => { + const element = getElement(selector) + + if (element) + entries(attrs).forEach(([attr, value]) => { + if (attr === 'class') element.classList.add(value) + else element.setAttribute(attr, value) + }) + }) + document.documentElement.style.setProperty('direction', 'rtl') + } else { + entries(rtlLocalePaths).forEach(([selector, attrs = {}]) => { + const element = getElement(selector) + + if (element) + entries(attrs).forEach(([attr, value]) => { + if (attr === 'class') element.classList.remove(value) + else element.removeAttribute(attr) + }) + }) + + document.documentElement.style.removeProperty('direction') + } + } + + onMounted(() => { + watch(routeLocale, toggleRTL, { immediate: true }) + }) +} diff --git a/plugins/development/plugin-rtl/src/client/config.ts b/plugins/development/plugin-rtl/src/client/config.ts index d7ef77d316..79741a77ed 100644 --- a/plugins/development/plugin-rtl/src/client/config.ts +++ b/plugins/development/plugin-rtl/src/client/config.ts @@ -1,51 +1,11 @@ -import { onMounted, watch } from 'vue' -import { defineClientConfig, useRouteLocale } from 'vuepress/client' +import { defineClientConfig } from 'vuepress/client' +import { useRtl } from './composables/index.js' declare const __RTL_LOCALES__: string[] declare const __RTL_SELECTOR__: Record> -const { entries } = Object - -const getElement = (selector: string): HTMLElement | null => - selector === 'html' - ? document.documentElement - : selector === 'body' - ? document.body - : document.querySelector(selector) - export default defineClientConfig({ setup() { - const routeLocale = useRouteLocale() - - const toggleRTL = (localePath: string): void => { - if (__RTL_LOCALES__.includes(localePath)) { - entries(__RTL_SELECTOR__).forEach(([selector, attrs = {}]) => { - const element = getElement(selector) - - if (element) - entries(attrs).forEach(([attr, value]) => { - if (attr === 'class') element.classList.add(value) - else element.setAttribute(attr, value) - }) - }) - document.documentElement.style.setProperty('direction', 'rtl') - } else { - entries(__RTL_LOCALES__).forEach(([selector, attrs = {}]) => { - const element = getElement(selector) - - if (element) - entries(attrs).forEach(([attr, value]) => { - if (attr === 'class') element.classList.remove(value) - else element.removeAttribute(attr) - }) - }) - - document.documentElement.style.removeProperty('direction') - } - } - - onMounted(() => { - watch(routeLocale, toggleRTL, { immediate: true }) - }) + useRtl(__RTL_LOCALES__, __RTL_SELECTOR__) }, }) diff --git a/plugins/development/plugin-rtl/src/client/index.ts b/plugins/development/plugin-rtl/src/client/index.ts new file mode 100644 index 0000000000..14f996097e --- /dev/null +++ b/plugins/development/plugin-rtl/src/client/index.ts @@ -0,0 +1 @@ +export * from './composables/index.js' diff --git a/plugins/development/plugin-rtl/src/client/utils/index.ts b/plugins/development/plugin-rtl/src/client/utils/index.ts new file mode 100644 index 0000000000..61fee41286 --- /dev/null +++ b/plugins/development/plugin-rtl/src/client/utils/index.ts @@ -0,0 +1,6 @@ +export const getElement = (selector: string): HTMLElement | null => + selector === 'html' + ? document.documentElement + : selector === 'body' + ? document.body + : document.querySelector(selector) diff --git a/plugins/development/plugin-sass-palette/CHANGELOG.md b/plugins/development/plugin-sass-palette/CHANGELOG.md index bc1b56f968..25473df77f 100644 --- a/plugins/development/plugin-sass-palette/CHANGELOG.md +++ b/plugins/development/plugin-sass-palette/CHANGELOG.md @@ -3,6 +3,26 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.51](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.50...v2.0.0-rc.51) (2024-09-23) + +### Features + +- **plugin-sass-palette:** remove variables staring with underscore in generator ([f329800](https://github.com/vuepress/ecosystem/commit/f329800e357e5a27eb1107252977dd98b29affed)) + +# [2.0.0-rc.50](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.49...v2.0.0-rc.50) (2024-09-23) + +**Note:** Version bump only for package @vuepress/plugin-sass-palette + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-sass-palette + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-sass-palette diff --git a/plugins/development/plugin-sass-palette/package.json b/plugins/development/plugin-sass-palette/package.json index 9a09932906..c50e517d46 100644 --- a/plugins/development/plugin-sass-palette/package.json +++ b/plugins/development/plugin-sass-palette/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-sass-palette", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - sass-palette", "keywords": [ "vuepress-plugin", @@ -43,21 +43,22 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", - "chokidar": "^4.0.0" + "chokidar": "^4.0.1" }, "devDependencies": { - "@vuepress/bundler-vite": "2.0.0-rc.15", - "@vuepress/bundler-webpack": "2.0.0-rc.15" + "@vuepress/bundler-vite": "2.0.0-rc.17", + "@vuepress/bundler-webpack": "2.0.0-rc.17" }, "peerDependencies": { "sass": "^1.79.2", "sass-embedded": "^1.79.2", "sass-loader": "^16.0.1", - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "peerDependenciesMeta": { "sass": { diff --git a/plugins/development/plugin-sass-palette/rollup.config.ts b/plugins/development/plugin-sass-palette/rollup.config.ts new file mode 100644 index 0000000000..2c083ff01d --- /dev/null +++ b/plugins/development/plugin-sass-palette/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['chokidar'], +}) diff --git a/plugins/development/plugin-sass-palette/src/node/index.ts b/plugins/development/plugin-sass-palette/src/node/index.ts index 96ee994d8f..50af9fa64c 100644 --- a/plugins/development/plugin-sass-palette/src/node/index.ts +++ b/plugins/development/plugin-sass-palette/src/node/index.ts @@ -1,4 +1,4 @@ -export * from './options.js' +export type * from './options.js' export * from './sassPalettePlugin.js' export * from './removePalettePlugin.js' export * from './useSassPalettePlugin.js' diff --git a/plugins/development/plugin-sass-palette/src/node/injectScssConfigModule.ts b/plugins/development/plugin-sass-palette/src/node/injectScssConfigModule.ts index 1854f34289..288053ac6a 100644 --- a/plugins/development/plugin-sass-palette/src/node/injectScssConfigModule.ts +++ b/plugins/development/plugin-sass-palette/src/node/injectScssConfigModule.ts @@ -57,19 +57,30 @@ export const injectScssConfigModule = ( source: string, file: string, ): Promise => { - const originalContent = isString(originalAdditionalData) + let originalContent = isString(originalAdditionalData) ? `${originalAdditionalData}${source}` : isFunction(originalAdditionalData) ? await originalAdditionalData(source, file) : source - return originalContent.match( - new RegExp( - `@use\\s+["']@sass-palette\\/${getIdPrefix(id)}config["'];`, - ), + if ( + !originalContent.match( + new RegExp( + `@use\\s+(["'])@sass-palette\\/${getIdPrefix(id)}config\\1;`, + ), + ) ) - ? originalContent - : `@use "@sass-palette/${getIdPrefix(id)}config";\n${originalContent}` + originalContent = `@use "@sass-palette/${getIdPrefix(id)}config";\n${originalContent}` + if ( + !originalContent.match( + new RegExp( + `@use\\s+(["'])@sass-palette\\/${getIdPrefix(id)}palette\\1;`, + ), + ) + ) + originalContent = `@use "@sass-palette/${getIdPrefix(id)}palette";\n${originalContent}` + + return originalContent }, }, }, @@ -90,19 +101,31 @@ export const injectScssConfigModule = ( content: string, loaderContext: SassLoaderContext, ): string => { - const originalContent = isString(additionalData) + let originalContent = isString(additionalData) ? `${additionalData}${content}` : isFunction(additionalData) ? additionalData(content, loaderContext) : content - return originalContent.match( - new RegExp( - `@use\\s+(["'])@sass-palette\\/${getIdPrefix(id)}config\\1;`, - ), + if ( + !originalContent.match( + new RegExp( + `@use\\s+(["'])@sass-palette\\/${getIdPrefix(id)}config\\1;`, + ), + ) ) - ? originalContent - : `@use "@sass-palette/${getIdPrefix(id)}config";\n${originalContent}` + originalContent = `@use "@sass-palette/${getIdPrefix(id)}config";\n${originalContent}` + + if ( + !originalContent.match( + new RegExp( + `@use\\s+(["'])@sass-palette\\/${getIdPrefix(id)}palette\\1;`, + ), + ) + ) + originalContent = `@use "@sass-palette/${getIdPrefix(id)}palette";\n${originalContent}` + + return originalContent } webpackBundlerConfig.scss.additionalData = additionalDataHandler diff --git a/plugins/development/plugin-sass-palette/src/node/prepare/prepareConfigSass.ts b/plugins/development/plugin-sass-palette/src/node/prepare/prepareConfigSass.ts index e318c6bcf5..8462893c71 100644 --- a/plugins/development/plugin-sass-palette/src/node/prepare/prepareConfigSass.ts +++ b/plugins/development/plugin-sass-palette/src/node/prepare/prepareConfigSass.ts @@ -1,33 +1,16 @@ import type { App } from 'vuepress/core' import { getIdPrefix, getPath } from '../utils.js' -export interface PrepareConfigOptions { - id: string - defaultConfig: string - defaultPalette?: string - generator: string - userConfig: string - userPalette: string -} - export const prepareConfigSass = ( app: App, - { - id, - defaultConfig, - defaultPalette, - generator, - userConfig, - userPalette, - }: PrepareConfigOptions, + id: string, + defaultConfig: string, + userConfig: string, ): Promise => app.writeTemp( `sass-palette/${getIdPrefix(id)}config.scss`, `\ -${defaultPalette ? `@import "file:///${getPath(defaultPalette)}";` : ''} @import "file:///${getPath(defaultConfig)}"; -@import "file:///${getPath(userPalette)}"; @import "file:///${getPath(userConfig)}"; -@import "file:///${getPath(generator)}"; `, ) diff --git a/plugins/development/plugin-sass-palette/src/node/prepare/prepareInjectSass.ts b/plugins/development/plugin-sass-palette/src/node/prepare/prepareInjectSass.ts index 052e4c9e98..dfa918fcf9 100644 --- a/plugins/development/plugin-sass-palette/src/node/prepare/prepareInjectSass.ts +++ b/plugins/development/plugin-sass-palette/src/node/prepare/prepareInjectSass.ts @@ -6,7 +6,6 @@ export const prepareInjectSass = (app: App, id: string): Promise => `sass-palette/${getIdPrefix(id)}inject.scss`, `\ @use "sass:meta"; - @use "@sass-palette/helper"; @use "@sass-palette/${getIdPrefix(id)}palette"; @@ -14,8 +13,8 @@ $palette-variables: meta.module-variables("${getIdPrefix(id)}palette"); ${ app.env.isDebug ? ` -@debug "${id} palette variables: #{meta.inspect($palette-variables)}"; @debug "${id} config variables: #{meta.inspect(meta.module-variables("${getIdPrefix(id)}config"))}"; +@debug "${id} palette variables: #{meta.inspect($palette-variables)}"; ` : '' } diff --git a/plugins/development/plugin-sass-palette/src/node/prepare/prepareStyleSass.ts b/plugins/development/plugin-sass-palette/src/node/prepare/prepareStyleSass.ts index 1fc2113cda..5590812327 100644 --- a/plugins/development/plugin-sass-palette/src/node/prepare/prepareStyleSass.ts +++ b/plugins/development/plugin-sass-palette/src/node/prepare/prepareStyleSass.ts @@ -8,7 +8,8 @@ export interface PrepareStyleOptions { export const prepareStyleSass = ( app: App, - { id, userStyle }: PrepareStyleOptions, + id: string, + userStyle: string | null, ): Promise => userStyle ? app.writeTemp( diff --git a/plugins/development/plugin-sass-palette/src/node/sassPalettePlugin.ts b/plugins/development/plugin-sass-palette/src/node/sassPalettePlugin.ts index ecebcf2de3..44bc8aa5fe 100644 --- a/plugins/development/plugin-sass-palette/src/node/sassPalettePlugin.ts +++ b/plugins/development/plugin-sass-palette/src/node/sassPalettePlugin.ts @@ -86,25 +86,15 @@ export const sassPalettePlugin = onInitialized: (): Promise => Promise.all([ + prepareConfigSass(app, id, defaultConfig, userConfig), prepareInjectSass(app, id), - - prepareConfigSass(app, { - id, - defaultConfig, - defaultPalette, - generator, - userConfig, - userPalette, - }), - preparePaletteSass(app, { id, defaultPalette, generator, userPalette, }), - - prepareStyleSass(app, { id, userStyle }), + prepareStyleSass(app, id, userStyle), ]).then(() => { if (app.env.isDebug) logger.info(`Style file for ${id} generated`) }), @@ -116,14 +106,7 @@ export const sassPalettePlugin = }) const updateConfig = (): Promise => - prepareConfigSass(app, { - id, - defaultConfig, - defaultPalette, - generator, - userConfig, - userPalette, - }).then(() => { + prepareConfigSass(app, id, defaultConfig, userConfig).then(() => { if (app.env.isDebug) logger.info(`Style file for ${id} updated`) }) @@ -143,15 +126,7 @@ export const sassPalettePlugin = const updatePalette = (): Promise => Promise.all([ - prepareConfigSass(app, { - id, - defaultConfig, - defaultPalette, - generator, - userConfig, - userPalette, - }), - + prepareConfigSass(app, id, defaultConfig, userConfig), preparePaletteSass(app, { id, defaultPalette, @@ -178,7 +153,7 @@ export const sassPalettePlugin = }) const updateStyle = (): Promise => - prepareStyleSass(app, { id, userStyle }).then(() => { + prepareStyleSass(app, id, userStyle).then(() => { if (app.env.isDebug) logger.info(`Style file for ${id} updated`) }) diff --git a/plugins/development/plugin-sass-palette/styles/helper.scss b/plugins/development/plugin-sass-palette/styles/helper.scss index 3048273bd2..f9a940a028 100644 --- a/plugins/development/plugin-sass-palette/styles/helper.scss +++ b/plugins/development/plugin-sass-palette/styles/helper.scss @@ -19,9 +19,20 @@ @for $i from 1 through $length { $char: string.slice($string, $i, $i); - $property: '#{$property}#{if(is-upper-case($char), '-#{string.to-lower-case( - $char - )}',$char)}'; + + @if is-upper-case($char) { + $lower-char: string.to-lower-case($char); + + @if $i != 1 { + $property: '#{$property}-#{$lower-char}'; + } @else { + $property: '#{$property}#{$lower-char}'; + } + } @else if $char == '_' { + $property: '#{$property}-'; + } @else { + $property: '#{$property}#{$char}'; + } } @return $property; @@ -73,19 +84,21 @@ @each $name, $value in $variables { $key: camel-to-kebab($name); - @if meta.type-of($value) == number or meta.type-of($value) == string { - $root-variables: map.set($root-variables, $key, $value); - } @else if color-is-legal($value) { - $light-color: get-color($value, false); - $dark-color: get-color($value, true); - $root-variables: map.set($root-variables, $key, $light-color); - - @if $light-color != $dark-color { - $dark-variables: map.set( - $dark-variables, - $key, - get-color($value, true) - ); + @if string.slice($name, 1, 1) != '_' { + @if meta.type-of($value) == number or meta.type-of($value) == string { + $root-variables: map.set($root-variables, $key, $value); + } @else if color-is-legal($value) { + $light-color: get-color($value, false); + $dark-color: get-color($value, true); + $root-variables: map.set($root-variables, $key, $light-color); + + @if $light-color != $dark-color { + $dark-variables: map.set( + $dark-variables, + $key, + get-color($value, true) + ); + } } } } diff --git a/plugins/development/plugin-theme-data/CHANGELOG.md b/plugins/development/plugin-theme-data/CHANGELOG.md index 456dcbad83..4d310fe066 100644 --- a/plugins/development/plugin-theme-data/CHANGELOG.md +++ b/plugins/development/plugin-theme-data/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-theme-data + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-theme-data diff --git a/plugins/development/plugin-theme-data/package.json b/plugins/development/plugin-theme-data/package.json index 90789ec5b5..e58594eda1 100644 --- a/plugins/development/plugin-theme-data/package.json +++ b/plugins/development/plugin-theme-data/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-theme-data", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - theme data", "keywords": [ "vuepress-plugin", @@ -32,15 +32,16 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.d.ts\" lib" }, "dependencies": { - "@vue/devtools-api": "^6.6.4", - "vue": "^3.5.7" + "@vue/devtools-api": "^7.4.6", + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-theme-data/rollup.config.ts b/plugins/development/plugin-theme-data/rollup.config.ts new file mode 100644 index 0000000000..f5a76b44ef --- /dev/null +++ b/plugins/development/plugin-theme-data/rollup.config.ts @@ -0,0 +1,14 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + external: ['@internal/themeData', '@vue/devtools-api'], + }, + ), +] diff --git a/plugins/development/plugin-theme-data/src/shared/index.ts b/plugins/development/plugin-theme-data/src/shared/index.ts index c7ee2c139e..7e06208794 100644 --- a/plugins/development/plugin-theme-data/src/shared/index.ts +++ b/plugins/development/plugin-theme-data/src/shared/index.ts @@ -1 +1 @@ -export * from './themeData.js' +export type * from './themeData.js' diff --git a/plugins/development/plugin-toc/CHANGELOG.md b/plugins/development/plugin-toc/CHANGELOG.md index d2a576b368..e176b66789 100644 --- a/plugins/development/plugin-toc/CHANGELOG.md +++ b/plugins/development/plugin-toc/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-toc + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-toc diff --git a/plugins/development/plugin-toc/package.json b/plugins/development/plugin-toc/package.json index 3c60948d6f..ec6ada80cb 100644 --- a/plugins/development/plugin-toc/package.json +++ b/plugins/development/plugin-toc/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-toc", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - toc", "keywords": [ "vuepress-plugin", @@ -32,14 +32,15 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { - "vue": "^3.5.7", + "vue": "^3.5.10", "vue-router": "^4.4.5" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/development/plugin-toc/rollup.config.ts b/plugins/development/plugin-toc/rollup.config.ts new file mode 100644 index 0000000000..9f687c6c3c --- /dev/null +++ b/plugins/development/plugin-toc/rollup.config.ts @@ -0,0 +1,14 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + external: ['vue-router'], + }, + ), +] diff --git a/plugins/development/plugin-toc/src/shared/index.ts b/plugins/development/plugin-toc/src/shared/index.ts index fdc633235f..6b4b334c22 100644 --- a/plugins/development/plugin-toc/src/shared/index.ts +++ b/plugins/development/plugin-toc/src/shared/index.ts @@ -1 +1 @@ -export * from './types.js' +export type * from './types.js' diff --git a/plugins/features/plugin-back-to-top/CHANGELOG.md b/plugins/features/plugin-back-to-top/CHANGELOG.md index 19e55dc7b0..c415afe338 100644 --- a/plugins/features/plugin-back-to-top/CHANGELOG.md +++ b/plugins/features/plugin-back-to-top/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-back-to-top + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-back-to-top diff --git a/plugins/features/plugin-back-to-top/package.json b/plugins/features/plugin-back-to-top/package.json index cf130d030b..496be41065 100644 --- a/plugins/features/plugin-back-to-top/package.json +++ b/plugins/features/plugin-back-to-top/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-back-to-top", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - back to top", "keywords": [ "vuepress-plugin", @@ -32,6 +32,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.svg\" lib", "style": "sass src:lib --embed-sources --style=compressed" @@ -39,10 +40,10 @@ "dependencies": { "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-back-to-top/rollup.config.ts b/plugins/features/plugin-back-to-top/rollup.config.ts new file mode 100644 index 0000000000..4788abdb9c --- /dev/null +++ b/plugins/features/plugin-back-to-top/rollup.config.ts @@ -0,0 +1,11 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + dtsExternal: ['@vuepress/helper/shared'], + }), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/features/plugin-back-to-top/src/shared/index.ts b/plugins/features/plugin-back-to-top/src/shared/index.ts index 3b157fa5a9..4ed618382e 100644 --- a/plugins/features/plugin-back-to-top/src/shared/index.ts +++ b/plugins/features/plugin-back-to-top/src/shared/index.ts @@ -1 +1 @@ -export * from './locales.js' +export type * from './locales.js' diff --git a/plugins/features/plugin-catalog/CHANGELOG.md b/plugins/features/plugin-catalog/CHANGELOG.md index e80a57ae08..b81d6abb49 100644 --- a/plugins/features/plugin-catalog/CHANGELOG.md +++ b/plugins/features/plugin-catalog/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-catalog + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-catalog diff --git a/plugins/features/plugin-catalog/package.json b/plugins/features/plugin-catalog/package.json index 9f651b6491..0c5d8a9304 100644 --- a/plugins/features/plugin-catalog/package.json +++ b/plugins/features/plugin-catalog/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-catalog", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - catalog", "keywords": [ "vuepress-plugin", @@ -37,15 +37,16 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, "dependencies": { "@vuepress/helper": "workspace:*", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-catalog/rollup.config.ts b/plugins/features/plugin-catalog/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/features/plugin-catalog/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/features/plugin-catalog/src/node/index.ts b/plugins/features/plugin-catalog/src/node/index.ts index 4ea176963b..c1894cdaa0 100644 --- a/plugins/features/plugin-catalog/src/node/index.ts +++ b/plugins/features/plugin-catalog/src/node/index.ts @@ -1,3 +1,3 @@ export * from './catalogPlugin.js' -export * from './options.js' +export type * from './options.js' export type * from '../shared/index.js' diff --git a/plugins/features/plugin-catalog/src/shared/index.ts b/plugins/features/plugin-catalog/src/shared/index.ts index 3b157fa5a9..4ed618382e 100644 --- a/plugins/features/plugin-catalog/src/shared/index.ts +++ b/plugins/features/plugin-catalog/src/shared/index.ts @@ -1 +1 @@ -export * from './locales.js' +export type * from './locales.js' diff --git a/plugins/features/plugin-copy-code/CHANGELOG.md b/plugins/features/plugin-copy-code/CHANGELOG.md index 057ddc9605..1a01d29c61 100644 --- a/plugins/features/plugin-copy-code/CHANGELOG.md +++ b/plugins/features/plugin-copy-code/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-copy-code + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-copy-code diff --git a/plugins/features/plugin-copy-code/package.json b/plugins/features/plugin-copy-code/package.json index 24314565cd..4589c31eea 100644 --- a/plugins/features/plugin-copy-code/package.json +++ b/plugins/features/plugin-copy-code/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-copy-code", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - copy code block", "keywords": [ "vuepress-plugin", @@ -27,7 +27,7 @@ "type": "module", "exports": { ".": "./lib/node/index.js", - "./client/*": "./lib/client/*", + "./client": "./lib/client/index.js", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -37,6 +37,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.svg\" lib", "style": "sass src:lib --embed-sources --style=compressed" @@ -44,10 +45,10 @@ "dependencies": { "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-copy-code/rollup.config.ts b/plugins/features/plugin-copy-code/rollup.config.ts new file mode 100644 index 0000000000..4a44353832 --- /dev/null +++ b/plugins/features/plugin-copy-code/rollup.config.ts @@ -0,0 +1,16 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + dtsExternal: ['@vuepress/helper/shared'], + }), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + dtsExternal: ['@vuepress/helper/shared'], + }, + ), +] diff --git a/plugins/features/plugin-copy-code/src/shared/index.ts b/plugins/features/plugin-copy-code/src/shared/index.ts index 3b157fa5a9..4ed618382e 100644 --- a/plugins/features/plugin-copy-code/src/shared/index.ts +++ b/plugins/features/plugin-copy-code/src/shared/index.ts @@ -1 +1 @@ -export * from './locales.js' +export type * from './locales.js' diff --git a/plugins/features/plugin-copyright/CHANGELOG.md b/plugins/features/plugin-copyright/CHANGELOG.md index dba8a50a13..51cd8d3a35 100644 --- a/plugins/features/plugin-copyright/CHANGELOG.md +++ b/plugins/features/plugin-copyright/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- **plugin-copyright:** provide composables ([a9b6e98](https://github.com/vuepress/ecosystem/commit/a9b6e98ac9300c9a485cb317afb050b0a3e4d9eb)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-copyright + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-copyright diff --git a/plugins/features/plugin-copyright/package.json b/plugins/features/plugin-copyright/package.json index 91e1b0bf6d..a87b11cc58 100644 --- a/plugins/features/plugin-copyright/package.json +++ b/plugins/features/plugin-copyright/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-copyright", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - copyright", "keywords": [ "vuepress-plugin", @@ -26,7 +26,7 @@ "type": "module", "exports": { ".": "./lib/node/index.js", - "./client/*": "./lib/client/*", + "./client": "./lib/client/index.js", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -36,15 +36,16 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-copyright/rollup.config.ts b/plugins/features/plugin-copyright/rollup.config.ts new file mode 100644 index 0000000000..ce3991c71a --- /dev/null +++ b/plugins/features/plugin-copyright/rollup.config.ts @@ -0,0 +1,14 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + dtsExternal: ['@vuepress/helper/client'], + }, + ), +] diff --git a/plugins/features/plugin-copyright/src/client/composables/setupCopyright.ts b/plugins/features/plugin-copyright/src/client/composables/setupCopyright.ts index 9a76ef8c62..a34fb341b9 100644 --- a/plugins/features/plugin-copyright/src/client/composables/setupCopyright.ts +++ b/plugins/features/plugin-copyright/src/client/composables/setupCopyright.ts @@ -9,69 +9,55 @@ import { import { useEventListener } from '@vueuse/core' import { computed, onMounted, watchEffect } from 'vue' import { usePageData, usePageFrontmatter } from 'vuepress/client' -import type { CopyrightPluginOptions } from '../../node/options.js' import type { CopyrightPluginFrontmatter, CopyrightPluginLocaleData, CopyrightPluginPageData, } from '../../shared/index.js' +import type { CopyrightPluginClientOptions } from '../typings.js' -declare const __COPYRIGHT_OPTIONS__: Required< - Pick< - CopyrightPluginOptions, - | 'author' - | 'canonical' - | 'disableCopy' - | 'disableSelection' - | 'global' - | 'license' - | 'maxLength' - | 'triggerLength' - > -> - -declare const __COPYRIGHT_LOCALES__: ExactLocaleConfig - -const copyrightOptions = __COPYRIGHT_OPTIONS__ -const { canonical } = copyrightOptions - -export const setupCopyright = (): void => { +export const setupCopyright = ( + options: CopyrightPluginClientOptions, + locales: ExactLocaleConfig, +): void => { + const locale = useLocaleConfig(locales) const frontmatter = usePageFrontmatter() - const locale = useLocaleConfig(__COPYRIGHT_LOCALES__) const page = usePageData() const enabled = computed( () => Boolean(frontmatter.value.copy) || - (frontmatter.value.copy !== false && copyrightOptions.global), + (frontmatter.value.copy !== false && options.global), ) - const copyOptions = computed(() => + const frontmatterOptions = computed(() => isPlainObject(frontmatter.value.copy) ? frontmatter.value.copy : null, ) const disableCopy = computed( - () => copyOptions.value?.disableCopy ?? copyrightOptions.disableCopy, + () => frontmatterOptions.value?.disableCopy ?? options.disableCopy ?? false, ) const disableSelection = computed(() => enabled.value - ? (copyOptions.value?.disableSelection ?? - copyrightOptions.disableSelection) + ? (frontmatterOptions.value?.disableSelection ?? + options.disableSelection ?? + false) : false, ) const maxLength = computed(() => enabled.value - ? (copyOptions.value?.maxLength ?? copyrightOptions.maxLength) + ? (frontmatterOptions.value?.maxLength ?? options.maxLength ?? 0) : 0, ) const triggerLength = computed( - () => copyOptions.value?.triggerLength ?? copyrightOptions.triggerLength, + () => + frontmatterOptions.value?.triggerLength ?? options.triggerLength ?? 100, ) - const getLink = (): string => + const getLink = (canonical?: string): string => canonical ? `${removeEndingSlash( isLinkHttp(canonical) ? canonical : `https://${canonical}`, @@ -79,15 +65,15 @@ export const setupCopyright = (): void => { : window.location.href const getCopyrightContent = ( - authorInfo: string, - licenseInfo: string, + authorInfo?: string, + licenseInfo?: string, ): string => { const { author, license, link } = locale.value return [ authorInfo ? author.replace(':author', authorInfo) : '', licenseInfo ? license.replace(':license', licenseInfo) : '', - link.replace(':link', getLink()), + link.replace(':link', getLink(options.canonical)), ] .filter((item) => item) .join('\n') @@ -100,8 +86,8 @@ export const setupCopyright = (): void => { const { author, license } = page.value.copyright ?? {} return getCopyrightContent( - author ?? copyrightOptions.author, - license ?? copyrightOptions.license, + author ?? options.author, + license ?? options.license, ) } diff --git a/plugins/features/plugin-copyright/src/client/config.ts b/plugins/features/plugin-copyright/src/client/config.ts index 936958ed88..80f73c8eb4 100644 --- a/plugins/features/plugin-copyright/src/client/config.ts +++ b/plugins/features/plugin-copyright/src/client/config.ts @@ -1,8 +1,15 @@ +import type { ExactLocaleConfig } from '@vuepress/helper/client' import { defineClientConfig } from 'vuepress/client' +import type { CopyrightPluginLocaleData } from '../shared/index.js' import { setupCopyright } from './composables/index.js' +import type { CopyrightPluginClientOptions } from './typings.js' + +declare const __COPYRIGHT_OPTIONS__: CopyrightPluginClientOptions + +declare const __COPYRIGHT_LOCALES__: ExactLocaleConfig export default defineClientConfig({ setup: () => { - setupCopyright() + setupCopyright(__COPYRIGHT_OPTIONS__, __COPYRIGHT_LOCALES__) }, }) diff --git a/plugins/features/plugin-copyright/src/client/index.ts b/plugins/features/plugin-copyright/src/client/index.ts new file mode 100644 index 0000000000..9cf94d7bbe --- /dev/null +++ b/plugins/features/plugin-copyright/src/client/index.ts @@ -0,0 +1,2 @@ +export * from './composables/index.js' +export type * from './typings.js' diff --git a/plugins/features/plugin-copyright/src/client/typings.ts b/plugins/features/plugin-copyright/src/client/typings.ts new file mode 100644 index 0000000000..263266e297 --- /dev/null +++ b/plugins/features/plugin-copyright/src/client/typings.ts @@ -0,0 +1,3 @@ +import type { CopyrightPluginSharedOptions } from '../shared/options.js' + +export type CopyrightPluginClientOptions = CopyrightPluginSharedOptions diff --git a/plugins/features/plugin-copyright/src/node/options.ts b/plugins/features/plugin-copyright/src/node/options.ts index 69e1ea5d14..ba21e9ab8b 100644 --- a/plugins/features/plugin-copyright/src/node/options.ts +++ b/plugins/features/plugin-copyright/src/node/options.ts @@ -1,15 +1,11 @@ import type { Page } from 'vuepress/core' import type { LocaleConfig } from 'vuepress/shared' -import type { CopyrightPluginLocaleData } from '../shared/locales.js' - -export interface CopyrightPluginOptions { - /** - * Default Author Information - * - * 默认作者信息 - */ - author?: string +import type { + CopyrightPluginLocaleData, + CopyrightPluginSharedOptions, +} from '../shared/index.js' +export interface CopyrightPluginOptions extends CopyrightPluginSharedOptions { /** * Author Getter * @@ -26,13 +22,6 @@ export interface CopyrightPluginOptions { page: Page, ) => string | null - /** - * Default License Information - * - * 默认协议信息 - */ - license?: string - /** * License getter * @@ -65,70 +54,10 @@ export interface CopyrightPluginOptions { page: Page, ) => string | null - /** - * Min length triggering copyright append - * - * 触发附加版权的最小长度 - * - * @default 100 - */ - triggerLength?: number - - /** - * Max length that allows to copy - * - * @description 0 means unlimited - * - * 允许复制的最大字数 - * - * @description 0 表示无限制 - * - * @default 0 - */ - maxLength?: number - - /** - * Whether enabled globally - * - * 是否全局启用 - * - * @default false - */ - global?: boolean - - /** - * Disable copy - * - * 禁用复制 - * - * @default false - */ - disableCopy?: boolean - - /** - * Disable selection - * - * 禁用选择 - * - * @default false - */ - disableSelection?: boolean - /** * Locales config for copyright * * 复制版权的多语言配置 */ locales?: LocaleConfig - - /** - * Canonical hostname with base - * - * @description This is useful when your content are deployed in multiple places - * - * 首选域名与部署目录 - * - * @description 当你在多个站点部署内容时很有用。 - */ - canonical?: string } diff --git a/plugins/features/plugin-copyright/src/shared/data.ts b/plugins/features/plugin-copyright/src/shared/data.ts index ded1e9acb8..64da437883 100644 --- a/plugins/features/plugin-copyright/src/shared/data.ts +++ b/plugins/features/plugin-copyright/src/shared/data.ts @@ -3,6 +3,6 @@ export interface CopyrightInfoData { license?: string } -export interface CopyrightPluginPageData { +export interface CopyrightPluginPageData extends Record { copyright?: CopyrightInfoData | string } diff --git a/plugins/features/plugin-copyright/src/shared/frontmatter.ts b/plugins/features/plugin-copyright/src/shared/frontmatter.ts index 0e44837a1a..37acd7e0c2 100644 --- a/plugins/features/plugin-copyright/src/shared/frontmatter.ts +++ b/plugins/features/plugin-copyright/src/shared/frontmatter.ts @@ -1,4 +1,6 @@ -export interface CopyrightPluginFrontmatter { +import type { PageFrontmatter } from 'vuepress/shared' + +export interface CopyrightPluginFrontmatter extends PageFrontmatter { copy?: | boolean | { diff --git a/plugins/features/plugin-copyright/src/shared/index.ts b/plugins/features/plugin-copyright/src/shared/index.ts index b2e392e38e..fd65294f1e 100644 --- a/plugins/features/plugin-copyright/src/shared/index.ts +++ b/plugins/features/plugin-copyright/src/shared/index.ts @@ -1,3 +1,4 @@ -export * from './data.js' -export * from './frontmatter.js' -export * from './locales.js' +export type * from './data.js' +export type * from './frontmatter.js' +export type * from './locales.js' +export type * from './options.js' diff --git a/plugins/features/plugin-copyright/src/shared/options.ts b/plugins/features/plugin-copyright/src/shared/options.ts new file mode 100644 index 0000000000..51081da7dc --- /dev/null +++ b/plugins/features/plugin-copyright/src/shared/options.ts @@ -0,0 +1,75 @@ +export interface CopyrightPluginSharedOptions { + /** + * Default Author Information + * + * 默认作者信息 + */ + author?: string + + /** + * Default License Information + * + * 默认协议信息 + */ + license?: string + + /** + * Canonical hostname with base + * + * @description This is useful when your content are deployed in multiple places + * + * 首选域名与部署目录 + * + * @description 当你在多个站点部署内容时很有用。 + */ + canonical?: string + + /** + * Whether enabled globally + * + * 是否全局启用 + * + * @default false + */ + global?: boolean + + /** + * Disable copy + * + * 禁用复制 + * + * @default false + */ + disableCopy?: boolean + + /** + * Disable selection + * + * 禁用选择 + * + * @default false + */ + disableSelection?: boolean + + /** + * Min length triggering copyright append + * + * 触发附加版权的最小长度 + * + * @default 100 + */ + triggerLength?: number + + /** + * Max length that allows to copy + * + * @description 0 means unlimited + * + * 允许复制的最大字数 + * + * @description 0 表示无限制 + * + * @default 0 + */ + maxLength?: number +} diff --git a/plugins/features/plugin-medium-zoom/CHANGELOG.md b/plugins/features/plugin-medium-zoom/CHANGELOG.md index 61d258f80a..45d974f639 100644 --- a/plugins/features/plugin-medium-zoom/CHANGELOG.md +++ b/plugins/features/plugin-medium-zoom/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-medium-zoom + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-medium-zoom diff --git a/plugins/features/plugin-medium-zoom/package.json b/plugins/features/plugin-medium-zoom/package.json index 1302e5af1a..5ca7a282e8 100644 --- a/plugins/features/plugin-medium-zoom/package.json +++ b/plugins/features/plugin-medium-zoom/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-medium-zoom", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - medium-zoom", "keywords": [ "vuepress-plugin", @@ -34,16 +34,17 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.css\" lib" }, "dependencies": { "@vuepress/helper": "workspace:*", "medium-zoom": "^1.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-medium-zoom/rollup.config.ts b/plugins/features/plugin-medium-zoom/rollup.config.ts new file mode 100644 index 0000000000..70cccd23fa --- /dev/null +++ b/plugins/features/plugin-medium-zoom/rollup.config.ts @@ -0,0 +1,12 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { external: ['medium-zoom'] }, + ), +] diff --git a/plugins/features/plugin-notice/CHANGELOG.md b/plugins/features/plugin-notice/CHANGELOG.md index 4d0abbf912..b8ead57791 100644 --- a/plugins/features/plugin-notice/CHANGELOG.md +++ b/plugins/features/plugin-notice/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-notice + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-notice diff --git a/plugins/features/plugin-notice/package.json b/plugins/features/plugin-notice/package.json index 00bcb56541..3ff49ad2f4 100644 --- a/plugins/features/plugin-notice/package.json +++ b/plugins/features/plugin-notice/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-notice", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - back to top", "keywords": [ "vuepress-plugin", @@ -32,6 +32,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.svg\" lib", "style": "sass src:lib --embed-sources --style=compressed" @@ -39,10 +40,10 @@ "dependencies": { "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-notice/rollup.config.ts b/plugins/features/plugin-notice/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/features/plugin-notice/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/features/plugin-notice/src/shared/index.ts b/plugins/features/plugin-notice/src/shared/index.ts index a1480ff745..81d4cb3b87 100644 --- a/plugins/features/plugin-notice/src/shared/index.ts +++ b/plugins/features/plugin-notice/src/shared/index.ts @@ -1 +1 @@ -export * from './notice.js' +export type * from './notice.js' diff --git a/plugins/features/plugin-nprogress/CHANGELOG.md b/plugins/features/plugin-nprogress/CHANGELOG.md index 2f0af6d27a..b6d43d2c9e 100644 --- a/plugins/features/plugin-nprogress/CHANGELOG.md +++ b/plugins/features/plugin-nprogress/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-nprogress + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-nprogress diff --git a/plugins/features/plugin-nprogress/package.json b/plugins/features/plugin-nprogress/package.json index cad693f1a5..ea28406b76 100644 --- a/plugins/features/plugin-nprogress/package.json +++ b/plugins/features/plugin-nprogress/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-nprogress", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - nprogress", "keywords": [ "vuepress-plugin", @@ -32,15 +32,16 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.css\" lib" }, "dependencies": { "@vuepress/helper": "workspace:*", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-nprogress/rollup.config.ts b/plugins/features/plugin-nprogress/rollup.config.ts new file mode 100644 index 0000000000..86a1f5ac55 --- /dev/null +++ b/plugins/features/plugin-nprogress/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['config', 'index'], + }), +] diff --git a/plugins/features/plugin-photo-swipe/CHANGELOG.md b/plugins/features/plugin-photo-swipe/CHANGELOG.md index 1c1da032d4..2ab4c77724 100644 --- a/plugins/features/plugin-photo-swipe/CHANGELOG.md +++ b/plugins/features/plugin-photo-swipe/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-photo-swipe + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-photo-swipe diff --git a/plugins/features/plugin-photo-swipe/package.json b/plugins/features/plugin-photo-swipe/package.json index cdabb21d26..fad88316d4 100644 --- a/plugins/features/plugin-photo-swipe/package.json +++ b/plugins/features/plugin-photo-swipe/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-photo-swipe", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - photo-swipe", "keywords": [ "vuepress-plugin", @@ -29,7 +29,6 @@ "exports": { ".": "./lib/node/index.js", "./client": "./lib/client/index.js", - "./client/*": "./lib/client/*", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -39,6 +38,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -46,10 +46,10 @@ "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", "photoswipe": "^5.4.4", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-photo-swipe/rollup.config.ts b/plugins/features/plugin-photo-swipe/rollup.config.ts new file mode 100644 index 0000000000..8756c595b1 --- /dev/null +++ b/plugins/features/plugin-photo-swipe/rollup.config.ts @@ -0,0 +1,14 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + external: ['photoswipe'], + }, + ), +] diff --git a/plugins/features/plugin-photo-swipe/src/client/utils/index.ts b/plugins/features/plugin-photo-swipe/src/client/utils/index.ts index 20135e4280..04d660f908 100644 --- a/plugins/features/plugin-photo-swipe/src/client/utils/index.ts +++ b/plugins/features/plugin-photo-swipe/src/client/utils/index.ts @@ -1,4 +1,4 @@ export * from './createPhotoSwipe.js' export * from './images.js' export * from './usePhotoSwipe.js' -export * from './typings.js' +export type * from './typings.js' diff --git a/plugins/features/plugin-photo-swipe/src/shared/index.ts b/plugins/features/plugin-photo-swipe/src/shared/index.ts index 3b157fa5a9..4ed618382e 100644 --- a/plugins/features/plugin-photo-swipe/src/shared/index.ts +++ b/plugins/features/plugin-photo-swipe/src/shared/index.ts @@ -1 +1 @@ -export * from './locales.js' +export type * from './locales.js' diff --git a/plugins/features/plugin-watermark/CHANGELOG.md b/plugins/features/plugin-watermark/CHANGELOG.md index 3d5cb369c7..b2b0720540 100644 --- a/plugins/features/plugin-watermark/CHANGELOG.md +++ b/plugins/features/plugin-watermark/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-watermark + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-watermark diff --git a/plugins/features/plugin-watermark/package.json b/plugins/features/plugin-watermark/package.json index 0c68d7b237..63ac7a9636 100644 --- a/plugins/features/plugin-watermark/package.json +++ b/plugins/features/plugin-watermark/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-watermark", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - watermark", "keywords": [ "vuepress-plugin", @@ -32,15 +32,16 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*", - "vue": "^3.5.7", - "watermark-js-plus": "^1.5.6" + "vue": "^3.5.10", + "watermark-js-plus": "^1.5.7" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/features/plugin-watermark/rollup.config.ts b/plugins/features/plugin-watermark/rollup.config.ts new file mode 100644 index 0000000000..114d1c347f --- /dev/null +++ b/plugins/features/plugin-watermark/rollup.config.ts @@ -0,0 +1,14 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + external: ['watermark-js-plus'], + }, + ), +] diff --git a/plugins/features/plugin-watermark/src/client/index.ts b/plugins/features/plugin-watermark/src/client/index.ts index cd566e1947..48f935e3e8 100644 --- a/plugins/features/plugin-watermark/src/client/index.ts +++ b/plugins/features/plugin-watermark/src/client/index.ts @@ -1,3 +1,3 @@ export * from './composables/index.js' export * from './helper/index.js' -export * from '../shared/index.js' +export type * from '../shared/index.js' diff --git a/plugins/features/plugin-watermark/src/node/index.ts b/plugins/features/plugin-watermark/src/node/index.ts index 5ace105e6c..2463c6ae8a 100644 --- a/plugins/features/plugin-watermark/src/node/index.ts +++ b/plugins/features/plugin-watermark/src/node/index.ts @@ -1,3 +1,3 @@ -export * from './options.js' +export type * from './options.js' export * from './watermarkPlugin.js' -export * from '../shared/index.js' +export type * from '../shared/index.js' diff --git a/plugins/features/plugin-watermark/src/shared/index.ts b/plugins/features/plugin-watermark/src/shared/index.ts index a66c7e8d47..65998b2a4f 100644 --- a/plugins/features/plugin-watermark/src/shared/index.ts +++ b/plugins/features/plugin-watermark/src/shared/index.ts @@ -1 +1 @@ -export * from './options.js' +export type * from './options.js' diff --git a/plugins/features/plugin-watermark/src/shared/options.ts b/plugins/features/plugin-watermark/src/shared/options.ts index abea21c479..6d3532bab4 100644 --- a/plugins/features/plugin-watermark/src/shared/options.ts +++ b/plugins/features/plugin-watermark/src/shared/options.ts @@ -1,3 +1,4 @@ +import type { PageFrontmatter } from 'vuepress/shared' import type { WatermarkOptions as _WatermarkRawOptions } from 'watermark-js-plus' export type WatermarkPureOptions = Omit< @@ -19,6 +20,6 @@ export type WatermarkPureOptions = Omit< parent?: 'body' | (string & { __z_ignore?: never }) } -export interface WatermarkPluginFrontmatter { +export interface WatermarkPluginFrontmatter extends PageFrontmatter { watermark?: WatermarkPureOptions | boolean } diff --git a/plugins/markdown/plugin-append-date/CHANGELOG.md b/plugins/markdown/plugin-append-date/CHANGELOG.md index ac36037246..b651dff8a3 100644 --- a/plugins/markdown/plugin-append-date/CHANGELOG.md +++ b/plugins/markdown/plugin-append-date/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-append-date + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-append-date diff --git a/plugins/markdown/plugin-append-date/package.json b/plugins/markdown/plugin-append-date/package.json index 2a66684920..4517b133f4 100644 --- a/plugins/markdown/plugin-append-date/package.json +++ b/plugins/markdown/plugin-append-date/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-append-date", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - append date", "keywords": [ "vuepress-plugin", @@ -35,6 +35,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { @@ -42,7 +43,7 @@ }, "peerDependencies": { "@vuepress/plugin-git": "workspace:*", - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/markdown/plugin-append-date/rollup.config.ts b/plugins/markdown/plugin-append-date/rollup.config.ts new file mode 100644 index 0000000000..a2d0fd0ec0 --- /dev/null +++ b/plugins/markdown/plugin-append-date/rollup.config.ts @@ -0,0 +1,3 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index') diff --git a/plugins/markdown/plugin-append-date/src/node/index.ts b/plugins/markdown/plugin-append-date/src/node/index.ts index 7011377e74..9b61dd5c20 100644 --- a/plugins/markdown/plugin-append-date/src/node/index.ts +++ b/plugins/markdown/plugin-append-date/src/node/index.ts @@ -1,2 +1,2 @@ export * from './appendDatePlugin.js' -export * from './options.js' +export type * from './options.js' diff --git a/plugins/markdown/plugin-links-check/CHANGELOG.md b/plugins/markdown/plugin-links-check/CHANGELOG.md index f69ef739c7..df7e9fef12 100644 --- a/plugins/markdown/plugin-links-check/CHANGELOG.md +++ b/plugins/markdown/plugin-links-check/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-links-check + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-links-check diff --git a/plugins/markdown/plugin-links-check/package.json b/plugins/markdown/plugin-links-check/package.json index 3609fdc1fa..7f034a9a6f 100644 --- a/plugins/markdown/plugin-links-check/package.json +++ b/plugins/markdown/plugin-links-check/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-links-check", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - links-check", "keywords": [ "vuepress-plugin", @@ -35,13 +35,14 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { "@vuepress/helper": "workspace:*" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/markdown/plugin-links-check/rollup.config.ts b/plugins/markdown/plugin-links-check/rollup.config.ts new file mode 100644 index 0000000000..a2d0fd0ec0 --- /dev/null +++ b/plugins/markdown/plugin-links-check/rollup.config.ts @@ -0,0 +1,3 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index') diff --git a/plugins/markdown/plugin-markdown-chart/package.json b/plugins/markdown/plugin-markdown-chart/package.json index e193e9d3ac..9d00915125 100644 --- a/plugins/markdown/plugin-markdown-chart/package.json +++ b/plugins/markdown/plugin-markdown-chart/package.json @@ -42,6 +42,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -50,20 +51,22 @@ "@mdit/plugin-plantuml": "^0.13.1", "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", - "vue": "^3.5.6" + "vue": "^3.5.10" }, "devDependencies": { - "@types/markdown-it": "^14.1.2" + "@types/markdown-it": "^14.1.2", + "markdown-it": "^14.1.0", + "markmap-common": "^0.17.1" }, "peerDependencies": { - "chart.js": "^4.0.0", - "echarts": "^5.0.0", - "flowchart.ts": "^3.0.0", - "markmap-lib": "^0.17.0", - "markmap-toolbar": "^0.17.0", - "markmap-view": "^0.17.0", - "mermaid": "^11.2.0", - "vuepress": "2.0.0-rc.15" + "chart.js": "^4.4.4", + "echarts": "^5.5.1", + "flowchart.ts": "^3.0.1", + "markmap-lib": "^0.17.2", + "markmap-toolbar": "^0.17.2", + "markmap-view": "^0.17.2", + "mermaid": "^11.2.1", + "vuepress": "2.0.0-rc.17" }, "peerDependenciesMeta": { "chart.js": { diff --git a/plugins/markdown/plugin-markdown-chart/rollup.config.ts b/plugins/markdown/plugin-markdown-chart/rollup.config.ts new file mode 100644 index 0000000000..8deeb099fd --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/rollup.config.ts @@ -0,0 +1,16 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: [ + 'components/ChartJS', + 'components/ECharts', + 'components/FlowChart', + 'components/MarkMap', + 'components/Mermaid', + 'index', + ], + }), +] diff --git a/plugins/markdown/plugin-markdown-chart/src/client/components/ChartJS.ts b/plugins/markdown/plugin-markdown-chart/src/client/components/ChartJS.ts index 8571cafa2d..2747e13b1b 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/components/ChartJS.ts +++ b/plugins/markdown/plugin-markdown-chart/src/client/components/ChartJS.ts @@ -1,11 +1,16 @@ -import { LoadingIcon, decodeData, useDarkmode } from '@vuepress/helper/client' +import { + LoadingIcon, + decodeData, + useDarkmode, + wait, +} from '@vuepress/helper/client' import type { Chart, ChartConfiguration } from 'chart.js' import type { PropType, VNode } from 'vue' import { computed, defineComponent, h, ref, shallowRef, watch } from 'vue' -import '../styles/chartjs.scss' +import '../styles/chartjs.css' -declare const MARKDOWN_ENHANCE_DELAY: number +declare const __MC_DELAY__: number const parseChartConfig = ( config: string, @@ -90,11 +95,7 @@ export default defineComponent({ const renderChart = async (darkmode: boolean): Promise => { const [{ default: Chart }] = await Promise.all([ import(/* webpackChunkName: "chartjs" */ 'chart.js/auto'), - loaded - ? Promise.resolve() - : new Promise((resolve) => { - setTimeout(resolve, MARKDOWN_ENHANCE_DELAY) - }), + loaded ? Promise.resolve() : wait(__MC_DELAY__), ]) loaded = true diff --git a/plugins/markdown/plugin-markdown-chart/src/client/components/ECharts.ts b/plugins/markdown/plugin-markdown-chart/src/client/components/ECharts.ts index 22fa7d7cc9..be6620c2fd 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/components/ECharts.ts +++ b/plugins/markdown/plugin-markdown-chart/src/client/components/ECharts.ts @@ -1,4 +1,4 @@ -import { LoadingIcon, decodeData } from '@vuepress/helper/client' +import { LoadingIcon, decodeData, wait } from '@vuepress/helper/client' import { useDebounceFn, useEventListener } from '@vueuse/core' import type { EChartsOption, EChartsType } from 'echarts' import type { PropType, VNode } from 'vue' @@ -12,9 +12,9 @@ import { } from 'vue' import { useEChartsConfig } from '../helpers/index.js' -import '../styles/echarts.scss' +import '../styles/echarts.css' -declare const MARKDOWN_ENHANCE_DELAY: number +declare const __MC_DELAY__: number interface EChartsConfig { width?: number @@ -101,10 +101,7 @@ export default defineComponent({ onMounted(() => { void Promise.all([ import(/* webpackChunkName: "echarts" */ 'echarts'), - // Delay - new Promise((resolve) => { - setTimeout(resolve, MARKDOWN_ENHANCE_DELAY) - }), + wait(__MC_DELAY__), ]).then(async ([echarts]) => { await echartsConfig.setup?.() diff --git a/plugins/markdown/plugin-markdown-chart/src/client/components/FlowChart.ts b/plugins/markdown/plugin-markdown-chart/src/client/components/FlowChart.ts index dd83c376f3..f3673c1464 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/components/FlowChart.ts +++ b/plugins/markdown/plugin-markdown-chart/src/client/components/FlowChart.ts @@ -1,4 +1,4 @@ -import { LoadingIcon, decodeData } from '@vuepress/helper/client' +import { LoadingIcon, decodeData, wait } from '@vuepress/helper/client' import { useDebounceFn, useEventListener } from '@vueuse/core' import type { Chart } from 'flowchart.ts' import type { PropType, VNode } from 'vue' @@ -6,9 +6,9 @@ import { computed, defineComponent, h, onMounted, ref, shallowRef } from 'vue' import { flowchartPresets } from '../utils/index.js' -import '../styles/flowchart.scss' +import '../styles/flowchart.css' -declare const MARKDOWN_ENHANCE_DELAY: number +declare const __MC_DELAY__: number export default defineComponent({ name: 'FlowChart', @@ -81,10 +81,7 @@ export default defineComponent({ onMounted(() => { void Promise.all([ import(/* webpackChunkName: "flowchart" */ 'flowchart.ts'), - // Delay - new Promise((resolve) => { - setTimeout(resolve, MARKDOWN_ENHANCE_DELAY) - }), + wait(__MC_DELAY__), ]).then(([{ parse }]) => { flowchart = parse(decodeData(props.code)) diff --git a/plugins/markdown/plugin-markdown-chart/src/client/components/MarkMap.ts b/plugins/markdown/plugin-markdown-chart/src/client/components/MarkMap.ts index 53e2294305..aeb601c5ba 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/components/MarkMap.ts +++ b/plugins/markdown/plugin-markdown-chart/src/client/components/MarkMap.ts @@ -11,9 +11,9 @@ import { shallowRef, } from 'vue' -import '../styles/markmap.scss' +import '../styles/markmap.css' -declare const MARKDOWN_ENHANCE_DELAY: number +declare const __MC_DELAY__: number export default defineComponent({ name: 'MarkMap', @@ -27,11 +27,11 @@ export default defineComponent({ id: { type: String, required: true }, /** - * Markmap content + * Markmap data * - * Markmap + * Markmap 数据 */ - content: { type: String, required: true }, + data: { type: String, required: true }, }, setup(props) { @@ -39,56 +39,63 @@ export default defineComponent({ const markupWrapper = shallowRef() const markmapSvg = shallowRef() - let markupMap: Markmap | null = null + let markmap: Markmap | null = null useEventListener( 'resize', useDebounceFn(() => { - void markupMap?.fit() + void markmap?.fit() }, 100), ) onMounted(() => { void Promise.all([ import(/* webpackChunkName: "markmap" */ 'markmap-lib'), - import(/* webpackChunkName: "markmap" */ 'markmap-toolbar'), import(/* webpackChunkName: "markmap" */ 'markmap-view'), + import(/* webpackChunkName: "markmap" */ 'markmap-toolbar'), // Delay new Promise((resolve) => { - setTimeout(resolve, MARKDOWN_ENHANCE_DELAY) + setTimeout(resolve, __MC_DELAY__) }), ]).then( - async ([{ Transformer }, { Toolbar }, { Markmap, deriveOptions }]) => { - const transformer = new Transformer() - const { frontmatter, root } = transformer.transform( - decodeData(props.content), + async ([{ Transformer, builtInPlugins }, markmapView, { Toolbar }]) => { + const { Markmap, deriveOptions, loadCSS, loadJS } = markmapView + + const transformer = new Transformer(builtInPlugins) + const { features, frontmatter, root } = transformer.transform( + decodeData(props.data), ) + const { styles, scripts } = transformer.getUsedAssets(features) - markupMap = Markmap.create( + if (styles) await loadCSS(styles) + if (scripts) await loadJS(scripts, { getMarkmap: () => markmapView }) + + markmap = Markmap.create( markmapSvg.value!, deriveOptions({ maxWidth: 240, ...frontmatter?.markmap, }), + root, ) - const { el } = Toolbar.create(markupMap) + await markmap.fit() - markupMap.setData(root) - await markupMap.fit() + const { el } = Toolbar.create(markmap) el.style.position = 'absolute' el.style.bottom = '0.5rem' el.style.right = '0.5rem' markupWrapper.value!.append(el) + loading.value = false }, ) }) onUnmounted(() => { - markupMap?.destroy() + markmap?.destroy() }) return (): VNode => diff --git a/plugins/markdown/plugin-markdown-chart/src/client/components/Mermaid.ts b/plugins/markdown/plugin-markdown-chart/src/client/components/Mermaid.ts index 56016ba68d..9f5e23db46 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/components/Mermaid.ts +++ b/plugins/markdown/plugin-markdown-chart/src/client/components/Mermaid.ts @@ -18,9 +18,9 @@ import { import { useMermaidOptions } from '../helpers/index.js' import type { MermaidThemeVariables } from '../typings/index.js' -import '../styles/mermaid.scss' +import '../styles/mermaid.css' -declare const MARKDOWN_ENHANCE_DELAY: number +declare const __MC_DELAY__: number const DEFAULT_CHART_OPTIONS = { useMaxWidth: false } @@ -123,7 +123,7 @@ export default defineComponent({ ? Promise.resolve() : ((loaded = true), new Promise((resolve) => { - setTimeout(resolve, MARKDOWN_ENHANCE_DELAY) + setTimeout(resolve, __MC_DELAY__) })), ]) diff --git a/plugins/markdown/plugin-markdown-chart/src/client/index.ts b/plugins/markdown/plugin-markdown-chart/src/client/index.ts new file mode 100644 index 0000000000..e094067de8 --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/src/client/index.ts @@ -0,0 +1 @@ +export * from './helpers/index.js' diff --git a/plugins/markdown/plugin-markdown-chart/src/client/styles/markmap.scss b/plugins/markdown/plugin-markdown-chart/src/client/styles/markmap.scss index b3e6b747ef..223dfe4b96 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/styles/markmap.scss +++ b/plugins/markdown/plugin-markdown-chart/src/client/styles/markmap.scss @@ -35,7 +35,7 @@ } } - // FIXME: Probably markmap bug + // FIXME: katex can not work with math plugin .katex-html { display: none; } diff --git a/plugins/markdown/plugin-markdown-chart/src/client/typings/mermaid.ts b/plugins/markdown/plugin-markdown-chart/src/client/typings/mermaid.ts index a8cd003d3c..26aea2b195 100644 --- a/plugins/markdown/plugin-markdown-chart/src/client/typings/mermaid.ts +++ b/plugins/markdown/plugin-markdown-chart/src/client/typings/mermaid.ts @@ -158,7 +158,7 @@ export interface MermaidThemeVariables { actorTextColor?: string actorLineColor?: string - [props: string]: string | boolean + [props: string]: boolean | string | undefined } export type MermaidOptions = Omit< diff --git a/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/chartjs.ts b/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/chartjs.ts new file mode 100644 index 0000000000..751c2cd4ee --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/chartjs.ts @@ -0,0 +1,47 @@ +import { container } from '@mdit/plugin-container' +import { encodeData } from '@vuepress/helper' +import type { PluginSimple } from 'markdown-it' + +export const chartjs: PluginSimple = (md) => { + container(md, { + name: 'chartjs', + openRender: (tokens, index) => { + const title = tokens[index].info + .trimStart() + // "chart" length + .slice(7) + .trim() + + const key = `chartjs-${index}` + + let config = '{}' + let configType = '' + + for (let i = index; i < tokens.length; i++) { + const { type, content, info } = tokens[i] + + if (type === 'container_chartjs_close') break + + if (!content) continue + if (type === 'fence') + if (info === 'json') { + config = encodeData(content) + configType = 'json' + } else if (info === 'js' || info === 'javascript') { + config = encodeData(content) + configType = 'js' + } + + // Set to an unknown token type + tokens[i].type = 'chartjs_empty' + // Hide token + tokens[i].hidden = true + } + + return `` + }, + closeRender: () => ``, + }) +} diff --git a/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/index.ts b/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/index.ts index c119153d77..581ec6f2f3 100644 --- a/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/index.ts +++ b/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/index.ts @@ -1,4 +1,4 @@ -export * from './chartJs.js' +export * from './chartjs.js' export * from './echarts.js' export * from './flowchart.js' export * from './markmap.js' diff --git a/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/markmap.ts b/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/markmap.ts index 9ccb36a60d..994c1d8a1a 100644 --- a/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/markmap.ts +++ b/plugins/markdown/plugin-markdown-chart/src/node/markdown-it-plugins/markmap.ts @@ -7,7 +7,7 @@ const markmapRender = (tokens: Token[], index: number): string => { const key = `markmap-${index}` const { content } = token - return `` + return `` } export const markmap: PluginSimple = (md) => { diff --git a/plugins/markdown/plugin-markdown-chart/src/node/markdownChartPlugin.ts b/plugins/markdown/plugin-markdown-chart/src/node/markdownChartPlugin.ts index a5f896e3a6..a683db311a 100644 --- a/plugins/markdown/plugin-markdown-chart/src/node/markdownChartPlugin.ts +++ b/plugins/markdown/plugin-markdown-chart/src/node/markdownChartPlugin.ts @@ -7,7 +7,7 @@ import { } from '@vuepress/helper' import type { Plugin } from 'vuepress/core' import { - chartJs, + chartjs, echarts, flowchart, markmap, @@ -15,6 +15,7 @@ import { plantuml, } from './markdown-it-plugins/index.js' import type { MarkdownChartPluginOptions } from './options.js' +import { prepareConfigFile } from './prepareConfigFile.js' import { PLUGIN_NAME, getInstallStatus, logger } from './utils.js' export const markdownChartPlugin = @@ -35,7 +36,7 @@ export const markdownChartPlugin = } const status = { - chartjs: getStatus('chartJs', ['chart.js']), + chartjs: getStatus('chartjs', ['chart.js']), echarts: getStatus('echarts', ['echarts']), flowchart: getStatus('flowchart', ['flowchart.ts']), markmap: getStatus('markmap', [ @@ -49,8 +50,12 @@ export const markdownChartPlugin = return { name: PLUGIN_NAME, + define: { + __MC_DELAY__: options.delay ?? 800, + }, + extendsMarkdown: (md) => { - if (status.chartjs) md.use(chartJs) + if (status.chartjs) md.use(chartjs) if (status.echarts) md.use(echarts) if (status.flowchart) md.use(flowchart) if (isArray(options.plantuml)) md.use(plantuml, options) @@ -106,5 +111,7 @@ export const markdownChartPlugin = addViteSsrExternal(bundlerOptions, app, 'mermaid') } }, + + clientConfigFile: () => prepareConfigFile(app, status), } } diff --git a/plugins/markdown/plugin-markdown-chart/src/node/options.ts b/plugins/markdown/plugin-markdown-chart/src/node/options.ts index 34a1fd5c48..0380af2c5b 100644 --- a/plugins/markdown/plugin-markdown-chart/src/node/options.ts +++ b/plugins/markdown/plugin-markdown-chart/src/node/options.ts @@ -8,7 +8,7 @@ export interface MarkdownChartPluginOptions { * * @default false */ - chartJs?: boolean + chartjs?: boolean /** * Whether to enable echarts support diff --git a/plugins/markdown/plugin-markdown-chart/src/node/prepareConfigFile.ts b/plugins/markdown/plugin-markdown-chart/src/node/prepareConfigFile.ts new file mode 100644 index 0000000000..e59fd5fc10 --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/src/node/prepareConfigFile.ts @@ -0,0 +1,64 @@ +import type { App } from 'vuepress/core' + +import { CLIENT_FOLDER } from './utils.js' + +export const prepareConfigFile = async ( + app: App, + status: Record, +): Promise => { + const imports = new Set() + const enhances = new Set() + + if (status.chart) { + imports.add(`import ChartJS from "${CLIENT_FOLDER}components/ChartJS.js";`) + enhances.add(`app.component("ChartJS", ChartJS)`) + } + + if (status.echarts) { + imports.add(`import ECharts from "${CLIENT_FOLDER}components/ECharts.js";`) + imports.add( + `import { injectEChartsConfig } from "${CLIENT_FOLDER}/index.js";`, + ) + enhances.add(`app.component("ECharts", ECharts);`) + enhances.add(`injectEChartsConfig(app);`) + } + + if (status.flowchart) { + imports.add( + `import FlowChart from "${CLIENT_FOLDER}components/FlowChart.js";`, + ) + + enhances.add(`app.component("FlowChart", FlowChart);`) + } + + if (status.markmap) { + imports.add(`import MarkMap from "${CLIENT_FOLDER}components/MarkMap.js";`) + enhances.add(`app.component("MarkMap", MarkMap);`) + } + + if (status.mermaid) { + imports.add(`import Mermaid from "${CLIENT_FOLDER}components/Mermaid.js";`) + imports.add( + `import { injectMermaidConfig } from "${CLIENT_FOLDER}index.js";`, + ) + enhances.add(`injectMermaidConfig(app);`) + enhances.add(`app.component("Mermaid", Mermaid);`) + } + + return app.writeTemp( + `markdown-chart/config.js`, + `\ +import { defineClientConfig } from "vuepress/client"; +${Array.from(imports.values()).join('\n')} + +export default defineClientConfig({ + enhance: ({ app }) => { +${Array.from(enhances.values()) + .map((item) => item.split('\n').map((line) => ` ${line}`)) + .flat() + .join('\n')} + }, +}); +`, + ) +} diff --git a/plugins/markdown/plugin-markdown-chart/src/shims.d.ts b/plugins/markdown/plugin-markdown-chart/src/shims.d.ts index 3d95151b15..a548d41c4e 100644 --- a/plugins/markdown/plugin-markdown-chart/src/shims.d.ts +++ b/plugins/markdown/plugin-markdown-chart/src/shims.d.ts @@ -4,3 +4,7 @@ declare module 'mermaid/dist/mermaid.esm.min.mjs' { export default mermaid } + +declare module '*.css' { + export {} +} diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/chartjs.spec.ts.snap b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/chartjs.spec.ts.snap new file mode 100644 index 0000000000..d794c0b0ec --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/chartjs.spec.ts.snap @@ -0,0 +1,15 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`chartjs > Should not break markdown fence 1`] = ` +"
const a = 1;
+
+" +`; + +exports[`chartjs > Should resolve chart info with javascript block 1`] = `""`; + +exports[`chartjs > Should resolve chart with empty title and body 1`] = `""`; + +exports[`chartjs > Should resolve chartjs info with js block 1`] = `""`; + +exports[`chartjs > Should resolve chartjs info with json block 1`] = `""`; diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/echarts.spec.ts.snap b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/echarts.spec.ts.snap new file mode 100644 index 0000000000..00c30aec92 --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/echarts.spec.ts.snap @@ -0,0 +1,19 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`echarts > Should not break markdown fence 1`] = ` +"
const a = 1;
+
+" +`; + +exports[`echarts > Should resolve echarts container with empty title and body 1`] = `""`; + +exports[`echarts > Should resolve echarts container with javascript block 1`] = `""`; + +exports[`echarts > Should resolve echarts container with js block 1`] = `""`; + +exports[`echarts > Should resolve echarts container with json block 1`] = `""`; + +exports[`echarts > Should resolve echarts fence 1`] = `""`; + +exports[`echarts > Should resolve echarts fence with empty title and body 1`] = `""`; diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/flowchart.spec.ts.snap b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/flowchart.spec.ts.snap new file mode 100644 index 0000000000..1d1de487ca --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/flowchart.spec.ts.snap @@ -0,0 +1,47 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`flowchart > Should handle preset 1`] = `""`; + +exports[`flowchart > Should handle preset 2`] = `""`; + +exports[`flowchart > Should not render 1`] = ` +"

st=>start: Start|past:>http://www.google.com[blank] +e=>end: End|future:>http://www.google.com +op1=>operation: My Operation|past +op2=>operation: Stuff|current +sub1=>subroutine: My Subroutine|invalid +cond=>condition: Yes +or No?|approved:>http://www.google.com +c2=>condition: Good idea|rejected +io=>inputoutput: catch something...|future

+

st->op1(right)->cond +cond(yes, right)->c2 +cond(no)->sub1(left)->op1 +c2(yes)->io->e +c2(no)->op2->e

+" +`; + +exports[`flowchart > Should not render 2`] = ` +"
st=>start: Start|past:>http://www.google.com[blank]
+e=>end: End|future:>http://www.google.com
+op1=>operation: My Operation|past
+op2=>operation: Stuff|current
+sub1=>subroutine: My Subroutine|invalid
+cond=>condition: Yes
+or No?|approved:>http://www.google.com
+c2=>condition: Good idea|rejected
+io=>inputoutput: catch something...|future
+
+st->op1(right)->cond
+cond(yes, right)->c2
+cond(no)->sub1(left)->op1
+c2(yes)->io->e
+c2(no)->op2->e
+
+" +`; + +exports[`flowchart > Should render \`\`\`flow 1`] = `""`; + +exports[`flowchart > Should render \`\`\`flowchart 1`] = `""`; diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/markmap.spec.ts.snap b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/markmap.spec.ts.snap new file mode 100644 index 0000000000..71025aebdd --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/markmap.spec.ts.snap @@ -0,0 +1,66 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`markmap plugin > Should not render 1`] = ` +"
+

markmap: +colorFreezeLevel: 2

+

markmap

+

Links

+ +

Features

+
    +
  • links
  • +
  • strong del italic ==highlight==
  • +
  • multiline +text
  • +
  • inline code
  • +
  • +
    const a = 1;
    +
    +
  • +
  • Katex +
      +
    • $x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$
    • +
    +
  • +
  • Now we can wrap very very very very long text based on maxWidth option
  • +
+" +`; + +exports[`markmap plugin > Should not render 2`] = ` +"
---
+markmap:
+  colorFreezeLevel: 2
+---
+
+# markmap
+
+## Links
+
+- <https://markmap.js.org/>
+- [GitHub](https://github.com/markmap/markmap)
+
+## Features
+
+- links
+- **strong** ~~del~~ *italic* ==highlight==
+- multiline
+  text
+- \`inline code\`
+-
+    \`\`\`js
+    const a = 1;
+    \`\`\`
+- Katex
+  - $x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$
+- Now we can wrap very very very very long text based on \`maxWidth\` option
+
+
+" +`; + +exports[`markmap plugin > Should render \`\`\`markmap 1`] = `""`; diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/mermaid.spec.ts.snap b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/mermaid.spec.ts.snap new file mode 100644 index 0000000000..36af614d4f --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/__snapshots__/mermaid.spec.ts.snap @@ -0,0 +1,124 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`getMermaidContent() > Should work with content 1`] = ` +"flowchart TB + c1-->a2 + subgraph one + a1-->a2 + end + subgraph two + b1-->b2 + end + subgraph three + c1-->c2 + end + one --> two + three --> two + two --> c2" +`; + +exports[`getMermaidContent() > Should work with content 2`] = ` +"sequenceDiagram + Alice ->> Bob: Hello Bob, how are you? + Bob-->>John: How about you John? + Bob--x Alice: I am good thanks! + Bob-x John: I am good thanks! + Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. + + Bob-->Alice: Checking with John... + Alice->John: Yes... John, how are you?" +`; + +exports[`getMermaidContent() > Should work with title and content 1`] = ` +"--- +title: Sample Title +--- + +flowchart TB + c1-->a2 + subgraph one + a1-->a2 + end + subgraph two + b1-->b2 + end + subgraph three + c1-->c2 + end + one --> two + three --> two + two --> c2" +`; + +exports[`getMermaidContent() > Should work with title and content 2`] = ` +"--- +title: Sample Title +--- + +sequenceDiagram + Alice ->> Bob: Hello Bob, how are you? + Bob-->>John: How about you John? + Bob--x Alice: I am good thanks! + Bob-x John: I am good thanks! + Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. + + Bob-->Alice: Checking with John... + Alice->John: Yes... John, how are you?" +`; + +exports[`mermaid plugin > Should not render 1`] = ` +"

flowchart TB +c1-->a2 +subgraph one +a1-->a2 +end +subgraph two +b1-->b2 +end +subgraph three +c1-->c2 +end +one --> two +three --> two +two --> c2

+" +`; + +exports[`mermaid plugin > Should not render 2`] = ` +"
flowchart TB
+  c1-->a2
+  subgraph one
+  a1-->a2
+  end
+  subgraph two
+  b1-->b2
+  end
+  subgraph three
+  c1-->c2
+  end
+  one --> two
+  three --> two
+  two --> c2
+
+" +`; + +exports[`mermaid plugin > Should render \`\`\`class 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`er 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`gantt 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`git-graph 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`journey 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`mermaid 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`pie 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`sequence 1`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`sequence 2`] = `""`; + +exports[`mermaid plugin > Should render \`\`\`state 1`] = `""`; diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/chartjs.spec.ts b/plugins/markdown/plugin-markdown-chart/tests/node/chartjs.spec.ts new file mode 100644 index 0000000000..bf1f63870a --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/chartjs.spec.ts @@ -0,0 +1,203 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { chartjs } from '../../src/node/markdown-it-plugins/chartjs.js' + +describe('chartjs', () => { + const markdownIt = MarkdownIt({ linkify: true }).use(chartjs) + + it('Should resolve chartjs info with json block', () => { + const result = markdownIt.render( + ` +::: chartjs A bar chart + +\`\`\`json +{ + "type": "bar", + "data": { + "labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], + "datasets": [ + { + "label": "# of Votes", + "data": [12, 19, 3, 5, 2, 3], + "backgroundColor": [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(255, 206, 86, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(255, 159, 64, 0.2)" + ], + "borderColor": [ + "rgba(255, 99, 132, 1)", + "rgba(54, 162, 235, 1)", + "rgba(255, 206, 86, 1)", + "rgba(75, 192, 192, 1)", + "rgba(153, 102, 255, 1)", + "rgba(255, 159, 64, 1)" + ], + "borderWidth": 1 + } + ] + }, + "options": { + "scales": { + "y": { + "beginAtZero": true + } + } + } +} +\`\`\` + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ChartJS>/) + expect(result).toContain(`title="${encodeURIComponent('A bar chart')}"`) + expect(result).toContain('type="json"') + expect(result).toMatchSnapshot() + }) + + it('Should resolve chartjs info with js block', () => { + const result = markdownIt.render( + ` +::: chartjs A bar chart + +\`\`\`js +const config = { + type: "bar", + data: { + labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], + datasets: [ + { + label: "# of Votes", + data: [12, 19, 3, 5, 2, 3], + backgroundColor: [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(255, 206, 86, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(255, 159, 64, 0.2)", + ], + borderColor: [ + "rgba(255, 99, 132, 1)", + "rgba(54, 162, 235, 1)", + "rgba(255, 206, 86, 1)", + "rgba(75, 192, 192, 1)", + "rgba(153, 102, 255, 1)", + "rgba(255, 159, 64, 1)", + ], + borderWidth: 1, + }, + ], + }, + options: { + scales: { + y: { + beginAtZero: true, + }, + }, + }, +}; +\`\`\` + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ChartJS>/) + expect(result).toContain(`title="${encodeURIComponent('A bar chart')}"`) + expect(result).toContain('type="js"') + expect(result).toMatchSnapshot() + }) + + it('Should resolve chart info with javascript block', () => { + const result = markdownIt.render( + ` +::: chartjs A bar chart + +\`\`\`javascript +const config = { + type: "bar", + data: { + labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], + datasets: [ + { + label: "# of Votes", + data: [12, 19, 3, 5, 2, 3], + backgroundColor: [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(255, 206, 86, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(255, 159, 64, 0.2)", + ], + borderColor: [ + "rgba(255, 99, 132, 1)", + "rgba(54, 162, 235, 1)", + "rgba(255, 206, 86, 1)", + "rgba(75, 192, 192, 1)", + "rgba(153, 102, 255, 1)", + "rgba(255, 159, 64, 1)", + ], + borderWidth: 1, + }, + ], + }, + options: { + scales: { + y: { + beginAtZero: true, + }, + }, + }, +}; +\`\`\` + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ChartJS>/) + expect(result).toContain(`title="${encodeURIComponent('A bar chart')}"`) + expect(result).toContain('type="js"') + expect(result).toMatchSnapshot() + }) + + it('Should resolve chart with empty title and body', () => { + const result = markdownIt.render( + ` +::: chartjs + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ChartJS>/) + expect(result).not.toContain('title="') + expect(result).toContain('type=""') + expect(result).toMatchSnapshot() + }) + + it('Should not break markdown fence', () => { + const result = markdownIt.render( + ` +\`\`\`js +const a = 1; +\`\`\` +`, + {}, + ) + + expect(result).toMatch(/[\s\S]*<\/pre>/) + expect(result).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/echarts.spec.ts b/plugins/markdown/plugin-markdown-chart/tests/node/echarts.spec.ts new file mode 100644 index 0000000000..edd849bd96 --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/echarts.spec.ts @@ -0,0 +1,185 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { echarts } from '../../src/node/markdown-it-plugins/echarts.js' + +describe('echarts', () => { + const markdownIt = MarkdownIt({ linkify: true }).use(echarts) + + it('Should resolve echarts container with json block', () => { + const result = markdownIt.render( + ` +::: echarts A line chart + +\`\`\`json +{ + 'xAxis': { + 'type': 'category', + 'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + 'yAxis': { + 'type': 'value' + }, + 'series': [ + { + 'data': [150, 230, 224, 218, 135, 147, 260], + 'type': 'line' + } + ] +} +\`\`\` + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ECharts>/) + expect(result).toContain(`title="${encodeURIComponent('A line chart')}"`) + expect(result).not.toContain('type=""') + expect(result).toMatchSnapshot() + }) + + it('Should resolve echarts container with js block', () => { + const result = markdownIt.render( + ` +::: echarts A line chart + +\`\`\`js +const option = { + xAxis: { + type: "category", + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + }, + yAxis: { + type: "value", + }, + series: [ + { + data: [150, 230, 224, 218, 135, 147, 260], + type: "line", + }, + ], +}; +\`\`\` + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ECharts>/) + expect(result).toContain(`title="${encodeURIComponent('A line chart')}"`) + expect(result).toContain('type="js"') + expect(result).toMatchSnapshot() + }) + + it('Should resolve echarts container with javascript block', () => { + const result = markdownIt.render( + ` +::: echarts A line chart + +\`\`\`javascript +const option = { + xAxis: { + type: "category", + data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], + }, + yAxis: { + type: "value", + }, + series: [ + { + data: [150, 230, 224, 218, 135, 147, 260], + type: "line", + }, + ], +}; +\`\`\` + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ECharts>/) + expect(result).toContain(`title="${encodeURIComponent('A line chart')}"`) + expect(result).toContain('type="js"') + expect(result).toMatchSnapshot() + }) + + it('Should resolve echarts container with empty title and body', () => { + const result = markdownIt.render( + ` +::: echarts + +::: +`, + {}, + ) + + expect(result).toMatch(/<\/ECharts>/) + expect(result).not.toContain('title="') + expect(result).not.toContain('type=""') + expect(result).toMatchSnapshot() + }) + + it('Should resolve echarts fence', () => { + const result = markdownIt.render( + ` +\`\`\`echarts:A line chart +{ + 'xAxis': { + 'type': 'category', + 'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + }, + 'yAxis': { + 'type': 'value' + }, + 'series': [ + { + 'data': [150, 230, 224, 218, 135, 147, 260], + 'type': 'line' + } + ] +} +\`\`\` +`, + {}, + ) + + expect(result).toMatch(/<\/ECharts>/) + expect(result).toContain(`title="${encodeURIComponent('A line chart')}"`) + expect(result).not.toContain('type=""') + expect(result).toMatchSnapshot() + }) + + it('Should resolve echarts fence with empty title and body', () => { + const result = markdownIt.render( + ` +\`\`\`echarts +\`\`\` +`, + {}, + ) + + expect(result).toMatch(/<\/ECharts>/) + expect(result).not.toContain('title="') + expect(result).not.toContain('type=""') + expect(result).toMatchSnapshot() + }) + + it('Should not break markdown fence', () => { + const result = markdownIt.render( + ` +\`\`\`js +const a = 1; +\`\`\` +`, + {}, + ) + + expect(result).toMatch(/[\s\S]*<\/pre>/) + expect(result).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/flowchart.spec.ts b/plugins/markdown/plugin-markdown-chart/tests/node/flowchart.spec.ts new file mode 100644 index 0000000000..385e17000a --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/flowchart.spec.ts @@ -0,0 +1,90 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { flowchart } from '../../src/node/markdown-it-plugins/flowchart.js' + +const demo = `st=>start: Start|past:>http://www.google.com[blank] +e=>end: End|future:>http://www.google.com +op1=>operation: My Operation|past +op2=>operation: Stuff|current +sub1=>subroutine: My Subroutine|invalid +cond=>condition: Yes +or No?|approved:>http://www.google.com +c2=>condition: Good idea|rejected +io=>inputoutput: catch something...|future + +st->op1(right)->cond +cond(yes, right)->c2 +cond(no)->sub1(left)->op1 +c2(yes)->io->e +c2(no)->op2->e` + +describe('flowchart', () => { + const markdownIt = MarkdownIt({ linkify: true }).use(flowchart) + + it('Should render ```flow', () => { + const flowRenderResult = markdownIt.render(` +\`\`\`flow +${demo} +\`\`\` +`) + + expect(flowRenderResult).toMatch( + /<\/FlowChart>/, + ) + expect(flowRenderResult).toMatchSnapshot() + }) + + it('Should render ```flowchart', () => { + const flowChartRenderResult = markdownIt.render(` +\`\`\`flowchart +${demo} +\`\`\` +`) + + expect(flowChartRenderResult).toMatch( + /<\/FlowChart>/, + ) + expect(flowChartRenderResult).toMatchSnapshot() + }) + + it('Should not render', () => { + expect( + markdownIt.render(` +${demo} +`), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +\`\`\`md +${demo} +\`\`\` +`), + ).toMatchSnapshot() + }) + + it('Should handle preset', () => { + const flowRenderResult = markdownIt.render(` +\`\`\`flow:ant +${demo} +\`\`\` +`) + + expect(flowRenderResult).toMatch( + /<\/FlowChart>/, + ) + expect(flowRenderResult).toMatchSnapshot() + + const flowChartRenderResult = markdownIt.render(` +\`\`\`flowchart:ant +${demo} +\`\`\` +`) + + expect(flowChartRenderResult).toMatch( + /<\/FlowChart>/, + ) + expect(flowChartRenderResult).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/markmap.spec.ts b/plugins/markdown/plugin-markdown-chart/tests/node/markmap.spec.ts new file mode 100644 index 0000000000..4bb4f2d49e --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/markmap.spec.ts @@ -0,0 +1,66 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { markmap } from '../../src/node/markdown-it-plugins/markmap.js' + +const content = `\ +--- +markmap: + colorFreezeLevel: 2 +--- + +# markmap + +## Links + +- +- [GitHub](https://github.com/markmap/markmap) + +## Features + +- links +- **strong** ~~del~~ *italic* ==highlight== +- multiline + text +- \`inline code\` +- + \`\`\`js + const a = 1; + \`\`\` +- Katex + - $x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}$ +- Now we can wrap very very very very long text based on \`maxWidth\` option +` + +describe('markmap plugin', () => { + const markdownIt = MarkdownIt({ linkify: true }).use(markmap) + + it('Should render ```markmap', () => { + const renderResult = markdownIt.render(` +\`\`\`\`markmap +${content} +\`\`\`\` +`) + + expect(renderResult).toMatch( + /<\/MarkMap>/, + ) + expect(renderResult).toMatchSnapshot() + }) + + it('Should not render', () => { + expect( + markdownIt.render(` +${content} +`), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +\`\`\`md +${content} +\`\`\` +`), + ).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-chart/tests/node/mermaid.spec.ts b/plugins/markdown/plugin-markdown-chart/tests/node/mermaid.spec.ts new file mode 100644 index 0000000000..c4afd8bb20 --- /dev/null +++ b/plugins/markdown/plugin-markdown-chart/tests/node/mermaid.spec.ts @@ -0,0 +1,276 @@ +import { decodeData } from '@vuepress/helper' +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { + getMermaidContent, + mermaid, +} from '../../src/node/markdown-it-plugins/mermaid.js' + +const title = 'Sample Title' + +const flowchartDemo = `\ +flowchart TB + c1-->a2 + subgraph one + a1-->a2 + end + subgraph two + b1-->b2 + end + subgraph three + c1-->c2 + end + one --> two + three --> two + two --> c2\ +` + +const sequenceDemo = `\ +Alice ->> Bob: Hello Bob, how are you? +Bob-->>John: How about you John? +Bob--x Alice: I am good thanks! +Bob-x John: I am good thanks! +Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. + +Bob-->Alice: Checking with John... +Alice->John: Yes... John, how are you?\ +` + +describe('getMermaidContent()', () => { + it('Should work with content', () => { + expect(getMermaidContent({ content: flowchartDemo })).toMatchSnapshot() + expect( + getMermaidContent({ diagram: 'sequenceDiagram', content: sequenceDemo }), + ).toMatchSnapshot() + }) + + it('Should work with title and content', () => { + expect( + getMermaidContent({ title, content: flowchartDemo }), + ).toMatchSnapshot() + expect( + getMermaidContent({ + diagram: 'sequenceDiagram', + title, + content: sequenceDemo, + }), + ).toMatchSnapshot() + }) +}) + +describe('mermaid plugin', () => { + const markdownIt = MarkdownIt({ linkify: true }).use(mermaid) + + it('Should render ```mermaid', () => { + const renderResult = markdownIt.render(` +\`\`\`mermaid +${flowchartDemo} +\`\`\` +`) + + expect(renderResult).toMatch( + /<\/Mermaid>/, + ) + expect( + decodeData( + /<\/Mermaid>/.exec( + renderResult, + )?.[1] ?? '', + ), + ).toMatch(flowchartDemo) + expect(renderResult).toMatchSnapshot() + }) + + it('Should not render', () => { + expect( + markdownIt.render(` +${flowchartDemo} +`), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +\`\`\`md +${flowchartDemo} +\`\`\` +`), + ).toMatchSnapshot() + }) + + it('Should render ```sequence', () => { + const renderResult1 = markdownIt.render(` +\`\`\`sequence +Alice ->> Bob: Hello Bob, how are you? +Bob-->>John: How about you John? +Bob--x Alice: I am good thanks! +Bob-x John: I am good thanks! +Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. + +Bob-->Alice: Checking with John... +Alice->John: Yes... John, how are you? +\`\`\` +`) + const renderResult2 = markdownIt.render(` +\`\`\`sequence Greetings +Alice ->> Bob: Hello Bob, how are you? +Bob-->>John: How about you John? +Bob--x Alice: I am good thanks! +Bob-x John: I am good thanks! +Note right of John: Bob thinks a long
long time, so long
that the text does
not fit on a row. + +Bob-->Alice: Checking with John... +Alice->John: Yes... John, how are you? +\`\`\` +`) + + expect(renderResult1).toMatchSnapshot() + expect(renderResult2).toMatchSnapshot() + }) + + it('Should render ```class', () => { + const renderResult = markdownIt.render(` +\`\`\`class +class Square~Shape~{ + int id + List~int~ position + setPoints(List~int~ points) + getPoints() List~int~ +} + +Square : -List~string~ messages +Square : +setMessages(List~string~ messages) +Square : +getMessages() List~string~ +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) + + it('Should render ```state', () => { + const renderResult = markdownIt.render(` +\`\`\`state +[*] --> Active + +state Active { + [*] --> NumLockOff + NumLockOff --> NumLockOn : EvNumLockPressed + NumLockOn --> NumLockOff : EvNumLockPressed + -- + [*] --> CapsLockOff + CapsLockOff --> CapsLockOn : EvCapsLockPressed + CapsLockOn --> CapsLockOff : EvCapsLockPressed + -- + [*] --> ScrollLockOff + ScrollLockOff --> ScrollLockOn : EvScrollLockPressed + ScrollLockOn --> ScrollLockOff : EvScrollLockPressed +} +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) + + it('Should render ```er', () => { + const renderResult = markdownIt.render(` +\`\`\`er +CAR ||--o{ NAMED-DRIVER : allows +CAR { + string registrationNumber + string make + string model +} +PERSON ||--o{ NAMED-DRIVER : is +PERSON { + string firstName + string lastName + int age +} +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) + + it('Should render ```journey', () => { + const renderResult = markdownIt.render(` +\`\`\`journey +title My working day +section Go to work + Make tea: 5: Me + Go upstairs: 3: Me + Do work: 1: Me, Cat +section Go home + Go downstairs: 5: Me + Sit down: 5: Me +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) + + it('Should render ```gantt', () => { + const renderResult = markdownIt.render(` +\`\`\`gantt +dateFormat YYYY-MM-DD +title Adding GANTT diagram functionality to mermaid +excludes weekends +%% (\`excludes\` accepts specific dates in YYYY-MM-DD format, days of the week ("sunday") or "weekends", but not the word "weekdays".) + +section A section +Completed task :done, des1, 2014-01-06,2014-01-08 +Active task :active, des2, 2014-01-09, 3d +Future task : des3, after des2, 5d +Future task2 : des4, after des3, 5d + +section Critical tasks +Completed task in the critical line :crit, done, 2014-01-06,24h +Implement parser :crit, done, after des1, 2d +Create tests for parser :crit, active, 3d +Future task in critical line :crit, 5d +Create tests for renderer :2d +Add to mermaid :1d + +section Documentation +Describe gantt syntax :active, a1, after des1, 3d +Add gantt diagram to demo page :after a1 , 20h +Add another diagram to demo page :doc1, after a1 , 48h + +section Last section +Describe gantt syntax :after doc1, 3d +Add gantt diagram to demo page :20h +Add another diagram to demo page :48h +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) + + it('Should render ```pie', () => { + const renderResult = markdownIt.render(` +\`\`\`pie +title What Voldemort doesn’t have? + "FRIENDS" : 2 + "FAMILY" : 3 + "NOSE" : 45 +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) + + it('Should render ```git-graph', () => { + const renderResult = markdownIt.render(` +\`\`\`git-graph +commit id: "Normal" +commit +commit id: "Reverse" type: REVERSE +commit +commit id: "Highlight" type: HIGHLIGHT +commit +\`\`\` +`) + + expect(renderResult).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-container/CHANGELOG.md b/plugins/markdown/plugin-markdown-container/CHANGELOG.md index f7b1e8d579..52a4f76b46 100644 --- a/plugins/markdown/plugin-markdown-container/CHANGELOG.md +++ b/plugins/markdown/plugin-markdown-container/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.43](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.42...v2.0.0-rc.43) (2024-09-12) **Note:** Version bump only for package @vuepress/plugin-markdown-container diff --git a/plugins/markdown/plugin-markdown-container/package.json b/plugins/markdown/plugin-markdown-container/package.json index 44cd9a0915..5bd838adc7 100644 --- a/plugins/markdown/plugin-markdown-container/package.json +++ b/plugins/markdown/plugin-markdown-container/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-markdown-container", - "version": "2.0.0-rc.43", + "version": "2.0.0-rc.52", "description": "VuePress plugin - markdown container", "keywords": [ "vuepress-plugin", @@ -32,6 +32,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { @@ -39,7 +40,7 @@ "markdown-it-container": "^4.0.0" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "devDependencies": { "markdown-it": "^14.1.0" diff --git a/plugins/markdown/plugin-markdown-container/rollup.config.ts b/plugins/markdown/plugin-markdown-container/rollup.config.ts new file mode 100644 index 0000000000..8e536fbde2 --- /dev/null +++ b/plugins/markdown/plugin-markdown-container/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['markdown-it-container'], +}) diff --git a/plugins/markdown/plugin-markdown-hint/CHANGELOG.md b/plugins/markdown/plugin-markdown-hint/CHANGELOG.md index 46dad37b68..a850be8581 100644 --- a/plugins/markdown/plugin-markdown-hint/CHANGELOG.md +++ b/plugins/markdown/plugin-markdown-hint/CHANGELOG.md @@ -3,6 +3,19 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- **plugin-markdown-hint:** improve hint container outlook ([#264](https://github.com/vuepress/ecosystem/issues/264)) ([340fff5](https://github.com/vuepress/ecosystem/commit/340fff5ced3f720f2d6204a230ed320031f9faa9)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Features + +- **plugin-markdown-hint:** toggle all details block open before print ([4cb99de](https://github.com/vuepress/ecosystem/commit/4cb99dee940441d030d23d92bf9c6749678e3cd6)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Bug Fixes diff --git a/plugins/markdown/plugin-markdown-hint/package.json b/plugins/markdown/plugin-markdown-hint/package.json index 77f4e37cf4..f31729b280 100644 --- a/plugins/markdown/plugin-markdown-hint/package.json +++ b/plugins/markdown/plugin-markdown-hint/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-markdown-hint", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - markdown hint", "keywords": [ "vuepress-plugin", @@ -37,6 +37,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -44,10 +45,11 @@ "@mdit/plugin-alert": "^0.13.1", "@mdit/plugin-container": "^0.13.1", "@types/markdown-it": "^14.1.2", - "@vuepress/helper": "workspace:*" + "@vuepress/helper": "workspace:*", + "@vueuse/core": "^11.1.0" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "devDependencies": { "markdown-it": "^14.1.0" diff --git a/plugins/markdown/plugin-markdown-hint/rollup.config.ts b/plugins/markdown/plugin-markdown-hint/rollup.config.ts new file mode 100644 index 0000000000..31b2cceea3 --- /dev/null +++ b/plugins/markdown/plugin-markdown-hint/rollup.config.ts @@ -0,0 +1,8 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['@mdit/plugin-alert', '@mdit/plugin-container'], + }), + ...rollupBundle('client/config'), +] diff --git a/plugins/markdown/plugin-markdown-hint/src/client/config.ts b/plugins/markdown/plugin-markdown-hint/src/client/config.ts index a1b6f2f109..525ab307a3 100644 --- a/plugins/markdown/plugin-markdown-hint/src/client/config.ts +++ b/plugins/markdown/plugin-markdown-hint/src/client/config.ts @@ -1,2 +1,16 @@ +import { useEventListener } from '@vueuse/core' +import { defineClientConfig } from 'vuepress/client' + import './styles/hint.css' import './styles/vars.css' + +export default defineClientConfig({ + setup() { + // Toggle all
open before print + useEventListener('beforeprint', () => { + document.querySelectorAll('details').forEach((detail) => { + detail.open = true + }) + }) + }, +}) diff --git a/plugins/markdown/plugin-markdown-hint/src/client/styles/hint.scss b/plugins/markdown/plugin-markdown-hint/src/client/styles/hint.scss index f43bcba079..d43206ca0c 100644 --- a/plugins/markdown/plugin-markdown-hint/src/client/styles/hint.scss +++ b/plugins/markdown/plugin-markdown-hint/src/client/styles/hint.scss @@ -8,7 +8,6 @@ background: var(--hint-c-soft); transition: background var(--vp-t-color), - border-color var(--vp-t-color), color var(--vp-t-color); @media print { @@ -36,20 +35,21 @@ &.tip, &.warning, &.caution { - margin: 0.85rem 0; - padding: 0.25rem 1rem; - border-inline-start-width: 0.3rem; - border-inline-start-style: solid; - border-radius: 0.5rem; + margin-block: 0.75rem; + padding: 0.25em 1em; + border-radius: 0.5em; color: inherit; - @media (max-width: 419px) { - margin-inline: -0.75rem; + font-size: var(--hint-font-size); + + @media print { + border-inline-start-width: 0.25em; + border-inline-start-style: solid; } .hint-container-title { - padding-inline-start: 1.75rem; + padding-inline-start: 1.75em; @media print { padding-inline-start: 0; @@ -147,8 +147,8 @@ display: block; - margin: 1rem 0; - padding: 1.5rem; + margin-block: 0.75rem; + padding: 1.25rem 1rem; border-radius: 0.5rem; background: var(--detail-c-bg); @@ -157,10 +157,6 @@ background var(--vp-t-transform), color var(--vp-t-transform); - @media (max-width: 419px) { - margin-inline: -0.75rem; - } - h4 { margin-top: 0; } @@ -184,12 +180,14 @@ summary { position: relative; - margin: -1.5rem; - padding-block: 1.5rem; - padding-inline: 4rem 1.5rem; + margin: -1rem; + padding-block: 1em; + padding-inline: 3em 1.5em; list-style: none; + font-size: var(--hint-font-size); + cursor: pointer; // compatible with safari @@ -202,32 +200,26 @@ font-size: 0; } - &::before, - &::after { + &::before { + @include svg.mask-svg(icons.$detail-icon); + content: ' '; position: absolute; - inset-inline-start: 1.5rem; - top: calc(50% - 0.75rem); + inset-inline-start: 0.8em; + top: calc(50% - 0.5em); - width: 1.5rem; - height: 1.5rem; + width: 1em; + height: 1em; - font-size: 1.5rem; - } + font-size: 1.25rem; + line-height: normal; - &::before { - border-radius: 50%; - background: var(--detail-c-icon); transition: - background var(--vp-t-color), + color, + var(--vp-t-color), transform var(--vp-t-transform); - } - &::after { - @include svg.mask-svg(icons.$detail-icon); - line-height: normal; - transition: transform var(--vp-t-transform); transform: rotate(90deg); } } @@ -235,7 +227,7 @@ &[open] > summary { margin-bottom: 0.5em; - &::after { + &::before { transform: rotate(180deg); } } diff --git a/plugins/markdown/plugin-markdown-hint/src/client/styles/vars.css b/plugins/markdown/plugin-markdown-hint/src/client/styles/vars.css index d87a7d3c2c..d774520c14 100644 --- a/plugins/markdown/plugin-markdown-hint/src/client/styles/vars.css +++ b/plugins/markdown/plugin-markdown-hint/src/client/styles/vars.css @@ -1,4 +1,6 @@ :root { + --hint-font-size: 0.9rem; + /* important */ --important-c-accent: var(--vp-c-purple-bg); --important-c-text: var(--vp-c-purple-text); diff --git a/plugins/markdown/plugin-markdown-hint/src/node/alert.ts b/plugins/markdown/plugin-markdown-hint/src/node/alert.ts index 1c3e587d7b..c234ac7dba 100644 --- a/plugins/markdown/plugin-markdown-hint/src/node/alert.ts +++ b/plugins/markdown/plugin-markdown-hint/src/node/alert.ts @@ -1,3 +1,4 @@ +import type { MarkdownItAlertOptions as _MarkdownItAlertOptions } from '@mdit/plugin-alert' import { alert as _alert } from '@mdit/plugin-alert' import type { ExactLocaleConfig } from '@vuepress/helper' import { ensureLeadingSlash } from '@vuepress/helper' @@ -14,9 +15,9 @@ export const alert: PluginWithOptions = ( md, options = {}, ) => { - md.use(_alert, { + md.use<_MarkdownItAlertOptions>(_alert, { alertNames: ['important', 'note', 'tip', 'warning', 'caution', 'info'], - openRender: (tokens, index): string => + openRender: (tokens, index) => `
\n`, titleRender: (tokens, index, _options, env: MarkdownEnv) => { const type = tokens[index].markup diff --git a/plugins/markdown/plugin-markdown-hint/src/node/hint.ts b/plugins/markdown/plugin-markdown-hint/src/node/hint.ts index 53207edc02..fab77c2391 100644 --- a/plugins/markdown/plugin-markdown-hint/src/node/hint.ts +++ b/plugins/markdown/plugin-markdown-hint/src/node/hint.ts @@ -1,3 +1,4 @@ +import type { MarkdownItContainerOptions } from '@mdit/plugin-container' import { container } from '@mdit/plugin-container' import type { ExactLocaleConfig } from '@vuepress/helper' import { ensureLeadingSlash } from '@vuepress/helper' @@ -26,9 +27,9 @@ export const hint: PluginWithOptions = ( ] containers.forEach((name) => { - md.use(container, { + md.use(container, { name, - openRender: (tokens, index, _options, env: MarkdownEnv): string => { + openRender: (tokens, index, _options, env: MarkdownEnv) => { const token = tokens[index] // Resolve info (title) @@ -53,9 +54,9 @@ export const hint: PluginWithOptions = ( }) // Compact with @vuepress/theme-default - md.use(container, { + md.use(container, { name: 'danger', - openRender: (tokens, index, _options, env: MarkdownEnv): string => { + openRender: (tokens, index, _options, env: MarkdownEnv) => { const token = tokens[index] // Resolve info (title) @@ -78,9 +79,9 @@ export const hint: PluginWithOptions = ( closeRender: () => '
\n', }) - md.use(container, { + md.use(container, { name: 'details', - openRender: (tokens, index, _options, env: MarkdownEnv): string => { + openRender: (tokens, index, _options, env: MarkdownEnv) => { const token = tokens[index] // Resolve info (title) diff --git a/plugins/markdown/plugin-markdown-hint/src/node/index.ts b/plugins/markdown/plugin-markdown-hint/src/node/index.ts index 636ae50013..811264ee19 100644 --- a/plugins/markdown/plugin-markdown-hint/src/node/index.ts +++ b/plugins/markdown/plugin-markdown-hint/src/node/index.ts @@ -1,2 +1,2 @@ export * from './markdownHintPlugin.js' -export * from './options.js' +export type * from './options.js' diff --git a/plugins/markdown/plugin-markdown-hint/tsconfig.build.json b/plugins/markdown/plugin-markdown-hint/tsconfig.build.json index 1e7fd0d655..85b37d29a2 100644 --- a/plugins/markdown/plugin-markdown-hint/tsconfig.build.json +++ b/plugins/markdown/plugin-markdown-hint/tsconfig.build.json @@ -4,5 +4,6 @@ "rootDir": "./src", "outDir": "./lib" }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../../../tools/helper/tsconfig.build.json" }] } diff --git a/plugins/markdown/plugin-markdown-image/CHANGELOG.md b/plugins/markdown/plugin-markdown-image/CHANGELOG.md index 4790d404c3..0a56150fdc 100644 --- a/plugins/markdown/plugin-markdown-image/CHANGELOG.md +++ b/plugins/markdown/plugin-markdown-image/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-markdown-image + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-markdown-image diff --git a/plugins/markdown/plugin-markdown-image/package.json b/plugins/markdown/plugin-markdown-image/package.json index 5f62b0cfd2..d3e5801a38 100644 --- a/plugins/markdown/plugin-markdown-image/package.json +++ b/plugins/markdown/plugin-markdown-image/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-markdown-image", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - markdown image", "keywords": [ "vuepress-plugin", @@ -31,7 +31,8 @@ "type": "module", "exports": { ".": "./lib/node/index.js", - "./client/*": "./lib/client/*", + "./figure.css": "./lib/client/styles/figure.css", + "./mark.css": "./lib/client/styles/mark.css", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -41,6 +42,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -53,7 +55,7 @@ "@vuepress/helper": "workspace:*" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/markdown/plugin-markdown-image/rollup.config.ts b/plugins/markdown/plugin-markdown-image/rollup.config.ts new file mode 100644 index 0000000000..8e8a881f77 --- /dev/null +++ b/plugins/markdown/plugin-markdown-image/rollup.config.ts @@ -0,0 +1,10 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: [ + '@mdit/plugin-figure', + '@mdit/plugin-img-lazyload', + '@mdit/plugin-img-mark', + '@mdit/plugin-img-size', + ], +}) diff --git a/plugins/markdown/plugin-markdown-image/src/node/index.ts b/plugins/markdown/plugin-markdown-image/src/node/index.ts index 480e66176b..2c03cdc12b 100644 --- a/plugins/markdown/plugin-markdown-image/src/node/index.ts +++ b/plugins/markdown/plugin-markdown-image/src/node/index.ts @@ -1,2 +1,2 @@ export * from './markdownImagePlugin.js' -export * from './options.js' +export type * from './options.js' diff --git a/plugins/markdown/plugin-markdown-image/src/node/markdownImagePlugin.ts b/plugins/markdown/plugin-markdown-image/src/node/markdownImagePlugin.ts index f0c2ab0c6d..7aedc3cdd1 100644 --- a/plugins/markdown/plugin-markdown-image/src/node/markdownImagePlugin.ts +++ b/plugins/markdown/plugin-markdown-image/src/node/markdownImagePlugin.ts @@ -1,5 +1,6 @@ import { figure } from '@mdit/plugin-figure' import { imgLazyload } from '@mdit/plugin-img-lazyload' +import type { MarkdownItImgMarkOptions } from '@mdit/plugin-img-mark' import { imgMark } from '@mdit/plugin-img-mark' import { imgSize, obsidianImageSize } from '@mdit/plugin-img-size' import type { Plugin } from 'vuepress/core' @@ -20,7 +21,8 @@ export const markdownImagePlugin = ( if (options.lazyload) md.use(imgLazyload) if (options.obsidianSize) md.use(obsidianImageSize) if (options.size) md.use(imgSize) - if (mark) md.use(imgMark, isPlainObject(mark) ? mark : {}) + if (mark) + md.use(imgMark, isPlainObject(mark) ? mark : {}) }, clientConfigFile: (app) => prepareClientConfigFile(app, options), diff --git a/plugins/markdown/plugin-markdown-image/src/node/prepare/prepareClientConfigFile.ts b/plugins/markdown/plugin-markdown-image/src/node/prepare/prepareClientConfigFile.ts index 59a2d7fef9..8e30b31488 100644 --- a/plugins/markdown/plugin-markdown-image/src/node/prepare/prepareClientConfigFile.ts +++ b/plugins/markdown/plugin-markdown-image/src/node/prepare/prepareClientConfigFile.ts @@ -11,13 +11,13 @@ export const prepareClientConfigFile = async ( if (figure) { content += `\ -import "${getRealPath(`${PLUGIN_NAME}/client/styles/figure.css`, import.meta.url)}" +import "${getRealPath(`${PLUGIN_NAME}/figure.css`, import.meta.url)}" ` } if (mark) { content += `\ -import "${getRealPath(`${PLUGIN_NAME}/client/styles/mark.css`, import.meta.url)}" +import "${getRealPath(`${PLUGIN_NAME}/mark.css`, import.meta.url)}" ` } diff --git a/plugins/markdown/plugin-markdown-image/tsconfig.build.json b/plugins/markdown/plugin-markdown-image/tsconfig.build.json index 1e7fd0d655..85b37d29a2 100644 --- a/plugins/markdown/plugin-markdown-image/tsconfig.build.json +++ b/plugins/markdown/plugin-markdown-image/tsconfig.build.json @@ -4,5 +4,6 @@ "rootDir": "./src", "outDir": "./lib" }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../../../tools/helper/tsconfig.build.json" }] } diff --git a/plugins/markdown/plugin-markdown-math/CHANGELOG.md b/plugins/markdown/plugin-markdown-math/CHANGELOG.md index d119261c37..96d81c8118 100644 --- a/plugins/markdown/plugin-markdown-math/CHANGELOG.md +++ b/plugins/markdown/plugin-markdown-math/CHANGELOG.md @@ -3,6 +3,28 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Bug Fixes + +- **plugin-markdown-math:** improve font-size in katex ([4add5f1](https://github.com/vuepress/ecosystem/commit/4add5f14a18a83d352419cd2d3863beb5434fb97)) +- **plugin-markdown-math:** prevent scrollbar with mathjax ([c73b86f](https://github.com/vuepress/ecosystem/commit/c73b86f684605fede21b0879c4826baaf2d37bbb)) + +### Features + +- **plugin-markdown-math:** add macros option for katex by default, close [#261](https://github.com/vuepress/ecosystem/issues/261) ([c5568ca](https://github.com/vuepress/ecosystem/commit/c5568ca84ed82e05407a38423b900c7782769073)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.49](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2024-09-23) + +### Bug Fixes + +- **plugin-markdown-math:** incorrect import css path ([#256](https://github.com/vuepress/ecosystem/issues/256)) ([4e61424](https://github.com/vuepress/ecosystem/commit/4e6142496e2e80472d377d58cfbf538e5a51a981)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-markdown-math + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Bug Fixes diff --git a/plugins/markdown/plugin-markdown-math/package.json b/plugins/markdown/plugin-markdown-math/package.json index 57de578126..3e1853a559 100644 --- a/plugins/markdown/plugin-markdown-math/package.json +++ b/plugins/markdown/plugin-markdown-math/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-markdown-math", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - markdown math", "keywords": [ "vuepress-plugin", @@ -36,6 +36,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -44,12 +45,12 @@ "@mdit/plugin-mathjax-slim": "^0.13.1", "@types/markdown-it": "^14.1.2", "@vuepress/helper": "workspace:*", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { "katex": "^0.16.10", "mathjax-full": "^3.2.2", - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "peerDependenciesMeta": { "katex": { diff --git a/plugins/markdown/plugin-markdown-math/rollup.config.ts b/plugins/markdown/plugin-markdown-math/rollup.config.ts new file mode 100644 index 0000000000..8363449ac5 --- /dev/null +++ b/plugins/markdown/plugin-markdown-math/rollup.config.ts @@ -0,0 +1,10 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['@mdit/plugin-katex-slim', '@mdit/plugin-mathjax-slim'], + }), + ...rollupBundle('client/composables/useKatexCopy', { + external: ['katex/dist/contrib/copy-tex.min.js'], + }), +] diff --git a/plugins/markdown/plugin-markdown-math/src/client/styles/katex.scss b/plugins/markdown/plugin-markdown-math/src/client/styles/katex.scss index 8f8c5da654..3f7d39782c 100644 --- a/plugins/markdown/plugin-markdown-math/src/client/styles/katex.scss +++ b/plugins/markdown/plugin-markdown-math/src/client/styles/katex.scss @@ -1,7 +1,11 @@ // katex fix .katex { - font-size: 1.05em; direction: ltr; + + /* stylelint-disable-next-line selector-class-pattern */ + .cjk_fallback { + font-size: 0.83em; + } } .katex-display { @@ -17,10 +21,6 @@ &::-webkit-scrollbar { height: 3px; } - - .katex { - font-size: 1.21em; - } } .katex-error { diff --git a/plugins/markdown/plugin-markdown-math/src/node/index.ts b/plugins/markdown/plugin-markdown-math/src/node/index.ts index 123a77b62d..da367a188f 100644 --- a/plugins/markdown/plugin-markdown-math/src/node/index.ts +++ b/plugins/markdown/plugin-markdown-math/src/node/index.ts @@ -1,2 +1,2 @@ export * from './markdownMathPlugin.js' -export * from './options.js' +export type * from './options.js' diff --git a/plugins/markdown/plugin-markdown-math/src/node/markdownMathPlugin.ts b/plugins/markdown/plugin-markdown-math/src/node/markdownMathPlugin.ts index e0705c4ecc..8cad21ee58 100644 --- a/plugins/markdown/plugin-markdown-math/src/node/markdownMathPlugin.ts +++ b/plugins/markdown/plugin-markdown-math/src/node/markdownMathPlugin.ts @@ -1,9 +1,13 @@ +import type { MarkdownItKatexOptions } from '@mdit/plugin-katex-slim' import { katex } from '@mdit/plugin-katex-slim' +import type { MathjaxInstance } from '@mdit/plugin-mathjax-slim' import { createMathjaxInstance, mathjax } from '@mdit/plugin-mathjax-slim' import { addCustomElement, getInstalledStatus } from '@vuepress/helper' import type { Plugin } from 'vuepress/core' +import type { MarkdownEnv } from 'vuepress/markdown' import { colors, logger } from 'vuepress/utils' import type { + MarkdownKatexPluginOptions, MarkdownMathPluginOptions, MarkdownMathjaxPluginOptions, } from './options.js' @@ -64,7 +68,7 @@ export const markdownMathPlugin = ({ extendsMarkdown: (md) => { if (mathRenderer === 'mathjax') { - md.use(mathjax, mathjaxInstance!) + md.use(mathjax, mathjaxInstance!) // Reset mathjax style in each render md.use((mdIt) => { const originalRender = mdIt.render.bind(mdIt) @@ -78,15 +82,8 @@ export const markdownMathPlugin = ({ } }) } else { - md.use(katex, { - logger: ( - errorCode, - errorMsg, - token: Record & { text: string }, - { - filePathRelative, - }: Record & { filePathRelative?: string | null }, - ) => { + md.use>(katex, { + logger: (errorCode, errorMsg, token, { filePathRelative }) => { // Ignore this error if (errorCode === 'newLineInDisplayMode') return @@ -105,9 +102,9 @@ export const markdownMathPlugin = ({ }`, ) }, - ...options, - transformer: (content: string) => - content.replace(/^(<[a-z]+ )/g, '$1v-pre '), + macros: {}, + ...(options as Omit), + transformer: (content) => content.replace(/^(<[a-z]+ )/g, '$1v-pre '), }) } }, diff --git a/plugins/markdown/plugin-markdown-math/src/node/prepare/prepareMathjaxStyle.ts b/plugins/markdown/plugin-markdown-math/src/node/prepare/prepareMathjaxStyle.ts index a7913f98ac..cb6a61ae24 100644 --- a/plugins/markdown/plugin-markdown-math/src/node/prepare/prepareMathjaxStyle.ts +++ b/plugins/markdown/plugin-markdown-math/src/node/prepare/prepareMathjaxStyle.ts @@ -4,7 +4,7 @@ import type { App } from 'vuepress/core' // Prevent mathjax breaking mobile layout const MATHJAX_STYLE_PATCH = `\ mjx-container { - overflow-x: auto; + overflow: auto hidden; } ` diff --git a/plugins/markdown/plugin-markdown-math/tsconfig.build.json b/plugins/markdown/plugin-markdown-math/tsconfig.build.json index 1e7fd0d655..85b37d29a2 100644 --- a/plugins/markdown/plugin-markdown-math/tsconfig.build.json +++ b/plugins/markdown/plugin-markdown-math/tsconfig.build.json @@ -4,5 +4,6 @@ "rootDir": "./src", "outDir": "./lib" }, - "include": ["./src"] + "include": ["./src"], + "references": [{ "path": "../../../tools/helper/tsconfig.build.json" }] } diff --git a/plugins/markdown/plugin-markdown-tab/CHANGELOG.md b/plugins/markdown/plugin-markdown-tab/CHANGELOG.md new file mode 100644 index 0000000000..0bb87da0c4 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- **plugin-markdown-tab:** provide client entry ([a1ed50b](https://github.com/vuepress/ecosystem/commit/a1ed50bb738bb8b510a1471c797ffc5d8731f683)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Features + +- add plugin-markdown-tab ([#250](https://github.com/vuepress/ecosystem/issues/250)) ([49ea97c](https://github.com/vuepress/ecosystem/commit/49ea97cf10f07ad3e20b2528d17efc3b6576ac7a)) diff --git a/plugins/markdown/plugin-markdown-tab/package.json b/plugins/markdown/plugin-markdown-tab/package.json new file mode 100644 index 0000000000..53b1e8f86b --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/package.json @@ -0,0 +1,60 @@ +{ + "name": "@vuepress/plugin-markdown-tab", + "version": "2.0.0-rc.52", + "description": "VuePress plugin - markdown tab", + "keywords": [ + "vuepress-plugin", + "vuepress", + "plugin", + "markdown", + "tab" + ], + "homepage": "https://ecosystem.vuejs.press/plugins/markdown/markdown-tab.html", + "bugs": { + "url": "https://github.com/vuepress/ecosystem/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuepress/ecosystem.git", + "directory": "plugins/markdown/plugin-markdown-tab" + }, + "license": "MIT", + "author": { + "name": "Mr.Hope", + "email": "mister-hope@outlook.com", + "url": "https://mister-hope.com" + }, + "type": "module", + "exports": { + ".": "./lib/node/index.js", + "./client": "./lib/client/index.js", + "./package.json": "./package.json" + }, + "main": "./lib/node/index.js", + "types": "./lib/node/index.d.ts", + "files": [ + "lib" + ], + "scripts": { + "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", + "clean": "rimraf --glob ./lib ./*.tsbuildinfo", + "style": "sass src:lib --embed-sources --style=compressed" + }, + "dependencies": { + "@mdit/plugin-tab": "^0.13.2", + "@types/markdown-it": "^14.1.2", + "@vuepress/helper": "workspace:*", + "@vueuse/core": "^11.1.0", + "vue": "^3.5.10" + }, + "peerDependencies": { + "vuepress": "2.0.0-rc.17" + }, + "devDependencies": { + "markdown-it": "^14.1.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/plugins/markdown/plugin-markdown-tab/rollup.config.ts b/plugins/markdown/plugin-markdown-tab/rollup.config.ts new file mode 100644 index 0000000000..b334274269 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/rollup.config.ts @@ -0,0 +1,11 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['@mdit/plugin-tab'], + }), + ...rollupBundle({ + base: 'client', + files: ['components/CodeTabs', 'components/Tabs', 'index'], + }), +] diff --git a/plugins/markdown/plugin-markdown-tab/src/client/components/CodeTabs.ts b/plugins/markdown/plugin-markdown-tab/src/client/components/CodeTabs.ts new file mode 100644 index 0000000000..af2050a298 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/components/CodeTabs.ts @@ -0,0 +1,195 @@ +import { useStorage } from '@vueuse/core' +import type { PropType, SlotsType, VNode } from 'vue' +import { defineComponent, h, onMounted, ref, shallowRef, watch } from 'vue' + +import type { TabProps } from './Tabs.js' + +import '../styles/code-tabs.css' + +const CODE_TAB_STORE_NAME = 'VUEPRESS_CODE_TAB_STORE' + +const codeTabStore = useStorage>(CODE_TAB_STORE_NAME, {}) + +export const CodeTabs = defineComponent({ + name: 'CodeTabs', + + props: { + /** + * Active tab index + * + * 激活的标签页序号 + */ + active: { + type: Number, + default: 0, + }, + + /** + * Code tab data + * + * 代码标签页数据 + */ + data: { + type: Array as PropType, + required: true, + }, + + /** + * Code tab id + * + * 代码标签页 id + */ + id: { + type: String, + required: true, + }, + + /** + * Tab id + * + * 标签页 id + */ + tabId: { + type: String, + default: '', + }, + }, + + slots: Object as SlotsType<{ + [slot: `title${number}`]: (props: { + value: string + isActive: boolean + }) => VNode[] + [slot: `tab${number}`]: (props: { + value: string + isActive: boolean + }) => VNode[] + }>, + + setup(props, { slots }) { + // Index of current active item + const activeIndex = ref(props.active) + + // Refs of the tab buttons + const tabRefs = shallowRef([]) + + // Update store + const updateStore = (): void => { + if (props.tabId) + codeTabStore.value[props.tabId] = props.data[activeIndex.value].id + } + + // Activate next tab + const activateNext = (index = activeIndex.value): void => { + activeIndex.value = index < tabRefs.value.length - 1 ? index + 1 : 0 + tabRefs.value[activeIndex.value].focus() + } + + // Activate previous tab + const activatePrev = (index = activeIndex.value): void => { + activeIndex.value = index > 0 ? index - 1 : tabRefs.value.length - 1 + tabRefs.value[activeIndex.value].focus() + } + + // Handle keyboard event + const keyboardHandler = (event: KeyboardEvent, index: number): void => { + if (event.key === ' ' || event.key === 'Enter') { + event.preventDefault() + activeIndex.value = index + } else if (event.key === 'ArrowRight') { + event.preventDefault() + activateNext() + } else if (event.key === 'ArrowLeft') { + event.preventDefault() + activatePrev() + } + + if (props.tabId) + codeTabStore.value[props.tabId] = props.data[activeIndex.value].id + } + + const getInitialIndex = (): number => { + if (props.tabId) { + const valueIndex = props.data.findIndex( + ({ id }) => codeTabStore.value[props.tabId] === id, + ) + + if (valueIndex !== -1) return valueIndex + } + + return props.active + } + + onMounted(() => { + activeIndex.value = getInitialIndex() + + watch( + () => codeTabStore.value[props.tabId], + (newValue, oldValue) => { + if (props.tabId && newValue !== oldValue) { + const index = props.data.findIndex(({ id }) => id === newValue) + + if (index !== -1) activeIndex.value = index + } + }, + ) + }) + + return (): VNode | null => + props.data.length + ? h('div', { class: 'vp-code-tabs' }, [ + h( + 'div', + { class: 'vp-code-tabs-nav', role: 'tablist' }, + props.data.map(({ id }, index) => { + const isActive = index === activeIndex.value + + return h( + 'button', + { + 'type': 'button', + 'ref': (element) => { + if (element) + tabRefs.value[index] = element as HTMLUListElement + }, + 'class': ['vp-code-tab-nav', { active: isActive }], + 'role': 'tab', + 'aria-controls': `codetab-${props.id}-${index}`, + 'aria-selected': isActive, + 'onClick': () => { + activeIndex.value = index + updateStore() + }, + 'onKeydown': (event: KeyboardEvent) => { + keyboardHandler(event, index) + }, + }, + slots[`title${index}`]({ value: id, isActive }), + ) + }), + ), + props.data.map(({ id }, index) => { + const isActive = index === activeIndex.value + + return h( + 'div', + { + 'class': ['vp-code-tab', { active: isActive }], + 'id': `codetab-${props.id}-${index}`, + 'role': 'tabpanel', + 'aria-expanded': isActive, + }, + [ + h( + 'div', + { class: 'vp-code-tab-title' }, + slots[`title${index}`]({ value: id, isActive }), + ), + slots[`tab${index}`]({ value: id, isActive }), + ], + ) + }), + ]) + : null + }, +}) diff --git a/plugins/markdown/plugin-markdown-tab/src/client/components/Tabs.ts b/plugins/markdown/plugin-markdown-tab/src/client/components/Tabs.ts new file mode 100644 index 0000000000..430ab54936 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/components/Tabs.ts @@ -0,0 +1,196 @@ +import { useStorage } from '@vueuse/core' +import type { PropType, SlotsType, VNode } from 'vue' +import { defineComponent, h, onMounted, ref, shallowRef, watch } from 'vue' + +import '../styles/tabs.css' + +export interface TabProps extends Record { + id: string +} + +const TAB_STORE_NAME = 'VUEPRESS_TAB_STORE' + +const tabStore = useStorage>(TAB_STORE_NAME, {}) + +export const Tabs = defineComponent({ + name: 'Tabs', + + props: { + /** + * Active tab index + * + * 激活的标签页序号 + */ + active: { + type: Number, + default: 0, + }, + + /** + * Tab data + * + * 标签页数据 + */ + data: { + type: Array as PropType, + required: true, + }, + + /** + * Tab id + * + * 标签页 id + */ + id: { + type: String, + required: true, + }, + + /** + * Tab id + * + * 标签页 id + */ + tabId: { + type: String, + default: '', + }, + }, + + slots: Object as SlotsType<{ + [slot: `title${number}`]: (props: { + value: string + isActive: boolean + }) => VNode[] + [slot: `tab${number}`]: (props: { + value: string + isActive: boolean + }) => VNode[] + }>, + + setup(props, { slots }) { + // Index of current active item + const activeIndex = ref(props.active) + + // Refs of the tab buttons + const tabRefs = shallowRef([]) + + // Update store + const updateStore = (): void => { + if (props.tabId) + tabStore.value[props.tabId] = props.data[activeIndex.value].id + } + + // Activate next tab + const activateNext = (index = activeIndex.value): void => { + activeIndex.value = index < tabRefs.value.length - 1 ? index + 1 : 0 + tabRefs.value[activeIndex.value].focus() + } + + // Activate previous tab + const activatePrev = (index = activeIndex.value): void => { + activeIndex.value = index > 0 ? index - 1 : tabRefs.value.length - 1 + tabRefs.value[activeIndex.value].focus() + } + + // Handle keyboard event + const keyboardHandler = (event: KeyboardEvent, index: number): void => { + if (event.key === ' ' || event.key === 'Enter') { + event.preventDefault() + activeIndex.value = index + } else if (event.key === 'ArrowRight') { + event.preventDefault() + activateNext() + } else if (event.key === 'ArrowLeft') { + event.preventDefault() + activatePrev() + } + + updateStore() + } + + const getInitialIndex = (): number => { + if (props.tabId) { + const valueIndex = props.data.findIndex( + ({ id }) => tabStore.value[props.tabId] === id, + ) + + if (valueIndex !== -1) return valueIndex + } + + return props.active + } + + onMounted(() => { + activeIndex.value = getInitialIndex() + + watch( + () => tabStore.value[props.tabId], + (newValue, oldValue) => { + if (props.tabId && newValue !== oldValue) { + const index = props.data.findIndex(({ id }) => id === newValue) + + if (index !== -1) activeIndex.value = index + } + }, + ) + }) + + return (): VNode | null => + props.data.length + ? h('div', { class: 'vp-tabs' }, [ + h( + 'div', + { class: 'vp-tabs-nav', role: 'tablist' }, + props.data.map(({ id }, index) => { + const isActive = index === activeIndex.value + + return h( + 'button', + { + 'type': 'button', + 'ref': (element) => { + if (element) + tabRefs.value[index] = element as HTMLUListElement + }, + 'class': ['vp-tab-nav', { active: isActive }], + 'role': 'tab', + 'aria-controls': `tab-${props.id}-${index}`, + 'aria-selected': isActive, + 'onClick': () => { + activeIndex.value = index + updateStore() + }, + 'onKeydown': (event: KeyboardEvent) => { + keyboardHandler(event, index) + }, + }, + slots[`title${index}`]({ value: id, isActive }), + ) + }), + ), + props.data.map(({ id }, index) => { + const isActive = index === activeIndex.value + + return h( + 'div', + { + 'class': ['vp-tab', { active: isActive }], + 'id': `tab-${props.id}-${index}`, + 'role': 'tabpanel', + 'aria-expanded': isActive, + }, + [ + h( + 'div', + { class: 'vp-tab-title' }, + slots[`title${index}`]({ value: id, isActive }), + ), + slots[`tab${index}`]({ value: id, isActive }), + ], + ) + }), + ]) + : null + }, +}) diff --git a/plugins/markdown/plugin-markdown-tab/src/client/components/index.ts b/plugins/markdown/plugin-markdown-tab/src/client/components/index.ts new file mode 100644 index 0000000000..18932d86dd --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/components/index.ts @@ -0,0 +1,2 @@ +export * from './CodeTabs.js' +export * from './Tabs.js' diff --git a/plugins/markdown/plugin-markdown-tab/src/client/index.ts b/plugins/markdown/plugin-markdown-tab/src/client/index.ts new file mode 100644 index 0000000000..166b13ec0e --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/index.ts @@ -0,0 +1 @@ +export * from './components/index.js' diff --git a/plugins/markdown/plugin-markdown-tab/src/client/shims.d.ts b/plugins/markdown/plugin-markdown-tab/src/client/shims.d.ts new file mode 100644 index 0000000000..390d0c9ff6 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/shims.d.ts @@ -0,0 +1,3 @@ +declare module '*.css' { + export {} +} diff --git a/plugins/markdown/plugin-markdown-tab/src/client/styles/code-tabs.scss b/plugins/markdown/plugin-markdown-tab/src/client/styles/code-tabs.scss new file mode 100644 index 0000000000..258d528270 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/styles/code-tabs.scss @@ -0,0 +1,156 @@ +.vp-code-tabs-nav { + overflow-x: auto; + + margin: 0.75rem 0 -0.75rem; + padding: 0; + border-radius: 6px 6px 0 0; + + background: var(--code-tabs-c-bg); + list-style: none; + + white-space: nowrap; + + transition: background var(--vp-t-color); + + @media print { + display: none; + } + + @media (max-width: 419px) { + margin-inline: -1.5rem; + border-radius: 0; + } +} + +.vp-code-tab-nav { + position: relative; + + min-width: 3rem; + margin: 0; + padding: 6px 12px; + border-width: 0; + border-radius: 6px 6px 0 0; + + background: transparent; + color: var(--code-tabs-c-text); + + font-weight: 600; + font-size: 0.875em; + line-height: 1.4; + + cursor: pointer; + + transition: + background var(--vp-t-color), + color var(--vp-t-color); + + &:hover { + background: var(--code-tabs-c-hover); + } + + &::before, + &::after { + content: ' '; + + position: absolute; + bottom: 0; + z-index: 1; + + width: 6px; + height: 6px; + } + + &::before { + right: 100%; + } + + &::after { + left: 100%; + } + + &.active { + background: var(--code-c-bg); + + &::before { + background: radial-gradient( + 12px at left top, + transparent 50%, + var(--code-c-bg) 50% + ); + } + + &::after { + background: radial-gradient( + 12px at right top, + transparent 50%, + var(--code-c-bg) 50% + ); + } + } + + &:first-child { + &::before { + display: none; + } + + [dir='rtl'] & { + &::before { + display: block; + } + + &::after { + display: none; + } + } + } +} + +.vp-code-tab { + display: none; + + @media print { + display: block; + } + + &.active { + display: block; + } + + div[class*='language-'] { + border-top-left-radius: 0; + border-top-right-radius: 0; + + @media (max-width: 419px) { + margin: 0.75rem -1.5rem; + border-radius: 0; + } + + &.line-numbers-mode::after { + border-top-left-radius: 0; + } + + pre { + border-top-left-radius: 0; + border-top-right-radius: 0; + + @media (max-width: 419px) { + border-radius: 0; + } + } + + code { + @media print { + white-space: pre-wrap; + } + } + } +} + +.vp-code-tab-title { + display: none; + font-weight: 500; + + @media print { + display: block; + } +} diff --git a/plugins/markdown/plugin-markdown-tab/src/client/styles/tabs.scss b/plugins/markdown/plugin-markdown-tab/src/client/styles/tabs.scss new file mode 100644 index 0000000000..825928a597 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/styles/tabs.scss @@ -0,0 +1,145 @@ +.vp-tabs { + margin: 1.5rem 0; + border: 1px solid var(--vp-c-border); + border-radius: 8px; + + @media (max-width: 419px) { + [vp-content] > & { + margin-inline: -1.5rem; + border: none; + border-bottom: 1px solid var(--vp-c-border); + border-radius: 0; + } + } +} + +.vp-tabs-nav { + overflow-x: auto; + + margin: 0; + padding: 0; + border-radius: 0.5rem 0.5rem 0 0; + + background: var(--tab-c-bg-nav); + list-style: none; + + white-space: nowrap; + + transition: background var(--vp-t-color); + + @media print { + display: none; + } + + @media (max-width: 419px) { + border-radius: 0; + } +} + +.vp-tab-nav { + position: relative; + + min-width: 4rem; + margin: 0; + padding: 0.5em 1em; + border: none; + border-radius: 0.5rem 0.5rem 0 0; + + background: transparent; + color: var(--tab-c-nav); + + font-weight: 600; + font-size: 0.875em; + line-height: 1.75; + + cursor: pointer; + + transition: + background var(--vp-t-color), + color var(--vp-t-color); + + &:hover { + background: var(--tab-c-bg-nav-hover); + } + + &::before, + &::after { + content: ' '; + + position: absolute; + bottom: 0; + z-index: 1; + + width: 8px; + height: 8px; + } + + &::before { + right: 100%; + } + + &::after { + left: 100%; + } + + &.active { + background: var(--tab-c-bg); + + &::before { + background: radial-gradient( + 16px at left top, + transparent 50%, + var(--tab-c-bg) 50% + ); + } + + &::after { + background: radial-gradient( + 16px at right top, + transparent 50%, + var(--tab-c-bg) 50% + ); + } + } + + &:first-child { + &::before { + display: none; + } + } +} + +.vp-tab { + display: none; + + padding: 1rem 0.75rem; + border-radius: 0 0 0.5rem 0.5rem; + + background: var(--tab-c-bg); + + transition: background var(--vp-t-color); + + @media print { + display: block; + padding: 0.5rem; + } + + &.active { + display: block; + } + + &:nth-child(n + 2) .vp-tab-title { + border-top: none; + } +} + +.vp-tab-title { + display: none; + padding: 0.25rem 0; + border-top: 1px solid var(--vp-c-border); + font-weight: 500; + + @media print { + display: block; + } +} diff --git a/plugins/markdown/plugin-markdown-tab/src/client/styles/vars.css b/plugins/markdown/plugin-markdown-tab/src/client/styles/vars.css new file mode 100644 index 0000000000..9bddce2108 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/client/styles/vars.css @@ -0,0 +1,9 @@ +:root { + --code-tabs-c-text: var(--code-c-text); + --code-tabs-c-bg: var(--code-c-highlight-bg); + --code-tabs-c-hover: var(--code-c-bg); + --tab-c-bg: var(--vp-c-bg); + --tab-c-nav: var(--vp-c-text); + --tab-c-bg-nav: var(--vp-c-grey-bg); + --tab-c-bg-nav-hover: var(--vp-c-control-hover); +} diff --git a/plugins/markdown/plugin-markdown-tab/src/node/codeTabs.ts b/plugins/markdown/plugin-markdown-tab/src/node/codeTabs.ts new file mode 100644 index 0000000000..eefaafb23a --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/codeTabs.ts @@ -0,0 +1,69 @@ +import { tab } from '@mdit/plugin-tab' +import type { PluginSimple } from 'markdown-it' + +import { stringifyProp } from './utils.js' + +export const codeTabs: PluginSimple = (md) => { + tab(md, { + name: 'code-tabs', + + tabsOpenRenderer: ({ active, data }, tokens, index) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const { meta } = tokens[index] + const titles = data.map(({ title }) => md.renderInline(title)) + const tabsData = data.map((item, dataIndex) => { + const { id = titles[dataIndex] } = item + + return { id } + }) + + return ` +${titles + .map( + (title, titleIndex) => `\ + +`, + ) + .join('')}\ +` + }, + + tabsCloseRenderer: () => `\ + +`, + + tabOpenRenderer: ({ index }, tokens, tokenIndex) => { + let foundFence = false + + // Hide all elements excerpt the first fence + for (let i = tokenIndex; i < tokens.length; i++) { + const { block, type } = tokens[i] + + if (block) { + if (type === 'code-tabs_tab_close') break + + if ((type === 'fence' || type === 'import_code') && !foundFence) { + foundFence = true + continue + } + + tokens[i].type = 'code_tab_empty' + tokens[i].hidden = true + } + } + + return `\ + +`, + }) +} diff --git a/plugins/markdown/plugin-markdown-tab/src/node/index.ts b/plugins/markdown/plugin-markdown-tab/src/node/index.ts new file mode 100644 index 0000000000..6902381786 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/index.ts @@ -0,0 +1,4 @@ +export * from './codeTabs.js' +export * from './markdownTabPlugin.js' +export type * from './options.js' +export * from './tabs.js' diff --git a/plugins/markdown/plugin-markdown-tab/src/node/markdownTabPlugin.ts b/plugins/markdown/plugin-markdown-tab/src/node/markdownTabPlugin.ts new file mode 100644 index 0000000000..53ef0650af --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/markdownTabPlugin.ts @@ -0,0 +1,28 @@ +import type { Plugin } from 'vuepress/core' + +import { codeTabs } from './codeTabs.js' +import type { MarkdownTabPluginOptions } from './options.js' +import { prepareConfigFile } from './prepareConfigFile.js' +import { tabs } from './tabs.js' + +const PLUGIN_NAME = '@vuepress/plugin-markdown-tab' + +export const markdownTabPlugin = ( + options: MarkdownTabPluginOptions, +): Plugin => { + if (!options.codeTabs && !options.tabs) + return { + name: PLUGIN_NAME, + } + + return { + name: PLUGIN_NAME, + + extendsMarkdown: (md) => { + if (options.codeTabs) md.use(codeTabs) + if (options.tabs) md.use(tabs) + }, + + clientConfigFile: (app) => prepareConfigFile(app, options), + } +} diff --git a/plugins/markdown/plugin-markdown-tab/src/node/options.ts b/plugins/markdown/plugin-markdown-tab/src/node/options.ts new file mode 100644 index 0000000000..2b4cb3f156 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/options.ts @@ -0,0 +1,22 @@ +/** + * markdown tab plugin configuration + */ +export interface MarkdownTabPluginOptions { + /** + * Whether to enable code tabs. + * + * 是否启用代码组。 + * + * @default false + */ + codeTabs?: boolean + + /** + * Whether to enable tabs. + * + * 是否启用标签页分组。 + * + * @default false + */ + tabs?: boolean +} diff --git a/plugins/markdown/plugin-markdown-tab/src/node/prepareConfigFile.ts b/plugins/markdown/plugin-markdown-tab/src/node/prepareConfigFile.ts new file mode 100644 index 0000000000..2af4a97843 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/prepareConfigFile.ts @@ -0,0 +1,46 @@ +import type { App } from 'vuepress' +import { ensureEndingSlash } from 'vuepress/shared' +import { getDirname, path } from 'vuepress/utils' +import type { MarkdownTabPluginOptions } from './options.js' + +const { url } = import.meta + +const __dirname = getDirname(url) + +const CLIENT_FOLDER = ensureEndingSlash(path.resolve(__dirname, '../client')) + +export const prepareConfigFile = ( + app: App, + { codeTabs, tabs }: MarkdownTabPluginOptions, +): Promise => { + const imports = new Set() + const enhances = new Set() + + if (codeTabs) { + imports.add( + `import { CodeTabs } from "${CLIENT_FOLDER}components/CodeTabs.js";`, + ) + enhances.add(`app.component("CodeTabs", CodeTabs);`) + } + + if (tabs) { + imports.add(`import { Tabs } from "${CLIENT_FOLDER}components/Tabs.js";`) + enhances.add(`app.component("Tabs", Tabs);`) + } + + return app.writeTemp( + 'markdown-tab/config.js', + `\ +${Array.from(imports.values()).join('\n')} +import "${CLIENT_FOLDER}styles/vars.css"; + +export default { + enhance: ({ app }) => { +${Array.from(enhances.values()) + .map((line) => ` ${line}`) + .join('\n')} + }, +}; +`, + ) +} diff --git a/plugins/markdown/plugin-markdown-tab/src/node/tabs.ts b/plugins/markdown/plugin-markdown-tab/src/node/tabs.ts new file mode 100644 index 0000000000..a21c42fe7c --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/tabs.ts @@ -0,0 +1,50 @@ +import { tab } from '@mdit/plugin-tab' +import type { PluginSimple } from 'markdown-it' + +import { stringifyProp } from './utils.js' + +export const tabs: PluginSimple = (md) => { + tab(md, { + name: 'tabs', + + tabsOpenRenderer: ({ active, data }, tokens, index) => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment + const { meta } = tokens[index] + const titles = data.map(({ title }) => md.renderInline(title)) + const tabsData = data.map((item, dataIndex) => { + const { id = titles[dataIndex] } = item + + return { id } + }) + + return `\ + +${titles + .map( + (title, titleIndex) => `\ + +`, + ) + .join('')}\ +` + }, + + tabsCloseRenderer: () => `\ + +`, + + tabOpenRenderer: ({ index }) => + `\ + +`, + }) +} diff --git a/plugins/markdown/plugin-markdown-tab/src/node/utils.ts b/plugins/markdown/plugin-markdown-tab/src/node/utils.ts new file mode 100644 index 0000000000..b78742555e --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/src/node/utils.ts @@ -0,0 +1,3 @@ +// Single quote will break @vue/compiler-sfc +export const stringifyProp = (data: unknown): string => + JSON.stringify(data).replace(/'/g, ''') diff --git a/plugins/markdown/plugin-markdown-tab/tests/node/__snapshots__/codeTabs.spec.ts.snap b/plugins/markdown/plugin-markdown-tab/tests/node/__snapshots__/codeTabs.spec.ts.snap new file mode 100644 index 0000000000..f25aac599d --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/tests/node/__snapshots__/codeTabs.spec.ts.snap @@ -0,0 +1,276 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`code tabs > Should render multiple block 1`] = ` +" + + + + + +" +`; + +exports[`code tabs > Should render multiple block 2`] = ` +" + + + + + +" +`; + +exports[`code tabs > Should render single block 1`] = ` +" + + + +" +`; + +exports[`code tabs > Should render single block 2`] = ` +" + + + +" +`; + +exports[`code tabs > Should support active 1`] = ` +" + + + +" +`; + +exports[`code tabs > Should support active 2`] = ` +" + + + +" +`; + +exports[`code tabs > Should support active 3`] = ` +" + + + + + +" +`; + +exports[`code tabs > Should support active 4`] = ` +" + + + + + +" +`; + +exports[`code tabs > Should support id 1`] = ` +" + + + +" +`; + +exports[`code tabs > Should support id 2`] = ` +" + + + +" +`; + +exports[`code tabs > Should support id 3`] = ` +" + + + +" +`; + +exports[`code tabs > Should support id 4`] = ` +" + + + +" +`; + +exports[`code tabs > Should support value 1`] = ` +" + + + +" +`; + +exports[`code tabs > Should support value 2`] = ` +" + + + +" +`; + +exports[`code tabs > Should support value 3`] = ` +" + + + + + +" +`; + +exports[`code tabs > Should support value 4`] = ` +" + + + + + +" +`; + +exports[`code tabs > Should work with code import 1`] = ` +" + + + + + +" +`; + +exports[`code tabs > should ignore other items 1`] = ` +" + + + +" +`; + +exports[`code tabs > should ignore other items 2`] = ` +" + + + +" +`; + +exports[`code tabs > should ignore other items 3`] = ` +" + + + + + +" +`; + +exports[`code tabs > should ignore other items 4`] = ` +" + + + + + +" +`; diff --git a/plugins/markdown/plugin-markdown-tab/tests/node/__snapshots__/tabs.spec.ts.snap b/plugins/markdown/plugin-markdown-tab/tests/node/__snapshots__/tabs.spec.ts.snap new file mode 100644 index 0000000000..93edb59b93 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/tests/node/__snapshots__/tabs.spec.ts.snap @@ -0,0 +1,179 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`tabs > Should render multiple block 1`] = ` +" + + + + + +" +`; + +exports[`tabs > Should render multiple block 2`] = ` +" + + + + + +" +`; + +exports[`tabs > Should render single block 1`] = ` +" + + + +" +`; + +exports[`tabs > Should render single block 2`] = ` +" + + + +" +`; + +exports[`tabs > Should support active 1`] = ` +" + + + +" +`; + +exports[`tabs > Should support active 2`] = ` +" + + + +" +`; + +exports[`tabs > Should support active 3`] = ` +" + + + + + +" +`; + +exports[`tabs > Should support active 4`] = ` +" + + + + + +" +`; + +exports[`tabs > Should support tabs id 1`] = ` +" + + + +" +`; + +exports[`tabs > Should support tabs id 2`] = ` +" + + + +" +`; + +exports[`tabs > Should support tabs id 3`] = ` +" + + + +" +`; + +exports[`tabs > Should support tabs id 4`] = ` +" + + + +" +`; + +exports[`tabs > should ignore other items 1`] = ` +" + + + +" +`; + +exports[`tabs > should ignore other items 2`] = ` +" + + + +" +`; diff --git a/plugins/markdown/plugin-markdown-tab/tests/node/codeTabs.spec.ts b/plugins/markdown/plugin-markdown-tab/tests/node/codeTabs.spec.ts new file mode 100644 index 0000000000..61a90f64da --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/tests/node/codeTabs.spec.ts @@ -0,0 +1,353 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' +import { createMarkdown } from 'vuepress/markdown' + +import { codeTabs } from '../../src/node/codeTabs.js' + +const markdownIt = MarkdownIt({ linkify: true }).use(codeTabs) + +describe('code tabs', () => { + it('Should render single block', () => { + expect( + markdownIt.render(` +::: code-tabs + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('Should render multiple block', () => { + expect( + markdownIt.render(` +::: code-tabs + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +@tab ts + +\`\`\`ts +const a = 1; +\`\`\` + +::: +`), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +@tab ts +\`\`\`ts +const a = 1; +\`\`\` +::: +`), + ).toMatchSnapshot() + }) + + it('Should support id', () => { + expect( + markdownIt.render(` +::: code-tabs#event + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs#event-id +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs#id with space +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs # id starts and having space in the end +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('Should support active', () => { + expect( + markdownIt.render(` +::: code-tabs + +@tab:active js + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab:active js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +@tab:active ts + +\`\`\`ts +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +@tab:active ts +\`\`\`ts +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('Should support value', () => { + expect( + markdownIt.render(` +::: code-tabs + +@tab js#javascript + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab:active js#javascript +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs + +@tab js#js + +\`\`\`js +const a = 1; +\`\`\` + +@tab:active ts #typescript + +\`\`\`ts +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab js # javascript +\`\`\`js +const a = 1; +\`\`\` +@tab:active ts #typescript +\`\`\`ts +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('should ignore other items', () => { + expect( + markdownIt.render(` +::: code-tabs + +\`\`\`coffee +const a = 1; +\`\`\` + +@tab:active js + +\`\`\`js +const a = 1; +\`\`\` + +\`\`\`ts +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +\`\`\`coffee +const a = 1; +\`\`\` +@tab:active js +\`\`\`js +const a = 1; +\`\`\` +\`\`\`ts +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs + +@tab js + +A text + +\`\`\`js +const a = 1; +\`\`\` + +Another text + +@tab:active ts + +Another text again + +\`\`\`ts +const a = 1; +\`\`\` + +Another text again + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: code-tabs +@tab js +A text +\`\`\`js +const a = 1; +\`\`\` +Another text +@tab:active ts +Another text again +\`\`\`ts +const a = 1; +\`\`\` +Another text again +::: + `), + ).toMatchSnapshot() + }) + + it('Should work with code import', () => { + const markdown = createMarkdown() + + markdown.use(codeTabs) + + expect( + markdown.render(` +::: code-tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +@tab:active ts +@[code](./not-exist.spec.ts) +::: +`), + ).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-tab/tests/node/tabs.spec.ts b/plugins/markdown/plugin-markdown-tab/tests/node/tabs.spec.ts new file mode 100644 index 0000000000..b166f5d590 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/tests/node/tabs.spec.ts @@ -0,0 +1,224 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { tabs } from '../../src/node/tabs.js' + +const markdownIt = MarkdownIt({ linkify: true }).use(tabs) + +describe('tabs', () => { + it('Should render single block', () => { + expect( + markdownIt.render(` +::: tabs + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('Should render multiple block', () => { + expect( + markdownIt.render(` +::: tabs + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +@tab ts + +\`\`\`ts +const a = 1; +\`\`\` + +::: +`), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +@tab ts +\`\`\`ts +const a = 1; +\`\`\` +::: +`), + ).toMatchSnapshot() + }) + + it('Should support tabs id', () => { + expect( + markdownIt.render(` +::: tabs#event + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs#event-id +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs#id with space +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs # id starts and having space in the end +@tab js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('Should support active', () => { + expect( + markdownIt.render(` +::: tabs + +@tab:active js + +\`\`\`js +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs +@tab:active js +\`\`\`js +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs + +@tab js + +\`\`\`js +const a = 1; +\`\`\` + +@tab:active ts + +\`\`\`ts +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs +@tab js +\`\`\`js +const a = 1; +\`\`\` +@tab:active ts +\`\`\`ts +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) + + it('should ignore other items', () => { + expect( + markdownIt.render(` +::: tabs + +\`\`\`coffee +const a = 1; +\`\`\` + +@tab:active js + +\`\`\`js +const a = 1; +\`\`\` + +\`\`\`ts +const a = 1; +\`\`\` + +::: + `), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +::: tabs +\`\`\`coffee +const a = 1; +\`\`\` +@tab:active js +\`\`\`js +const a = 1; +\`\`\` +\`\`\`ts +const a = 1; +\`\`\` +::: + `), + ).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-markdown-tab/tsconfig.build.json b/plugins/markdown/plugin-markdown-tab/tsconfig.build.json new file mode 100644 index 0000000000..85b37d29a2 --- /dev/null +++ b/plugins/markdown/plugin-markdown-tab/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.build.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib" + }, + "include": ["./src"], + "references": [{ "path": "../../../tools/helper/tsconfig.build.json" }] +} diff --git a/plugins/markdown/plugin-prismjs/CHANGELOG.md b/plugins/markdown/plugin-prismjs/CHANGELOG.md index 584dc52612..103c3c11a1 100644 --- a/plugins/markdown/plugin-prismjs/CHANGELOG.md +++ b/plugins/markdown/plugin-prismjs/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.49](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2024-09-23) + +### Features + +- **plugin-prismjs:** improve highlight color generation ([492cd27](https://github.com/vuepress/ecosystem/commit/492cd2746821e1e3554f8a46de14042c107bb68b)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-prismjs + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-prismjs diff --git a/plugins/markdown/plugin-prismjs/package.json b/plugins/markdown/plugin-prismjs/package.json index e90368da64..2a8e1bcb5f 100644 --- a/plugins/markdown/plugin-prismjs/package.json +++ b/plugins/markdown/plugin-prismjs/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-prismjs", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - prismjs", "keywords": [ "vuepress-plugin", @@ -33,6 +33,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "tsx scripts/generateThemeFiles.ts" }, @@ -47,7 +48,7 @@ "markdown-it": "^14.1.0" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/markdown/plugin-prismjs/rollup.config.ts b/plugins/markdown/plugin-prismjs/rollup.config.ts new file mode 100644 index 0000000000..be606701d3 --- /dev/null +++ b/plugins/markdown/plugin-prismjs/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['prismjs', 'prismjs/components/index.js'], +}) diff --git a/plugins/markdown/plugin-prismjs/scripts/generateThemeFiles.ts b/plugins/markdown/plugin-prismjs/scripts/generateThemeFiles.ts index 4cb33ab4ba..da6c2b7506 100644 --- a/plugins/markdown/plugin-prismjs/scripts/generateThemeFiles.ts +++ b/plugins/markdown/plugin-prismjs/scripts/generateThemeFiles.ts @@ -1,4 +1,4 @@ -import { compileString } from 'sass-embedded' +import { compileStringAsync } from 'sass-embedded' import { fs, getDirname, path } from 'vuepress/utils' const __dirname = getDirname(import.meta.url) @@ -11,9 +11,10 @@ const themeFiles = fs.readdirSync(themeDir) fs.ensureDirSync(outputDir) -themeFiles.forEach((file) => { - const filename = path.basename(file, '.scss') - const themeContent = ` +await Promise.all( + themeFiles.map(async (file) => { + const filename = path.basename(file, '.scss') + const themeContent = ` @use 'mixins'; @use 'themes/${filename}'; @@ -24,7 +25,7 @@ themeFiles.forEach((file) => { @include ${filename}.style; ` - const lightThemeContent = ` + const lightThemeContent = ` @use 'mixins'; @use 'themes/${filename}'; @@ -34,7 +35,7 @@ themeFiles.forEach((file) => { } ` - const darkThemeContent = ` + const darkThemeContent = ` @use 'mixins'; @use 'themes/${filename}'; @@ -44,29 +45,25 @@ themeFiles.forEach((file) => { } ` - const themeCss = compileString(themeContent, { - loadPaths: [styleDir], - style: 'compressed', - }).css - - const lightThemeCss = compileString(lightThemeContent, { - loadPaths: [styleDir], - style: 'compressed', - }).css - - const darkThemeCss = compileString(darkThemeContent, { - loadPaths: [styleDir], - style: 'compressed', - }).css - - fs.writeFileSync(path.resolve(outputDir, `${filename}.css`), themeCss) - fs.writeFileSync( - path.resolve(outputDir, `${filename}.light.css`), - lightThemeCss, - ) - - fs.writeFileSync( - path.resolve(outputDir, `${filename}.dark.css`), - darkThemeCss, - ) -}) + await Promise.all([ + compileStringAsync(themeContent, { + loadPaths: [styleDir], + style: 'compressed', + }).then(({ css }) => { + fs.writeFileSync(path.resolve(outputDir, `${filename}.css`), css) + }), + compileStringAsync(lightThemeContent, { + loadPaths: [styleDir], + style: 'compressed', + }).then(({ css }) => { + fs.writeFileSync(path.resolve(outputDir, `${filename}.light.css`), css) + }), + compileStringAsync(darkThemeContent, { + loadPaths: [styleDir], + style: 'compressed', + }).then(({ css }) => { + fs.writeFileSync(path.resolve(outputDir, `${filename}.dark.css`), css) + }), + ]) + }), +) diff --git a/plugins/markdown/plugin-prismjs/src/client/styles/_mixins.scss b/plugins/markdown/plugin-prismjs/src/client/styles/_mixins.scss index 3422a2d6da..7d7f72eb02 100644 --- a/plugins/markdown/plugin-prismjs/src/client/styles/_mixins.scss +++ b/plugins/markdown/plugin-prismjs/src/client/styles/_mixins.scss @@ -10,13 +10,13 @@ $code-bg-color, $saturation: if( - color.channel($code-bg-color, 'whiteness', $space: hwb) < 50%, + color.channel($code-bg-color, 'lightness', $space: hsl) < 50%, 5%, 10% ), $lightness: if( - color.channel($code-bg-color, 'whiteness', $space: hwb) < 50%, + color.channel($code-bg-color, 'lightness', $space: hsl) < 50%, 5%, -5% ) diff --git a/plugins/markdown/plugin-prismjs/src/node/getTheme.ts b/plugins/markdown/plugin-prismjs/src/node/getTheme.ts index 17db185c16..55183cbe3f 100644 --- a/plugins/markdown/plugin-prismjs/src/node/getTheme.ts +++ b/plugins/markdown/plugin-prismjs/src/node/getTheme.ts @@ -1,4 +1,5 @@ -import type { PrismjsPluginOptions, PrismjsTheme } from './options.js' +import type { PrismjsPluginOptions } from './options.js' +import type { PrismjsTheme } from './types.js' const PRISMJS_THEMES: PrismjsTheme[] = [ 'ateliersulphurpool-light', diff --git a/plugins/markdown/plugin-prismjs/src/node/index.ts b/plugins/markdown/plugin-prismjs/src/node/index.ts index 8145d1f16e..c6d78eb0ef 100644 --- a/plugins/markdown/plugin-prismjs/src/node/index.ts +++ b/plugins/markdown/plugin-prismjs/src/node/index.ts @@ -1,13 +1,13 @@ import { prismjsPlugin } from './prismjsPlugin.js' export * from './loadLanguages.js' -export * from './options.js' +export type * from './options.js' export * from './prismjsPlugin.js' export * from './resolveHighlighter.js' export * from './markdown/index.js' export * from './parser/index.js' export * from './utils/index.js' -export * from './types.js' +export type * from './types.js' /** @deprecated Use named export instead */ export default prismjsPlugin diff --git a/plugins/markdown/plugin-prismjs/src/node/markdown/highlightPlugin.ts b/plugins/markdown/plugin-prismjs/src/node/markdown/highlightPlugin.ts index 6fadb8fc53..4e1fb25e6c 100644 --- a/plugins/markdown/plugin-prismjs/src/node/markdown/highlightPlugin.ts +++ b/plugins/markdown/plugin-prismjs/src/node/markdown/highlightPlugin.ts @@ -1,3 +1,4 @@ +import type { WhitespacePosition } from '@vuepress/highlighter-helper' import type { Markdown } from 'vuepress/markdown' import { getCodeParser, @@ -11,9 +12,80 @@ import { notationHighlight, notationWordHighlight, } from '../parser/index.js' -import type { HighlightOptions } from '../types.js' import { resolveLanguage } from '../utils/index.js' +export interface MarkdownItPrismjsHighlightOptions { + /** + * Enable highlight lines or not + * + * @default true + */ + highlightLines?: boolean + + /** + * Enable notation diff + * + * @default false + * + * @see https://shiki.style/packages/transformers#transformernotationdiff + */ + notationDiff?: boolean + + /** + * Enable notation focus + * + * @default false + * + * @see https://shiki.style/packages/transformers#transformernotationfocus + */ + notationFocus?: boolean + + /** + * Enable notation highlight + * + * @default false + * + * @see https://shiki.style/packages/transformers#transformernotationhighlight + */ + notationHighlight?: boolean + + /** + * Enable notation error level + * + * @default false + * + * @see https://shiki.style/packages/transformers#transformernotationerrorlevel + */ + notationErrorLevel?: boolean + + /** + * Enable notation word highlight + * + * @default false + * + * @see https://shiki.style/packages/transformers#transformernotationwordhighlight + */ + notationWordHighlight?: boolean + + /** + * Enable render whitespace + * - true: enable render whitespace, same of `all` + * - false: disable render whitespace + * - 'all': render all whitespace + * - 'boundary': render leading and trailing whitespace of each line. + * - 'trailing': render trailing whitespace of each line + * + * you are able to use `:whitespace` or `:no-whitespace` or `:whitespace=position` to set single code block + * + * position: 'all' | 'boundary' | 'trailing' + * + * @default false + * + * @see https://shiki.style/packages/transformers#transformerrenderwhitespace + */ + whitespace?: WhitespacePosition | boolean +} + export const highlightPlugin = ( md: Markdown, { @@ -24,7 +96,7 @@ export const highlightPlugin = ( notationHighlight: enabledHighlight, notationWordHighlight: enabledWordHighlight, whitespace: whitespacePosition = false, - }: HighlightOptions = {}, + }: MarkdownItPrismjsHighlightOptions = {}, ): void => { const rawFence = md.renderer.rules.fence! diff --git a/plugins/markdown/plugin-prismjs/src/node/markdown/preWrapperPlugin.ts b/plugins/markdown/plugin-prismjs/src/node/markdown/preWrapperPlugin.ts index e658797fde..2bc38b4605 100644 --- a/plugins/markdown/plugin-prismjs/src/node/markdown/preWrapperPlugin.ts +++ b/plugins/markdown/plugin-prismjs/src/node/markdown/preWrapperPlugin.ts @@ -1,10 +1,19 @@ import type { Markdown } from 'vuepress/markdown' -import type { PreWrapperOptions } from '../types.js' import { resolveAttr, resolveLanguage } from '../utils/index.js' +export interface MarkdownItPreWrapperOptions { + /** + * Wrap the `
` tag with an extra `
` or not. Do not disable it unless you + * understand what's it for + * + * - Required for line numbers, title display and code block collapsing + */ + preWrapper?: boolean +} + export const preWrapperPlugin = ( md: Markdown, - { preWrapper = true }: PreWrapperOptions = {}, + { preWrapper = true }: MarkdownItPreWrapperOptions = {}, ): void => { const rawFence = md.renderer.rules.fence! diff --git a/plugins/markdown/plugin-prismjs/src/node/options.ts b/plugins/markdown/plugin-prismjs/src/node/options.ts index 9fa5a83cff..184ccbea93 100644 --- a/plugins/markdown/plugin-prismjs/src/node/options.ts +++ b/plugins/markdown/plugin-prismjs/src/node/options.ts @@ -1,81 +1,18 @@ -import type { MarkdownItCollapsedLinesOptions } from '@vuepress/highlighter-helper' import type { - HighlightOptions, - LineNumbersOptions, - PreWrapperOptions, -} from './types.js' - -export type PrismjsLightTheme = - | 'ateliersulphurpool-light' - | 'coldark-cold' - | 'coy' - | 'duotone-light' - | 'ghcolors' - | 'gruvbox-light' - | 'material-light' - | 'one-light' - | 'vs' - -export type PrismjsDarkTheme = - | 'atom-dark' - | 'cb' - | 'coldark-dark' - | 'dark' - | 'dracula' - | 'duotone-dark' - | 'duotone-earth' - | 'duotone-forest' - | 'duotone-sea' - | 'duotone-space' - | 'gruvbox-dark' - | 'holi' - | 'hopscotch' - | 'lucario' - | 'material-dark' - | 'material-oceanic' - | 'night-owl' - | 'nord' - | 'one-dark' - | 'pojoaque' - | 'shades-of-purple' - | 'solarized-dark-atom' - | 'tomorrow' - | 'vsc-dark-plus' - | 'xonokai' - | 'z-touch' - -export type PrismjsTheme = PrismjsDarkTheme | PrismjsLightTheme + MarkdownItCollapsedLinesOptions, + MarkdownItLineNumbersOptions, +} from '@vuepress/highlighter-helper' +import type { + MarkdownItPreWrapperOptions, + MarkdownItPrismjsHighlightOptions, +} from './markdown/index.js' +import type { PrismjsHighlightOptions } from './types.js' /** * Options of @vuepress/plugin-prismjs */ -export interface PrismjsPluginOptions - extends Pick, - PreWrapperOptions, - LineNumbersOptions, - HighlightOptions { - /** - * Single theme - * - * @default 'nord' - */ - theme?: PrismjsTheme - - /** - * Dual themes - */ - themes?: { - light: PrismjsTheme - dark: PrismjsTheme - } - - /** - * Languages to preload - * - * Workaround for prismjs language reloading issue - * - * @default ['markdown', 'jsdoc', 'yaml'] - * @see https://github.com/PrismJS/prism/issues/2716 - */ - preloadLanguages?: string[] -} +export type PrismjsPluginOptions = MarkdownItLineNumbersOptions & + MarkdownItPreWrapperOptions & + MarkdownItPrismjsHighlightOptions & + Pick & + PrismjsHighlightOptions diff --git a/plugins/markdown/plugin-prismjs/src/node/types.ts b/plugins/markdown/plugin-prismjs/src/node/types.ts index 8c10371da9..6e7fdf8fbc 100644 --- a/plugins/markdown/plugin-prismjs/src/node/types.ts +++ b/plugins/markdown/plugin-prismjs/src/node/types.ts @@ -1,97 +1,67 @@ -import type { WhitespacePosition } from '@vuepress/highlighter-helper' +export type PrismjsLightTheme = + | 'ateliersulphurpool-light' + | 'coldark-cold' + | 'coy' + | 'duotone-light' + | 'ghcolors' + | 'gruvbox-light' + | 'material-light' + | 'one-light' + | 'vs' -export interface PreWrapperOptions { - /** - * Wrap the `
` tag with an extra `
` or not. Do not disable it unless you - * understand what's it for - * - * - Required for `lineNumbers` - * - Required for title display of default theme - */ - preWrapper?: boolean -} +export type PrismjsDarkTheme = + | 'atom-dark' + | 'cb' + | 'coldark-dark' + | 'dark' + | 'dracula' + | 'duotone-dark' + | 'duotone-earth' + | 'duotone-forest' + | 'duotone-sea' + | 'duotone-space' + | 'gruvbox-dark' + | 'holi' + | 'hopscotch' + | 'lucario' + | 'material-dark' + | 'material-oceanic' + | 'night-owl' + | 'nord' + | 'one-dark' + | 'pojoaque' + | 'shades-of-purple' + | 'solarized-dark-atom' + | 'tomorrow' + | 'vsc-dark-plus' + | 'xonokai' + | 'z-touch' -export interface LineNumbersOptions { - /** - * Enable line numbers or not - * - * - A `boolean` value is to enable line numbers or not globally. - * - A `number` value is the minimum number of lines to enable line numbers - * - `disable` means completely disable the feature - * - * @default true - */ - lineNumbers?: boolean | number | 'disable' -} +export type PrismjsTheme = PrismjsDarkTheme | PrismjsLightTheme -export interface HighlightOptions { +export interface PrismjsHighlightOptions { /** - * Enable highlight lines or not + * Single theme * - * @default true + * @default 'nord' */ - highlightLines?: boolean + theme?: PrismjsTheme /** - * Enable notation diff - * - * @default false - * - * @see https://shiki.style/packages/transformers#transformernotationdiff - */ - notationDiff?: boolean - - /** - * Enable notation focus - * - * @default false - * - * @see https://shiki.style/packages/transformers#transformernotationfocus + * Dual themes */ - notationFocus?: boolean + themes?: { + light: PrismjsTheme + dark: PrismjsTheme + } /** - * Enable notation highlight - * - * @default false - * - * @see https://shiki.style/packages/transformers#transformernotationhighlight - */ - notationHighlight?: boolean - - /** - * Enable notation error level - * - * @default false - * - * @see https://shiki.style/packages/transformers#transformernotationerrorlevel - */ - notationErrorLevel?: boolean - - /** - * Enable notation word highlight - * - * @default false - * - * @see https://shiki.style/packages/transformers#transformernotationwordhighlight - */ - notationWordHighlight?: boolean - - /** - * Enable render whitespace - * - true: enable render whitespace, same of `all` - * - false: disable render whitespace - * - 'all': render all whitespace - * - 'boundary': render leading and trailing whitespace of each line. - * - 'trailing': render trailing whitespace of each line - * - * you are able to use `:whitespace` or `:no-whitespace` or `:whitespace=position` to set single code block - * - * position: 'all' | 'boundary' | 'trailing' + * Languages to preload * - * @default false + * Workaround for prismjs language reloading issue * - * @see https://shiki.style/packages/transformers#transformerrenderwhitespace + * @default ['markdown', 'jsdoc', 'yaml'] + * @see https://github.com/PrismJS/prism/issues/2716 */ - whitespace?: WhitespacePosition | boolean + preloadLanguages?: string[] } diff --git a/plugins/markdown/plugin-prismjs/tests/prismjs-preWrapper.spec.ts b/plugins/markdown/plugin-prismjs/tests/prismjs-preWrapper.spec.ts index 2831b08a28..95b9c2953a 100644 --- a/plugins/markdown/plugin-prismjs/tests/prismjs-preWrapper.spec.ts +++ b/plugins/markdown/plugin-prismjs/tests/prismjs-preWrapper.spec.ts @@ -1,3 +1,7 @@ +import type { + MarkdownItCollapsedLinesOptions, + MarkdownItLineNumbersOptions, +} from '@vuepress/highlighter-helper' import { collapsedLines as collapsedLinesPlugin, lineNumbers as lineNumbersPlugin, @@ -5,8 +9,8 @@ import { import MarkdownIt from 'markdown-it' import { describe, expect, it, vi } from 'vitest' import type { - HighlightOptions, - PreWrapperOptions, + MarkdownItPreWrapperOptions, + MarkdownItPrismjsHighlightOptions, PrismjsPluginOptions, } from '../src/node/index.js' import { highlightPlugin, preWrapperPlugin } from '../src/node/index.js' @@ -26,11 +30,17 @@ const createMarkdown = ({ const highlighter = resolveHighlighter(lang) return highlighter?.(code) || '' } - md.use(highlightPlugin, options) - md.use(preWrapperPlugin, { preWrapper }) + md.use(highlightPlugin, options) + md.use(preWrapperPlugin, { preWrapper }) if (preWrapper) { - md.use(lineNumbersPlugin, { lineNumbers, removeLastLine: true }) - md.use(collapsedLinesPlugin, { collapsedLines, removeLastLine: true }) + md.use(lineNumbersPlugin, { + lineNumbers, + removeLastLine: true, + }) + md.use(collapsedLinesPlugin, { + collapsedLines, + removeLastLine: true, + }) } return md } diff --git a/plugins/markdown/plugin-revealjs/CHANGELOG.md b/plugins/markdown/plugin-revealjs/CHANGELOG.md new file mode 100644 index 0000000000..ac58b791c6 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/CHANGELOG.md @@ -0,0 +1,22 @@ +# Change Log + +All notable changes to this project will be documented in this file. +See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. + +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.48](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.47...v2.0.0-rc.48) (2024-09-22) + +### Bug Fixes + +- **plugin-revealjs:** fix embed mode and keyboard events ([5d98506](https://github.com/vuepress/ecosystem/commit/5d985061c232037dc48329e3b8ce28ba15f75e1d)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Features + +- add plugin-revealjs ([#251](https://github.com/vuepress/ecosystem/issues/251)) ([253b959](https://github.com/vuepress/ecosystem/commit/253b959cca19fd8ef9eff5d90f21a147c916899a)) diff --git a/plugins/markdown/plugin-revealjs/package.json b/plugins/markdown/plugin-revealjs/package.json new file mode 100644 index 0000000000..921f8751f3 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/package.json @@ -0,0 +1,64 @@ +{ + "name": "@vuepress/plugin-revealjs", + "version": "2.0.0-rc.52", + "description": "VuePress plugin - markdown reveals", + "keywords": [ + "vuepress-plugin", + "vuepress", + "plugin", + "markdown", + "reveals" + ], + "homepage": "https://ecosystem.vuejs.press/plugins/markdown/revealjs.html", + "bugs": { + "url": "https://github.com/vuepress/ecosystem/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/vuepress/ecosystem.git", + "directory": "plugins/markdown/plugin-revealjs" + }, + "license": "MIT", + "author": { + "name": "Mr.Hope", + "email": "mister-hope@outlook.com", + "url": "https://mister-hope.com" + }, + "type": "module", + "exports": { + ".": "./lib/node/index.js", + "./client": "./lib/client/index.js", + "./layouts": "./lib/client/layouts/index.js", + "./styles/*": "./lib/client/styles/*", + "./package.json": "./package.json" + }, + "main": "./lib/node/index.js", + "types": "./lib/node/index.d.ts", + "files": [ + "lib" + ], + "scripts": { + "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", + "clean": "rimraf --glob ./lib ./*.tsbuildinfo", + "style": "sass src:lib --embed-sources --style=compressed" + }, + "dependencies": { + "@mdit/plugin-uml": "^0.13.1", + "@types/markdown-it": "^14.1.2", + "@types/reveal.js": "^5.0.3", + "@vuepress/helper": "workspace:*", + "@vueuse/core": "^11.1.0", + "reveal.js": "^5.1.0", + "vue": "^3.5.10" + }, + "peerDependencies": { + "vuepress": "2.0.0-rc.17" + }, + "devDependencies": { + "markdown-it": "^14.1.0" + }, + "publishConfig": { + "access": "public" + } +} diff --git a/plugins/markdown/plugin-revealjs/rollup.config.ts b/plugins/markdown/plugin-revealjs/rollup.config.ts new file mode 100644 index 0000000000..9e1345b4ed --- /dev/null +++ b/plugins/markdown/plugin-revealjs/rollup.config.ts @@ -0,0 +1,11 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['@mdit/plugin-uml'], + }), + ...rollupBundle({ + base: 'client', + files: ['layouts/index', 'index'], + }), +] diff --git a/plugins/markdown/plugin-revealjs/src/client/components/RevealJs.ts b/plugins/markdown/plugin-revealjs/src/client/components/RevealJs.ts new file mode 100644 index 0000000000..b892116508 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/components/RevealJs.ts @@ -0,0 +1,136 @@ +import { useRevealJs } from '@temp/revealjs/index.js' +import { LoadingIcon, decodeData, wait } from '@vuepress/helper/client' +// eslint-disable-next-line import/no-rename-default +import type Reveal from 'reveal.js/dist/reveal.esm.js' +import type { PropType, VNode } from 'vue' +import { + defineComponent, + h, + onMounted, + onUnmounted, + ref, + shallowRef, +} from 'vue' +import { usePageFrontmatter, usePageLayout } from 'vuepress/client' + +import type { RevealJsTheme } from '../../shared/index.js' +import { useRevealJsConfig } from '../helpers/index.js' + +import '../styles/reveal-js.css' + +declare const __REVEAL_DELAY__: number + +export const RevealJs = defineComponent({ + name: 'RevealJs', + + props: { + /** + * Presentation id + * + * 幻灯片 id + */ + id: { type: String, required: true }, + + /** + * Presentation code + * + * 幻灯片代码 + */ + code: { type: String, required: true }, + + /** + * Presentation theme + * + * 幻灯片主题 + */ + theme: { type: String as PropType, default: 'auto' }, + }, + + setup(props) { + const revealOptions = useRevealJsConfig() + const frontmatter = usePageFrontmatter<{ revealJs: Reveal.Options }>() + const layout = usePageLayout() + + const code = ref('') + const loading = ref(true) + const presentationContainer = shallowRef() + + let reveal: Reveal.Api | null = null + + const initRevealJs = async ( + container: HTMLElement, + ): Promise => { + const promises: [Promise, ...ReturnType] = [ + wait(__REVEAL_DELAY__), + ...useRevealJs(), + ] + + const [, { default: Reveal }, ...plugins] = await Promise.all(promises) + + const isSlidePage = layout.value.name === 'SlidePage' + + const instance = new Reveal(container, { + backgroundTransition: 'slide', + transition: 'slide', + slideNumber: true, + ...revealOptions, + hash: isSlidePage, + mouseWheel: isSlidePage, + ...frontmatter.value.revealJs, + embedded: !isSlidePage, + keyboardCondition: isSlidePage ? null : 'focused', + markdown: { + separator: '^\r?\\n---\r?\n$', + verticalSeparator: '^\r?\n--\r?\n$', + }, + + plugins: [ + plugins.map(({ default: plugin }) => plugin), + + revealOptions.plugins ?? [], + ].flat(), + }) + + await instance.initialize() + + return instance + } + + onMounted(async () => { + const container = presentationContainer.value + + if (container) { + code.value = decodeData(props.code) + + container.setAttribute('id', props.id) + container.setAttribute('data-theme', props.theme) + + reveal = await initRevealJs(container) + + loading.value = false + } + }) + + onUnmounted(() => { + reveal?.destroy() + }) + + return (): VNode => + h('div', { class: 'vp-reveal' }, [ + h( + 'div', + { + ref: presentationContainer, + class: ['reveal', 'reveal-viewport'], + }, + h('div', { + class: 'slides', + innerHTML: `
`, + }), + ), + loading.value + ? h(LoadingIcon, { class: 'reveal-loading', height: 400 }) + : null, + ]) + }, +}) diff --git a/plugins/markdown/plugin-revealjs/src/client/components/index.ts b/plugins/markdown/plugin-revealjs/src/client/components/index.ts new file mode 100644 index 0000000000..eaea722c2c --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/components/index.ts @@ -0,0 +1 @@ +export * from './RevealJs.js' diff --git a/plugins/markdown/plugin-revealjs/src/client/helpers/index.ts b/plugins/markdown/plugin-revealjs/src/client/helpers/index.ts new file mode 100644 index 0000000000..ae867e664c --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/helpers/index.ts @@ -0,0 +1 @@ +export * from './revealJs.js' diff --git a/plugins/markdown/plugin-revealjs/src/client/helpers/revealJs.ts b/plugins/markdown/plugin-revealjs/src/client/helpers/revealJs.ts new file mode 100644 index 0000000000..e8a5c94e98 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/helpers/revealJs.ts @@ -0,0 +1,25 @@ +// eslint-disable-next-line import/no-rename-default +import type Reveal from 'reveal.js' +import type { App } from 'vue' +import { inject } from 'vue' + +declare const __VUEPRESS_DEV__: boolean + +export type RevealJsOptions = Omit + +let revealOptions: Partial = {} + +const revealJsSymbol = Symbol(__VUEPRESS_DEV__ ? 'revealjs' : '') + +export const defineRevealJsConfig = ( + options: Partial, +): void => { + revealOptions = options +} + +export const useRevealJsConfig = (): Partial => + inject(revealJsSymbol)! + +export const injectRevealJsConfig = (app: App): void => { + app.provide(revealJsSymbol, revealOptions) +} diff --git a/plugins/markdown/plugin-revealjs/src/client/index.ts b/plugins/markdown/plugin-revealjs/src/client/index.ts new file mode 100644 index 0000000000..c5f5277e4d --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/index.ts @@ -0,0 +1,2 @@ +export * from './components/index.js' +export * from './helpers/index.js' diff --git a/plugins/markdown/plugin-revealjs/src/client/layouts/SlidePage.ts b/plugins/markdown/plugin-revealjs/src/client/layouts/SlidePage.ts new file mode 100644 index 0000000000..e82fc77f2a --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/layouts/SlidePage.ts @@ -0,0 +1,81 @@ +import { onClickOutside } from '@vueuse/core' +import type { VNode } from 'vue' +import { defineComponent, h, ref, shallowRef } from 'vue' +import { Content, useRouteLocale, useRouter } from 'vuepress/client' + +import '../styles/slide-page.css' + +const BACK_SVG = + '' +const HOME_SVG = + '' + +export const SlidePage = defineComponent({ + name: 'SlidePage', + + setup() { + const router = useRouter() + const routeLocale = useRouteLocale() + const showMenu = ref(false) + + const menu = shallowRef() + + const toggle = (): void => { + showMenu.value = !showMenu.value + } + + const closeMenu = (): void => { + showMenu.value = false + } + + const back = (): void => { + closeMenu() + window.history.go(-1) + } + + const home = (): void => { + closeMenu() + void router.push(routeLocale.value) + } + + onClickOutside(menu, closeMenu) + + return (): VNode => + h('div', { class: 'vp-reveal-page' }, [ + h(Content), + h( + 'div', + { ref: menu, class: ['vp-reveal-menu', { active: showMenu.value }] }, + [ + h( + 'button', + { + type: 'button', + class: 'menu-button', + onClick: () => { + toggle() + }, + }, + h('span', { class: 'icon' }), + ), + h('button', { + type: 'button', + class: 'back-button', + onClick: () => { + back() + }, + innerHTML: BACK_SVG, + }), + h('button', { + type: 'button', + class: 'home-button', + onClick: () => { + home() + }, + innerHTML: HOME_SVG, + }), + ], + ), + ]) + }, +}) diff --git a/plugins/markdown/plugin-revealjs/src/client/layouts/index.ts b/plugins/markdown/plugin-revealjs/src/client/layouts/index.ts new file mode 100644 index 0000000000..82e2676d6a --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/layouts/index.ts @@ -0,0 +1 @@ +export * from './SlidePage.js' diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/_normalize.scss b/plugins/markdown/plugin-revealjs/src/client/styles/_normalize.scss new file mode 100644 index 0000000000..2732a48038 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/_normalize.scss @@ -0,0 +1,183 @@ +@mixin normalize() { + font-weight: normal; + + p { + line-height: 1.3; + } + + /* Ensure certain elements are never larger than the slide itself */ + img, + video, + iframe { + max-width: 95%; + max-height: 95%; + } + + strong, + b { + font-weight: bold; + } + + em { + font-style: italic; + } + + ol, + dl, + ul { + display: inline-block; + margin: 0 0 0 1em; + text-align: start; + } + + ol { + list-style-type: decimal; + } + + ul ul, + ul ol, + ol ol, + ol ul { + display: block; + margin-left: 40px; + } + + ul { + list-style-type: disc; + + ul { + list-style-type: square; + + ul { + list-style-type: circle; + } + } + } + + dt { + font-weight: bold; + } + + dd { + margin-left: 40px; + } + + blockquote { + position: relative; + + display: block; + + width: 70%; + padding: 5px; + + background: rgb(255 255 255 / 5%); + box-shadow: 0 0 2px rgb(0 0 0 / 20%); + + font-style: italic; + + p { + &:first-child, + &:last-child { + display: inline-block; + } + } + } + + q { + font-style: italic; + } + + pre { + position: relative; + + display: block; + + width: 90%; + padding: 0; + + box-shadow: 0 5px 15px rgb(0 0 0 / 15%); + + font-size: 0.55em; + line-height: 1.2em; + text-align: left; + word-wrap: break-word; + } + + code { + text-transform: none; + } + + pre code { + display: block; + + overflow: auto; + + max-height: 400px; + padding: 5px; + + word-wrap: normal; + } + + a { + text-decoration: none; + transition: color 0.15s ease; + + &:hover { + border: none; + text-shadow: none; + } + } + + table { + margin: auto; + border-spacing: 0; + border-collapse: collapse; + } + + th { + font-weight: bold; + } + + th, + td { + padding: 0.2em 0.5em; + border-bottom: 1px solid; + text-align: left; + + &[align='center'] { + text-align: center; + } + + &[align='right'] { + text-align: right; + } + } + + tbody tr:last-child { + th, + td { + border-bottom: none; + } + } + + sup { + vertical-align: super; + font-size: smaller; + } + + sub { + vertical-align: sub; + font-size: smaller; + } + + small { + display: inline-block; + vertical-align: top; + font-size: 0.6em; + line-height: 1.2em; + + * { + vertical-align: top; + } + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/base.scss b/plugins/markdown/plugin-revealjs/src/client/styles/base.scss new file mode 100644 index 0000000000..4678e16191 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/base.scss @@ -0,0 +1,146 @@ +@use 'normalize'; + +.reveal-viewport { + background-color: var(--r-background-color); +} + +.reveal { + @include normalize.normalize; + color: var(--r-main-color); + font-size: var(--r-main-font-size); + font-family: var(--r-main-font); + + @media print { + .backgrounds { + background-color: var(--r-background-color); + } + } + + ::selection { + background: var(--r-selection-background-color); + color: var(--r-selection-color); + text-shadow: none; + } + + .slides section { + &, + > section { + font-weight: inherit; + line-height: 1.3; + } + } + + h1 { + font-size: var(--r-heading1-size); + text-shadow: var(--r-heading1-text-shadow); + } + + h2 { + font-size: var(--r-heading2-size); + } + + h3 { + font-size: var(--r-heading3-size); + } + + h4 { + font-size: var(--r-heading4-size); + } + + p { + margin: var(--r-block-margin) 0; + } + + h1, + h2, + h3, + h4, + h5, + h6 { + margin: var(--r-heading-margin); + + color: var(--r-heading-color); + + font-weight: var(--r-heading-font-weight); + font-family: var(--r-heading-font); + line-height: var(--r-heading-line-height); + letter-spacing: var(--r-heading-letter-spacing); + text-transform: var(--r-heading-text-transform); + text-shadow: var(--r-heading-text-shadow); + word-wrap: break-word; + + &:last-child { + margin-bottom: 0; + } + } + + blockquote { + margin: var(--r-block-margin) auto; + } + + pre { + margin: var(--r-block-margin) auto; + font-family: var(--r-code-font); + } + + code { + font-family: var(--r-code-font); + } + + img { + margin: var(--r-block-margin) 0; + } + + a { + color: var(--r-link-color); + + &:hover { + color: var(--r-link-color-hover); + } + } + + .roll span::after { + background: var(--r-link-color-dark); + color: #fff; + } + + .r-frame { + border: 4px solid var(--r-main-color); + box-shadow: 0 0 10px rgb(0 0 0 / 15%); + } + + a .r-frame { + transition: all 0.15s linear; + } + + a:hover .r-frame { + border-color: var(--r-link-color); + box-shadow: 0 0 20px rgb(0 0 0 / 55%); + } + + .controls { + color: var(--r-link-color); + } + + .progress { + background: rgb(0 0 0 / 20%); + color: var(--r-link-color); + } + + table.hljs-ln { + display: table; + width: 100%; + + tr { + border: none; + + &:nth-child(odd) { + background: inherit !important; + } + } + + td { + border: none; + } + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/lato.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/lato.scss new file mode 100644 index 0000000000..3fe4a28b3d --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/lato.scss @@ -0,0 +1,110 @@ +// @import "https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400;1,700&display=swap"; +// Note: inlined because of network reasons + +/* latin-ext */ +@font-face { + font-weight: 400; + font-style: italic; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6u8w4BMUTPHjxsAUi-qJCY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 400; + font-style: italic; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6u8w4BMUTPHjxsAXC-q.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin-ext */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6u_w4BMUTPHjxsI5wq_FQft1dw.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6u_w4BMUTPHjxsI5wq_Gwft.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin-ext */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHjxAwXjeu.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHjx4wXg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6u9w4BMUTPHh6UVSwaPGR_p.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6u9w4BMUTPHh6UVSwiPGQ.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/league-gothic.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/league-gothic.scss new file mode 100644 index 0000000000..c94a583421 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/league-gothic.scss @@ -0,0 +1,46 @@ +// @import "https://fonts.googleapis.com/css2?family=League+Gothic&display=swap"; +// Note: inlined because of network reasons + +/* vietnamese */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: 'League Gothic'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/leaguegothic/v11/qFdR35CBi4tvBz81xy7WG7ep-BQAY7Krj7feObpH_9aug9UKQw.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: 'League Gothic'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/leaguegothic/v11/qFdR35CBi4tvBz81xy7WG7ep-BQAY7Krj7feObpH_9avg9UKQw.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: 'League Gothic'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/leaguegothic/v11/qFdR35CBi4tvBz81xy7WG7ep-BQAY7Krj7feObpH_9ahg9U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/montserrat.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/montserrat.scss new file mode 100644 index 0000000000..542e2336eb --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/montserrat.scss @@ -0,0 +1,95 @@ +// @import "https://fonts.googleapis.com/css2?family=Lato&family=Montserrat:wght@700&display=swap"; +// Note: inlined because of network reasons + +/* latin-ext */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHjxAwXjeu.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: Lato; + src: url('https://fonts.gstatic.com/s/lato/v24/S6uyw4BMUTPHjx4wXg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* cyrillic-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Montserrat; + src: url('https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w0aXpsog.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Montserrat; + src: url('https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w9aXpsog.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* vietnamese */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Montserrat; + src: url('https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w2aXpsog.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Montserrat; + src: url('https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w3aXpsog.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Montserrat; + src: url('https://fonts.gstatic.com/s/montserrat/v26/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCuM73w5aXo.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/news-cycle.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/news-cycle.scss new file mode 100644 index 0000000000..45d216e1ba --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/news-cycle.scss @@ -0,0 +1,56 @@ +// @import "https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;700&display=swap"; +// Note: inlined because of network reasons + +/* latin-ext */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: 'News Cycle'; + src: url('https://fonts.gstatic.com/s/newscycle/v23/CSR64z1Qlv-GDxkbKVQ_fO4KTet_.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 400; + font-style: normal; + font-family: 'News Cycle'; + src: url('https://fonts.gstatic.com/s/newscycle/v23/CSR64z1Qlv-GDxkbKVQ_fOAKTQ.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* latin-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: 'News Cycle'; + src: url('https://fonts.gstatic.com/s/newscycle/v23/CSR54z1Qlv-GDxkbKVQ_dFsvWNpeudwk.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: 'News Cycle'; + src: url('https://fonts.gstatic.com/s/newscycle/v23/CSR54z1Qlv-GDxkbKVQ_dFsvWNReuQ.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/open-sans.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/open-sans.scss new file mode 100644 index 0000000000..9b43b7c35c --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/open-sans.scss @@ -0,0 +1,336 @@ +// @import "https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"; +// Note: inlined because of network reasons + +/* cyrillic-ext */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtE6F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWvU6F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtU6F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuk6F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* hebrew */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWu06F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; +} + +/* math */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWxU6F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0330, U+0391-03A1, + U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, + U+2034-2037, U+2057, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2102, U+210A-210E, + U+2110-2112, U+2115, U+2119-211D, U+2124, U+2128, U+212C-212D, U+212F-2131, + U+2133-2138, U+213C-2140, U+2145-2149, U+2190, U+2192, U+2194-21AE, + U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, + U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B6, + U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, + U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, + U+2B30-2B4C, U+2BFE, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF; +} + +/* symbols */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqW106F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, + U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, + U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, + U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, + U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, + U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, + U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, + U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, + U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, + U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, + U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, + U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, + U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, + U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, + U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, + U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, + U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, + U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, + U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8B1, U+1F900-1F90B, U+1F93B, U+1F946, + U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA88, + U+1FA90-1FABD, U+1FABF-1FAC5, U+1FACE-1FADB, U+1FAE0-1FAE8, U+1FAF0-1FAF8, + U+1FB00-1FBFF; +} + +/* vietnamese */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWtk6F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWt06F15M.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 300 800; + font-style: italic; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memtYaGs126MiZpBA-UFUIcVXSCEkx2cmqvXlWqWuU6F.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* cyrillic-ext */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSKmu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSumu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSOmu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSymu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* hebrew */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS2mu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F; +} + +/* math */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTVOmu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0302-0303, U+0305, U+0307-0308, U+0330, U+0391-03A1, + U+03A3-03A9, U+03B1-03C9, U+03D1, U+03D5-03D6, U+03F0-03F1, U+03F4-03F5, + U+2034-2037, U+2057, U+20D0-20DC, U+20E1, U+20E5-20EF, U+2102, U+210A-210E, + U+2110-2112, U+2115, U+2119-211D, U+2124, U+2128, U+212C-212D, U+212F-2131, + U+2133-2138, U+213C-2140, U+2145-2149, U+2190, U+2192, U+2194-21AE, + U+21B0-21E5, U+21F1-21F2, U+21F4-2211, U+2213-2214, U+2216-22FF, U+2308-230B, + U+2310, U+2319, U+231C-2321, U+2336-237A, U+237C, U+2395, U+239B-23B6, + U+23D0, U+23DC-23E1, U+2474-2475, U+25AF, U+25B3, U+25B7, U+25BD, U+25C1, + U+25CA, U+25CC, U+25FB, U+266D-266F, U+27C0-27FF, U+2900-2AFF, U+2B0E-2B11, + U+2B30-2B4C, U+2BFE, U+FF5B, U+FF5D, U+1D400-1D7FF, U+1EE00-1EEFF; +} + +/* symbols */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTUGmu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0001-000C, U+000E-001F, U+007F-009F, U+20DD-20E0, U+20E2-20E4, + U+2150-218F, U+2190, U+2192, U+2194-2199, U+21AF, U+21E6-21F0, U+21F3, + U+2218-2219, U+2299, U+22C4-22C6, U+2300-243F, U+2440-244A, U+2460-24FF, + U+25A0-27BF, U+2800-28FF, U+2921-2922, U+2981, U+29BF, U+29EB, U+2B00-2BFF, + U+4DC0-4DFF, U+FFF9-FFFB, U+10140-1018E, U+10190-1019C, U+101A0, + U+101D0-101FD, U+102E0-102FB, U+10E60-10E7E, U+1D2C0-1D2D3, U+1D2E0-1D37F, + U+1F000-1F0FF, U+1F100-1F1AD, U+1F1E6-1F1FF, U+1F30D-1F30F, U+1F315, U+1F31C, + U+1F31E, U+1F320-1F32C, U+1F336, U+1F378, U+1F37D, U+1F382, U+1F393-1F39F, + U+1F3A7-1F3A8, U+1F3AC-1F3AF, U+1F3C2, U+1F3C4-1F3C6, U+1F3CA-1F3CE, + U+1F3D4-1F3E0, U+1F3ED, U+1F3F1-1F3F3, U+1F3F5-1F3F7, U+1F408, U+1F415, + U+1F41F, U+1F426, U+1F43F, U+1F441-1F442, U+1F444, U+1F446-1F449, + U+1F44C-1F44E, U+1F453, U+1F46A, U+1F47D, U+1F4A3, U+1F4B0, U+1F4B3, U+1F4B9, + U+1F4BB, U+1F4BF, U+1F4C8-1F4CB, U+1F4D6, U+1F4DA, U+1F4DF, U+1F4E3-1F4E6, + U+1F4EA-1F4ED, U+1F4F7, U+1F4F9-1F4FB, U+1F4FD-1F4FE, U+1F503, U+1F507-1F50B, + U+1F50D, U+1F512-1F513, U+1F53E-1F54A, U+1F54F-1F5FA, U+1F610, U+1F650-1F67F, + U+1F687, U+1F68D, U+1F691, U+1F694, U+1F698, U+1F6AD, U+1F6B2, U+1F6B9-1F6BA, + U+1F6BC, U+1F6C6-1F6CF, U+1F6D3-1F6D7, U+1F6E0-1F6EA, U+1F6F0-1F6F3, + U+1F6F7-1F6FC, U+1F700-1F7FF, U+1F800-1F80B, U+1F810-1F847, U+1F850-1F859, + U+1F860-1F887, U+1F890-1F8AD, U+1F8B0-1F8B1, U+1F900-1F90B, U+1F93B, U+1F946, + U+1F984, U+1F996, U+1F9E9, U+1FA00-1FA6F, U+1FA70-1FA7C, U+1FA80-1FA88, + U+1FA90-1FABD, U+1FABF-1FAC5, U+1FACE-1FADB, U+1FAE0-1FAE8, U+1FAF0-1FAF8, + U+1FB00-1FBFF; +} + +/* vietnamese */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSCmu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTSGmu1aB.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 300 800; + font-style: normal; + font-family: 'Open Sans'; + font-stretch: 100%; + src: url('https://fonts.gstatic.com/s/opensans/v40/memvYaGs126MiZpBA-UvWbX2vVnXBbObj2OVTS-muw.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/quicksand.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/quicksand.scss new file mode 100644 index 0000000000..51c312697c --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/quicksand.scss @@ -0,0 +1,43 @@ +// @import "https://fonts.googleapis.com/css2?family=Quicksand:wght@300..700&display=swap"; +// Note: inlined because of network reasons + +/* vietnamese */ +@font-face { + font-weight: 300 700; + font-style: normal; + font-family: Quicksand; + src: url('https://fonts.gstatic.com/s/quicksand/v31/6xKtdSZaM9iE8KbpRA_hJFQNcOM.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 300 700; + font-style: normal; + font-family: Quicksand; + src: url('https://fonts.gstatic.com/s/quicksand/v31/6xKtdSZaM9iE8KbpRA_hJVQNcOM.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 300 700; + font-style: normal; + font-family: Quicksand; + src: url('https://fonts.gstatic.com/s/quicksand/v31/6xKtdSZaM9iE8KbpRA_hK1QN.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/source-sans-pro.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/source-sans-pro.scss new file mode 100644 index 0000000000..ad743bed12 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/source-sans-pro.scss @@ -0,0 +1,184 @@ +// @import "https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"; +// Note: inlined because of network reasons + +/* cyrillic-ext */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqauLY1HY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqY-LY1HY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqa-LY1HY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqZOLY1HY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* vietnamese */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqaOLY1HY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqaeLY1HY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 200 900; + font-style: italic; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpMtKy2OAdR1K-IwhWudF-R3woqZ-LY.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* cyrillic-ext */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3wIaZfrc.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3wsaZfrc.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3wMaZfrc.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3wwaZfrc.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* vietnamese */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3wAaZfrc.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, + U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, + U+1EA0-1EF9, U+20AB; +} + +/* latin-ext */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3wEaZfrc.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 200 900; + font-style: normal; + font-family: 'Source Sans 3'; + src: url('https://fonts.gstatic.com/s/sourcesans3/v15/nwpStKy2OAdR1K-IwhWudF-R3w8aZQ.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/fonts/ubuntu.scss b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/ubuntu.scss new file mode 100644 index 0000000000..20a676856c --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/fonts/ubuntu.scss @@ -0,0 +1,310 @@ +// @import "https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,700;1,300;1,700&display=swap"; +// Note: inlined because of network reasons + +/* cyrillic-ext */ +@font-face { + font-weight: 300; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyCN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 300; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyLN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 300; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyDN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 300; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyMN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* latin-ext */ +@font-face { + font-weight: 300; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyBN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 300; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZftVyPN4E.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* cyrillic-ext */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyCN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyLN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyDN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyMN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* latin-ext */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyBN4Ffgg.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 700; + font-style: italic; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCp6KVjbNBYlgoKejZPslyPN4E.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* cyrillic-ext */ +@font-face { + font-weight: 300; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzjvWyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 300; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzjtGyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 300; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzjvGyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 300; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1Czjs2yNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* latin-ext */ +@font-face { + font-weight: 300; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzjvmyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 300; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoC1CzjsGyN.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} + +/* cyrillic-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvWyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, + U+FE2E-FE2F; +} + +/* cyrillic */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjtGyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; +} + +/* greek-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvGyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+1F00-1FFF; +} + +/* greek */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjs2yNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, + U+03A3-03FF; +} + +/* latin-ext */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjvmyNL4U.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, + U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; +} + +/* latin */ +@font-face { + font-weight: 700; + font-style: normal; + font-family: Ubuntu; + src: url('https://fonts.gstatic.com/s/ubuntu/v20/4iCv6KVjbNBYlgoCxCvjsGyN.woff2') + format('woff2'); + + font-display: swap; + unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, + U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, + U+2193, U+2212, U+2215, U+FEFF, U+FFFD; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/reveal-js.scss b/plugins/markdown/plugin-revealjs/src/client/styles/reveal-js.scss new file mode 100644 index 0000000000..05d9c42de0 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/reveal-js.scss @@ -0,0 +1,22 @@ +.vp-reveal { + position: relative; + width: 100%; + height: 400px; + min-height: 400px; + + @media print { + page-break-inside: avoid; + } + + @media (max-width: 419px) { + width: calc(100% + 3rem); + min-height: 300px; + margin: 0 -1.5rem; + } +} + +.reveal-loading { + position: absolute; + inset: 0 0 auto; + color: var(--vp-c-accent-bg); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/slide-page.scss b/plugins/markdown/plugin-revealjs/src/client/styles/slide-page.scss new file mode 100644 index 0000000000..9d892b5cc5 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/slide-page.scss @@ -0,0 +1,116 @@ +.vp-reveal-page { + .vp-reveal { + min-width: 100vw; + min-height: 100vh; + } + + .menu-button, + .back-button, + .home-button { + position: fixed; + bottom: 2rem; + + box-sizing: content-box; + width: 1rem; + height: 1rem; + padding: 0.5rem; + border: 0; + border-radius: 50%; + + background: var(--reveal-c-control); + box-shadow: 0 2px 8px 2px var(--reveal-c-shadow); + + cursor: pointer; + + &:hover { + background: var(--reveal-c-control-hover); + } + } + + .menu-button { + left: 2rem; + z-index: 50; + vertical-align: middle; + transition: transform 0.2s ease-in-out; + + &::before { + content: ' '; + margin-top: 0.125em; + } + + &::after { + content: ' '; + margin-bottom: 0.125em; + } + + .icon { + margin: 0.2em 0; + } + + &::before, + &::after, + .icon { + display: block; + + width: 100%; + height: 0.2em; + border-radius: 0.05em; + + background: var(--reveal-c-accent); + + transition: transform 0.2s ease-in-out; + } + } + + .back-button { + left: 2rem; + z-index: 49; + + opacity: 0; + + transition: + left 0.2s ease-out, + opacity 0.2s ease-out; + + fill: var(--reveal-c-accent); + } + + .home-button { + left: 2rem; + z-index: 48; + + opacity: 0; + + transition: + left 0.2s ease-out, + opacity 0.2s ease-out; + + fill: var(--reveal-c-accent); + } + + .active { + .menu-button { + &::before { + transform: translateY(0.4em) rotate(135deg); + } + + .icon { + transform: scale(0); + } + + &::after { + transform: translateY(-0.4em) rotate(-135deg); + } + } + + .back-button { + left: 4.5rem; + opacity: 1; + } + + .home-button { + left: 7rem; + opacity: 1; + } + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/auto.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/auto.scss new file mode 100644 index 0000000000..abe81d5b91 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/auto.scss @@ -0,0 +1,82 @@ +/** + * auto theme + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/dark'; +@use 'highlight/light'; + +[data-theme='light'] { + $link-color: #2a76dd; + + @include helper.theme( + 'auto', + ( + background-color: #fff, + main-color: #222, + heading-color: #222, + main-font-size: 42px, + main-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-text-shadow: none, + heading-letter-spacing: normal, + heading-text-transform: uppercase, + heading-font-weight: 600, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 15%), + selection-background-color: color.scale($link-color, $lightness: 25%), + heading1-size: 2.5em, + heading2-size: 1.6em, + heading3-size: 1.3em, + heading4-size: 1em, + ) + ) { + @include light.highlight; + } +} + +[data-theme='dark'] { + $link-color: #42affa; + + @include helper.theme( + 'auto', + ( + background-color: #191919, + main-color: #fff, + heading-color: #fff, + main-font-size: 42px, + main-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-text-shadow: none, + heading-letter-spacing: normal, + heading-text-transform: uppercase, + heading-font-weight: 600, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 15%), + selection-background-color: color.scale($link-color, $lightness: 25%), + heading1-size: 2.5em, + heading2-size: 1.6em, + heading3-size: 1.3em, + heading4-size: 1em, + ) + ) { + @include dark.highlight; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/beige.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/beige.scss new file mode 100644 index 0000000000..6df136e29d --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/beige.scss @@ -0,0 +1,53 @@ +/** + * Beige theme for reveal.js. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/light'; + +$link-color: #42affa; + +@include helper.theme( + 'beige', + ( + main-color: #333, + heading-color: #333, + heading-text-shadow: none, + background-color: #f7f3de, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 20%), + selection-background-color: rgb(79 64 28 / 99%), + overlay-element-bg-color: ( + 240, + 240, + 240, + ), + overlay-element-fg-color: ( + 0, + 0, + 0, + ), + heading1-text-shadow: ( + 0 1px 0 #ccc, + 0 2px 0 #c9c9c9, + 0 3px 0 #bbb, + 0 4px 0 #b9b9b9, + 0 5px 0 #aaa, + 0 6px 1px rgb(0 0 0 / 10%), + 0 0 5px rgb(0 0 0 / 10%), + 0 1px 3px rgb(0 0 0 / 30%), + 0 3px 5px rgb(0 0 0 / 20%), + 0 5px 10px rgb(0 0 0 / 25%), + 0 20px 20px rgb(0 0 0 / 15%), + ), + viewport-color: + helper.circle-gradient(rgb(247, 242, 211), rgb(255, 255, 255)), + ) +) { + @include light.highlight; + + // Change text colors against dark slide backgrounds + @include helper.darkmode-text-color(#fff); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/black.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/black.scss new file mode 100644 index 0000000000..376c9db6f4 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/black.scss @@ -0,0 +1,45 @@ +/** + * Black theme for reveal.js. This is the opposite of the 'white' theme. + * + * By Hakim El Hattab, http://hakim.se + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/dark'; + +$link-color: #42affa; + +@include helper.theme( + 'black', + ( + background-color: #191919, + main-color: #fff, + heading-color: #fff, + main-font-size: 42px, + main-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-text-shadow: none, + heading-letter-spacing: normal, + heading-text-transform: uppercase, + heading-font-weight: 600, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 15%), + selection-background-color: color.scale($link-color, $lightness: 25%), + heading1-size: 2.5em, + heading2-size: 1.6em, + heading3-size: 1.3em, + heading4-size: 1em, + ) +) { + @include dark.highlight; + @include helper.lightmode-text-color(#222); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/blood.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/blood.scss new file mode 100644 index 0000000000..7c39b0a341 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/blood.scss @@ -0,0 +1,100 @@ +/** + * Blood theme for reveal.js + * Author: Walther http://github.com/Walther + * + * Designed to be used with highlight.js theme + * "monokai_sublime.css" available from + * https://github.com/isagalaev/highlight.js/ + * + * For other themes, change $code-background accordingly. + * + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/dark'; + +// Colors used in the theme +$blood: #a23; +$coal: #222; +$code-background: #23241f; + +@include helper.theme( + 'blood', + ( + background-color: $coal, + + // Main text + main-font: + ( + ubuntu, + 'sans-serif', + ), + main-color: #eee, + + // Headings + heading-font: + ( + ubuntu, + 'sans-serif', + ), + heading-text-shadow: 2px 2px 2px $coal, + + // h1 shadow, borrowed humbly from + // (c) Default theme by Hakim El Hattab + heading1-text-shadow: + ( + 0 1px 0 #ccc, + 0 2px 0 #c9c9c9, + 0 3px 0 #bbb, + 0 4px 0 #b9b9b9, + 0 5px 0 #aaa, + 0 6px 1px rgb(0 0 0 / 10%), + 0 0 5px rgb(0 0 0 / 10%), + 0 1px 3px rgb(0 0 0 / 30%), + 0 3px 5px rgb(0 0 0 / 20%), + 0 5px 10px rgb(0 0 0 / 25%), + 0 20px 20px rgb(0 0 0 / 15%), + ), + // Links + link-color: $blood, + link-color-hover: color.scale($blood, $lightness: 20%), + // Text selection + selection-background-color: $blood, + selection-color: #fff, + ) +) { + @include dark.highlight; + @include helper.lightmode-text-color(#222); + + // some overrides + h1, + h2, + h3, + h4, + h5, + h6 { + font-weight: 700; + } + + p { + font-weight: 300; + text-shadow: 1px 1px $coal; + + code { + display: inline-block; + border-radius: 7px; + background: $code-background; + } + } + + section.has-light-background { + p, + h1, + h2, + h3, + h4 { + text-shadow: none; + } + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_helper.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_helper.scss new file mode 100644 index 0000000000..d52dd7ea45 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_helper.scss @@ -0,0 +1,111 @@ +@use 'sass:map'; +@use 'sass:meta'; +@use 'vars'; + +$default-variables: meta.module-variables('vars'); + +@function circle-gradient($outer, $inner, $type: circle) { + @return radial-gradient( + center, + $type farthest-corner, + $inner 0%, + $outer 100% + ); +} + +@mixin lightmode-text-color($color) { + section.has-light-background { + &, + h1, + h2, + h3, + h4, + h5, + h6 { + color: $color; + } + } +} + +@mixin darkmode-text-color($color) { + section.has-dark-background { + &, + h1, + h2, + h3, + h4, + h5, + h6 { + color: $color; + } + } +} + +@mixin theme($theme, $theme-variables) { + $variables: map.deep-merge($default-variables, $theme-variables); + $viewport-color: map.get($variables, 'viewport-color'); + $background-color: map.get($variables, 'background-color'); + $main-font: map.get($variables, 'main-font'); + $main-font-size: map.get($variables, 'main-font-size'); + $main-color: map.get($variables, 'main-color'); + $block-margin: map.get($variables, 'block-margin'); + $heading-margin: map.get($variables, 'heading-margin'); + $heading-font: map.get($variables, 'heading-font'); + $heading-color: map.get($variables, 'heading-color'); + $heading-line-height: map.get($variables, 'heading-line-height'); + $heading-letter-spacing: map.get($variables, 'heading-letter-spacing'); + $heading-text-transform: map.get($variables, 'heading-text-transform'); + $heading-text-shadow: map.get($variables, 'heading-text-shadow'); + $heading-font-weight: map.get($variables, 'heading-font-weight'); + $heading1-text-shadow: map.get($variables, 'heading1-text-shadow'); + $heading1-size: map.get($variables, 'heading1-size'); + $heading2-size: map.get($variables, 'heading2-size'); + $heading3-size: map.get($variables, 'heading3-size'); + $heading4-size: map.get($variables, 'heading4-size'); + $code-font: map.get($variables, 'code-font'); + $link-color: map.get($variables, 'link-color'); + $link-color-hover: map.get($variables, 'link-color-hover'); + $selection-background-color: map.get( + $variables, + 'selection-background-color' + ); + $selection-color: map.get($variables, 'selection-color'); + $overlay-element-bg-color: map.get($variables, 'overlay-element-bg-color'); + $overlay-element-fg-color: map.get($variables, 'overlay-element-fg-color'); + + .reveal[data-theme='#{$theme}'] { + --r-background-color: #{$background-color}; + --r-main-font: #{$main-font}; + --r-main-font-size: #{$main-font-size}; + --r-main-color: #{$main-color}; + --r-block-margin: #{$block-margin}; + --r-heading-margin: #{$heading-margin}; + --r-heading-font: #{$heading-font}; + --r-heading-color: #{$heading-color}; + --r-heading-line-height: #{$heading-line-height}; + --r-heading-letter-spacing: #{$heading-letter-spacing}; + --r-heading-text-transform: #{$heading-text-transform}; + --r-heading-text-shadow: #{$heading-text-shadow}; + --r-heading-font-weight: #{$heading-font-weight}; + --r-heading1-text-shadow: #{$heading1-text-shadow}; + --r-heading1-size: #{$heading1-size}; + --r-heading2-size: #{$heading2-size}; + --r-heading3-size: #{$heading3-size}; + --r-heading4-size: #{$heading4-size}; + --r-code-font: #{$code-font}; + --r-link-color: #{$link-color}; + --r-link-color-hover: #{$link-color-hover}; + --r-selection-background-color: #{$selection-background-color}; + --r-selection-color: #{$selection-color}; + --r-overlay-element-bg-color: #{$overlay-element-bg-color}; + --r-overlay-element-fg-color: #{$overlay-element-fg-color}; + + @if $viewport-color { + --r-viewport-color: #{$viewport-color}; + } @else { + --r-viewport-color: #{$background-color}; + } + + @content; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_vars.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_vars.scss new file mode 100644 index 0000000000..8bddf722f3 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/helper/_vars.scss @@ -0,0 +1,44 @@ +@use 'sass:color'; + +// Base settings for all themes that can optionally be overridden by the super-theme + +// Background of the presentation +$background-color: #2b2b2b; +$viewport-color: null; + +// Primary/body text +$main-color: #eee; +$main-font: 'Lato', sans-serif; +$main-font-size: 40px; + +// Vertical spacing between blocks of text +$block-margin: 20px; + +// Headings +$heading-margin: 0 0 $block-margin 0; +$heading-font: 'League Gothic', impact, sans-serif; +$heading-color: #eee; +$heading-line-height: 1.2; +$heading-letter-spacing: normal; +$heading-text-transform: uppercase; +$heading-text-shadow: none; +$heading-font-weight: normal; +$heading1-text-shadow: $heading-text-shadow; +$heading1-size: 3.77em; +$heading2-size: 2.11em; +$heading3-size: 1.55em; +$heading4-size: 1em; +$code-font: monospace; + +// Links and actions +$link-color: #13daec; +$link-color-hover: color.scale($link-color, $lightness: 20%); + +// Text selection +$selection-background-color: #ff5e99; +$selection-color: #fff; + +// Colors used for UI elements that are overlaid on top of +// the presentation +$overlay-element-bg-color: 240, 240, 240; +$overlay-element-fg-color: 0, 0, 0; diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_dark.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_dark.scss new file mode 100644 index 0000000000..9468f5b998 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_dark.scss @@ -0,0 +1,70 @@ +@mixin highlight() { + .hljs-comment, + .hljs-quote { + color: #b6b18b; + } + + .hljs-deletion, + .hljs-name, + .hljs-regexp, + .hljs-selector-class, + .hljs-selector-id, + .hljs-tag, + .hljs-template-variable, + .hljs-variable { + color: #eb3c54; + } + + // stylelint-disable selector-class-pattern + .hljs-built_in, + .hljs-builtin-name, + .hljs-link, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-params, + .hljs-type { + color: #e7ce56; + } + // stylelint-enable selector-class-pattern + + .hljs-attribute { + color: #ee7c2b; + } + + .hljs-addition, + .hljs-bullet, + .hljs-string, + .hljs-symbol { + color: #4fb4d7; + } + + .hljs-section, + .hljs-title { + color: #78bb65; + } + + .hljs-keyword, + .hljs-selector-tag { + color: #b45ea4; + } + + .hljs { + display: block; + + overflow-x: auto; + + padding: 0.5em; + + background: #1c1d21; + color: #c0c5ce; + } + + .hljs-emphasis { + font-style: italic; + } + + .hljs-strong { + font-weight: 700; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_index.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_index.scss new file mode 100644 index 0000000000..84f349356a --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_index.scss @@ -0,0 +1,9 @@ +.reveal pre.code-wrapper { + margin: var(--r-block-margin) auto; + padding: 0; + background: transparent; + + code { + color: inherit; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_light.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_light.scss new file mode 100644 index 0000000000..1d0b9b58d3 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/highlight/_light.scss @@ -0,0 +1,70 @@ +@mixin highlight() { + .hljs-comment, + .hljs-quote { + color: #8e908c; + } + + .hljs-deletion, + .hljs-name, + .hljs-regexp, + .hljs-selector-class, + .hljs-selector-id, + .hljs-tag, + .hljs-template-variable, + .hljs-variable { + color: #c82829; + } + + // stylelint-disable selector-class-pattern + .hljs-built_in, + .hljs-builtin-name, + .hljs-link, + .hljs-literal, + .hljs-meta, + .hljs-number, + .hljs-params, + .hljs-type { + color: #f5871f; + } + // stylelint-enable selector-class-pattern + + .hljs-attribute { + color: #eab700; + } + + .hljs-addition, + .hljs-bullet, + .hljs-string, + .hljs-symbol { + color: #718c00; + } + + .hljs-section, + .hljs-title { + color: #4271ae; + } + + .hljs-keyword, + .hljs-selector-tag { + color: #8959a8; + } + + .hljs { + display: block; + + overflow-x: auto; + + padding: 0.5em; + + background: #fff; + color: #4d4d4c; + } + + .hljs-emphasis { + font-style: italic; + } + + .hljs-strong { + font-weight: 700; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/league.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/league.scss new file mode 100644 index 0000000000..f467f505b8 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/league.scss @@ -0,0 +1,35 @@ +/** + * League theme for reveal.js. + * + * This was the default theme pre-3.0.0. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + +@use 'helper/helper'; +@use 'highlight/dark'; + +@include helper.theme( + 'league', + ( + viewport-color: + helper.circle-gradient(rgb(28, 30, 32, 1), rgb(85, 90, 95, 1)), + heading-text-shadow: 0 0 6px rgb(0 0 0 / 20%), + heading1-text-shadow: ( + 0 1px 0 #ccc, + 0 2px 0 #c9c9c9, + 0 3px 0 #bbb, + 0 4px 0 #b9b9b9, + 0 5px 0 #aaa, + 0 6px 1px rgb(0 0 0 / 10%), + 0 0 5px rgb(0 0 0 / 10%), + 0 1px 3px rgb(0 0 0 / 30%), + 0 3px 5px rgb(0 0 0 / 20%), + 0 5px 10px rgb(0 0 0 / 25%), + 0 20px 20px rgb(0 0 0 / 15%), + ), + ) +) { + @include dark.highlight; + @include helper.lightmode-text-color(#222); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/moon.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/moon.scss new file mode 100644 index 0000000000..58fd6ba04e --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/moon.scss @@ -0,0 +1,42 @@ +/** + * Solarized Dark theme for reveal.js. + * Author: Achim Staebler + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/dark'; + +// Solarized colors +$base03: #002b36; +$base02: #073642; +$base01: #586e75; +$base00: #657b83; +$base0: #839496; +$base1: #93a1a1; +$base2: #eee8d5; +$base3: #fdf6e3; +$yellow: #b58900; +$orange: #cb4b16; +$red: #dc322f; +$magenta: #d33682; +$violet: #6c71c4; +$blue: #268bd2; +$cyan: #2aa198; +$green: #859900; + +@include helper.theme( + 'moon', + ( + main-color: $base1, + heading-color: $base2, + heading-text-shadow: none, + background-color: $base03, + link-color: $blue, + link-color-hover: color.scale($blue, $lightness: 20%), + selection-background-color: $magenta, + ) +) { + @include dark.highlight; + @include helper.lightmode-text-color(#222); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/night.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/night.scss new file mode 100644 index 0000000000..85efd775a2 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/night.scss @@ -0,0 +1,36 @@ +/** + * Black theme for reveal.js. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/dark'; + +$link-color: #e7ad52; + +@include helper.theme( + 'night', + ( + background-color: #111, + main-font: ( + 'Open Sans', + sans-serif, + ), + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 20%), + heading-font: ( + 'Montserrat', + impact, + sans-serif, + ), + heading-text-shadow: none, + heading-letter-spacing: -0.03em, + heading-text-transform: none, + selection-background-color: $link-color, + ) +) { + @include dark.highlight; + @include helper.lightmode-text-color(#222); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/serif.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/serif.scss new file mode 100644 index 0000000000..091f1f363b --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/serif.scss @@ -0,0 +1,57 @@ +/** + * A simple theme for reveal.js presentations, similar + * to the default The accent color is brown. + * + * This theme is Copyright (C) 2012-2013 Owen Versteeg, http://owenversteeg.com - it is MIT licensed. + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/light'; + +$link-color: #51483d; + +@include helper.theme( + 'serif', + ( + main-font: ( + 'Palatino Linotype', + 'Book Antiqua', + palatino, + freeserif, + serif, + ), + main-color: #000, + heading-font: ( + 'Palatino Linotype', + 'Book Antiqua', + palatino, + freeserif, + serif, + ), + heading-color: #383d3d, + heading-text-shadow: none, + heading-text-transform: none, + background-color: #f0f1eb, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 20%), + selection-background-color: #26351c, + overlay-element-bg-color: ( + 240, + 240, + 240, + ), + overlay-element-fg-color: ( + 0, + 0, + 0, + ), + ) +) { + @include light.highlight; + @include helper.darkmode-text-color(#fff); + + a { + line-height: 1.3em; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/simple.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/simple.scss new file mode 100644 index 0000000000..b58975ac21 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/simple.scss @@ -0,0 +1,51 @@ +/** + * A simple theme for reveal.js presentations, similar + * to the default theme. The accent color is darkblue. + * + * This theme is Copyright (C) 2012 Owen Versteeg, https://github.com/StereotypicalApps. It is MIT licensed. + * reveal.js is Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/light'; + +$link-color: #00008b; +$overlay-element-bg-color: 0, 0, 0; +$overlay-element-fg-color: 240, 240, 240; + +@include helper.theme( + 'simple', + ( + main-font: ( + 'Lato', + sans-serif, + ), + main-color: #000, + heading-font: ( + 'News Cycle', + impact, + sans-serif, + ), + heading-color: #000, + heading-text-shadow: none, + heading-text-transform: none, + background-color: #fff, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 20%), + selection-background-color: rgb(0 0 0 / 99%), + overlay-element-bg-color: ( + 240, + 240, + 240, + ), + overlay-element-fg-color: ( + 0, + 0, + 0, + ), + ) +) { + @include light.highlight; + @include helper.darkmode-text-color(#fff); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/sky.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/sky.scss new file mode 100644 index 0000000000..69baeee7ae --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/sky.scss @@ -0,0 +1,51 @@ +/** + * Sky theme for reveal.js. + * + * Copyright (C) 2011-2012 Hakim El Hattab, http://hakim.se + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/light'; + +$link-color: #3b759e; + +@include helper.theme( + 'sky', + ( + viewport-color: helper.circle-gradient(#add9e4, #f7fbfc), + main-font: ( + 'Open Sans', + sans-serif, + ), + main-color: #333, + heading-font: ( + 'Quicksand', + sans-serif, + ), + heading-color: #333, + heading-letter-spacing: -0.08em, + heading-text-shadow: none, + background-color: #f7fbfc, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 20%), + selection-background-color: #134674, + overlay-element-bg-color: ( + 240, + 240, + 240, + ), + overlay-element-fg-color: ( + 0, + 0, + 0, + ), + ) +) { + @include light.highlight; + @include helper.darkmode-text-color(#fff); + + a { + line-height: 1.3em; + } +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/solarized.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/solarized.scss new file mode 100644 index 0000000000..6825974521 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/solarized.scss @@ -0,0 +1,51 @@ +/** + * Solarized Light theme for reveal.js. + * Author: Achim Staebler + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/light'; + +// Solarized colors +$base03: #002b36; +$base02: #073642; +$base01: #586e75; +$base00: #657b83; +$base0: #839496; +$base1: #93a1a1; +$base2: #eee8d5; +$base3: #fdf6e3; +$yellow: #b58900; +$orange: #cb4b16; +$red: #dc322f; +$magenta: #d33682; +$violet: #6c71c4; +$blue: #268bd2; +$cyan: #2aa198; +$green: #859900; + +@include helper.theme( + 'solarized', + ( + main-color: $base00, + heading-color: $base01, + heading-text-shadow: none, + background-color: $base3, + link-color: $blue, + link-color-hover: color.scale($blue, $lightness: 20%), + selection-background-color: $magenta, + overlay-element-bg-color: ( + 240, + 240, + 240, + ), + overlay-element-fg-color: ( + 0, + 0, + 0, + ), + ) +) { + @include light.highlight; +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/themes/white.scss b/plugins/markdown/plugin-revealjs/src/client/styles/themes/white.scss new file mode 100644 index 0000000000..8982513d83 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/themes/white.scss @@ -0,0 +1,55 @@ +/** + * White theme for reveal.js. This is the opposite of the 'black' theme. + * + * By Hakim El Hattab, http://hakim.se + */ + +@use 'sass:color'; +@use 'helper/helper'; +@use 'highlight/light'; + +$link-color: #2a76dd; + +@include helper.theme( + 'white', + ( + background-color: #fff, + main-color: #222, + heading-color: #222, + main-font-size: 42px, + main-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-font: ( + 'Source Sans Pro', + helvetica, + sans-serif, + ), + heading-text-shadow: none, + heading-letter-spacing: normal, + heading-text-transform: uppercase, + heading-font-weight: 600, + link-color: $link-color, + link-color-hover: color.scale($link-color, $lightness: 15%), + selection-background-color: color.scale($link-color, $lightness: 25%), + heading1-size: 2.5em, + heading2-size: 1.6em, + heading3-size: 1.3em, + heading4-size: 1em, + overlay-element-bg-color: ( + 240, + 240, + 240, + ), + overlay-element-fg-color: ( + 0, + 0, + 0, + ), + ) +) { + @include light.highlight; + @include helper.darkmode-text-color(#fff); +} diff --git a/plugins/markdown/plugin-revealjs/src/client/styles/vars.css b/plugins/markdown/plugin-revealjs/src/client/styles/vars.css new file mode 100644 index 0000000000..b8e5d63e25 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/client/styles/vars.css @@ -0,0 +1,6 @@ +:root { + --reveal-c-accent: var(--vp-c-accent); + --reveal-c-control: var(--vp-c-control); + --reveal-c-control-hover: var(--vp-c-control-hover); + --reveal-c-shadow: var(--vp-c-shadow); +} diff --git a/plugins/markdown/plugin-revealjs/src/node/index.ts b/plugins/markdown/plugin-revealjs/src/node/index.ts new file mode 100644 index 0000000000..4dfd327a47 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/index.ts @@ -0,0 +1,3 @@ +export type * from './options.js' +export * from './revealJs.js' +export * from './revealJsPlugin.js' diff --git a/plugins/markdown/plugin-revealjs/src/node/options.ts b/plugins/markdown/plugin-revealjs/src/node/options.ts new file mode 100644 index 0000000000..a6ff0bcd3b --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/options.ts @@ -0,0 +1,48 @@ +import type { RevealJsTheme } from '../shared/index.js' + +export type RevealJsPlugin = 'highlight' | 'math' | 'notes' | 'search' | 'zoom' + +/** + * reveal.js plugin options + */ +export interface RevealJsPluginOptions { + /** + * Reveal.js plugins + * + * 幻灯片插件 + * + * @default [] + */ + plugins?: RevealJsPlugin[] + + /** + * Reveal.js themes + * + * 幻灯片主题 + * + * @default ["auto"] + */ + themes?: RevealJsTheme[] + + /** + * Slide layout name + * + * 幻灯片布局名称 + * + * @default 'SlidePage' + */ + layout?: string | false + + /** + * The delay of rendering slides, in ms + * + * If the theme you are using has a switching animation, it is recommended to configure this option to `Switch animation duration + 200` + * + * 渲染幻灯片延时,单位 ms + * + * 如果你使用的主题有切换动画,建议配置此选项为 `切换动画时长 + 200` + * + * @default 800 + */ + delay?: number +} diff --git a/plugins/markdown/plugin-revealjs/src/node/prepare/index.ts b/plugins/markdown/plugin-revealjs/src/node/prepare/index.ts new file mode 100644 index 0000000000..cdacdb60e6 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/prepare/index.ts @@ -0,0 +1,2 @@ +export * from './prepareClientConfigFile.js' +export * from './prepareRevealJsEntry.js' diff --git a/plugins/markdown/plugin-revealjs/src/node/prepare/prepareClientConfigFile.ts b/plugins/markdown/plugin-revealjs/src/node/prepare/prepareClientConfigFile.ts new file mode 100644 index 0000000000..2416f9f6b6 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/prepare/prepareClientConfigFile.ts @@ -0,0 +1,73 @@ +import { getRealPath } from '@vuepress/helper' +import type { App } from 'vuepress' +import type { RevealJsTheme } from '../../shared/index.js' +import { PLUGIN_NAME } from '../utils.js' + +const CLIENT_ENTRY = getRealPath(`${PLUGIN_NAME}/client`, import.meta.url) + +const REVEAL_THEME_CONFIG: [name: RevealJsTheme, fonts?: string[]][] = [ + ['auto'], + ['beige', ['lato']], + ['black'], + ['blood', ['ubuntu']], + ['league'], + ['moon'], + ['night', ['montserrat', 'open-sans']], + ['serif'], + ['simple', ['lato', 'news-cycle']], + ['sky', ['open-sans', 'quicksand']], + ['solarized', ['lato']], + ['white'], +] + +export const prepareClientConfigFile = async ( + app: App, + revealThemes: RevealJsTheme[], + layout: string | false, +): Promise => { + const fonts = new Set(['league-gothic', 'source-sans-pro']) + const themes = new Set() + + revealThemes.forEach((theme) => { + const config = REVEAL_THEME_CONFIG.find(([name]) => name === theme) + + if (config) { + const [themeName, fontNames] = config + + themes.add(themeName) + fontNames?.forEach((fontName) => fonts.add(fontName)) + } + }) + + return app.writeTemp( + 'revealjs/config.js', + `\ +import { RevealJs, injectRevealJsConfig } from "${CLIENT_ENTRY}"; +${layout ? `import { SlidePage } from "${getRealPath(`${PLUGIN_NAME}/layouts`, import.meta.url)}";\n` : ''}\ + +import "${getRealPath('reveal.js/dist/reveal.css', import.meta.url)}"; +import "${getRealPath(`${PLUGIN_NAME}/styles/base.css`, import.meta.url)}"; +import "${getRealPath(`${PLUGIN_NAME}/styles/vars.css`, import.meta.url)}"; +${Array.from(fonts) + .map( + (name) => + `import "${getRealPath(`${PLUGIN_NAME}/styles/fonts/${name}.css`, import.meta.url)}";`, + ) + .join('\n')} +${Array.from(themes) + .map( + (name) => + `import "${getRealPath(`${PLUGIN_NAME}/styles/themes/${name}.css`, import.meta.url)}";`, + ) + .join('\n')} + +export default { + enhance: ({ app }) => { + injectRevealJsConfig(app) + app.component("RevealJs", RevealJs) + }, +${layout ? ` layouts: { "${layout}": SlidePage },\n` : ''}\ +}; +`, + ) +} diff --git a/plugins/markdown/plugin-revealjs/src/node/prepare/prepareRevealJsEntry.ts b/plugins/markdown/plugin-revealjs/src/node/prepare/prepareRevealJsEntry.ts new file mode 100644 index 0000000000..a243796d4e --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/prepare/prepareRevealJsEntry.ts @@ -0,0 +1,36 @@ +import { getRealPath } from '@vuepress/helper' +import type { App } from 'vuepress/core' + +import type { RevealJsPlugin } from '../options.js' + +const { url } = import.meta + +export const prepareRevealJsEntry = async ( + app: App, + revealPlugins: RevealJsPlugin[], +): Promise => { + await app.writeTemp( + 'revealjs/index.js', + `\ +export const useRevealJs = () => [ + import(/* webpackChunkName: "reveal" */ "${getRealPath( + 'reveal.js/dist/reveal.esm.js', + url, + )}"), + import(/* webpackChunkName: "reveal" */ "${getRealPath( + 'reveal.js/plugin/markdown/markdown.esm.js', + url, + )}"), +${revealPlugins + .map( + (plugin) => + ` import(/* webpackChunkName: "reveal" */ "${getRealPath( + `reveal.js/plugin/${plugin}/${plugin}.esm.js`, + url, + )}")`, + ) + .join(',\n')} +]; +`, + ) +} diff --git a/plugins/markdown/plugin-revealjs/src/node/revealJs.ts b/plugins/markdown/plugin-revealjs/src/node/revealJs.ts new file mode 100644 index 0000000000..0bd2a4faff --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/revealJs.ts @@ -0,0 +1,21 @@ +import type { MarkdownItUMLOptions } from '@mdit/plugin-uml' +import { uml } from '@mdit/plugin-uml' +import { encodeData } from '@vuepress/helper' +import type { PluginSimple } from 'markdown-it' + +export const revealJs: PluginSimple = (md) => { + md.use(uml, { + name: 'revealjs', + open: 'slidestart', + close: 'slideend', + render: (tokens, index) => { + const token = tokens[index] + const key = `revealjs-${index}` + const { content, info } = token + + return `` + }, + }) +} diff --git a/plugins/markdown/plugin-revealjs/src/node/revealJsPlugin.ts b/plugins/markdown/plugin-revealjs/src/node/revealJsPlugin.ts new file mode 100644 index 0000000000..d077bc6a40 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/revealJsPlugin.ts @@ -0,0 +1,47 @@ +import { + addViteOptimizeDepsExclude, + addViteSsrExternal, +} from '@vuepress/helper' +import type { Plugin } from 'vuepress/core' +import type { RevealJsPluginOptions } from './options.js' +import { + prepareClientConfigFile, + prepareRevealJsEntry, +} from './prepare/index.js' +import { revealJs } from './revealJs.js' +import { PLUGIN_NAME } from './utils.js' + +export const revealJsPlugin = ({ + plugins = [], + themes = ['auto'], + layout = 'SlidePage', + delay = 800, +}: RevealJsPluginOptions = {}): Plugin => { + return { + name: PLUGIN_NAME, + + define: { + __REVEAL_DELAY__: delay, + }, + + extendsBundlerOptions: (bundlerOptions, app) => { + addViteOptimizeDepsExclude(bundlerOptions, app, [ + 'reveal.js/dist/reveal.esm.js', + 'reveal.js/plugin/markdown/markdown.esm.js', + ...plugins.map( + (plugin) => `reveal.js/plugin/${plugin}/${plugin}.esm.js`, + ), + ]) + + addViteSsrExternal(bundlerOptions, app, 'reveal.js') + }, + + extendsMarkdown: (md) => { + md.use(revealJs) + }, + + onPrepared: async (app) => prepareRevealJsEntry(app, plugins), + + clientConfigFile: (app) => prepareClientConfigFile(app, themes, layout), + } +} diff --git a/plugins/markdown/plugin-revealjs/src/node/utils.ts b/plugins/markdown/plugin-revealjs/src/node/utils.ts new file mode 100644 index 0000000000..7fe3b2824c --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/node/utils.ts @@ -0,0 +1,5 @@ +import { Logger } from '@vuepress/helper' + +export const PLUGIN_NAME = '@vuepress/plugin-revealjs' + +export const logger = new Logger(PLUGIN_NAME) diff --git a/plugins/markdown/plugin-revealjs/src/shared/index.ts b/plugins/markdown/plugin-revealjs/src/shared/index.ts new file mode 100644 index 0000000000..433a0635f4 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/shared/index.ts @@ -0,0 +1 @@ +export type * from './theme.js' diff --git a/plugins/markdown/plugin-revealjs/src/shared/theme.ts b/plugins/markdown/plugin-revealjs/src/shared/theme.ts new file mode 100644 index 0000000000..7ba06137c0 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/shared/theme.ts @@ -0,0 +1,13 @@ +export type RevealJsTheme = + | 'auto' + | 'beige' + | 'black' + | 'blood' + | 'league' + | 'moon' + | 'night' + | 'serif' + | 'simple' + | 'sky' + | 'solarized' + | 'white' diff --git a/plugins/markdown/plugin-revealjs/src/shims.d.ts b/plugins/markdown/plugin-revealjs/src/shims.d.ts new file mode 100644 index 0000000000..3a42a6ebf8 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/src/shims.d.ts @@ -0,0 +1,20 @@ +declare module 'reveal.js/dist/reveal.esm.js' { + // eslint-disable-next-line import/no-rename-default + import Reveal from 'reveal.js' + + export default Reveal +} + +declare module '@temp/revealjs/index.js' { + import type { PluginFunction } from 'reveal.js' + + export const useRevealJs: () => [ + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + Promise, + ...Promise<{ default: PluginFunction }>[], + ] +} + +declare module '*.css' { + export {} +} diff --git a/plugins/markdown/plugin-revealjs/tests/node/__snapshots__/revealJs.spec.ts.snap b/plugins/markdown/plugin-revealjs/tests/node/__snapshots__/revealJs.spec.ts.snap new file mode 100644 index 0000000000..c16305d601 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/tests/node/__snapshots__/revealJs.spec.ts.snap @@ -0,0 +1,47 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`revealJs > Should not render 1`] = ` +"

Slide 1

+

A paragraph with some text and a link

+
+

Slide 2

+
    +
  • Item 1
  • +
  • Item 2
  • +
+
+

Slide 3.1

+
const a = 1;
+
+

--

+

Slide 3.2

+

$$ +J(\\theta_0,\\theta_1) = \\sum_{i=0} +$$

+" +`; + +exports[`revealJs > Should not render 2`] = ` +"

@slidestar

+

Slide 1

+

A paragraph with some text and a link

+
+

Slide 2

+
    +
  • Item 1
  • +
  • Item 2
  • +
+
+

Slide 3.1

+
const a = 1;
+
+

--

+

Slide 3.2

+

$$ +J(\\theta_0,\\theta_1) = \\sum_{i=0} +$$

+

@slideend

+" +`; + +exports[`revealJs > Should render 1`] = `""`; diff --git a/plugins/markdown/plugin-revealjs/tests/node/revealJs.spec.ts b/plugins/markdown/plugin-revealjs/tests/node/revealJs.spec.ts new file mode 100644 index 0000000000..428460547a --- /dev/null +++ b/plugins/markdown/plugin-revealjs/tests/node/revealJs.spec.ts @@ -0,0 +1,66 @@ +import MarkdownIt from 'markdown-it' +import { describe, expect, it } from 'vitest' + +import { revealJs } from '../../src/node/revealJs.js' + +const demo = ` +## Slide 1 + +A paragraph with some text and a [link](https://mister-hope.com) + +--- + +## Slide 2 + +- Item 1 +- Item 2 + +--- + +## Slide 3.1 + +\`\`\`js +const a = 1; +\`\`\` + +-- + +## Slide 3.2 + +$$ +J(\\theta_0,\\theta_1) = \\sum_{i=0} +$$ +` + +describe('revealJs', () => { + const markdownIt = MarkdownIt({ linkify: true }).use(revealJs) + + it('Should render', () => { + const renderResult = markdownIt.render(` +@slidestart +${demo} +@slideend +`) + + expect(renderResult).toMatch( + /<\/RevealJs>/, + ) + expect(renderResult).toMatchSnapshot() + }) + + it('Should not render', () => { + expect( + markdownIt.render(` +${demo} +`), + ).toMatchSnapshot() + + expect( + markdownIt.render(` +@slidestar +${demo} +@slideend +`), + ).toMatchSnapshot() + }) +}) diff --git a/plugins/markdown/plugin-revealjs/tsconfig.build.json b/plugins/markdown/plugin-revealjs/tsconfig.build.json new file mode 100644 index 0000000000..85b37d29a2 --- /dev/null +++ b/plugins/markdown/plugin-revealjs/tsconfig.build.json @@ -0,0 +1,9 @@ +{ + "extends": "../../../tsconfig.build.json", + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib" + }, + "include": ["./src"], + "references": [{ "path": "../../../tools/helper/tsconfig.build.json" }] +} diff --git a/plugins/markdown/plugin-shiki/CHANGELOG.md b/plugins/markdown/plugin-shiki/CHANGELOG.md index 965ea40004..8febbd57d8 100644 --- a/plugins/markdown/plugin-shiki/CHANGELOG.md +++ b/plugins/markdown/plugin-shiki/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-shiki + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Bug Fixes diff --git a/plugins/markdown/plugin-shiki/package.json b/plugins/markdown/plugin-shiki/package.json index 4eb0052d49..22850d6b99 100644 --- a/plugins/markdown/plugin-shiki/package.json +++ b/plugins/markdown/plugin-shiki/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-shiki", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - shiki", "keywords": [ "vuepress-plugin", @@ -33,18 +33,19 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, "dependencies": { - "@shikijs/transformers": "^1.18.0", + "@shikijs/transformers": "^1.21.0", "@vuepress/helper": "workspace:*", "@vuepress/highlighter-helper": "workspace:*", "nanoid": "^5.0.7", - "shiki": "^1.18.0" + "shiki": "^1.21.0" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/markdown/plugin-shiki/rollup.config.ts b/plugins/markdown/plugin-shiki/rollup.config.ts new file mode 100644 index 0000000000..cb16101b70 --- /dev/null +++ b/plugins/markdown/plugin-shiki/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['@shikijs/transformers', 'nanoid', 'shiki'], +}) diff --git a/plugins/markdown/plugin-shiki/src/node/index.ts b/plugins/markdown/plugin-shiki/src/node/index.ts index 02fe18a8ba..34fc2f57a5 100644 --- a/plugins/markdown/plugin-shiki/src/node/index.ts +++ b/plugins/markdown/plugin-shiki/src/node/index.ts @@ -1,8 +1,8 @@ import { shikiPlugin } from './shikiPlugin.js' -export * from './options.js' +export type * from './options.js' export * from './shiki.js' export * from './shikiPlugin.js' -export * from './types.js' +export type * from './types.js' /** @deprecated Use named export instead */ export default shikiPlugin diff --git a/plugins/markdown/plugin-shiki/src/node/markdown/preWrapperPlugin.ts b/plugins/markdown/plugin-shiki/src/node/markdown/preWrapperPlugin.ts index 8e5aec740b..74ea6aa60e 100644 --- a/plugins/markdown/plugin-shiki/src/node/markdown/preWrapperPlugin.ts +++ b/plugins/markdown/plugin-shiki/src/node/markdown/preWrapperPlugin.ts @@ -1,14 +1,23 @@ // markdown-it plugin for generating line numbers. // v-pre block logic is in `../highlight.ts` import type { Markdown } from 'vuepress/markdown' -import type { PreWrapperOptions } from '../types.js' import { resolveAttr, resolveLanguage } from '../utils.js' const PRE_ATTRS_REGEXP = /]*)>/ +export interface MarkdownItPreWrapperOptions { + /** + * Wrap the `
` tag with an extra `
` or not. Do not disable it unless you + * understand what's it for + * + * - Required for line numbers, title display and code block collapsing + */ + preWrapper?: boolean +} + export const preWrapperPlugin = ( md: Markdown, - { preWrapper = true }: PreWrapperOptions = {}, + { preWrapper = true }: MarkdownItPreWrapperOptions = {}, ): void => { const rawFence = md.renderer.rules.fence! diff --git a/plugins/markdown/plugin-shiki/src/node/options.ts b/plugins/markdown/plugin-shiki/src/node/options.ts index 185d1920be..b1d1f4902c 100644 --- a/plugins/markdown/plugin-shiki/src/node/options.ts +++ b/plugins/markdown/plugin-shiki/src/node/options.ts @@ -1,23 +1,14 @@ -import type { MarkdownItCollapsedLinesOptions } from '@vuepress/highlighter-helper' -import type { PreWrapperOptions, ShikiHighlightOptions } from './types.js' +import type { + MarkdownItCollapsedLinesOptions, + MarkdownItLineNumbersOptions, +} from '@vuepress/highlighter-helper' +import type { MarkdownItPreWrapperOptions } from './markdown/index.js' +import type { ShikiHighlightOptions } from './types.js' /** * Options of @vuepress/plugin-shiki */ -export type ShikiPluginOptions = Pick< - MarkdownItCollapsedLinesOptions, - 'collapsedLines' -> & - PreWrapperOptions & - ShikiHighlightOptions & { - /** - * Line number options - * - * - A `boolean` value is to enable line numbers or not globally. - * - A `number` value is the minimum number of lines to enable line numbers - * - `disable` means completely disable the feature - * - * @default true - */ - lineNumbers?: boolean | number | 'disable' - } +export type ShikiPluginOptions = MarkdownItLineNumbersOptions & + MarkdownItPreWrapperOptions & + Pick & + ShikiHighlightOptions diff --git a/plugins/markdown/plugin-shiki/src/node/shikiPlugin.ts b/plugins/markdown/plugin-shiki/src/node/shikiPlugin.ts index 669b715e08..88225149fc 100644 --- a/plugins/markdown/plugin-shiki/src/node/shikiPlugin.ts +++ b/plugins/markdown/plugin-shiki/src/node/shikiPlugin.ts @@ -1,9 +1,14 @@ +import type { + MarkdownItCollapsedLinesOptions, + MarkdownItLineNumbersOptions, +} from '@vuepress/highlighter-helper' import { collapsedLines as collapsedLinesPlugin, lineNumbers as lineNumbersPlugin, } from '@vuepress/highlighter-helper' import type { Plugin } from 'vuepress/core' import { isPlainObject } from 'vuepress/shared' +import type { MarkdownItPreWrapperOptions } from './markdown/index.js' import { applyHighlighter, highlightLinesPlugin, @@ -36,12 +41,14 @@ export const shikiPlugin = (options: ShikiPluginOptions = {}): Plugin => { const { preWrapper, lineNumbers, collapsedLines } = opt md.use(highlightLinesPlugin) - md.use(preWrapperPlugin, { preWrapper }) + md.use(preWrapperPlugin, { preWrapper }) if (preWrapper) { - if (lineNumbers !== 'disable') - md.use(lineNumbersPlugin, { lineNumbers }) - if (collapsedLines !== 'disable') - md.use(collapsedLinesPlugin, { collapsedLines }) + md.use(lineNumbersPlugin, { + lineNumbers, + }) + md.use(collapsedLinesPlugin, { + collapsedLines, + }) } }, diff --git a/plugins/markdown/plugin-shiki/src/node/types.ts b/plugins/markdown/plugin-shiki/src/node/types.ts index f5c48c7bae..fe7779858e 100644 --- a/plugins/markdown/plugin-shiki/src/node/types.ts +++ b/plugins/markdown/plugin-shiki/src/node/types.ts @@ -156,14 +156,3 @@ export type ShikiHighlightOptions = ShikiThemeOptions & { */ logLevel?: 'debug' | 'silent' | 'warn' } - -export interface PreWrapperOptions { - /** - * Wrap the `
` tag with an extra `
` or not. Do not disable it unless you - * understand what's it for - * - * - Required for `lineNumbers` - * - Required for title display of default theme - */ - preWrapper?: boolean -} diff --git a/plugins/markdown/plugin-shiki/tests/shiki-preWrapper.spec.ts b/plugins/markdown/plugin-shiki/tests/shiki-preWrapper.spec.ts index 480df558dc..9cd08e5287 100644 --- a/plugins/markdown/plugin-shiki/tests/shiki-preWrapper.spec.ts +++ b/plugins/markdown/plugin-shiki/tests/shiki-preWrapper.spec.ts @@ -9,35 +9,33 @@ import { import MarkdownIt from 'markdown-it' import { describe, expect, it } from 'vitest' import type { App } from 'vuepress' +import type { MarkdownItPreWrapperOptions } from '../src/node/markdown/index.js' import { applyHighlighter, highlightLinesPlugin, preWrapperPlugin, } from '../src/node/markdown/index.js' -import type { - PreWrapperOptions, - ShikiHighlightOptions, -} from '../src/node/types.js' +import type { ShikiPluginOptions } from '../src/node/options.js' const createMarkdown = async ({ preWrapper = true, lineNumbers = true, collapsedLines = false, ...options -}: MarkdownItCollapsedLinesOptions & - MarkdownItLineNumbersOptions & - PreWrapperOptions & - ShikiHighlightOptions = {}): Promise => { +}: ShikiPluginOptions = {}): Promise => { const md = MarkdownIt() await applyHighlighter(md, { env: { isDebug: false } } as App, options) md.use(highlightLinesPlugin) - md.use(preWrapperPlugin, { preWrapper }) + md.use(preWrapperPlugin, { preWrapper }) if (preWrapper) { - md.use(lineNumbersPlugin, { lineNumbers }) - if (collapsedLines !== 'disable') - md.use(collapsedLinesPlugin, { collapsedLines }) + md.use(lineNumbersPlugin, { + lineNumbers, + }) + md.use(collapsedLinesPlugin, { + collapsedLines, + }) } return md } diff --git a/plugins/pwa/plugin-pwa/CHANGELOG.md b/plugins/pwa/plugin-pwa/CHANGELOG.md index 5e38d37462..fd12fe4c87 100644 --- a/plugins/pwa/plugin-pwa/CHANGELOG.md +++ b/plugins/pwa/plugin-pwa/CHANGELOG.md @@ -3,6 +3,22 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Bug Fixes + +- **plugin-pwa:** fix config file ([4295c5d](https://github.com/vuepress/ecosystem/commit/4295c5d2bd8e64a51916909337eb9597ef9befb3)) + +### Features + +- **plugin-pwa:** improve style tree shaking ([aed3060](https://github.com/vuepress/ecosystem/commit/aed3060c104b872cd6f337202abd36090648faac)) +- **plugin-pwa:** prevent defining variables ([ec0d8d0](https://github.com/vuepress/ecosystem/commit/ec0d8d0cc5223b90b53c337079a1a1c5d5dbbf2b)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-pwa + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-pwa diff --git a/plugins/pwa/plugin-pwa/package.json b/plugins/pwa/plugin-pwa/package.json index 30f0e74906..6fdbff1a3a 100644 --- a/plugins/pwa/plugin-pwa/package.json +++ b/plugins/pwa/plugin-pwa/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-pwa", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - progressive web application", "keywords": [ "vuepress-plugin", @@ -27,7 +27,7 @@ "exports": { ".": "./lib/node/index.js", "./client": "./lib/client/index.js", - "./client/*": "./lib/client/*", + "./styles/*": "./lib/client/styles/*", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -37,6 +37,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -45,13 +46,16 @@ "@vueuse/core": "^11.1.0", "mitt": "^3.0.1", "register-service-worker": "^1.7.2", - "vue": "^3.5.7", + "vue": "^3.5.10", "workbox-build": "^7.1.1" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" + }, + "devDependencies": { + "rollup": "^4.22.5" } } diff --git a/plugins/pwa/plugin-pwa/rollup.config.ts b/plugins/pwa/plugin-pwa/rollup.config.ts new file mode 100644 index 0000000000..320dfe9bee --- /dev/null +++ b/plugins/pwa/plugin-pwa/rollup.config.ts @@ -0,0 +1,22 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['workbox-build'], + }), + ...rollupBundle( + { + base: 'client', + files: [ + 'components/PwaInstall', + 'components/PwaFoundPopup', + 'components/PwaReadyPopup', + 'composables/index', + 'index', + ], + }, + { + external: ['mitt', 'register-service-worker'], + }, + ), +] diff --git a/plugins/pwa/plugin-pwa/src/node/index.ts b/plugins/pwa/plugin-pwa/src/node/index.ts index 04dfa55133..40a2c954e8 100644 --- a/plugins/pwa/plugin-pwa/src/node/index.ts +++ b/plugins/pwa/plugin-pwa/src/node/index.ts @@ -1,4 +1,4 @@ export * from './locales.js' -export * from './options.js' +export type * from './options.js' export * from './pwaPlugin.js' -export * from '../shared/index.js' +export type * from '../shared/index.js' diff --git a/plugins/pwa/plugin-pwa/src/node/injectLinksToHead.ts b/plugins/pwa/plugin-pwa/src/node/injectLinksToHead.ts index e807efe6c0..74538e3023 100644 --- a/plugins/pwa/plugin-pwa/src/node/injectLinksToHead.ts +++ b/plugins/pwa/plugin-pwa/src/node/injectLinksToHead.ts @@ -1,9 +1,15 @@ -import { isPlainObject } from '@vuepress/helper' import type { HeadConfig } from 'vuepress/core' +import { isPlainObject } from 'vuepress/shared' import type { PwaPluginOptions } from './options.js' export const injectLinksToHead = ( - options: PwaPluginOptions, + { + favicon, + manifest, + themeColor = '#46bd87', + apple, + msTile, + }: PwaPluginOptions, base = '/', head: HeadConfig[] = [], ): HeadConfig[] => { @@ -34,15 +40,15 @@ export const injectLinksToHead = ( head.push(['meta', { name, content, ...more }]) } - if (options.favicon) setLink('icon', options.favicon) + if (favicon) setLink('icon', favicon) - if (options.manifest?.icons) { - const { icons } = options.manifest + if (manifest?.icons) { + const { icons } = manifest if (icons.length > 0) { fallBackIcon = icons[0].src - options.manifest.icons.forEach((icon) => { + manifest.icons.forEach((icon) => { if (icon.type) setLink('icon', icon.src, { type: icon.type, sizes: icon.sizes }) else setLink('icon', icon.src, { sizes: icon.sizes }) @@ -53,34 +59,31 @@ export const injectLinksToHead = ( setLink('manifest', `${base}manifest.webmanifest`, { crossorigin: 'use-credentials', }) - setMeta('theme-color', options.themeColor || '#46bd87') + setMeta('theme-color', themeColor || '#46bd87') - if (isPlainObject(options.apple) && (options.apple.icon || fallBackIcon)) { - setLink('apple-touch-icon', options.apple.icon || fallBackIcon) + if (isPlainObject(apple) && (apple.icon || fallBackIcon)) { + setLink('apple-touch-icon', apple.icon || fallBackIcon) setMeta('apple-mobile-web-app-capable', 'yes') setMeta( 'apple-mobile-web-app-status-bar-style', - options.apple.statusBarColor || 'black', + apple.statusBarColor || 'black', ) - if (options.apple.maskIcon) - setLink('mask-icon', options.apple.maskIcon, { - color: options.themeColor || '#46bd87', + if (apple.maskIcon) + setLink('mask-icon', apple.maskIcon, { + color: themeColor || '#46bd87', }) - } else if (options.apple !== false && fallBackIcon) { + } else if (apple !== false && fallBackIcon) { setLink('apple-touch-icon', fallBackIcon) setMeta('apple-mobile-web-app-capable', 'yes') setMeta('apple-mobile-web-app-status-bar-style', 'black') } - if (isPlainObject(options.msTile) && (options.msTile.image || fallBackIcon)) { - setMeta('msapplication-TileImage', options.msTile.image || fallBackIcon) - setMeta( - 'msapplication-TileColor', - options.msTile.color || options.themeColor || '#46bd87', - ) - } else if (options.msTile !== false && fallBackIcon) { + if (isPlainObject(msTile) && (msTile.image || fallBackIcon)) { + setMeta('msapplication-TileImage', msTile.image || fallBackIcon) + setMeta('msapplication-TileColor', msTile.color || themeColor || '#46bd87') + } else if (msTile !== false && fallBackIcon) { setMeta('msapplication-TileImage', fallBackIcon) - setMeta('msapplication-TileColor', options.themeColor || '#46bd87') + setMeta('msapplication-TileColor', themeColor || '#46bd87') } return head diff --git a/plugins/pwa/plugin-pwa/src/node/prepareConfigFile.ts b/plugins/pwa/plugin-pwa/src/node/prepareConfigFile.ts index 8205ecf9db..67f60a8fa7 100644 --- a/plugins/pwa/plugin-pwa/src/node/prepareConfigFile.ts +++ b/plugins/pwa/plugin-pwa/src/node/prepareConfigFile.ts @@ -1,5 +1,8 @@ +import { getLocaleConfig, getRealPath } from '@vuepress/helper' import type { App } from 'vuepress/core' import { getDirname, path } from 'vuepress/utils' +import { pwaLocales } from './locales.js' +import { PLUGIN_NAME } from './logger.js' import type { PwaPluginOptions } from './options.js' const __dirname = getDirname(import.meta.url) @@ -44,22 +47,26 @@ import { PwaReadyPopup as _PwaReadyPopup } from "${ `\ import { h } from "vue"; import { defineClientConfig } from "vuepress/client"; -import { setupPwa } from "${path.join(__dirname, '../client/composables/setupPwa.js')}"; -import { setupViewPoint } from "${path.join(__dirname, '../client/composables/setupViewPoint.js')}"; +import { setupPwa, setupViewPoint } from "${path.join(__dirname, '../client/composables/index.js')}"; ${configImport} -import "${path.join(__dirname, '../client/styles/vars.css')}"; +import "${getRealPath('@vuepress/plugin-pwa/styles/vars.css', import.meta.url)}"; -const locales = __PWA_LOCALES__; - -${rootComponents.map((item) => `const ${item} = () => h(_${item}, { locales })`).join('\n')} +const locales = ${JSON.stringify( + getLocaleConfig({ + app, + name: PLUGIN_NAME, + default: pwaLocales, + config: options.locales, + }), + )}; export default defineClientConfig({ setup: () => { - setupPwa(__SW_PATH__, __SW_FORCE_UPDATE__); + setupPwa(${JSON.stringify(options.serviceWorkerFilename ?? 'service-worker.js')}, ${options.update === 'force'}); setupViewPoint(); }, rootComponents: [ -${rootComponents.map((item) => ` ${item},`).join('\n')} +${rootComponents.map((item) => ` () => h(_${item}, { locales }),`).join('\n')} ], }); `, diff --git a/plugins/pwa/plugin-pwa/src/node/pwaPlugin.ts b/plugins/pwa/plugin-pwa/src/node/pwaPlugin.ts index 235ab63ffb..4cf60877af 100644 --- a/plugins/pwa/plugin-pwa/src/node/pwaPlugin.ts +++ b/plugins/pwa/plugin-pwa/src/node/pwaPlugin.ts @@ -2,7 +2,6 @@ import { addViteOptimizeDepsExclude, addViteSsrNoExternal, customizeDevServer, - getLocaleConfig, } from '@vuepress/helper' import type { PluginFunction } from 'vuepress/core' import { generateManifest } from './generateManifest.js' @@ -10,7 +9,6 @@ import { generateServiceWorker } from './generateServiceWorker.js' import { getManifest } from './getManifest.js' import { appendBase } from './helper.js' import { injectLinksToHead } from './injectLinksToHead.js' -import { pwaLocales } from './locales.js' import { PLUGIN_NAME, logger } from './logger.js' import type { PwaPluginOptions } from './options.js' import { prepareConfigFile } from './prepareConfigFile.js' @@ -34,17 +32,6 @@ export const pwaPlugin = return { name: PLUGIN_NAME, - define: () => ({ - __PWA_LOCALES__: getLocaleConfig({ - app, - name: PLUGIN_NAME, - default: pwaLocales, - config: options.locales, - }), - __SW_FORCE_UPDATE__: options.update === 'force', - __SW_PATH__: options.serviceWorkerFilename || 'service-worker.js', - }), - extendsBundlerOptions: (bundlerOptions: unknown): void => { addViteOptimizeDepsExclude(bundlerOptions, app, [ 'mitt', diff --git a/plugins/pwa/plugin-pwa/src/shared/index.ts b/plugins/pwa/plugin-pwa/src/shared/index.ts index 50c1a52cc1..d4fc046cb3 100644 --- a/plugins/pwa/plugin-pwa/src/shared/index.ts +++ b/plugins/pwa/plugin-pwa/src/shared/index.ts @@ -1,2 +1,2 @@ -export * from './locales.js' -export * from './manifest.js' +export type * from './locales.js' +export type * from './manifest.js' diff --git a/plugins/pwa/plugin-remove-pwa/CHANGELOG.md b/plugins/pwa/plugin-remove-pwa/CHANGELOG.md index bf32b7512e..b5d91d9a2f 100644 --- a/plugins/pwa/plugin-remove-pwa/CHANGELOG.md +++ b/plugins/pwa/plugin-remove-pwa/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.42](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.41...v2.0.0-rc.42) (2024-08-22) **Note:** Version bump only for package @vuepress/plugin-remove-pwa diff --git a/plugins/pwa/plugin-remove-pwa/package.json b/plugins/pwa/plugin-remove-pwa/package.json index 5898633dd4..684356b3be 100644 --- a/plugins/pwa/plugin-remove-pwa/package.json +++ b/plugins/pwa/plugin-remove-pwa/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-remove-pwa", - "version": "2.0.0-rc.42", + "version": "2.0.0-rc.52", "description": "VuePress plugin - remove-pwa", "keywords": [ "vuepress-plugin", @@ -35,10 +35,11 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/pwa/plugin-remove-pwa/rollup.config.ts b/plugins/pwa/plugin-remove-pwa/rollup.config.ts new file mode 100644 index 0000000000..a2d0fd0ec0 --- /dev/null +++ b/plugins/pwa/plugin-remove-pwa/rollup.config.ts @@ -0,0 +1,3 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index') diff --git a/plugins/search/plugin-docsearch/CHANGELOG.md b/plugins/search/plugin-docsearch/CHANGELOG.md index bd40620600..517edd14bb 100644 --- a/plugins/search/plugin-docsearch/CHANGELOG.md +++ b/plugins/search/plugin-docsearch/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Features + +- **plugin-docsearch:** improve search box appearance ([5282d3b](https://github.com/vuepress/ecosystem/commit/5282d3b3c5ca63170d2c915e76054cb326c00e11)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-docsearch diff --git a/plugins/search/plugin-docsearch/package.json b/plugins/search/plugin-docsearch/package.json index a9f5e1fcb1..04cb713865 100644 --- a/plugins/search/plugin-docsearch/package.json +++ b/plugins/search/plugin-docsearch/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-docsearch", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - docsearch", "keywords": [ "vuepress-plugin", @@ -25,7 +25,7 @@ "exports": { ".": "./lib/node/index.js", "./client": "./lib/client/index.js", - "./client/styles/*": "./lib/client/styles/*", + "./styles/*": "./lib/client/styles/*", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -35,20 +35,21 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.css\" lib" }, "dependencies": { - "@docsearch/css": "^3.6.1", - "@docsearch/js": "^3.6.1", - "@docsearch/react": "^3.6.1", + "@docsearch/css": "^3.6.2", + "@docsearch/js": "^3.6.2", + "@docsearch/react": "^3.6.2", "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", "ts-debounce": "^4.0.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/search/plugin-docsearch/rollup.config.ts b/plugins/search/plugin-docsearch/rollup.config.ts new file mode 100644 index 0000000000..cfc3fc1c79 --- /dev/null +++ b/plugins/search/plugin-docsearch/rollup.config.ts @@ -0,0 +1,8 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle('client/index', { + external: ['@docsearch/js', 'ts-debounce'], + }), +] diff --git a/plugins/search/plugin-docsearch/src/client/styles/vars.css b/plugins/search/plugin-docsearch/src/client/styles/vars.css index 35df626939..a245308975 100644 --- a/plugins/search/plugin-docsearch/src/client/styles/vars.css +++ b/plugins/search/plugin-docsearch/src/client/styles/vars.css @@ -7,7 +7,7 @@ html[data-theme='dark'] { --docsearch-container-background: rgb(16 16 16 / 75%); --docsearch-modal-background: var(--vp-c-bg-elv); --docsearch-searchbox-background: var(--vp-c-grey-soft); - --docsearch-searchbox-focus-background: var(--vp-c-bg); + --docsearch-searchbox-focus-background: var(--vp-c-bg-elv); --docsearch-searchbox-shadow: inset 0 0 0 2px var(--vp-c-accent-soft); --docsearch-hit-color: var(--vp-c-text-mute); --docsearch-hit-active-color: var(--vp-c-bg); diff --git a/plugins/search/plugin-docsearch/src/node/prepareClientConfig.ts b/plugins/search/plugin-docsearch/src/node/prepareClientConfig.ts index 9db1b7d0bd..2fa692dfd9 100644 --- a/plugins/search/plugin-docsearch/src/node/prepareClientConfig.ts +++ b/plugins/search/plugin-docsearch/src/node/prepareClientConfig.ts @@ -14,8 +14,8 @@ ${ injectStyles ? `\ import '${getRealPath('@docsearch/css', import.meta.url)}' -import '${getRealPath(`${PLUGIN_NAME}/client/styles/docsearch.css`, import.meta.url)}' -import '${getRealPath(`${PLUGIN_NAME}/client/styles/vars.css`, import.meta.url)}' +import '${getRealPath(`${PLUGIN_NAME}/styles/docsearch.css`, import.meta.url)}' +import '${getRealPath(`${PLUGIN_NAME}/styles/vars.css`, import.meta.url)}' ` : '' }\ diff --git a/plugins/search/plugin-docsearch/src/shared/index.ts b/plugins/search/plugin-docsearch/src/shared/index.ts index fdc633235f..6b4b334c22 100644 --- a/plugins/search/plugin-docsearch/src/shared/index.ts +++ b/plugins/search/plugin-docsearch/src/shared/index.ts @@ -1 +1 @@ -export * from './types.js' +export type * from './types.js' diff --git a/plugins/search/plugin-search/CHANGELOG.md b/plugins/search/plugin-search/CHANGELOG.md index 7387f49888..78529a570a 100644 --- a/plugins/search/plugin-search/CHANGELOG.md +++ b/plugins/search/plugin-search/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-search + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-search diff --git a/plugins/search/plugin-search/package.json b/plugins/search/plugin-search/package.json index 8500e2a5d1..b0be4c3e64 100644 --- a/plugins/search/plugin-search/package.json +++ b/plugins/search/plugin-search/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-search", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - built-in search", "keywords": [ "vuepress-plugin", @@ -32,16 +32,17 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.{d.ts,svg}\" lib", "style": "sass src:lib --embed-sources --style=compressed" }, "dependencies": { "chokidar": "^3.6.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/search/plugin-search/rollup.config.ts b/plugins/search/plugin-search/rollup.config.ts new file mode 100644 index 0000000000..41f8b0b234 --- /dev/null +++ b/plugins/search/plugin-search/rollup.config.ts @@ -0,0 +1,17 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['chokidar'], + dtsExternal: ['vuepress/core'], + }), + ...rollupBundle( + { + base: 'client', + files: ['config', 'index'], + }, + { + external: ['@internal/searchIndex'], + }, + ), +] diff --git a/plugins/search/plugin-search/src/client/searchIndex.d.ts b/plugins/search/plugin-search/src/client/searchIndex.d.ts index dacad54db0..5ec6d70c55 100644 --- a/plugins/search/plugin-search/src/client/searchIndex.d.ts +++ b/plugins/search/plugin-search/src/client/searchIndex.d.ts @@ -1,5 +1,5 @@ declare module '@internal/searchIndex' { - import type { SearchIndex } from '@vuepress/plugin-search' + import type { SearchIndex } from '@vuepress/plugin-search/client' export const SEARCH_INDEX: SearchIndex } diff --git a/plugins/search/plugin-search/src/shared/index.ts b/plugins/search/plugin-search/src/shared/index.ts index 3e3f1de2fe..cc4a7b4a03 100644 --- a/plugins/search/plugin-search/src/shared/index.ts +++ b/plugins/search/plugin-search/src/shared/index.ts @@ -1,2 +1,2 @@ -export * from './hotKey.js' -export * from './searchIndex.js' +export type * from './hotKey.js' +export type * from './searchIndex.js' diff --git a/plugins/seo/plugin-seo/CHANGELOG.md b/plugins/seo/plugin-seo/CHANGELOG.md index d46e3de2d9..531c46cd21 100644 --- a/plugins/seo/plugin-seo/CHANGELOG.md +++ b/plugins/seo/plugin-seo/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-seo + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-seo diff --git a/plugins/seo/plugin-seo/package.json b/plugins/seo/plugin-seo/package.json index afb267a11f..dfb52f50b5 100644 --- a/plugins/seo/plugin-seo/package.json +++ b/plugins/seo/plugin-seo/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-seo", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "SEO plugin for vuepress", "keywords": [ "vuepress", @@ -35,6 +35,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { @@ -44,7 +45,7 @@ "@vuepress/plugin-git": "workspace:*" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/seo/plugin-seo/rollup.config.ts b/plugins/seo/plugin-seo/rollup.config.ts new file mode 100644 index 0000000000..a2d0fd0ec0 --- /dev/null +++ b/plugins/seo/plugin-seo/rollup.config.ts @@ -0,0 +1,3 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index') diff --git a/plugins/seo/plugin-seo/src/node/index.ts b/plugins/seo/plugin-seo/src/node/index.ts index 1658c40ee4..fa07a1e1b6 100644 --- a/plugins/seo/plugin-seo/src/node/index.ts +++ b/plugins/seo/plugin-seo/src/node/index.ts @@ -1,3 +1,3 @@ -export * from './options.js' +export type * from './options.js' export * from './seoPlugin.js' export type * from '../typings/index.js' diff --git a/plugins/seo/plugin-seo/src/typings/helper.ts b/plugins/seo/plugin-seo/src/typings/helper.ts index 5fee653598..d19f412ebe 100644 --- a/plugins/seo/plugin-seo/src/typings/helper.ts +++ b/plugins/seo/plugin-seo/src/typings/helper.ts @@ -2,19 +2,19 @@ import type { GitData } from '@vuepress/plugin-git' import type { Page } from 'vuepress/core' import type { SEOPluginFrontmatter } from './frontmatter.js' -export interface SeoPluginPageData { +export interface SeoPluginPageData extends Record { autoDesc?: true excerpt?: string git?: GitData } export type ExtendPage< - ExtraPageData extends Record = Record, + ExtraPageData extends Record = Record, ExtraPageFrontmatter extends Record = Record< string, unknown >, - ExtraPageFields extends Record = Record, + ExtraPageFields extends Record = Record, > = Page< ExtraPageData & SeoPluginPageData, ExtraPageFrontmatter & SEOPluginFrontmatter, diff --git a/plugins/seo/plugin-seo/src/typings/index.ts b/plugins/seo/plugin-seo/src/typings/index.ts index 5086f1bd71..36ce61fcfa 100644 --- a/plugins/seo/plugin-seo/src/typings/index.ts +++ b/plugins/seo/plugin-seo/src/typings/index.ts @@ -1,4 +1,4 @@ -export * from './frontmatter.js' -export * from './helper.js' -export * from './ogp.js' -export * from './schema.js' +export type * from './frontmatter.js' +export type * from './helper.js' +export type * from './ogp.js' +export type * from './schema.js' diff --git a/plugins/seo/plugin-sitemap/CHANGELOG.md b/plugins/seo/plugin-sitemap/CHANGELOG.md index 67fbacaad7..1390f79346 100644 --- a/plugins/seo/plugin-sitemap/CHANGELOG.md +++ b/plugins/seo/plugin-sitemap/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/plugin-sitemap + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-sitemap diff --git a/plugins/seo/plugin-sitemap/package.json b/plugins/seo/plugin-sitemap/package.json index 98458a0aba..5fb74a0758 100644 --- a/plugins/seo/plugin-sitemap/package.json +++ b/plugins/seo/plugin-sitemap/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-sitemap", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "Sitemap plugin for vuepress", "keywords": [ "vuepress", @@ -37,6 +37,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { @@ -47,7 +48,7 @@ "@vuepress/plugin-git": "workspace:*" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/seo/plugin-sitemap/rollup.config.ts b/plugins/seo/plugin-sitemap/rollup.config.ts new file mode 100644 index 0000000000..162c9ed9e6 --- /dev/null +++ b/plugins/seo/plugin-sitemap/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['sitemap'], +}) diff --git a/plugins/seo/plugin-sitemap/src/node/getInfo.ts b/plugins/seo/plugin-sitemap/src/node/getInfo.ts index 6e7de27826..ea69916e0b 100644 --- a/plugins/seo/plugin-sitemap/src/node/getInfo.ts +++ b/plugins/seo/plugin-sitemap/src/node/getInfo.ts @@ -58,7 +58,12 @@ export const getSitemapInfos = ( const sitemapInfos: [path: string, info: SitemapInfo][] = [] app.pages.forEach( - (page: Page<{ git?: GitData }, SitemapPluginFrontmatter>) => { + ( + page: Page< + Record & { git?: GitData }, + SitemapPluginFrontmatter + >, + ) => { const pageOptions = page.frontmatter.sitemap if (pageOptions === false) return diff --git a/plugins/seo/plugin-sitemap/src/typings/index.ts b/plugins/seo/plugin-sitemap/src/typings/index.ts index cfc547a702..c684de64bb 100644 --- a/plugins/seo/plugin-sitemap/src/typings/index.ts +++ b/plugins/seo/plugin-sitemap/src/typings/index.ts @@ -1,3 +1,3 @@ -export * from './frontmatter.js' -export * from './options.js' -export * from './sitemap.js' +export type * from './frontmatter.js' +export type * from './options.js' +export type * from './sitemap.js' diff --git a/plugins/tools/plugin-cache/CHANGELOG.md b/plugins/tools/plugin-cache/CHANGELOG.md index ed1071f678..c2a459e872 100644 --- a/plugins/tools/plugin-cache/CHANGELOG.md +++ b/plugins/tools/plugin-cache/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.42](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.41...v2.0.0-rc.42) (2024-08-22) **Note:** Version bump only for package @vuepress/plugin-cache diff --git a/plugins/tools/plugin-cache/package.json b/plugins/tools/plugin-cache/package.json index ed74369d28..daedb91676 100644 --- a/plugins/tools/plugin-cache/package.json +++ b/plugins/tools/plugin-cache/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-cache", - "version": "2.0.0-rc.42", + "version": "2.0.0-rc.52", "description": "VuePress plugin - cache", "keywords": [ "vuepress-plugin", @@ -31,10 +31,11 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/tools/plugin-cache/rollup.config.ts b/plugins/tools/plugin-cache/rollup.config.ts new file mode 100644 index 0000000000..c858f8f7de --- /dev/null +++ b/plugins/tools/plugin-cache/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['ci-info', 'lru-cache'], +}) diff --git a/plugins/tools/plugin-google-tag-manager/CHANGELOG.md b/plugins/tools/plugin-google-tag-manager/CHANGELOG.md index 837882749a..c6f0c50fe5 100644 --- a/plugins/tools/plugin-google-tag-manager/CHANGELOG.md +++ b/plugins/tools/plugin-google-tag-manager/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.42](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.41...v2.0.0-rc.42) (2024-08-22) **Note:** Version bump only for package @vuepress/plugin-google-tag-manager diff --git a/plugins/tools/plugin-google-tag-manager/package.json b/plugins/tools/plugin-google-tag-manager/package.json index 5c6a7a5fe0..bdcc4eecb7 100644 --- a/plugins/tools/plugin-google-tag-manager/package.json +++ b/plugins/tools/plugin-google-tag-manager/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-google-tag-manager", - "version": "2.0.0-rc.42", + "version": "2.0.0-rc.52", "description": "VuePress plugin - google-tag-manager", "keywords": [ "vuepress-plugin", @@ -32,10 +32,11 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/tools/plugin-google-tag-manager/rollup.config.ts b/plugins/tools/plugin-google-tag-manager/rollup.config.ts new file mode 100644 index 0000000000..a2d0fd0ec0 --- /dev/null +++ b/plugins/tools/plugin-google-tag-manager/rollup.config.ts @@ -0,0 +1,3 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index') diff --git a/plugins/tools/plugin-redirect/CHANGELOG.md b/plugins/tools/plugin-redirect/CHANGELOG.md index a2b1490513..28bcfdc37f 100644 --- a/plugins/tools/plugin-redirect/CHANGELOG.md +++ b/plugins/tools/plugin-redirect/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Bug Fixes + +- **plugin-redirect:** respect config option from command line ([790731a](https://github.com/vuepress/ecosystem/commit/790731aafa31a4aa68b720632d2f33453e18bfab)) + +### Features + +- **plugin-redirect:** reduce runtime size ([#268](https://github.com/vuepress/ecosystem/issues/268)) ([1adfab9](https://github.com/vuepress/ecosystem/commit/1adfab9dcf5589dd391c387aa46930b836941941)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.51](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.50...v2.0.0-rc.51) (2024-09-23) + +### Features + +- **plugin-redirect:** add remember my choice, close [#253](https://github.com/vuepress/ecosystem/issues/253) ([#259](https://github.com/vuepress/ecosystem/issues/259)) ([8805d9c](https://github.com/vuepress/ecosystem/commit/8805d9c95611facabc3c02cb50d6ee9dafdac852)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Features + +- **plugin-redirect:** appear target language first ([4ca960a](https://github.com/vuepress/ecosystem/commit/4ca960a90de9dce54c2b45038eec11e3fe9e5d7e)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package @vuepress/plugin-redirect diff --git a/plugins/tools/plugin-redirect/package.json b/plugins/tools/plugin-redirect/package.json index b48d983051..2b95b578a2 100644 --- a/plugins/tools/plugin-redirect/package.json +++ b/plugins/tools/plugin-redirect/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-redirect", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress plugin - redirect", "keywords": [ "vuepress-plugin", @@ -26,6 +26,7 @@ "type": "module", "exports": { ".": "./lib/node/index.js", + "./client": "./lib/client/index.js", "./package.json": "./package.json" }, "main": "./lib/node/index.js", @@ -38,6 +39,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, @@ -45,10 +47,10 @@ "@vuepress/helper": "workspace:*", "@vueuse/core": "^11.1.0", "cac": "^6.7.14", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/tools/plugin-redirect/rollup.config.ts b/plugins/tools/plugin-redirect/rollup.config.ts new file mode 100644 index 0000000000..be5ec76467 --- /dev/null +++ b/plugins/tools/plugin-redirect/rollup.config.ts @@ -0,0 +1,20 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default [ + ...rollupBundle('cli/index', { + external: ['cac'], + }), + ...rollupBundle('node/index', { + dtsExternal: ['@vuepress/helper/shared'], + }), + ...rollupBundle( + { + base: 'client', + files: ['components/RedirectModal', 'config', 'index'], + }, + { + external: ['@vuepress/plugin-redirect/modal'], + dtsExternal: ['@vuepress/helper/shared'], + }, + ), +] diff --git a/plugins/tools/plugin-redirect/src/cli/index.ts b/plugins/tools/plugin-redirect/src/cli/index.ts index a7861a050c..bd38b02eda 100644 --- a/plugins/tools/plugin-redirect/src/cli/index.ts +++ b/plugins/tools/plugin-redirect/src/cli/index.ts @@ -7,6 +7,7 @@ import { resolveAppConfig, resolveCliAppConfig, resolveUserConfigConventionalPath, + resolveUserConfigPath, transformUserConfigToPlugin, } from 'vuepress/cli' import { createBuildApp } from 'vuepress/core' @@ -62,9 +63,9 @@ cli const cliAppConfig = resolveCliAppConfig(sourceDir, {}) // resolve user config file - const userConfigPath = resolveUserConfigConventionalPath( - cliAppConfig.source, - ) + const userConfigPath = commandOptions.config + ? resolveUserConfigPath(commandOptions.config) + : resolveUserConfigConventionalPath(cliAppConfig.source) const { userConfig } = await loadUserConfig(userConfigPath) @@ -103,13 +104,12 @@ cli // initialize vuepress app to get pages logger.info('Initializing VuePress and preparing data...') + // initialize vuepress app to get pages await app.init() - // redirect all pages - - // initialize vuepress app to get pages logger.info('Generating redirect pages...') + // redirect all pages await Promise.all( app.pages.map((page) => { const redirectUrl = `${removeEndingSlash(commandOptions.hostname)}${ diff --git a/plugins/tools/plugin-redirect/src/client/components/RedirectModal.ts b/plugins/tools/plugin-redirect/src/client/components/RedirectModal.ts index b45b170ee0..1c3dfcbdca 100644 --- a/plugins/tools/plugin-redirect/src/client/components/RedirectModal.ts +++ b/plugins/tools/plugin-redirect/src/client/components/RedirectModal.ts @@ -1,9 +1,5 @@ -import { - usePreferredLanguages, - useScrollLock, - useSessionStorage, -} from '@vueuse/core' -import type { VNode } from 'vue' +import { useScrollLock } from '@vueuse/core' +import type { PropType, VNode } from 'vue' import { TransitionGroup, computed, @@ -16,79 +12,66 @@ import { watch, } from 'vue' import { useRouteLocale, useRoutePath, useRouter } from 'vuepress/client' -import type { RedirectPluginLocaleConfig } from '../../shared/locales.js' -import { redirectLocaleConfig, redirectLocaleEntries } from '../define.js' +import type { + RedirectBehaviorConfig, + RedirectPluginLocaleConfig, +} from '../../shared/index.js' +import { useRedirectInfo } from '../composables/index.js' +import { statusLocalStorage, statusSessionStorage } from '../utils/index.js' import '../styles/redirect-modal.css' -declare const __REDIRECT_LOCALES__: RedirectPluginLocaleConfig - -const redirectLocales = __REDIRECT_LOCALES__ -const { switchLocale } = redirectLocaleConfig - -interface LocaleInfo { - lang: string - localePath: string -} - -const redirectStatusStorage = useSessionStorage>( - 'VUEPRESS_REDIRECT_LOCALES', - {}, -) - export default defineComponent({ name: 'RedirectModal', - setup() { - const languages = usePreferredLanguages() + props: { + config: { + type: Object as PropType, + required: true, + }, + + locales: { + type: Object as PropType, + required: true, + }, + }, + + setup(props) { const router = useRouter() const routePath = useRoutePath() const routeLocale = useRouteLocale() + const redirectInfo = useRedirectInfo(props.config) const body = ref() // lock body scroll when modal is displayed const showModal = useScrollLock(body) - - const info = computed(() => { - if (redirectLocaleEntries.some(([key]) => routeLocale.value === key)) - for (const language of languages.value) - for (const [localePath, langs] of redirectLocaleEntries) - if (langs.includes(language)) { - if (localePath === routeLocale.value) return null - - return { - lang: language, - localePath, - } - } - - return null - }) + const shouldRemember = ref(false) const locale = computed(() => { - if (info.value) { - const { lang, localePath } = info.value - const locales = [ - redirectLocales[routeLocale.value], - redirectLocales[localePath], - ] - - return { - hint: locales.map(({ hint }) => hint.replace('$1', lang)), - switch: locales - .map(({ switch: switchText }) => switchText.replace('$1', lang)) - .join(' / '), - cancel: locales.map(({ cancel }) => cancel).join(' / '), - } + if (!redirectInfo.value) return null + + const { lang, localePath } = redirectInfo.value + const locales = [ + props.locales[localePath], + props.locales[routeLocale.value], + ] + + return { + hint: locales.map(({ hint }) => hint.replace('$1', lang)), + switch: locales + .map(({ switch: switchText }) => switchText.replace('$1', lang)) + .join(' / '), + cancel: locales.map(({ cancel }) => cancel).join(' / '), + remember: locales.map(({ remember }) => remember).join(' / '), } - - return null }) - const redirect = (): void => { - router.replace( - routePath.value.replace(routeLocale.value, info.value!.localePath), - ) + const updateState = (): void => { + statusSessionStorage.value[routeLocale.value] = true + if (shouldRemember.value) { + statusLocalStorage.value[routeLocale.value] = true + } + showModal.value = false } watch(routePath, () => { @@ -100,9 +83,12 @@ export default defineComponent({ await nextTick() - if (!redirectStatusStorage.value[routeLocale.value] && info.value) { - if (switchLocale === 'direct') redirect() - else if (switchLocale === 'modal') showModal.value = true + if ( + redirectInfo.value && + !statusSessionStorage.value[routeLocale.value] && + !statusLocalStorage.value[routeLocale.value] + ) { + showModal.value = true } }) @@ -128,15 +114,34 @@ export default defineComponent({ { class: 'redirect-modal-content' }, locale.value?.hint.map((text) => h('p', text)), ), + h('div', { class: 'redirect-modal-hint' }, [ + h('input', { + id: 'remember-redirect', + type: 'checkbox', + value: shouldRemember.value, + onChange: () => { + shouldRemember.value = !shouldRemember.value + }, + }), + h( + 'label', + { for: 'remember-redirect' }, + locale.value?.remember, + ), + ]), h( 'button', { type: 'button', class: 'redirect-modal-action primary', onClick: () => { - redirectStatusStorage.value[routeLocale.value] = true - showModal.value = false - redirect() + updateState() + router.replace( + routePath.value.replace( + routeLocale.value, + redirectInfo.value!.localePath, + ), + ) }, }, locale.value?.switch, @@ -147,8 +152,7 @@ export default defineComponent({ type: 'button', class: 'redirect-modal-action', onClick: () => { - redirectStatusStorage.value[routeLocale.value] = true - showModal.value = false + updateState() }, }, locale.value?.cancel, diff --git a/plugins/tools/plugin-redirect/src/client/components/index.ts b/plugins/tools/plugin-redirect/src/client/components/index.ts new file mode 100644 index 0000000000..daaa1eea8e --- /dev/null +++ b/plugins/tools/plugin-redirect/src/client/components/index.ts @@ -0,0 +1 @@ +export { default as RedirectModal } from './RedirectModal.js' diff --git a/plugins/tools/plugin-redirect/src/client/composables/index.ts b/plugins/tools/plugin-redirect/src/client/composables/index.ts index 1687eb4543..1ae8608a9d 100644 --- a/plugins/tools/plugin-redirect/src/client/composables/index.ts +++ b/plugins/tools/plugin-redirect/src/client/composables/index.ts @@ -1 +1,3 @@ export * from './setupDevServerRedirect.js' +export * from './setupRedirect.js' +export * from './useRedirectInfo.js' diff --git a/plugins/tools/plugin-redirect/src/client/composables/setupDevServerRedirect.ts b/plugins/tools/plugin-redirect/src/client/composables/setupDevServerRedirect.ts index 570c8b730c..c139045f79 100644 --- a/plugins/tools/plugin-redirect/src/client/composables/setupDevServerRedirect.ts +++ b/plugins/tools/plugin-redirect/src/client/composables/setupDevServerRedirect.ts @@ -3,17 +3,17 @@ import { entries, isLinkHttp } from '@vuepress/helper/client' import { usePreferredLanguages } from '@vueuse/core' import { computed, watch } from 'vue' import { useRoute, useRouteLocale, useRouter } from 'vuepress/client' +import type { RedirectBehaviorConfig } from '../../shared/index.js' import { normalizePath } from '../../shared/index.js' -import { redirectLocaleConfig, redirectLocaleEntries } from '../define.js' -const { +export const setupDevServerRedirect = ({ autoLocale, + config, defaultBehavior, defaultLocale: defaultLocalePath, localeFallback, -} = redirectLocaleConfig - -export const setupDevServerRedirect = (): void => { +}: RedirectBehaviorConfig): void => { + const localeEntries = Object.entries(config) const languages = usePreferredLanguages() const route = useRoute() const router = useRouter() @@ -40,7 +40,7 @@ export const setupDevServerRedirect = (): void => { // get matched locale // eslint-disable-next-line no-restricted-syntax findLanguage: for (const lang of languages.value) - for (const [localePath, langs] of redirectLocaleEntries) + for (const [localePath, langs] of localeEntries) if (langs.includes(lang)) { if ( localeFallback && diff --git a/plugins/tools/plugin-redirect/src/client/composables/setupRedirect.ts b/plugins/tools/plugin-redirect/src/client/composables/setupRedirect.ts new file mode 100644 index 0000000000..9b45f702ba --- /dev/null +++ b/plugins/tools/plugin-redirect/src/client/composables/setupRedirect.ts @@ -0,0 +1,29 @@ +import { onMounted } from 'vue' +import { useRouteLocale, useRoutePath, useRouter } from 'vuepress/client' +import type { RedirectBehaviorConfig } from '../../shared/index.js' +import { statusSessionStorage } from '../utils/index.js' +import { useRedirectInfo } from './useRedirectInfo.js' + +export interface LocaleInfo { + lang: string + localePath: string +} + +export const setupRedirect = (behaviorConfig: RedirectBehaviorConfig): void => { + const redirectInfo = useRedirectInfo(behaviorConfig) + const routeLocale = useRouteLocale() + const routePath = useRoutePath() + const router = useRouter() + + onMounted(() => { + if (redirectInfo.value && !statusSessionStorage.value[routeLocale.value]) { + router.replace( + routePath.value.replace( + routeLocale.value, + redirectInfo.value.localePath, + ), + ) + statusSessionStorage.value[routeLocale.value] = true + } + }) +} diff --git a/plugins/tools/plugin-redirect/src/client/composables/useRedirectInfo.ts b/plugins/tools/plugin-redirect/src/client/composables/useRedirectInfo.ts new file mode 100644 index 0000000000..1bc5df30db --- /dev/null +++ b/plugins/tools/plugin-redirect/src/client/composables/useRedirectInfo.ts @@ -0,0 +1,36 @@ +import { entries } from '@vuepress/helper/client' +import { usePreferredLanguages } from '@vueuse/core' +import type { ComputedRef } from 'vue' +import { computed } from 'vue' +import { useRouteLocale } from 'vuepress/client' +import type { RedirectBehaviorConfig } from '../../shared/index.js' + +export interface RedirectInfo { + lang: string + localePath: string +} + +export const useRedirectInfo = ( + behaviorConfig: RedirectBehaviorConfig, +): ComputedRef => { + const languages = usePreferredLanguages() + const routeLocale = useRouteLocale() + + const localeEntries = entries(behaviorConfig.config) + + return computed(() => { + if (localeEntries.some(([key]) => routeLocale.value === key)) + for (const language of languages.value) + for (const [localePath, langs] of localeEntries) + if (langs.includes(language)) { + if (localePath === routeLocale.value) return null + + return { + lang: language, + localePath, + } + } + + return null + }) +} diff --git a/plugins/tools/plugin-redirect/src/client/config.ts b/plugins/tools/plugin-redirect/src/client/config.ts index f1236f9b7f..1f85a16fc9 100644 --- a/plugins/tools/plugin-redirect/src/client/config.ts +++ b/plugins/tools/plugin-redirect/src/client/config.ts @@ -1,14 +1,35 @@ +import RedirectModal from '@vuepress/plugin-redirect/modal' +import { h } from 'vue' import { defineClientConfig } from 'vuepress/client' -import RedirectModal from './components/RedirectModal.js' -import { setupDevServerRedirect } from './composables/index.js' +import type { + RedirectBehaviorConfig, + RedirectPluginLocaleConfig, +} from '../shared/index.js' +import { setupDevServerRedirect, setupRedirect } from './composables/index.js' import './styles/vars.css' -declare const __REDIRECT_LOCALE_SWITCH__: boolean +declare const __REDIRECT_CONFIG__: RedirectBehaviorConfig +declare const __REDIRECT_LOCALES__: RedirectPluginLocaleConfig +declare const __REDIRECT_DIRECT__: boolean +declare const __REDIRECT_MODAL__: boolean + +export const config = __REDIRECT_CONFIG__ export default defineClientConfig({ setup() { - if (__VUEPRESS_DEV__) setupDevServerRedirect() + if (__REDIRECT_DIRECT__) setupRedirect(config) + if (__VUEPRESS_DEV__) setupDevServerRedirect(config) }, - rootComponents: __REDIRECT_LOCALE_SWITCH__ ? [RedirectModal] : [], + ...(__REDIRECT_MODAL__ + ? { + rootComponents: [ + () => + h(RedirectModal, { + config, + locales: __REDIRECT_LOCALES__, + }), + ], + } + : {}), }) diff --git a/plugins/tools/plugin-redirect/src/client/define.ts b/plugins/tools/plugin-redirect/src/client/define.ts deleted file mode 100644 index ceba09be36..0000000000 --- a/plugins/tools/plugin-redirect/src/client/define.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { entries } from '@vuepress/helper/client' -import type { RedirectLocaleConfig } from '../shared/index.js' - -declare const __REDIRECT_LOCALE_CONFIG__: RedirectLocaleConfig - -export const redirectLocaleConfig = __REDIRECT_LOCALE_CONFIG__ -export const redirectLocaleEntries = entries(redirectLocaleConfig.localeConfig) diff --git a/plugins/tools/plugin-redirect/src/client/index.ts b/plugins/tools/plugin-redirect/src/client/index.ts new file mode 100644 index 0000000000..63433cbbb5 --- /dev/null +++ b/plugins/tools/plugin-redirect/src/client/index.ts @@ -0,0 +1,2 @@ +export * from './components/index.js' +export * from './composables/index.js' diff --git a/plugins/tools/plugin-redirect/src/client/styles/redirect-modal.scss b/plugins/tools/plugin-redirect/src/client/styles/redirect-modal.scss index 83c3532aa0..035a133661 100644 --- a/plugins/tools/plugin-redirect/src/client/styles/redirect-modal.scss +++ b/plugins/tools/plugin-redirect/src/client/styles/redirect-modal.scss @@ -38,6 +38,76 @@ box-shadow: 0 2px 6px 0 var(--redirect-c-shadow); } +.redirect-modal-hint { + margin-top: 0.5rem; + color: var(--vp-c-text-mute); + font-size: 14px; + text-align: start; + + input[type='checkbox'] { + position: relative; + + vertical-align: text-bottom; + + height: 1em; + margin-inline-end: 18px; + + cursor: pointer; + + appearance: none; + + &::after { + content: ' '; + + position: absolute; + top: 0; + + display: inline-block; + + box-sizing: border-box; + width: 14px; + height: 14px; + padding-inline-start: 0; + border: 1px solid var(--vp-c-border); + border-radius: 50%; + + background: var(--vp-c-control); + + text-align: center; + + visibility: visible; + } + + &:checked { + &::after { + content: ''; + border-color: var(--vp-c-accent-bg); + background: var(--vp-c-accent-bg); + } + + &::before { + content: ''; + + position: absolute; + inset-inline-start: 5px; + top: 2px; + z-index: 1; + + width: 2px; + height: 6px; + border: solid var(--vp-c-white); + border-width: 0 2px 2px 0; + + transform: rotate(45deg); + } + } + } + + label { + display: inline-block; + } +} + .redirect-modal-action { display: block; diff --git a/plugins/tools/plugin-redirect/src/client/utils/index.ts b/plugins/tools/plugin-redirect/src/client/utils/index.ts new file mode 100644 index 0000000000..47120e1947 --- /dev/null +++ b/plugins/tools/plugin-redirect/src/client/utils/index.ts @@ -0,0 +1 @@ +export * from './storage.js' diff --git a/plugins/tools/plugin-redirect/src/client/utils/storage.ts b/plugins/tools/plugin-redirect/src/client/utils/storage.ts new file mode 100644 index 0000000000..cc08bb79c7 --- /dev/null +++ b/plugins/tools/plugin-redirect/src/client/utils/storage.ts @@ -0,0 +1,13 @@ +import { useLocalStorage, useSessionStorage } from '@vueuse/core' + +const REDIRECT_STORAGE_KEY = 'VUEPRESS_REDIRECT_STATUS' + +export const statusLocalStorage = useLocalStorage>( + REDIRECT_STORAGE_KEY, + {}, +) + +export const statusSessionStorage = useSessionStorage>( + REDIRECT_STORAGE_KEY, + {}, +) diff --git a/plugins/tools/plugin-redirect/src/node/generate/generateAutoLocaleRedirectFiles.ts b/plugins/tools/plugin-redirect/src/node/generate/generateAutoLocaleRedirectFiles.ts index d2cca3beb8..c9230a5069 100644 --- a/plugins/tools/plugin-redirect/src/node/generate/generateAutoLocaleRedirectFiles.ts +++ b/plugins/tools/plugin-redirect/src/node/generate/generateAutoLocaleRedirectFiles.ts @@ -1,13 +1,13 @@ import { entries, removeLeadingSlash } from '@vuepress/helper' import type { App } from 'vuepress/core' import { fs, path } from 'vuepress/utils' -import type { RedirectLocaleConfig } from '../../shared/index.js' +import type { RedirectBehaviorConfig } from '../../shared/index.js' import { logger } from '../logger.js' import { getLocaleRedirectHTML } from './getLocaleRedirectHTML.js' export const generateAutoLocaleRedirectFiles = async ( { dir, options, pages }: App, - localeOptions: RedirectLocaleConfig, + localeOptions: RedirectBehaviorConfig, ): Promise => { const rootPaths = pages .filter(({ pathLocale }) => pathLocale === '/') diff --git a/plugins/tools/plugin-redirect/src/node/generate/getLocaleRedirectHTML.ts b/plugins/tools/plugin-redirect/src/node/generate/getLocaleRedirectHTML.ts index d771ebb85c..bad4f451b3 100644 --- a/plugins/tools/plugin-redirect/src/node/generate/getLocaleRedirectHTML.ts +++ b/plugins/tools/plugin-redirect/src/node/generate/getLocaleRedirectHTML.ts @@ -1,13 +1,13 @@ import { removeEndingSlash } from '@vuepress/helper' -import type { RedirectLocaleConfig } from '../../shared/index.js' +import type { RedirectBehaviorConfig } from '../../shared/index.js' export const getLocaleRedirectHTML = ( { - localeConfig, + config, defaultBehavior, defaultLocale, localeFallback, - }: RedirectLocaleConfig, + }: RedirectBehaviorConfig, availableLocales: string[], base: string, ): string => ` @@ -22,7 +22,7 @@ export const getLocaleRedirectHTML = ( const { languages } = window.navigator; const anchor = hash.substring(1); - const localeConfig = ${JSON.stringify(localeConfig)}; + const config = ${JSON.stringify(config)}; const availableLocales = ${JSON.stringify(availableLocales)}; const defaultLocale = ${ availableLocales.includes(defaultLocale) @@ -36,7 +36,7 @@ export const getLocaleRedirectHTML = ( // get matched locale findLanguage: for (const lang of languages) - for (const [localePath, langs] of Object.entries(localeConfig)) + for (const [localePath, langs] of Object.entries(config)) if (langs.includes(lang)) { ${ localeFallback diff --git a/plugins/tools/plugin-redirect/src/node/getRedirectLocaleConfig.ts b/plugins/tools/plugin-redirect/src/node/getRedirectLocaleConfig.ts index 6b519056ee..aaebc32807 100644 --- a/plugins/tools/plugin-redirect/src/node/getRedirectLocaleConfig.ts +++ b/plugins/tools/plugin-redirect/src/node/getRedirectLocaleConfig.ts @@ -8,19 +8,19 @@ import { } from '@vuepress/helper' import type { App } from 'vuepress/core' import { colors } from 'vuepress/utils' -import type { RedirectLocaleConfig } from '../shared/index.js' +import type { RedirectBehaviorConfig } from '../shared/index.js' import { logger } from './logger.js' import type { RedirectPluginOptions } from './types/index.js' const AVAILABLE_FALLBACK = ['defaultLocale', 'homepage', '404'] as const -export const getRedirectLocaleConfig = ( +export const getRedirectBehaviorConfig = ( app: App, options: RedirectPluginOptions, -): RedirectLocaleConfig => { +): RedirectBehaviorConfig => { const { locales } = app.options - const localeConfig = deepAssign( + const config = deepAssign( fromEntries( entries(locales) .filter(([key, { lang }]) => { @@ -47,13 +47,11 @@ export const getRedirectLocaleConfig = ( ) : {}, ) - const defaultLocale = options.defaultLocale || keys(localeConfig).pop()! return { + config, autoLocale: options.autoLocale ?? false, - switchLocale: options.switchLocale ?? false, - localeConfig, - defaultLocale, + defaultLocale: options.defaultLocale || keys(config).pop()!, localeFallback: options.localeFallback ?? true, defaultBehavior: options.defaultBehavior && diff --git a/plugins/tools/plugin-redirect/src/node/getRedirectMap.ts b/plugins/tools/plugin-redirect/src/node/getRedirectMap.ts index 8216cddd1b..f52faa835c 100644 --- a/plugins/tools/plugin-redirect/src/node/getRedirectMap.ts +++ b/plugins/tools/plugin-redirect/src/node/getRedirectMap.ts @@ -8,7 +8,7 @@ import { import type { App, Page } from 'vuepress/core' import { normalizePath } from '../shared/normalizePath.js' import type { - RedirectPluginFrontmatterOption, + RedirectPluginFrontmatter, RedirectPluginOptions, } from './types/index.js' @@ -24,22 +24,10 @@ export const getRedirectMap = ( return { ...fromEntries( - ( - app.pages as Page< - Record, - RedirectPluginFrontmatterOption - >[] - ) - .map<[string, string][]>(({ frontmatter, path }) => - isArray(frontmatter.redirectFrom) - ? frontmatter.redirectFrom.map((from) => [ - normalizePath(from, true), - path, - ]) - : frontmatter.redirectFrom - ? [[normalizePath(frontmatter.redirectFrom, true), path]] - : [], - ) + (app.pages as Page, RedirectPluginFrontmatter>[]) + .map< + [string, string][] + >(({ frontmatter, path }) => (isArray(frontmatter.redirectFrom) ? frontmatter.redirectFrom.map((from) => [normalizePath(from, true), path]) : frontmatter.redirectFrom ? [[normalizePath(frontmatter.redirectFrom, true), path]] : [])) .flat(), ), ...fromEntries( diff --git a/plugins/tools/plugin-redirect/src/node/handleRedirectTo.ts b/plugins/tools/plugin-redirect/src/node/handleRedirectTo.ts index 84d5906dd1..e89247cba2 100644 --- a/plugins/tools/plugin-redirect/src/node/handleRedirectTo.ts +++ b/plugins/tools/plugin-redirect/src/node/handleRedirectTo.ts @@ -1,12 +1,12 @@ import { isLinkAbsolute, removeLeadingSlash } from '@vuepress/helper' import type { App, Page } from 'vuepress/core' import { normalizePath } from '../shared/normalizePath.js' -import type { RedirectPluginFrontmatterOption } from './types/index.js' +import type { RedirectPluginFrontmatter } from './types/index.js' export const handleRedirectTo = ({ frontmatter }: Page, app: App): void => { const { base } = app.options - const { redirectTo } = frontmatter as RedirectPluginFrontmatterOption + const { redirectTo } = frontmatter as RedirectPluginFrontmatter if (redirectTo) { const redirectUrl = normalizePath( diff --git a/plugins/tools/plugin-redirect/src/node/locales.ts b/plugins/tools/plugin-redirect/src/node/locales.ts index 3ce0f8d4e9..3dbdd6eb77 100644 --- a/plugins/tools/plugin-redirect/src/node/locales.ts +++ b/plugins/tools/plugin-redirect/src/node/locales.ts @@ -7,6 +7,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Your primary language is $1, do you want to switch to it?', switch: 'Switch to $1', cancel: 'Cancel', + remember: 'Remember my choice', }, '/zh/': { @@ -14,6 +15,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: '您的首选语言是 $1,是否切换到该语言?', switch: '切换到 $1', cancel: '取消', + remember: '记住我的选择', }, '/zh-tw/': { @@ -21,6 +23,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: '您的首選語言是 $1,是否切換到該語言?', switch: '切換到 $1', cancel: '取消', + remember: '記住我的選擇', }, '/de/': { @@ -28,6 +31,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Ihre bevorzugte Sprache ist $1, möchten Sie zu dieser wechseln?', switch: 'Zu $1 wechseln', cancel: 'Abbrechen', + remember: 'Meine Wahl merken', }, '/de-at/': { @@ -35,6 +39,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Ihre bevorzugte Sprache ist $1, möchten Sie zu dieser wechseln?', switch: 'Zu $1 wechseln', cancel: 'Abbrechen', + remember: 'Meine Wahl merken', }, '/vi/': { @@ -42,6 +47,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Ngôn ngữ chính của bạn là $1, bạn có muốn chuyển sang nó?', switch: 'Chuyển sang $1', cancel: 'Hủy', + remember: 'Nhớ lựa chọn của tôi', }, '/uk/': { @@ -49,6 +55,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Вашою основною мовою є $1, чи бажаєте ви переключитися на неї?', switch: 'Переключитися на $1', cancel: 'Скасувати', + remember: 'Запам’ятати мій вибір', }, '/ru/': { @@ -56,6 +63,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Ваш основной язык - $1, вы хотите переключиться на него?', switch: 'Переключиться на $1', cancel: 'Отмена', + remember: 'Запомнить мой выбор', }, '/br/': { @@ -63,6 +71,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'A língua principal é $1, deseja mudar para ela?', switch: 'Mudar para $1', cancel: 'Cancelar', + remember: 'Lembrar minha escolha', }, '/pl/': { @@ -70,6 +79,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Twoim głównym językiem jest $1, czy chcesz przełączyć się na niego?', switch: 'Przełącz na $1', cancel: 'Anuluj', + remember: 'Zapamiętaj moje wybory', }, '/sk/': { @@ -77,6 +87,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Vašou hlavnou jazykom je $1, chcete prepnúť naň?', switch: 'Prepnúť na $1', cancel: 'Zrušiť', + remember: 'Zapamätať si moju voľbu', }, '/fr/': { @@ -84,6 +95,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Votre langue principale est $1, voulez-vous la changer ?', switch: 'Changer pour $1', cancel: 'Annuler', + remember: 'Se souvenir de mon choix', }, '/tr/': { @@ -91,6 +103,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Ana diliniz $1, ona geçmek ister misiniz?', switch: "$1'e geç", cancel: 'İptal', + remember: 'Seçimimi hatırla', }, '/fi/': { @@ -98,6 +111,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Pääkielenäsi on $1, haluatko vaihtaa siihen?', switch: 'Vaihda $1:een', cancel: 'Peruuta', + remember: 'Muista valintani', }, '/hu/': { @@ -105,6 +119,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'A fő nyelvét $1, szeretné váltani?', switch: 'Váltás $1', cancel: 'Mégse', + remember: 'Emlékezzen a választásomra', }, '/id/': { @@ -112,6 +127,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Bahasa utama Anda adalah $1, apakah Anda ingin beralih ke sana?', switch: 'Beralih ke $1', cancel: 'Batal', + remember: 'Ingat pilihan saya', }, '/nl/': { @@ -119,6 +135,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Uw primaire taal is $1, wilt u overschakelen?', switch: 'Overschakelen naar $1', cancel: 'Annuleren', + remember: 'Onthoud mijn keuze', }, '/ja/': { @@ -126,6 +143,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'あなたの主要な言語は $1 です。それに切り替えますか?', switch: '$1 に切り替える', cancel: 'キャンセル', + remember: '選択を記憶する', }, '/ko/': { @@ -133,6 +151,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: '당신의 기본 언어는 $1입니다. 그것으로 전환 하시겠습니까?', switch: '$1로 전환', cancel: '취소', + remember: '내 선택 기억하기', }, '/es/': { @@ -140,6 +159,7 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Su idioma principal es $1, ¿desea cambiarlo?', switch: 'Cambiar a $1', cancel: 'Cancelar', + remember: 'Recordar mi elección', }, '/pt/': { @@ -147,5 +167,6 @@ export const redirectLocales: RedirectPluginLocaleConfig = { hint: 'Sua língua principal é $1, deseja mudar para ela?', switch: 'Mudar para $1', cancel: 'Cancelar', + remember: 'Lembrar minha escolha', }, } diff --git a/plugins/tools/plugin-redirect/src/node/redirectPlugin.ts b/plugins/tools/plugin-redirect/src/node/redirectPlugin.ts index 1d67b62964..4e08df980e 100644 --- a/plugins/tools/plugin-redirect/src/node/redirectPlugin.ts +++ b/plugins/tools/plugin-redirect/src/node/redirectPlugin.ts @@ -1,4 +1,8 @@ -import { addViteSsrNoExternal, getLocaleConfig } from '@vuepress/helper' +import { + addViteSsrNoExternal, + getLocaleConfig, + getRealPath, +} from '@vuepress/helper' import type { PluginFunction } from 'vuepress/core' import { getDirname, path } from 'vuepress/utils' import { ensureRootHomePage } from './ensureRootHomePage.js' @@ -6,29 +10,38 @@ import { generateAutoLocaleRedirectFiles, generateRedirectFiles, } from './generate/index.js' -import { getRedirectLocaleConfig } from './getRedirectLocaleConfig.js' +import { getRedirectBehaviorConfig } from './getRedirectLocaleConfig.js' import { getRedirectMap } from './getRedirectMap.js' import { handleRedirectTo } from './handleRedirectTo.js' import { redirectLocales } from './locales.js' import { PLUGIN_NAME, logger } from './logger.js' import type { RedirectPluginOptions } from './types/index.js' -const __dirname = getDirname(import.meta.url) +const { url } = import.meta +const __dirname = getDirname(url) export const redirectPlugin = (options: RedirectPluginOptions = {}): PluginFunction => (app) => { if (app.env.isDebug) logger.info('Options:', options) - const redirectLocaleConfig = getRedirectLocaleConfig(app, options) - let redirectMap: Record + const behaviorConfig = getRedirectBehaviorConfig(app, options) + let redirectMap: Record | null = null return { name: PLUGIN_NAME, + alias: { + '@vuepress/plugin-redirect/modal': + options.switchLocale === 'modal' + ? path.resolve(__dirname, '../client/components/RedirectModal.js') + : getRealPath('@vuepress/helper/noopComponent', url), + }, + define: { - __REDIRECT_LOCALE_CONFIG__: redirectLocaleConfig, - __REDIRECT_LOCALE_SWITCH__: Boolean(redirectLocaleConfig.switchLocale), + __REDIRECT_CONFIG__: behaviorConfig, + __REDIRECT_DIRECT__: options.switchLocale === 'direct', + __REDIRECT_MODAL__: options.switchLocale === 'modal', __REDIRECT_LOCALES__: getLocaleConfig({ app, name: 'redirect', @@ -50,8 +63,7 @@ export const redirectPlugin = if (app.env.isDebug) logger.info('Redirect Map:', redirectMap) - if (redirectLocaleConfig.autoLocale && app.env.isDebug) - await ensureRootHomePage(app) + if (options.autoLocale && app.env.isDebug) await ensureRootHomePage(app) }, onPrepared: async (): Promise => { @@ -63,12 +75,14 @@ export const redirectMap = ${ }; `, ) + // clean redirectMap reference in dev server + if (app.env.isDev) redirectMap = null }, onGenerated: async (): Promise => { - await generateRedirectFiles(app, redirectMap) - if (redirectLocaleConfig.autoLocale) - await generateAutoLocaleRedirectFiles(app, redirectLocaleConfig) + await generateRedirectFiles(app, redirectMap!) + if (options.autoLocale) + await generateAutoLocaleRedirectFiles(app, behaviorConfig) }, clientConfigFile: path.join(__dirname, '../client/config.js'), diff --git a/plugins/tools/plugin-redirect/src/node/types/frontmatter.ts b/plugins/tools/plugin-redirect/src/node/types/frontmatter.ts index ebe53ce8fc..0b0a4661a8 100644 --- a/plugins/tools/plugin-redirect/src/node/types/frontmatter.ts +++ b/plugins/tools/plugin-redirect/src/node/types/frontmatter.ts @@ -1,4 +1,6 @@ -export interface RedirectPluginFrontmatterOption { +import type { PageFrontmatter } from 'vuepress' + +export interface RedirectPluginFrontmatter extends PageFrontmatter { redirectFrom?: string[] | string redirectTo?: string } diff --git a/plugins/tools/plugin-redirect/src/node/types/options.ts b/plugins/tools/plugin-redirect/src/node/types/options.ts index f861d10712..004ede7196 100644 --- a/plugins/tools/plugin-redirect/src/node/types/options.ts +++ b/plugins/tools/plugin-redirect/src/node/types/options.ts @@ -1,11 +1,10 @@ import type { App, LocaleConfig } from 'vuepress/core' import type { - RedirectLocaleConfig, + RedirectBehaviorOptions, RedirectPluginLocaleData, } from '../../shared/index.js' -export interface RedirectPluginOptions - extends Partial> { +export interface RedirectPluginOptions extends RedirectBehaviorOptions { /** * Redirect mapping * @@ -13,6 +12,13 @@ export interface RedirectPluginOptions */ config?: Record | ((app: App) => Record) + /** + * Whether switch locales + * + * 是否启用重定向语言 + */ + switchLocale?: 'direct' | 'modal' + /** * Locale language config * diff --git a/plugins/tools/plugin-redirect/src/shared/localeConfig.ts b/plugins/tools/plugin-redirect/src/shared/behavior.ts similarity index 72% rename from plugins/tools/plugin-redirect/src/shared/localeConfig.ts rename to plugins/tools/plugin-redirect/src/shared/behavior.ts index cb710f268b..42b850f73c 100644 --- a/plugins/tools/plugin-redirect/src/shared/localeConfig.ts +++ b/plugins/tools/plugin-redirect/src/shared/behavior.ts @@ -1,4 +1,4 @@ -export interface RedirectLocaleConfig { +export interface RedirectBehaviorOptions { /** * Whether enable locales redirection * @@ -6,23 +6,7 @@ export interface RedirectLocaleConfig { * * @default false */ - autoLocale: boolean - - /** - * Whether switch locales - * - * 是否启用重定向语言 - * - * @default false - */ - switchLocale: 'direct' | 'modal' | false - - /** - * Locale language config - * - * 多语言语言配置 - */ - localeConfig: Record + autoLocale?: boolean /** * Whether fallback to other locales user defined @@ -31,7 +15,7 @@ export interface RedirectLocaleConfig { * * @default true */ - localeFallback: boolean + localeFallback?: boolean /** * Behavior when a locale version is not available for current link @@ -44,7 +28,7 @@ export interface RedirectLocaleConfig { * * @default "defaultLocale" */ - defaultBehavior: '404' | 'defaultLocale' | 'homepage' + defaultBehavior?: '404' | 'defaultLocale' | 'homepage' /** * Default locale path @@ -55,5 +39,15 @@ export interface RedirectLocaleConfig { * * @description 如果缺失,则使用第一个语言 */ - defaultLocale: string + defaultLocale?: string +} + +export interface RedirectBehaviorConfig + extends Required { + /** + * Locale language config + * + * 多语言语言配置 + */ + config: Record } diff --git a/plugins/tools/plugin-redirect/src/shared/index.ts b/plugins/tools/plugin-redirect/src/shared/index.ts index ab739754ee..0c4bf722d0 100644 --- a/plugins/tools/plugin-redirect/src/shared/index.ts +++ b/plugins/tools/plugin-redirect/src/shared/index.ts @@ -1,3 +1,3 @@ -export * from './localeConfig.js' -export * from './locales.js' +export type * from './behavior.js' +export type * from './locales.js' export * from './normalizePath.js' diff --git a/plugins/tools/plugin-redirect/src/shared/locales.ts b/plugins/tools/plugin-redirect/src/shared/locales.ts index 5d6c723e85..3f538e6119 100644 --- a/plugins/tools/plugin-redirect/src/shared/locales.ts +++ b/plugins/tools/plugin-redirect/src/shared/locales.ts @@ -3,6 +3,8 @@ import type { ExactLocaleConfig } from '@vuepress/helper/shared' export interface RedirectPluginLocaleData { /** * Language name + * + * 语言名称 */ name: string @@ -15,6 +17,8 @@ export interface RedirectPluginLocaleData { /** * Switch button text + * + * 切换按钮文字 */ switch: string @@ -24,6 +28,13 @@ export interface RedirectPluginLocaleData { * 取消按钮文字 */ cancel: string + + /** + * remember hint text + * + * 记住提示文本 + */ + remember: string } export type RedirectPluginLocaleConfig = diff --git a/plugins/tools/plugin-redirect/src/shims-redirectMap.d.ts b/plugins/tools/plugin-redirect/src/shims-redirectMap.d.ts deleted file mode 100644 index eb09a4bb5a..0000000000 --- a/plugins/tools/plugin-redirect/src/shims-redirectMap.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -declare module '@temp/redirect/map.js' { - export const redirectMap: Record -} diff --git a/plugins/tools/plugin-redirect/src/shims.d.ts b/plugins/tools/plugin-redirect/src/shims.d.ts new file mode 100644 index 0000000000..85a163cd31 --- /dev/null +++ b/plugins/tools/plugin-redirect/src/shims.d.ts @@ -0,0 +1,10 @@ +declare module '@temp/redirect/map.js' { + export const redirectMap: Record +} + +declare module '@vuepress/plugin-redirect/modal' { + import type { ComponentOptions } from 'vue' + + const component: ComponentOptions + export default component +} diff --git a/plugins/tools/plugin-register-components/CHANGELOG.md b/plugins/tools/plugin-register-components/CHANGELOG.md index b467ad68ba..59d6770dbc 100644 --- a/plugins/tools/plugin-register-components/CHANGELOG.md +++ b/plugins/tools/plugin-register-components/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.44](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.43...v2.0.0-rc.44) (2024-09-18) **Note:** Version bump only for package @vuepress/plugin-register-components diff --git a/plugins/tools/plugin-register-components/package.json b/plugins/tools/plugin-register-components/package.json index 72d4651030..a33c079250 100644 --- a/plugins/tools/plugin-register-components/package.json +++ b/plugins/tools/plugin-register-components/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/plugin-register-components", - "version": "2.0.0-rc.44", + "version": "2.0.0-rc.52", "description": "VuePress plugin - register-components", "keywords": [ "vuepress-plugin", @@ -31,6 +31,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.{css,svg}\" lib" }, @@ -38,7 +39,7 @@ "chokidar": "^3.6.0" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/plugins/tools/plugin-register-components/rollup.config.ts b/plugins/tools/plugin-register-components/rollup.config.ts new file mode 100644 index 0000000000..2c083ff01d --- /dev/null +++ b/plugins/tools/plugin-register-components/rollup.config.ts @@ -0,0 +1,5 @@ +import { rollupBundle } from '../../../scripts/rollup.js' + +export default rollupBundle('node/index', { + external: ['chokidar'], +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15759148b0..9204f553ec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,25 +10,31 @@ importers: devDependencies: '@commitlint/cli': specifier: ^19.5.0 - version: 19.5.0(@types/node@22.5.5)(typescript@5.6.2) + version: 19.5.0(@types/node@22.7.4)(typescript@5.6.2) '@commitlint/config-conventional': specifier: ^19.5.0 version: 19.5.0 '@lerna-lite/cli': - specifier: ^3.9.1 - version: 3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(@lerna-lite/version@3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2) + specifier: ^3.9.2 + version: 3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(@lerna-lite/version@3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2) '@lerna-lite/publish': - specifier: ^3.9.1 - version: 3.9.1(typescript@5.6.2) + specifier: ^3.9.2 + version: 3.9.2(typescript@5.6.2) + '@rollup/plugin-commonjs': + specifier: ^28.0.0 + version: 28.0.0(rollup@4.22.5) + '@rollup/plugin-node-resolve': + specifier: ^15.3.0 + version: 15.3.0(rollup@4.22.5) '@types/node': - specifier: ^22.5.5 - version: 22.5.5 + specifier: ^22.7.4 + version: 22.7.4 '@types/webpack-env': specifier: ^1.18.5 version: 1.18.5 '@vitest/coverage-istanbul': specifier: ^2.1.1 - version: 2.1.1(vitest@2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)) + version: 2.1.1(vitest@2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)) conventional-changelog-cli: specifier: ^5.0.0 version: 5.0.0(conventional-commits-filter@5.0.0) @@ -39,11 +45,11 @@ importers: specifier: ^7.0.3 version: 7.0.3 eslint: - specifier: ^9.11.0 - version: 9.11.0(jiti@1.21.6) + specifier: ^9.11.1 + version: 9.11.1(jiti@1.21.6) eslint-config-vuepress: specifier: ^5.2.0 - version: 5.2.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.0(jiti@1.21.6))) + version: 5.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.1(jiti@1.21.6))) http-server: specifier: ^14.1.1 version: 14.1.1 @@ -65,9 +71,21 @@ importers: rimraf: specifier: ^6.0.1 version: 6.0.1 + rollup: + specifier: ^4.22.5 + version: 4.22.5 + rollup-plugin-dts: + specifier: ^6.1.1 + version: 6.1.1(rollup@4.22.5)(typescript@5.6.2) + rollup-plugin-esbuild: + specifier: ^6.1.1 + version: 6.1.1(esbuild@0.23.1)(rollup@4.22.5) + rollup-plugin-resolve-shebang: + specifier: ^1.0.1 + version: 1.0.1(rollup@4.22.5) sass-embedded: - specifier: 1.79.2 - version: 1.79.2 + specifier: 1.79.4 + version: 1.79.4 sort-package-json: specifier: ^2.10.1 version: 2.10.1 @@ -90,14 +108,14 @@ importers: specifier: ^5.6.2 version: 5.6.2 vite: - specifier: 5.4.6 - version: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + specifier: ~5.4.8 + version: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) vitest: specifier: ^2.1.1 - version: 2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + version: 2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) docs: dependencies: @@ -105,11 +123,11 @@ importers: specifier: 0.13.1 version: 0.13.1(markdown-it@14.1.0) '@vuepress/bundler-vite': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) '@vuepress/bundler-webpack': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(typescript@5.6.2) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2) '@vuepress/helper': specifier: workspace:* version: link:../tools/helper @@ -134,12 +152,18 @@ importers: '@vuepress/plugin-feed': specifier: workspace:* version: link:../plugins/blog/plugin-feed + '@vuepress/plugin-markdown-chart': + specifier: workspace:* + version: link:../plugins/markdown/plugin-markdown-chart '@vuepress/plugin-markdown-image': specifier: workspace:* version: link:../plugins/markdown/plugin-markdown-image '@vuepress/plugin-markdown-math': specifier: workspace:* version: link:../plugins/markdown/plugin-markdown-math + '@vuepress/plugin-markdown-tab': + specifier: workspace:* + version: link:../plugins/markdown/plugin-markdown-tab '@vuepress/plugin-medium-zoom': specifier: workspace:* version: link:../plugins/features/plugin-medium-zoom @@ -158,6 +182,9 @@ importers: '@vuepress/plugin-register-components': specifier: workspace:* version: link:../plugins/tools/plugin-register-components + '@vuepress/plugin-revealjs': + specifier: workspace:* + version: link:../plugins/markdown/plugin-revealjs '@vuepress/plugin-search': specifier: workspace:* version: link:../plugins/search/plugin-search @@ -167,30 +194,54 @@ importers: '@vuepress/theme-default': specifier: workspace:* version: link:../themes/theme-default + chart.js: + specifier: ^4.4.4 + version: 4.4.4 + echarts: + specifier: ^5.5.1 + version: 5.5.1 + flowchart.ts: + specifier: ^3.0.1 + version: 3.0.1 + katex: + specifier: 0.16.11 + version: 0.16.11 + markmap-lib: + specifier: ^0.17.2 + version: 0.17.2(markmap-common@0.17.1) + markmap-toolbar: + specifier: ^0.17.2 + version: 0.17.2(markmap-common@0.17.1) + markmap-view: + specifier: ^0.17.2 + version: 0.17.2(markmap-common@0.17.1) mathjax-full: - specifier: 3.2.2 + specifier: ^3.2.2 version: 3.2.2 + mermaid: + specifier: ^11.2.1 + version: 11.2.1 sass-embedded: - specifier: 1.79.2 - version: 1.79.2 + specifier: ^1.79.4 + version: 1.79.4 sass-loader: specifier: ^16.0.2 - version: 16.0.2(sass-embedded@1.79.2)(sass@1.79.2)(webpack@5.94.0) + version: 16.0.2(sass-embedded@1.79.4)(sass@1.79.4)(webpack@5.95.0(esbuild@0.23.1)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) e2e: dependencies: '@vuepress/bundler-vite': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) '@vuepress/bundler-webpack': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(typescript@5.6.2) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2) '@vuepress/plugin-blog': specifier: workspace:* version: link:../plugins/blog/plugin-blog @@ -215,6 +266,9 @@ importers: '@vuepress/plugin-register-components': specifier: workspace:* version: link:../plugins/tools/plugin-register-components + '@vuepress/plugin-sass-palette': + specifier: workspace:* + version: link:../plugins/development/plugin-sass-palette '@vuepress/plugin-theme-data': specifier: workspace:* version: link:../plugins/development/plugin-theme-data @@ -225,21 +279,21 @@ importers: specifier: workspace:* version: link:../themes/theme-default sass-embedded: - specifier: 1.79.2 - version: 1.79.2 + specifier: 1.79.4 + version: 1.79.4 sass-loader: specifier: ^16.0.2 - version: 16.0.2(sass-embedded@1.79.2)(sass@1.79.2)(webpack@5.94.0) + version: 16.0.2(sass-embedded@1.79.4)(sass@1.79.4)(webpack@5.95.0(esbuild@0.23.1)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@playwright/test': - specifier: ^1.47.1 - version: 1.47.1 + specifier: ^1.47.2 + version: 1.47.2 plugins/analytics/plugin-baidu-analytics: dependencies: @@ -247,17 +301,17 @@ importers: specifier: workspace:* version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/analytics/plugin-google-analytics: dependencies: vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/analytics/plugin-umami-analytics: dependencies: @@ -265,11 +319,11 @@ importers: specifier: workspace:* version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/blog/plugin-blog: dependencies: @@ -280,11 +334,11 @@ importers: specifier: ^3.6.0 version: 3.6.0 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/blog/plugin-comment: dependencies: @@ -304,11 +358,11 @@ importers: specifier: ^1.6.39 version: 1.6.39 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/blog/plugin-feed: dependencies: @@ -316,8 +370,8 @@ importers: specifier: workspace:* version: link:../../../tools/helper vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) xml-js: specifier: ^1.6.11 version: 1.6.11 @@ -330,13 +384,13 @@ importers: dependencies: '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/development/plugin-git: dependencies: @@ -344,8 +398,8 @@ importers: specifier: ^9.4.0 version: 9.4.0 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/development/plugin-palette: dependencies: @@ -353,11 +407,11 @@ importers: specifier: workspace:* version: link:../../../tools/helper chokidar: - specifier: ^4.0.0 - version: 4.0.0 + specifier: ^4.0.1 + version: 4.0.1 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/development/plugin-reading-time: dependencies: @@ -365,20 +419,23 @@ importers: specifier: workspace:* version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/development/plugin-rtl: dependencies: + '@vuepress/helper': + specifier: workspace:* + version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/development/plugin-sass-palette: dependencies: @@ -386,51 +443,51 @@ importers: specifier: workspace:* version: link:../../../tools/helper chokidar: - specifier: ^4.0.0 - version: 4.0.0 + specifier: ^4.0.1 + version: 4.0.1 sass: specifier: ^1.79.2 - version: 1.79.2 + version: 1.79.4 sass-embedded: specifier: ^1.79.2 - version: 1.79.2 + version: 1.79.4 sass-loader: specifier: ^16.0.1 - version: 16.0.2(sass-embedded@1.79.2)(sass@1.79.2)(webpack@5.94.0) + version: 16.0.2(sass-embedded@1.79.4)(sass@1.79.4)(webpack@5.95.0(esbuild@0.23.1)) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@vuepress/bundler-vite': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) '@vuepress/bundler-webpack': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(typescript@5.6.2) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2) plugins/development/plugin-theme-data: dependencies: '@vue/devtools-api': - specifier: ^6.6.4 - version: 6.6.4 + specifier: ^7.4.6 + version: 7.4.6 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/development/plugin-toc: dependencies: vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vue-router: specifier: ^4.4.5 - version: 4.4.5(vue@3.5.7(typescript@5.6.2)) + version: 4.4.5(vue@3.5.10(typescript@5.6.2)) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-back-to-top: dependencies: @@ -439,13 +496,13 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-catalog: dependencies: @@ -453,11 +510,11 @@ importers: specifier: workspace:* version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-copy-code: dependencies: @@ -466,13 +523,13 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-copyright: dependencies: @@ -481,13 +538,13 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-medium-zoom: dependencies: @@ -498,11 +555,11 @@ importers: specifier: ^1.1.0 version: 1.1.0 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-notice: dependencies: @@ -511,13 +568,13 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-nprogress: dependencies: @@ -525,11 +582,11 @@ importers: specifier: workspace:* version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-photo-swipe: dependencies: @@ -538,16 +595,16 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) photoswipe: specifier: ^5.4.4 version: 5.4.4 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/features/plugin-watermark: dependencies: @@ -555,14 +612,14 @@ importers: specifier: workspace:* version: link:../../../tools/helper vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) watermark-js-plus: - specifier: ^1.5.6 - version: 1.5.6 + specifier: ^1.5.7 + version: 1.5.7 plugins/markdown/plugin-append-date: dependencies: @@ -573,8 +630,8 @@ importers: specifier: workspace:* version: link:../../development/plugin-git vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/markdown/plugin-links-check: dependencies: @@ -582,8 +639,8 @@ importers: specifier: workspace:* version: link:../../../tools/helper vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/markdown/plugin-markdown-chart: dependencies: @@ -598,38 +655,44 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) chart.js: - specifier: ^4.0.0 + specifier: ^4.4.4 version: 4.4.4 echarts: - specifier: ^5.0.0 + specifier: ^5.5.1 version: 5.5.1 flowchart.ts: - specifier: ^3.0.0 + specifier: ^3.0.1 version: 3.0.1 markmap-lib: - specifier: ^0.17.0 - version: 0.17.0(markmap-common@0.17.0) + specifier: ^0.17.2 + version: 0.17.2(markmap-common@0.17.1) markmap-toolbar: - specifier: ^0.17.0 - version: 0.17.0(markmap-common@0.17.0) + specifier: ^0.17.2 + version: 0.17.2(markmap-common@0.17.1) markmap-view: - specifier: ^0.17.0 - version: 0.17.0(markmap-common@0.17.0) + specifier: ^0.17.2 + version: 0.17.2(markmap-common@0.17.1) mermaid: - specifier: ^11.2.0 + specifier: ^11.2.1 version: 11.2.1 vue: - specifier: ^3.5.6 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@types/markdown-it': specifier: ^14.1.2 version: 14.1.2 + markdown-it: + specifier: ^14.1.0 + version: 14.1.0 + markmap-common: + specifier: ^0.17.1 + version: 0.17.1 plugins/markdown/plugin-markdown-container: dependencies: @@ -640,8 +703,8 @@ importers: specifier: ^4.0.0 version: 4.0.0 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: markdown-it: specifier: ^14.1.0 @@ -661,9 +724,12 @@ importers: '@vuepress/helper': specifier: workspace:* version: link:../../../tools/helper + '@vueuse/core': + specifier: ^11.1.0 + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: markdown-it: specifier: ^14.1.0 @@ -690,8 +756,8 @@ importers: specifier: workspace:* version: link:../../../tools/helper vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/markdown/plugin-markdown-math: dependencies: @@ -714,11 +780,36 @@ importers: specifier: ^3.2.2 version: 3.2.2 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) + devDependencies: + markdown-it: + specifier: ^14.1.0 + version: 14.1.0 + + plugins/markdown/plugin-markdown-tab: + dependencies: + '@mdit/plugin-tab': + specifier: ^0.13.2 + version: 0.13.2(markdown-it@14.1.0) + '@types/markdown-it': + specifier: ^14.1.2 + version: 14.1.2 + '@vuepress/helper': + specifier: workspace:* + version: link:../../../tools/helper + '@vueuse/core': + specifier: ^11.1.0 + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) + vue: + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) + vuepress: + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: markdown-it: specifier: ^14.1.0 @@ -736,8 +827,8 @@ importers: specifier: ^1.29.0 version: 1.29.0 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@types/markdown-it': specifier: ^14.1.2 @@ -749,11 +840,42 @@ importers: specifier: ^14.1.0 version: 14.1.0 + plugins/markdown/plugin-revealjs: + dependencies: + '@mdit/plugin-uml': + specifier: ^0.13.1 + version: 0.13.1(markdown-it@14.1.0) + '@types/markdown-it': + specifier: ^14.1.2 + version: 14.1.2 + '@types/reveal.js': + specifier: ^5.0.3 + version: 5.0.3 + '@vuepress/helper': + specifier: workspace:* + version: link:../../../tools/helper + '@vueuse/core': + specifier: ^11.1.0 + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) + reveal.js: + specifier: ^5.1.0 + version: 5.1.0 + vue: + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) + vuepress: + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) + devDependencies: + markdown-it: + specifier: ^14.1.0 + version: 14.1.0 + plugins/markdown/plugin-shiki: dependencies: '@shikijs/transformers': - specifier: ^1.18.0 - version: 1.18.0 + specifier: ^1.21.0 + version: 1.21.0 '@vuepress/helper': specifier: workspace:* version: link:../../../tools/helper @@ -764,11 +886,11 @@ importers: specifier: ^5.0.7 version: 5.0.7 shiki: - specifier: ^1.18.0 - version: 1.18.0 + specifier: ^1.21.0 + version: 1.21.0 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@types/markdown-it': specifier: ^14.1.2 @@ -784,7 +906,7 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) mitt: specifier: ^3.0.1 version: 3.0.1 @@ -792,47 +914,51 @@ importers: specifier: ^1.7.2 version: 1.7.2 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) workbox-build: specifier: ^7.1.1 version: 7.1.1 + devDependencies: + rollup: + specifier: ^4.22.5 + version: 4.22.5 plugins/pwa/plugin-remove-pwa: dependencies: vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/search/plugin-docsearch: dependencies: '@docsearch/css': - specifier: ^3.6.1 - version: 3.6.1 + specifier: ^3.6.2 + version: 3.6.2 '@docsearch/js': - specifier: ^3.6.1 - version: 3.6.1(@algolia/client-search@4.24.0)(search-insights@2.13.0) + specifier: ^3.6.2 + version: 3.6.2(@algolia/client-search@4.24.0)(search-insights@2.13.0) '@docsearch/react': - specifier: ^3.6.1 - version: 3.6.1(@algolia/client-search@4.24.0)(search-insights@2.13.0) + specifier: ^3.6.2 + version: 3.6.2(@algolia/client-search@4.24.0)(search-insights@2.13.0) '@vuepress/helper': specifier: workspace:* version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) ts-debounce: specifier: ^4.0.0 version: 4.0.0 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/search/plugin-search: dependencies: @@ -840,11 +966,11 @@ importers: specifier: ^3.6.0 version: 3.6.0 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/seo/plugin-seo: dependencies: @@ -852,8 +978,8 @@ importers: specifier: workspace:* version: link:../../../tools/helper vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@vuepress/plugin-git': specifier: workspace:* @@ -868,8 +994,8 @@ importers: specifier: ^8.0.0 version: 8.0.0 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@vuepress/plugin-git': specifier: workspace:* @@ -884,14 +1010,14 @@ importers: specifier: ^10.4.3 version: 10.4.3 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/tools/plugin-google-tag-manager: dependencies: vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/tools/plugin-redirect: dependencies: @@ -900,16 +1026,16 @@ importers: version: link:../../../tools/helper '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) cac: specifier: ^6.7.14 version: 6.7.14 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) plugins/tools/plugin-register-components: dependencies: @@ -917,8 +1043,8 @@ importers: specifier: ^3.6.0 version: 3.6.0 vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) themes/theme-default: dependencies: @@ -940,12 +1066,12 @@ importers: '@vuepress/plugin-links-check': specifier: workspace:* version: link:../../plugins/markdown/plugin-links-check - '@vuepress/plugin-markdown-container': - specifier: workspace:* - version: link:../../plugins/markdown/plugin-markdown-container '@vuepress/plugin-markdown-hint': specifier: workspace:* version: link:../../plugins/markdown/plugin-markdown-hint + '@vuepress/plugin-markdown-tab': + specifier: workspace:* + version: link:../../plugins/markdown/plugin-markdown-tab '@vuepress/plugin-medium-zoom': specifier: workspace:* version: link:../../plugins/features/plugin-medium-zoom @@ -969,22 +1095,22 @@ importers: version: link:../../plugins/development/plugin-theme-data '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) sass: specifier: ^1.79.2 - version: 1.79.2 + version: 1.79.4 sass-embedded: specifier: ^1.79.2 - version: 1.79.2 + version: 1.79.4 sass-loader: specifier: ^16.0.1 - version: 16.0.2(sass-embedded@1.79.2)(sass@1.79.2)(webpack@5.94.0) + version: 16.0.2(sass-embedded@1.79.4)(sass@1.79.4)(webpack@5.95.0(esbuild@0.23.1)) vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) tools/create-vuepress: dependencies: @@ -1008,11 +1134,11 @@ importers: tools/helper: dependencies: '@vue/shared': - specifier: ^3.5.7 - version: 3.5.7 + specifier: ^3.5.10 + version: 3.5.10 '@vueuse/core': specifier: ^11.1.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) cheerio: specifier: 1.0.0 version: 1.0.0 @@ -1023,21 +1149,21 @@ importers: specifier: ^4.0.3 version: 4.0.3 vue: - specifier: ^3.5.7 - version: 3.5.7(typescript@5.6.2) + specifier: ^3.5.10 + version: 3.5.10(typescript@5.6.2) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) devDependencies: '@types/connect': specifier: 3.4.38 version: 3.4.38 '@vuepress/bundler-vite': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) '@vuepress/bundler-webpack': - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(typescript@5.6.2) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2) '@vuepress/plugin-git': specifier: workspace:* version: link:../../plugins/development/plugin-git @@ -1045,17 +1171,17 @@ importers: specifier: 5.0.3 version: 5.0.3 vite: - specifier: ~5.4.6 - version: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + specifier: ~5.4.8 + version: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) tools/highlighter-helper: dependencies: '@vueuse/core': - specifier: ^11.0.0 - version: 11.1.0(vue@3.5.7(typescript@5.6.2)) + specifier: ^11.1.0 + version: 11.1.0(vue@3.5.10(typescript@5.6.2)) vuepress: - specifier: 2.0.0-rc.15 - version: 2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)) + specifier: 2.0.0-rc.17 + version: 2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)) tools/vp-update: dependencies: @@ -1850,14 +1976,14 @@ packages: peerDependencies: postcss-selector-parser: ^6.1.0 - '@docsearch/css@3.6.1': - resolution: {integrity: sha512-VtVb5DS+0hRIprU2CO6ZQjK2Zg4QU5HrDM1+ix6rT0umsYvFvatMAnf97NHZlVWDaaLlx7GRfR/7FikANiM2Fg==} + '@docsearch/css@3.6.2': + resolution: {integrity: sha512-vKNZepO2j7MrYBTZIGXvlUOIR+v9KRf70FApRgovWrj3GTs1EITz/Xb0AOlm1xsQBp16clVZj1SY/qaOJbQtZw==} - '@docsearch/js@3.6.1': - resolution: {integrity: sha512-erI3RRZurDr1xES5hvYJ3Imp7jtrXj6f1xYIzDzxiS7nNBufYWPbJwrmMqWC5g9y165PmxEmN9pklGCdLi0Iqg==} + '@docsearch/js@3.6.2': + resolution: {integrity: sha512-pS4YZF+VzUogYrkblCucQ0Oy2m8Wggk8Kk7lECmZM60hTbaydSIhJTTiCrmoxtBqV8wxORnOqcqqOfbmkkQEcA==} - '@docsearch/react@3.6.1': - resolution: {integrity: sha512-qXZkEPvybVhSXj0K7U3bXc233tk5e8PfhoZ6MhPOiik/qUQxYC+Dn9DnoS7CxHQQhHfCvTiN0eY9M12oRghEXw==} + '@docsearch/react@3.6.2': + resolution: {integrity: sha512-rtZce46OOkVflCQH71IdbXSFK+S8iJZlUF56XBW5rIgx/eG5qoomC7Ag3anZson1bBac/JFQn7XOBfved/IMRA==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' react: '>= 16.8.0 < 19.0.0' @@ -2172,12 +2298,16 @@ packages: resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.6.0': + resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/eslintrc@3.1.0': resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.11.0': - resolution: {integrity: sha512-LPkkenkDqyzTFauZLLAPhIb48fj6drrfMvRGSL9tS3AcZBSVTllemLSNyCvHNNL2t797S/6DJNSIwRwXgMO/eQ==} + '@eslint/js@9.11.1': + resolution: {integrity: sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/object-schema@2.1.4': @@ -2228,10 +2358,6 @@ packages: resolution: {integrity: sha512-VA96GPFaSOVudjKFraokEEmUQg/Lub6OXvbIEZU1SDCmBzRkHGhxoFAVaF30nyiB4m5cEbDgiI2QRacXZ2hw9Q==} engines: {node: '>=18'} - '@inquirer/expand@2.3.0': - resolution: {integrity: sha512-qnJsUcOGCSG1e5DTOErmv2BPQqrtT6uzqn1vI/aYGiPKq+FgslGZmtdnXbhuI7IlT7OByDoEEqdnhUnVR2hhLw==} - engines: {node: '>=18'} - '@inquirer/expand@3.0.1': resolution: {integrity: sha512-ToG8d6RIbnVpbdPdiN7BCxZGiHOTomOX94C2FaT5KOHupV40tKEDozp12res6cMIfRKrXLJyexAZhWVHgbALSQ==} engines: {node: '>=18'} @@ -2240,10 +2366,6 @@ packages: resolution: {integrity: sha512-yfZzps3Cso2UbM7WlxKwZQh2Hs6plrbjs1QnzQDZhK2DgyCo6D8AaHps9olkNcUFlcYERMqU3uJSp1gmy3s/qQ==} engines: {node: '>=18'} - '@inquirer/input@2.3.0': - resolution: {integrity: sha512-XfnpCStx2xgh1LIRqPXrTNEEByqQWoxsWYzNRSEUxJ5c6EQlhMogJ3vHKu8aXuTacebtaZzMAHwEL0kAflKOBw==} - engines: {node: '>=18'} - '@inquirer/input@3.0.1': resolution: {integrity: sha512-BDuPBmpvi8eMCxqC5iacloWqv+5tQSJlUafYWUe31ow1BVXjW2a5qe3dh4X/Z25Wp22RwvcaLCc2siHobEOfzg==} engines: {node: '>=18'} @@ -2268,18 +2390,10 @@ packages: resolution: {integrity: sha512-r5hBKZk3g5MkIzLVoSgE4evypGqtOannnB3PKTG9NRZxyFRKcfzrdxXXPcoJQsxJPzvdSU2Rn7pB7lw0GCmGAg==} engines: {node: '>=18'} - '@inquirer/select@2.5.0': - resolution: {integrity: sha512-YmDobTItPP3WcEI86GvPo+T2sRHkxxOq/kXmsBjHS5BVXUgvgZ5AfJjkvQvZr03T81NnI3KrrRuMzeuYUQRFOA==} - engines: {node: '>=18'} - '@inquirer/select@3.0.1': resolution: {integrity: sha512-lUDGUxPhdWMkN/fHy1Lk7pF3nK1fh/gqeyWXmctefhxLYxlDsc7vsPBEpxrfVGDsVdyYJsiJoD4bJ1b623cV1Q==} engines: {node: '>=18'} - '@inquirer/type@1.5.5': - resolution: {integrity: sha512-MzICLu4yS7V8AA61sANROZ9vT1H3ooca5dSmI1FjZkzq7o/koMsRfQSzRtFo+F3Ao4Sf1C0bpLKejpKB/+j6MA==} - engines: {node: '>=18'} - '@inquirer/type@2.0.0': resolution: {integrity: sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==} engines: {node: '>=18'} @@ -2348,8 +2462,8 @@ packages: '@leichtgewicht/ip-codec@2.0.5': resolution: {integrity: sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==} - '@lerna-lite/cli@3.9.1': - resolution: {integrity: sha512-WAqBZZbXJsRZRRLUwIUCI21croYF9AiOQI86nXV75u0booqZJhUQyp7bnj54Eb23+Y0PEjN1qxMiIhiAPRPYOQ==} + '@lerna-lite/cli@3.9.2': + resolution: {integrity: sha512-luplQHUv3HeZ+YWBH+Q2NApEhEhczQDhzORoHwT5GofZQSsnINKD5PSUQrRBLRRp5rgXB587vSTQF6OoQV0mWw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2373,24 +2487,24 @@ packages: '@lerna-lite/watch': optional: true - '@lerna-lite/core@3.9.1': - resolution: {integrity: sha512-xIJcHu6be937nNNtkHaaj37pdc+GtwdiO60iURGqHZJNPaN2lq00bqcSQ3OVuszpBQXGaMI3DuvDTdxoZR7clg==} + '@lerna-lite/core@3.9.2': + resolution: {integrity: sha512-phbTnRNAMRvAtYiCl70SUaVWItAwY6HOznUgKt1vykReW3PabNEfb+sbq69/a7FS2qeQaCSAmAjO9fkVaEjUjw==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/init@3.9.1': - resolution: {integrity: sha512-2QwvKiMOLOpBxXxZxMo28LF/M6JTfjdyah7nWgWUaJDbr2ew6ZL23fLIq/irtWaOn4LTViwWzEdY4zGGQKrNmg==} + '@lerna-lite/init@3.9.2': + resolution: {integrity: sha512-2YNlZsUk2DBcAUpIy4ZKjaNgi2bQ87+P96xqxaUGw5s+oFCgJJZwPGKORH/Slm9d5m1cPTpywiBBgbgG18JUwQ==} engines: {node: ^18.0.0 || >=20.0.0} '@lerna-lite/npmlog@3.8.0': resolution: {integrity: sha512-ny8vueqyhWZtNRsoOVUybdOK6KcGDpLzFD01Ae4k/NjEw1ap3v6sUS0k7h/U2/HmZgiR0bU+XRJShuoUZf6E/g==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/publish@3.9.1': - resolution: {integrity: sha512-j85gQZ4B+S/e13lwoQhzlJ3YQHBuR80xvCqMf+oFrCxsyfOHXtZB1kdAsOQFCR9j1jcAiCnz+6V2xr06visJ8Q==} + '@lerna-lite/publish@3.9.2': + resolution: {integrity: sha512-H/2/1JWgx0GnhYaLN47DJAx8r3jMp6BTrtgX0KomAskJKPl85QerEkBCwg1NQ0UcAqVISbhwrLx9U8rvUZBIeA==} engines: {node: ^18.0.0 || >=20.0.0} - '@lerna-lite/version@3.9.1': - resolution: {integrity: sha512-gljKw4HvmL+YSOYqMEXV2BhcrVrh+k5fO3ecVo8NxC0t43DTCLgKWvY6BAp9XJuxD/achTaw2nr1QbIsfpsylQ==} + '@lerna-lite/version@3.9.2': + resolution: {integrity: sha512-Gev5HLFW7UCkBuYnXBHLHj+/9CJtH8g1CBZ3Fjc7OdIHVOivFH/2Dzm+PbWsxbn0QGIyt4qJPIFCvOw8eo/Adw==} engines: {node: ^18.0.0 || >=20.0.0} '@lit-labs/ssr-dom-shim@1.2.1': @@ -2514,6 +2628,14 @@ packages: markdown-it: optional: true + '@mdit/plugin-tab@0.13.2': + resolution: {integrity: sha512-evpIXvo6vXRWhgNE6vu4ok1I2dVOzrBYmBUGc1gW8nT9MvkW9litu7RbJ6CafscqaiiYRIM5Oib1ahS0lwte6g==} + peerDependencies: + markdown-it: ^14.1.0 + peerDependenciesMeta: + markdown-it: + optional: true + '@mdit/plugin-tex@0.13.1': resolution: {integrity: sha512-lkRf6XrfVfS11FzT3hiooWdOUPJfAd/cnAv4NN/4WU7qOEz0e0HBVQO8PQb5CPwrE94Ld4+E6rQwJfVH1grkwQ==} engines: {node: '>= 18'} @@ -2535,13 +2657,13 @@ packages: '@mermaid-js/parser@0.3.0': resolution: {integrity: sha512-HsvL6zgE5sUPGgkIDlmAWR1HTNHz2Iy11BAWPTa4Jjabkpguy4Ze2gzfLrg6pdRuBvFwgUYyxiaNqZwrEEXepA==} - '@meteorlxy/eslint-config@4.5.1': - resolution: {integrity: sha512-rdazcyU6GGW6+wIDJpCHmB/x7mt4/MPmiFZ5KFUxW6hhCV7e2MgxSL5p3qC8f3aCFk7Ve33mja0TBAwBfN8Vpg==} + '@meteorlxy/eslint-config@4.6.0': + resolution: {integrity: sha512-zQTJaHAgRS4ocdbzQYDGQ0DHtXkeHwp+APabqJ3js8Xfi6n2B2HsrH29zZSiTZiR7dgfQqXY5IfLzu9hdWWoDw==} peerDependencies: - eslint-plugin-react: ^7.35.0 + eslint-plugin-react: ^7.36.1 eslint-plugin-react-hooks: 5.x - eslint-plugin-react-refresh: ^0.4.9 - eslint-plugin-vue: ^9.27.0 + eslint-plugin-react-refresh: ^0.4.12 + eslint-plugin-vue: ^9.28.0 vue-eslint-parser: ^9.4.3 peerDependenciesMeta: eslint-plugin-react: @@ -2647,8 +2769,8 @@ packages: '@octokit/plugin-enterprise-rest@6.0.1': resolution: {integrity: sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw==} - '@octokit/plugin-paginate-rest@11.3.3': - resolution: {integrity: sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==} + '@octokit/plugin-paginate-rest@11.3.5': + resolution: {integrity: sha512-cgwIRtKrpwhLoBi0CUNuY83DPGRMaWVjqVI/bGKsLJ4PzyWZNaEmhHroI2xlrVXkk6nFv0IsZpOp+ZWSWUS2AQ==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=6' @@ -2659,14 +2781,14 @@ packages: peerDependencies: '@octokit/core': '>=6' - '@octokit/plugin-rest-endpoint-methods@13.2.4': - resolution: {integrity: sha512-gusyAVgTrPiuXOdfqOySMDztQHv6928PQ3E4dqVGEtOvRXAKRbJR4b1zQyniIT9waqaWk/UDaoJ2dyPr7Bk7Iw==} + '@octokit/plugin-rest-endpoint-methods@13.2.5': + resolution: {integrity: sha512-c4pRWi7OUSFM4E6frfUs+qsAf052aOWt1x2qFQ6llQcd1J0HqQ/0Egfs2lm33IixXeXXhZ+GmC9tf92qbOs25Q==} engines: {node: '>= 18'} peerDependencies: '@octokit/core': '>=6' - '@octokit/request-error@6.1.4': - resolution: {integrity: sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==} + '@octokit/request-error@6.1.5': + resolution: {integrity: sha512-IlBTfGX8Yn/oFPMwSfvugfncK2EwRLjzbrpifNaMY8o/HTEAFqCA1FZxjD9cWvSKBHgrIhc4CSBIzMxiLsbzFQ==} engines: {node: '>= 18'} '@octokit/request@9.1.3': @@ -2677,15 +2799,15 @@ packages: resolution: {integrity: sha512-+CiLisCoyWmYicH25y1cDfCrv41kRSvTq6pPWtRroRJzhsCZWZyCqGyI8foJT5LmScADSwRAnr/xo+eewL04wQ==} engines: {node: '>= 18'} - '@octokit/types@13.5.0': - resolution: {integrity: sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==} + '@octokit/types@13.6.0': + resolution: {integrity: sha512-CrooV/vKCXqwLa+osmHLIMUb87brpgUqlqkPGc6iE2wCkUvTrHiXFMhAKoDDaAAYJrtKtrFTgSQTg5nObBEaew==} '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} - '@playwright/test@1.47.1': - resolution: {integrity: sha512-dbWpcNQZ5nj16m+A5UNScYx7HX5trIy7g4phrcitn+Nk83S32EBX/CLU4hiF4RGKX/yRc93AAqtfaXB7JWBd4Q==} + '@playwright/test@1.47.2': + resolution: {integrity: sha512-jTXRsoSPONAs8Za9QEQdyjFn+0ZQFjCiIztAIF6bi1HqhBzG9Ma7g1WotyiGqFSBRZjIEqMdT8RUlbk1QVhzCQ==} engines: {node: '>=18'} hasBin: true @@ -2700,8 +2822,17 @@ packages: '@types/babel__core': optional: true - '@rollup/plugin-node-resolve@15.2.3': - resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} + '@rollup/plugin-commonjs@28.0.0': + resolution: {integrity: sha512-BJcu+a+Mpq476DMXG+hevgPSl56bkUoi88dKT8t3RyUp8kGuOh+2bU8Gs7zXDlu+fyZggnJ+iOBGrb/O1SorYg==} + engines: {node: '>=16.0.0 || 14 >= 14.17'} + peerDependencies: + rollup: ^2.68.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true + + '@rollup/plugin-node-resolve@15.3.0': + resolution: {integrity: sha512-9eO5McEICxMzJpDW9OnMYSv4Sta3hmt7VtBFz5zR9273suNOydOyq/FrGeGy+KsTRFm8w0SLVhzig2ILFT63Ag==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^2.78.0||^3.0.0||^4.0.0 @@ -2729,8 +2860,8 @@ packages: peerDependencies: rollup: ^1.20.0||^2.0.0 - '@rollup/pluginutils@5.1.0': - resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} + '@rollup/pluginutils@5.1.2': + resolution: {integrity: sha512-/FIdS3PyZ39bjZlwqFnWqCOVnW7o963LtKMwQOD0NhQqw22gSr2YY1afu3FxRip4ZCZNsD5jq6Aaz6QV3D/Njw==} engines: {node: '>=14.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 @@ -2738,112 +2869,103 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.22.2': - resolution: {integrity: sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw==} + '@rollup/rollup-android-arm-eabi@4.22.5': + resolution: {integrity: sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.22.2': - resolution: {integrity: sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ==} + '@rollup/rollup-android-arm64@4.22.5': + resolution: {integrity: sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.22.2': - resolution: {integrity: sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg==} + '@rollup/rollup-darwin-arm64@4.22.5': + resolution: {integrity: sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.2': - resolution: {integrity: sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q==} + '@rollup/rollup-darwin-x64@4.22.5': + resolution: {integrity: sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.22.2': - resolution: {integrity: sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg==} + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + resolution: {integrity: sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==} cpu: [arm] os: [linux] - libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.22.2': - resolution: {integrity: sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ==} + '@rollup/rollup-linux-arm-musleabihf@4.22.5': + resolution: {integrity: sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==} cpu: [arm] os: [linux] - libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.22.2': - resolution: {integrity: sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A==} + '@rollup/rollup-linux-arm64-gnu@4.22.5': + resolution: {integrity: sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==} cpu: [arm64] os: [linux] - libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.22.2': - resolution: {integrity: sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA==} + '@rollup/rollup-linux-arm64-musl@4.22.5': + resolution: {integrity: sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==} cpu: [arm64] os: [linux] - libc: [musl] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': - resolution: {integrity: sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + resolution: {integrity: sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==} cpu: [ppc64] os: [linux] - libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.22.2': - resolution: {integrity: sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg==} + '@rollup/rollup-linux-riscv64-gnu@4.22.5': + resolution: {integrity: sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==} cpu: [riscv64] os: [linux] - libc: [glibc] - '@rollup/rollup-linux-s390x-gnu@4.22.2': - resolution: {integrity: sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA==} + '@rollup/rollup-linux-s390x-gnu@4.22.5': + resolution: {integrity: sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==} cpu: [s390x] os: [linux] - libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.22.2': - resolution: {integrity: sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ==} + '@rollup/rollup-linux-x64-gnu@4.22.5': + resolution: {integrity: sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==} cpu: [x64] os: [linux] - libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.22.2': - resolution: {integrity: sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g==} + '@rollup/rollup-linux-x64-musl@4.22.5': + resolution: {integrity: sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==} cpu: [x64] os: [linux] - libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.22.2': - resolution: {integrity: sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA==} + '@rollup/rollup-win32-arm64-msvc@4.22.5': + resolution: {integrity: sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.2': - resolution: {integrity: sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw==} + '@rollup/rollup-win32-ia32-msvc@4.22.5': + resolution: {integrity: sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.2': - resolution: {integrity: sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA==} + '@rollup/rollup-win32-x64-msvc@4.22.5': + resolution: {integrity: sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==} cpu: [x64] os: [win32] '@sec-ant/readable-stream@0.4.1': resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} - '@shikijs/core@1.18.0': - resolution: {integrity: sha512-VK4BNVCd2leY62Nm2JjyxtRLkyrZT/tv104O81eyaCjHq4Adceq2uJVFJJAIof6lT1mBwZrEo2qT/T+grv3MQQ==} + '@shikijs/core@1.21.0': + resolution: {integrity: sha512-zAPMJdiGuqXpZQ+pWNezQAk5xhzRXBNiECFPcJLtUdsFM3f//G95Z15EHTnHchYycU8kIIysqGgxp8OVSj1SPQ==} - '@shikijs/engine-javascript@1.18.0': - resolution: {integrity: sha512-qoP/aO/ATNwYAUw1YMdaip/YVEstMZEgrwhePm83Ll9OeQPuxDZd48szZR8oSQNQBT8m8UlWxZv8EA3lFuyI5A==} + '@shikijs/engine-javascript@1.21.0': + resolution: {integrity: sha512-jxQHNtVP17edFW4/0vICqAVLDAxmyV31MQJL4U/Kg+heQALeKYVOWo0sMmEZ18FqBt+9UCdyqGKYE7bLRtk9mg==} - '@shikijs/engine-oniguruma@1.18.0': - resolution: {integrity: sha512-B9u0ZKI/cud+TcmF8Chyh+R4V5qQVvyDOqXC2l2a4x73PBSBc6sZ0JRAX3eqyJswqir6ktwApUUGBYePdKnMJg==} + '@shikijs/engine-oniguruma@1.21.0': + resolution: {integrity: sha512-AIZ76XocENCrtYzVU7S4GY/HL+tgHGbVU+qhiDyNw1qgCA5OSi4B4+HY4BtAoJSMGuD/L5hfTzoRVbzEm2WTvg==} - '@shikijs/transformers@1.18.0': - resolution: {integrity: sha512-EdX/UIVaaS8qp9NWRyHIXp2dmuLpdVvx+UVpbIn9eafFlLemAuljPb2+K40ie6jrlg0uUIqkg25CM/8I34yBNw==} + '@shikijs/transformers@1.21.0': + resolution: {integrity: sha512-aA+XGGSzipcvqdsOYL8l6Q2RYiMuJNdhdt9eZnkJmW+wjSOixN/I7dBq3fISwvEMDlawrtuXM3eybLCEC+Fjlg==} - '@shikijs/types@1.18.0': - resolution: {integrity: sha512-O9N36UEaGGrxv1yUrN2nye7gDLG5Uq0/c1LyfmxsvzNPqlHzWo9DI0A4+fhW2y3bGKuQu/fwS7EPdKJJCowcVA==} + '@shikijs/types@1.21.0': + resolution: {integrity: sha512-tzndANDhi5DUndBtpojEq/42+dpUF2wS7wdCDQaFtIXm3Rd1QkrcVgSSRLOvEwexekihOXfbYJINW37g96tJRw==} '@shikijs/vscode-textmate@9.2.2': resolution: {integrity: sha512-TMp15K+GGYrWlZM8+Lnj9EaHEFmOen0WJBrfa17hF7taDOYthuPPV0GWzfd/9iMij0akS/8Yw2ikquH7uVi/fg==} @@ -3012,14 +3134,14 @@ packages: '@types/estree@0.0.39': resolution: {integrity: sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==} - '@types/estree@1.0.5': - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - '@types/express-serve-static-core@4.19.5': - resolution: {integrity: sha512-y6W03tvrACO72aijJ5uF02FRq5cgDR9lUxddQ8vyF+GvmjJQqbzDcJngEjURc+ZsG31VI3hODNZJ2URj86pzmg==} + '@types/express-serve-static-core@4.19.6': + resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} + + '@types/express-serve-static-core@5.0.0': + resolution: {integrity: sha512-AbXMTZGt40T+KON9/Fdxx0B2WK5hsgxcfXJLr5bFpZ7b4JCex2WyQPTEKdXqfHiY5nKKBScZ7yCoO6Pvgxfvnw==} '@types/express@4.17.21': resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==} @@ -3096,8 +3218,8 @@ packages: '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} - '@types/node@22.5.5': - resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} + '@types/node@22.7.4': + resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -3120,6 +3242,9 @@ packages: '@types/retry@0.12.2': resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} + '@types/reveal.js@5.0.3': + resolution: {integrity: sha512-gwnK8TR38IOBIORWFrV5/z9lRX4iLke2FBqNgRhXxehaWJFkrzVY2TVzfdX/SX94eugt+OI5l++zDBBSfdzruQ==} + '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} @@ -3165,8 +3290,8 @@ packages: '@types/yargs@17.0.33': resolution: {integrity: sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==} - '@typescript-eslint/eslint-plugin@8.6.0': - resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==} + '@typescript-eslint/eslint-plugin@8.7.0': + resolution: {integrity: sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -3176,8 +3301,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.6.0': - resolution: {integrity: sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==} + '@typescript-eslint/parser@8.7.0': + resolution: {integrity: sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -3186,12 +3311,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.6.0': - resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==} + '@typescript-eslint/scope-manager@8.7.0': + resolution: {integrity: sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.6.0': - resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==} + '@typescript-eslint/type-utils@8.7.0': + resolution: {integrity: sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3199,12 +3324,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.6.0': - resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==} + '@typescript-eslint/types@8.7.0': + resolution: {integrity: sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.6.0': - resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==} + '@typescript-eslint/typescript-estree@8.7.0': + resolution: {integrity: sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -3212,14 +3337,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.6.0': - resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==} + '@typescript-eslint/utils@8.7.0': + resolution: {integrity: sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.6.0': - resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==} + '@typescript-eslint/visitor-keys@8.7.0': + resolution: {integrity: sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.2.0': @@ -3267,62 +3392,74 @@ packages: '@vitest/utils@2.1.1': resolution: {integrity: sha512-Y6Q9TsI+qJ2CC0ZKj6VBb+T8UPz593N113nnUykqwANqhgf3QkZeHFlusgKLTqrnVHbj/XDKZcDHol+dxVT+rQ==} - '@vue/compiler-core@3.5.7': - resolution: {integrity: sha512-A0gay3lK71MddsSnGlBxRPOugIVdACze9L/rCo5X5srCyjQfZOfYtSFMJc3aOZCM+xN55EQpb4R97rYn/iEbSw==} + '@vue/compiler-core@3.5.10': + resolution: {integrity: sha512-iXWlk+Cg/ag7gLvY0SfVucU8Kh2CjysYZjhhP70w9qI4MvSox4frrP+vDGvtQuzIcgD8+sxM6lZvCtdxGunTAA==} - '@vue/compiler-dom@3.5.7': - resolution: {integrity: sha512-GYWl3+gO8/g0ZdYaJ18fYHdI/WVic2VuuUd1NsPp60DWXKy+XjdhFsDW7FbUto8siYYZcosBGn9yVBkjhq1M8Q==} + '@vue/compiler-dom@3.5.10': + resolution: {integrity: sha512-DyxHC6qPcktwYGKOIy3XqnHRrrXyWR2u91AjP+nLkADko380srsC2DC3s7Y1Rk6YfOlxOlvEQKa9XXmLI+W4ZA==} - '@vue/compiler-sfc@3.5.7': - resolution: {integrity: sha512-EjOJtCWJrC7HqoCEzOwpIYHm+JH7YmkxC1hG6VkqIukYRqj8KFUlTLK6hcT4nGgtVov2+ZfrdrRlcaqS78HnBA==} + '@vue/compiler-sfc@3.5.10': + resolution: {integrity: sha512-to8E1BgpakV7224ZCm8gz1ZRSyjNCAWEplwFMWKlzCdP9DkMKhRRwt0WkCjY7jkzi/Vz3xgbpeig5Pnbly4Tow==} - '@vue/compiler-ssr@3.5.7': - resolution: {integrity: sha512-oZx+jXP2k5arV/8Ly3TpQbfFyimMw2ANrRqvHJoKjPqtEzazxQGZjCLOfq8TnZ3wy2TOXdqfmVp4q7FyYeHV4g==} + '@vue/compiler-ssr@3.5.10': + resolution: {integrity: sha512-hxP4Y3KImqdtyUKXDRSxKSRkSm1H9fCvhojEYrnaoWhE4w/y8vwWhnosJoPPe2AXm5sU7CSbYYAgkt2ZPhDz+A==} '@vue/devtools-api@6.6.4': resolution: {integrity: sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g==} - '@vue/reactivity@3.5.7': - resolution: {integrity: sha512-yF0EpokpOHRNXyn/h6abXc9JFIzfdAf0MJHIi92xxCWS0mqrXH6+2aZ+A6EbSrspGzX5MHTd5N8iBA28HnXu9g==} + '@vue/devtools-api@7.4.6': + resolution: {integrity: sha512-XipBV5k0/IfTr0sNBDTg7OBUCp51cYMMXyPxLXJZ4K/wmUeMqt8cVdr2ZZGOFq+si/jTyCYnNxeKoyev5DOUUA==} - '@vue/runtime-core@3.5.7': - resolution: {integrity: sha512-OzLpBpKbZEaZVSNfd+hQbfBrDKux+b7Yl5hYhhWWWhHD7fEpF+CdI3Brm5k5GsufHEfvMcjruPxwQZuBN6nFYQ==} + '@vue/devtools-kit@7.4.6': + resolution: {integrity: sha512-NbYBwPWgEic1AOd9bWExz9weBzFdjiIfov0yRn4DrRfR+EQJCI9dn4I0XS7IxYGdkmUJi8mFW42LLk18WsGqew==} - '@vue/runtime-dom@3.5.7': - resolution: {integrity: sha512-fL7cETfE27U2jyTgqzE382IGFY6a6uyznErn27KbbEzNctzxxUWYDbaN3B55l9nXh0xW2LRWPuWKOvjtO2UewQ==} + '@vue/devtools-shared@7.4.6': + resolution: {integrity: sha512-rPeSBzElnHYMB05Cc056BQiJpgocQjY8XVulgni+O9a9Gr9tNXgPteSzFFD+fT/iWMxNuUgGKs9CuW5DZewfIg==} - '@vue/server-renderer@3.5.7': - resolution: {integrity: sha512-peRypij815eIDjpPpPXvYQGYqPH6QXwLJGWraJYPPn8JqWGl29A8QXnS7/Mh3TkMiOcdsJNhbFCoW2Agc2NgAQ==} + '@vue/reactivity@3.5.10': + resolution: {integrity: sha512-kW08v06F6xPSHhid9DJ9YjOGmwNDOsJJQk0ax21wKaUYzzuJGEuoKNU2Ujux8FLMrP7CFJJKsHhXN9l2WOVi2g==} + + '@vue/runtime-core@3.5.10': + resolution: {integrity: sha512-9Q86I5Qq3swSkFfzrZ+iqEy7Vla325M7S7xc1NwKnRm/qoi1Dauz0rT6mTMmscqx4qz0EDJ1wjB+A36k7rl8mA==} + + '@vue/runtime-dom@3.5.10': + resolution: {integrity: sha512-t3x7ht5qF8ZRi1H4fZqFzyY2j+GTMTDxRheT+i8M9Ph0oepUxoadmbwlFwMoW7RYCpNQLpP2Yx3feKs+fyBdpA==} + + '@vue/server-renderer@3.5.10': + resolution: {integrity: sha512-IVE97tt2kGKwHNq9yVO0xdh1IvYfZCShvDSy46JIh5OQxP1/EXSpoDqetVmyIzL7CYOWnnmMkVqd7YK2QSWkdw==} peerDependencies: - vue: 3.5.7 + vue: 3.5.10 + + '@vue/shared@3.5.10': + resolution: {integrity: sha512-VkkBhU97Ki+XJ0xvl4C9YJsIZ2uIlQ7HqPpZOS3m9VCvmROPaChZU6DexdMJqvz9tbgG+4EtFVrSuailUq5KGQ==} - '@vue/shared@3.5.7': - resolution: {integrity: sha512-NBE1PBIvzIedxIc2RZiKXvGbJkrZ2/hLf3h8GlS4/sP9xcXEZMFWOazFkNd6aGeUCMaproe5MHVYB3/4AW9q9g==} + '@vuepress/bundler-vite@2.0.0-rc.17': + resolution: {integrity: sha512-K2osFYuAX1y1m50IxSA7ykM0wdxvQBD3LsYsqAltMk/yM26cF8BjTOfpAbfBw4/gTbQHv2pzJbfUgOm9o/LbvQ==} - '@vuepress/bundler-vite@2.0.0-rc.15': - resolution: {integrity: sha512-xPJBOvrt9hn+3dkMuWIpVy1Jb3a29ZPkEZ0nE10ULzLaGvN+Lv6tB7FPTN9d67LGT4wi09X0EXSvWg9Eun+6pQ==} + '@vuepress/bundler-webpack@2.0.0-rc.17': + resolution: {integrity: sha512-w3h1A8yrVIHU4Su1uePxQd2JTX6WcvTZOOgPphnxjpMLg7eyETpd+HrsQ0G4wdEAwGU6WyfVgyCoU3MZFQN4Pw==} - '@vuepress/bundler-webpack@2.0.0-rc.15': - resolution: {integrity: sha512-btoZPkSbEubEKOWLkFtt1BsSRlXL12foYs6aLdhlh+21VZId3o8jHC1JXS24sjHkIuqni5ZyRPKnKIFVckjdmQ==} + '@vuepress/bundlerutils@2.0.0-rc.17': + resolution: {integrity: sha512-+Hxv3N8XRr6TTzBcXtaXlzq8r3YY/+HLeQHZ9mCGAhBXRCv5BeBgjpMP4BiQT1jd1FxfxRguyyFwioC6g5dOdA==} - '@vuepress/cli@2.0.0-rc.15': - resolution: {integrity: sha512-frJ0G4sOWUicpa6P1avpgYT0ZLfaAPeRCugghaQGVPnssYuddsP9KBIwfsJ5RP4lWpwfcsdZEuJKKrVJDh6PkQ==} + '@vuepress/cli@2.0.0-rc.17': + resolution: {integrity: sha512-naib+o5MRmkimjzHykuTLojltebv4+VpstK2KyOp7oR8XBBLAbpgVOgTLnTnDSooR9e313wQzYUzrgI+TKOwdQ==} hasBin: true - '@vuepress/client@2.0.0-rc.15': - resolution: {integrity: sha512-73TWRIFKFqDRI+JHFjVWUJNfeExBYUxR7QuB5ZrtbntvN7Tu+Qr6wMwTU9bwDttRIaxUzoTBuTN5wfAiijokHg==} + '@vuepress/client@2.0.0-rc.17': + resolution: {integrity: sha512-dnCU+spOgVw1V7vU/Gkj6e7bkfsGbezUuPAQMiWkBdrNTZ2BJctOHhhi+F8OBRR02hZ9JldlToA5vBoVsPKRpw==} - '@vuepress/core@2.0.0-rc.15': - resolution: {integrity: sha512-CcVuANpF3k5QH6k27uShpQc+fdb35QdMbqNr4YEBleCVM2M5fHPeA8Did2OgzDzdr15G+AX2aP98yNVLgNR8cw==} + '@vuepress/core@2.0.0-rc.17': + resolution: {integrity: sha512-Ux5zAqnSAAnaE4qFgIGkGRMWObyZaAeRk6Pj30tVRCC7zkYIRWXii7sUK6aehPyugQz02TKMvW5FlrJeA40ogw==} - '@vuepress/markdown@2.0.0-rc.15': - resolution: {integrity: sha512-q+yuwV+PzvFCs92Q/O/3HHRDY9CNYKJgc+fKbqE98P3qGBATnDtABUjc+NjtPvG4OdYt2fELTXOzyprE8omFIw==} + '@vuepress/markdown@2.0.0-rc.17': + resolution: {integrity: sha512-eIwRostE3t3zsJzPjmOufVyyBpsaWQkZluk6o0i1e9WLW3EoinKrDZdzej0Jw8IQlq6nvOPD2JMFWyXwu8fv7w==} - '@vuepress/shared@2.0.0-rc.15': - resolution: {integrity: sha512-KLTTw0MWXrLw5XQ8h6y1iI11zJdlZcB8jXgAdOHFJ3a++InDYmUC0aCE0KbXyQTH46ODpMadJnz8/RewCftVXg==} + '@vuepress/shared@2.0.0-rc.17': + resolution: {integrity: sha512-meBWLJCCHqj+edHY+U2q64Q8AIqqlHzau6T0j95Q58WkWOQdgn8MUCx1/TXXh2mKVyTt4g6Kgci/3fK2Hi97HQ==} - '@vuepress/utils@2.0.0-rc.15': - resolution: {integrity: sha512-yHdMxPg8yxlAz/QL5G7U1IQ+jk34sCtn8H8X5j+A2U1x/j2lnr8LLDWzl84TyN78pdEA1cQL5g7Ks/zTzrIWhQ==} + '@vuepress/utils@2.0.0-rc.17': + resolution: {integrity: sha512-5QFG8arU01QxJm+pzaNpNxfvSy3ttSjouwcefyr/6dO/cKbnjgmmaDOoy3UKnHYQtEDycybNOg4ebn2AHslEKw==} '@vueuse/core@11.1.0': resolution: {integrity: sha512-P6dk79QYA6sKQnghrUz/1tHi0n9mrb/iO1WTMk/ElLmTyNqgDeSZ3wcDf6fRBGzRJbeG1dxzEOvLENMjr+E3fg==} @@ -3599,6 +3736,9 @@ packages: resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} + birpc@0.2.17: + resolution: {integrity: sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==} + body-parser@1.20.3: resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} @@ -3619,8 +3759,8 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + browserslist@4.24.0: + resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -3630,10 +3770,6 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - builtin-modules@3.3.0: - resolution: {integrity: sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==} - engines: {node: '>=6'} - bundle-name@4.1.0: resolution: {integrity: sha512-tjwM5exMg6BGRI+kNmTntNsvdZS1X8BFYS6tnJ2hdH0kVxM6/eVZ2xy+FqStSWvYmtfFMDLIxurorHwDKfDz5Q==} engines: {node: '>=18'} @@ -3672,8 +3808,8 @@ packages: caniuse-api@3.0.0: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} - caniuse-lite@1.0.30001662: - resolution: {integrity: sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==} + caniuse-lite@1.0.30001664: + resolution: {integrity: sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==} ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} @@ -3743,8 +3879,8 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} - chokidar@4.0.0: - resolution: {integrity: sha512-mxIojEAQcuEvT/lyXq+jf/3cO/KoA6z4CeNDGGevTybECPOMFCnQy3OPahluUkbqgPNGw5Bi78UC7Po6Lhy+NA==} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} engines: {node: '>= 14.16.0'} chownr@2.0.0: @@ -3854,6 +3990,9 @@ packages: resolution: {integrity: sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==} engines: {node: '>=4.0.0'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + compare-func@2.0.0: resolution: {integrity: sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==} @@ -4004,6 +4143,10 @@ packages: resolution: {integrity: sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==} engines: {node: '>= 0.6'} + copy-anything@3.0.5: + resolution: {integrity: sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==} + engines: {node: '>=12.13'} + copy-webpack-plugin@12.0.2: resolution: {integrity: sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==} engines: {node: '>= 18.12.0'} @@ -4527,8 +4670,8 @@ packages: engines: {node: '>=0.10.0'} hasBin: true - electron-to-chromium@1.5.26: - resolution: {integrity: sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ==} + electron-to-chromium@1.5.29: + resolution: {integrity: sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==} emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -4658,8 +4801,8 @@ packages: peerDependencies: eslint: '>=4.19.1' - eslint-plugin-import-x@4.2.1: - resolution: {integrity: sha512-WWi2GedccIJa0zXxx3WDnTgouGQTtdYK1nhXMwywbqqAgB0Ov+p1pYBsWh3VaB0bvBOwLse6OfVII7jZD9xo5Q==} + eslint-plugin-import-x@4.3.1: + resolution: {integrity: sha512-5TriWkXulDl486XnYYRgsL+VQoS/7mhN/2ci02iLCuL7gdhbiWxnsuL/NTcaKY9fpMgsMFjWZBtIGW7pb+RX0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -4684,20 +4827,20 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + eslint-scope@8.1.0: + resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.11.0: - resolution: {integrity: sha512-yVS6XODx+tMFMDFcG4+Hlh+qG7RM6cCJXtQhCKLSsr3XkLvWggHjCqjfh0XsPPnt1c56oaT6PMgW9XWQQjdHXA==} + eslint@9.11.1: + resolution: {integrity: sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -4710,8 +4853,8 @@ packages: resolution: {integrity: sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==} engines: {node: '>=6'} - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: @@ -4805,8 +4948,8 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fast-uri@3.0.1: - resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + fast-uri@3.0.2: + resolution: {integrity: sha512-GR6f0hD7XXyNJa25Tb9BuIdN0tdr+0BMi6/CJPH3wJO1JjNG3n/VsSw38AwRdKZABm8lGbPfakLRkYzx2V9row==} fastest-levenshtein@1.0.16: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} @@ -4819,6 +4962,14 @@ packages: resolution: {integrity: sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==} engines: {node: '>=0.8.0'} + fdir@6.4.0: + resolution: {integrity: sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -5183,6 +5334,9 @@ packages: resolution: {integrity: sha512-SYVnVFswQER+zu1laSya563s+F8VDGt7o35d4utbamowvUNLLMovFqwCLSocpZTz3MgaSRA1IbqRWZv97dtErQ==} engines: {node: '>=12.0.0'} + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + hosted-git-info@7.0.2: resolution: {integrity: sha512-puUZAUKT5m8Zzvs72XWy3HtvVbTWljRE66cP60bxJzAqf2DgICo7lYTY2IHUmLnNpjYvw5bvmoHvPc0QO2a62w==} engines: {node: ^16.14.0 || >=18.0.0} @@ -5413,10 +5567,6 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} - is-builtin-module@3.2.1: - resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} - engines: {node: '>=6'} - is-callable@1.2.7: resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} engines: {node: '>= 0.4'} @@ -5523,6 +5673,9 @@ packages: resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==} engines: {node: '>=0.10.0'} + is-reference@1.2.1: + resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -5577,6 +5730,10 @@ packages: is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + is-what@4.1.16: + resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} + engines: {node: '>=12.13'} + is-wsl@3.1.0: resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} engines: {node: '>=16'} @@ -5621,8 +5778,8 @@ packages: jackspeak@3.4.3: resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - jackspeak@4.0.1: - resolution: {integrity: sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==} + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} engines: {node: 20 || >=22} jake@10.9.2: @@ -5807,28 +5964,24 @@ packages: engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [glibc] lightningcss-linux-arm64-musl@1.27.0: resolution: {integrity: sha512-rCGBm2ax7kQ9pBSeITfCW9XSVF69VX+fm5DIpvDZQl4NnQoMQyRwhZQm9pd59m8leZ1IesRqWk2v/DntMo26lg==} engines: {node: '>= 12.0.0'} cpu: [arm64] os: [linux] - libc: [musl] lightningcss-linux-x64-gnu@1.27.0: resolution: {integrity: sha512-Dk/jovSI7qqhJDiUibvaikNKI2x6kWPN79AQiD/E/KeQWMjdGe9kw51RAgoWFDi0coP4jinaH14Nrt/J8z3U4A==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [glibc] lightningcss-linux-x64-musl@1.27.0: resolution: {integrity: sha512-QKjTxXm8A9s6v9Tg3Fk0gscCQA1t/HMoF7Woy1u68wCk5kS4fR+q3vXa1p3++REW784cRAtkYKrPy6JKibrEZA==} engines: {node: '>= 12.0.0'} cpu: [x64] os: [linux] - libc: [musl] lightningcss-win32-arm64-msvc@1.27.0: resolution: {integrity: sha512-/wXegPS1hnhkeG4OXQKEMQeJd48RDC3qdh+OA8pCuOPCyvnm/yEayrJdJVqzBsqpy1aJklRCVxscpFur80o6iQ==} @@ -6026,26 +6179,26 @@ packages: engines: {node: '>= 18'} hasBin: true - markmap-common@0.17.0: - resolution: {integrity: sha512-3tuU6PxjrQxivZD18czJKcGKTTRJKMNne1bBflcHqu7yASznJRBM80CC4DzIVGiAb74hTuX8tTfkEQUMu0yKMg==} + markmap-common@0.17.1: + resolution: {integrity: sha512-U1v2+CkdE9OzNgONvBwUW26RMcu27Bqlv/JuAG+l1qRkTduD2aT4cGew6qb4VLjpqhcBwS3mcj0Xd7LVW01QFA==} - markmap-html-parser@0.17.0: - resolution: {integrity: sha512-eB8jmSTY0waKT8c9lNFxLRCKS5HaXAAeA9za0Smt3q6/F/yqCkUH2eYAU7+AIxrY2T90+QDP4xbB8wyRoZCBxA==} + markmap-html-parser@0.17.1: + resolution: {integrity: sha512-wdzneAsNXNIYH3R8xZVNYi/4MXhswuZ4wmZxHS3+BLp9jO6kBCoQybICB90tcAcXUjiSAYRnirq3EvkSK0AdDw==} peerDependencies: markmap-common: '*' - markmap-lib@0.17.0: - resolution: {integrity: sha512-YYf/nq+Zr4q6T5E7lVfZGWEUK/0ItDPKwePOiUmuR/k5UUIR8s+UZvLMrFAnu4E1aveM0Tzg9/QPANAWGWmfBw==} + markmap-lib@0.17.2: + resolution: {integrity: sha512-zS5nL8OBR4hRpqegxeXAd4jQq/wd+Xn21bHhW0QHgGzE3dJTG55pLDi1rmdaHLCTpN7lUtO5MBOZ1HyXGYuHwQ==} peerDependencies: markmap-common: '*' - markmap-toolbar@0.17.0: - resolution: {integrity: sha512-zRkg+pYtjDefJ4lSG0KownAN3eqkJcrTei+HbobBWsWTsc7qdUMn2Ewd97SFHCkGoo1nrG0aW7dzDP6lHWuDkw==} + markmap-toolbar@0.17.2: + resolution: {integrity: sha512-WQ05P2xvQmZT0ybRUE0uRzrs30aXlJ6/yEUsA6A9nYEwm8T9jSwBxIM/5zYlkH/XzUcsRRxtCa4k1IWR74gkpQ==} peerDependencies: markmap-common: '*' - markmap-view@0.17.0: - resolution: {integrity: sha512-V4n5gXbIk7b/ns/gzoNoMaRu7Es+9OLUqfRqj/EiWuiYMlmmQ/rN8NDCgPcuTAnr0hJmor7UXaKYqWL275LspA==} + markmap-view@0.17.2: + resolution: {integrity: sha512-kF9bbXWF/10UBFTatv0kPQSBgVb8+Xn4Bttep78i9879nzqRaIjCNzZYGtpxK0gx9B4U9NGMZrx/B4cTTwmeQA==} peerDependencies: markmap-common: '*' @@ -6486,8 +6639,8 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} package-manager-detector@0.2.0: resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} @@ -6601,6 +6754,9 @@ packages: resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} engines: {node: '>= 14.16'} + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + photoswipe@5.4.4: resolution: {integrity: sha512-WNFHoKrkZNnvFFhbHL93WDkW3ifwVOXSW3w1UuZZelSmgXpIGiZSNlZJq37rR8YejqME2rHs9EhH9ZvlvFH2NA==} engines: {node: '>= 0.12.0'} @@ -6623,13 +6779,13 @@ packages: pkg-types@1.2.0: resolution: {integrity: sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==} - playwright-core@1.47.1: - resolution: {integrity: sha512-i1iyJdLftqtt51mEk6AhYFaAJCDx0xQ/O5NU8EKaWFgMjItPVma542Nh/Aq8aLCjIJSzjaiEQGW/nyqLkGF1OQ==} + playwright-core@1.47.2: + resolution: {integrity: sha512-3JvMfF+9LJfe16l7AbSmU555PaTl2tPyQsVInqm3id16pdDfvZ8TTZ/pyzmkbDrZTQefyzU7AIHlZqQnxpqHVQ==} engines: {node: '>=18'} hasBin: true - playwright@1.47.1: - resolution: {integrity: sha512-SUEKi6947IqYbKxRiqnbUobVZY4bF1uu+ZnZNJX9DfU1tlf2UhWfvVjLf01pQx9URsOr18bFVUKXmanYWhbfkw==} + playwright@1.47.2: + resolution: {integrity: sha512-nx1cLMmQWqmA3UsnjaaokyoUpdVaaDhJhMoxX2qj3McpjnsqFHs516QAKYhqHAgOP+oCFTEOCOAaD1RgD/RQfA==} engines: {node: '>=18'} hasBin: true @@ -6908,8 +7064,8 @@ packages: resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} - preact@10.24.0: - resolution: {integrity: sha512-aK8Cf+jkfyuZ0ZZRG9FbYqwmEiGQ4y/PUO4SuTWoyWL244nZZh7bd5h2APd4rSNDYTBNghg1L+5iJN3Skxtbsw==} + preact@10.24.1: + resolution: {integrity: sha512-PnBAwFI3Yjxxcxw75n6VId/5TFxNW/81zexzWD9jn1+eSrOP84NdsS38H5IkF/UH3frqRPT+MvuCoVHjTDTnDw==} prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} @@ -7135,6 +7291,13 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + reveal.js@5.1.0: + resolution: {integrity: sha512-KDt7m0+xwKV6nAZt4CNPVFBf42sTKRQapg0bGGKB5PKO5XvChnMfwlZkybydHiQJ7p5+6LbHKRGrhXODdoNIaA==} + engines: {node: '>=18.0.0'} + + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rimraf@6.0.1: resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} engines: {node: 20 || >=22} @@ -7143,13 +7306,33 @@ packages: robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} - rollup@2.79.1: - resolution: {integrity: sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw==} + rollup-plugin-dts@6.1.1: + resolution: {integrity: sha512-aSHRcJ6KG2IHIioYlvAOcEq6U99sVtqDDKVhnwt70rW6tsz3tv5OSjEiWcgzfsHdLyGXZ/3b/7b/+Za3Y6r1XA==} + engines: {node: '>=16'} + peerDependencies: + rollup: ^3.29.4 || ^4 + typescript: ^4.5 || ^5.0 + + rollup-plugin-esbuild@6.1.1: + resolution: {integrity: sha512-CehMY9FAqJD5OUaE/Mi1r5z0kNeYxItmRO2zG4Qnv2qWKF09J2lTy5GUzjJR354ZPrLkCj4fiBN41lo8PzBUhw==} + engines: {node: '>=14.18.0'} + peerDependencies: + esbuild: '>=0.18.0' + rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 + + rollup-plugin-resolve-shebang@1.0.1: + resolution: {integrity: sha512-TtLEBTMDs3Qmaae+0pbyN0og0RMYjL4j+/SFQp7BnnpHKLuakJyS8klnSzjAGTynm9vtUPCrb2ixXsOyOdy4kQ==} + engines: {node: ^18.0.0 || >=20} + peerDependencies: + rollup: '>= 4' + + rollup@2.79.2: + resolution: {integrity: sha512-fS6iqSPZDs3dr/y7Od6y5nha8dW1YnbgtsyotCVvoFGKbERG++CVRFv1meyGDE1SNItQA8BrnCw7ScdAhRJ3XQ==} engines: {node: '>=10.0.0'} hasBin: true - rollup@4.22.2: - resolution: {integrity: sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg==} + rollup@4.22.5: + resolution: {integrity: sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7186,128 +7369,128 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sass-embedded-android-arm64@1.79.2: - resolution: {integrity: sha512-msFtFD9QGPKH3wnrgj8bc/UMCpKGBUHpCTzMz1JSUDZapD3T/sSJSqkuywu3smawqd77tBKkr+34HX+ot9jNew==} + sass-embedded-android-arm64@1.79.4: + resolution: {integrity: sha512-0JAZ8TtXYv9yI3Yasaq03xvo7DLJOmD+Exb30oJKxXcWTAV9TB0ZWKoIRsFxbCyPxyn7ouxkaCEXQtaTRKrmfw==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [android] - sass-embedded-android-arm@1.79.2: - resolution: {integrity: sha512-oBy6lRjCHvNThNbXJ8/P02tZQYnvaI3sR0aZ86DoHiMGMFaijwvXrzwkZWJZ6LxysuBXlfRh0nRWQuwWBCIt/A==} + sass-embedded-android-arm@1.79.4: + resolution: {integrity: sha512-YOVpDGDcwWUQvktpJhYo4zOkknDpdX6ALpaeHDTX6GBUvnZfx+Widh76v+QFUhiJQ/I/hndXg1jv/PKilOHRrw==} engines: {node: '>=14.0.0'} cpu: [arm] os: [android] - sass-embedded-android-ia32@1.79.2: - resolution: {integrity: sha512-dtIAVmRdx+rMq0Bk4MG6AbcD/YfDfz2UIljzxnKp1kmZcU9vxcYbtx8c9T68qF3/JZx0rX6KSKwVRXjfLIxmVg==} + sass-embedded-android-ia32@1.79.4: + resolution: {integrity: sha512-IjO3RoyvNN84ZyfAR5s/a8TIdNPfClb7CLGrswB3BN/NElYIJUJMVHD6+Y8W9QwBIZ8DrK1IdLFSTV8nn82xMA==} engines: {node: '>=14.0.0'} cpu: [ia32] os: [android] - sass-embedded-android-riscv64@1.79.2: - resolution: {integrity: sha512-XHe+ft67aeLdwyRId14NhJYQT6GdsGQdX2rH31HSJw2z8Xdzl2kbESw3QRPYpoIw+nPCt9ItJV6BoTaDszOc2A==} + sass-embedded-android-riscv64@1.79.4: + resolution: {integrity: sha512-uOT8nXmKxSwuIdcqvElVWBFcm/+YcIvmwfoKbpuuSOSxUe9eqFzxo+fk7ILhynzf6FBlvRUH5DcjGj+sXtCc3w==} engines: {node: '>=14.0.0'} cpu: [riscv64] os: [android] - sass-embedded-android-x64@1.79.2: - resolution: {integrity: sha512-1Es9PhGVCgT7BuXLMwxHv1h/Z6Oku5oN/zP2gkKycLgQwXRdz6c3jjvnveLpMgM8IhyWm1M4ELAYZ+3Agby0zg==} + sass-embedded-android-x64@1.79.4: + resolution: {integrity: sha512-W2FQoj3Z2J2DirNs3xSBVvrhMuqLnsqvOPulxOkhL/074+faKOZZnPx2tZ5zsHbY97SonciiU0SV0mm98xI42w==} engines: {node: '>=14.0.0'} cpu: [x64] os: [android] - sass-embedded-darwin-arm64@1.79.2: - resolution: {integrity: sha512-89Oe60sneLTjqw7HwgDRdgQp3XFOe96GxM7HoQUFupl0a/xwOechDDTIIKqjZlx3CTwG4gijTufw4TlA2nROsw==} + sass-embedded-darwin-arm64@1.79.4: + resolution: {integrity: sha512-pcYtbN1VUAAcfgyHeX8ySndDWGjIvcq6rldduktPbGGuAlEWFDfnwjTbv0hS945ggdzZ6TFnaFlLEDr0SjKzBA==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [darwin] - sass-embedded-darwin-x64@1.79.2: - resolution: {integrity: sha512-b7jL2tcRFowuQU1VsPbktYJgaOy2I7xOf4PT0kv0okvgAzlr1lWCrWBJd1Ef1etu3jkkR713WkE08Jdr6jb37w==} + sass-embedded-darwin-x64@1.79.4: + resolution: {integrity: sha512-ir8CFTfc4JLx/qCP8LK1/3pWv35nRyAQkUK7lBIKM6hWzztt64gcno9rZIk4SpHr7Z/Bp1IYWWRS4ZT+4HmsbA==} engines: {node: '>=14.0.0'} cpu: [x64] os: [darwin] - sass-embedded-linux-arm64@1.79.2: - resolution: {integrity: sha512-t4RoNDnvTlvMO+UjTiuKJef4MiGyzO2YBVxb0k5Vsc82SFdCaNeqVsb1TlWcsmZA1uREmN+4XUPk25TTYYH92w==} + sass-embedded-linux-arm64@1.79.4: + resolution: {integrity: sha512-XIVn2mCuA422SR2kmKjF6jhjMs1Vrt1DbZ/ktSp+eR0sU4ugu2htg45GajiUFSKKRj7Sc+cBdThq1zPPsDLf1w==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - sass-embedded-linux-arm@1.79.2: - resolution: {integrity: sha512-fW3E1OZDy6AXRjcW1Rx6AEHquNNF7TbtJjfU/IkJdS3hRUuJK03vvJduDYD3zCjr4EqKyuok+E+nYEnuIdyYrQ==} + sass-embedded-linux-arm@1.79.4: + resolution: {integrity: sha512-H/XEE3rY7c+tY0qDaELjPjC6VheAhBo1tPJQ6UHoBEf8xrbT/RT3dWiIS8grp9Vk54RCn05BEB/+POaljvvKGA==} engines: {node: '>=14.0.0'} cpu: [arm] os: [linux] - sass-embedded-linux-ia32@1.79.2: - resolution: {integrity: sha512-RXNqN4kKwQAELRTzVZe4KGAyZgRNZaZ5pslsPIPa2sJUCHnbGyhN+4NZBR/vZWWyb2q3Ps2kpM9FvOhYh72vgg==} + sass-embedded-linux-ia32@1.79.4: + resolution: {integrity: sha512-3nqZxV4nuUTb1ahLexVl4hsnx1KKwiGdHEf1xHWTZai6fYFMcwyNPrHySCQzFHqb5xiqSpPzzrKjuDhF6+guuQ==} engines: {node: '>=14.0.0'} cpu: [ia32] os: [linux] - sass-embedded-linux-musl-arm64@1.79.2: - resolution: {integrity: sha512-/5wZ4skLIfhjei8WQ1HbOxXIrHHyW5ZBvD3Bay5k+YOH9chWqU3IVOl3q3ZY/MK+Exz99IBAV3/6ei11l6igoA==} + sass-embedded-linux-musl-arm64@1.79.4: + resolution: {integrity: sha512-C6qX06waPEfDgOHR8jXoYxl0EtIXOyBDyyonrLO3StRjWjGx7XMQj2hA/KXSsV+Hr71fBOsaViosqWXPzTbEiQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [linux] - sass-embedded-linux-musl-arm@1.79.2: - resolution: {integrity: sha512-3IJ6L3UnLTVx4eheKqU9CcjwKyobTfSn9F3WdlWzxOH4SXSf7EYbfKpvwNHyZ8QJ7mRcndJOWU5Efuak12fl0w==} + sass-embedded-linux-musl-arm@1.79.4: + resolution: {integrity: sha512-HnbU1DEiQdUayioNzxh2WlbTEgQRBPTgIIvof8J63QLmVItUqE7EkWYkSUy4RhO+8NsuN9wzGmGTzFBvTImU7g==} engines: {node: '>=14.0.0'} cpu: [arm] os: [linux] - sass-embedded-linux-musl-ia32@1.79.2: - resolution: {integrity: sha512-6Edl93bBC0l8+/WaxisBocEQI6fe3Buce9ZiUy2yF6fLTuX2vZn4zx6T2/sb5+EbD0K2ZFuDkDeNwWWZvz4H4g==} + sass-embedded-linux-musl-ia32@1.79.4: + resolution: {integrity: sha512-y5b0fdOPWyhj4c+mc88GvQiC5onRH1V0iNaWNjsiZ+L4hHje6T98nDLrCJn0fz5GQnXjyLCLZduMWbfV0QjHGg==} engines: {node: '>=14.0.0'} cpu: [ia32] os: [linux] - sass-embedded-linux-musl-riscv64@1.79.2: - resolution: {integrity: sha512-r/++4Cwsr56qXlcqc5/2W7PqjQGOSLhz7Lf1BBBNqesMjTjBc1ZTBEQaIs+uHCNCAkl2BvVRHsR4UigzSQyz+A==} + sass-embedded-linux-musl-riscv64@1.79.4: + resolution: {integrity: sha512-G2M5ADMV9SqnkwpM0S+UzDz7xR2njCOhofku/sDMZABzAjQQWTsAykKoGmzlT98fTw2HbNhb6u74umf2WLhCfw==} engines: {node: '>=14.0.0'} cpu: [riscv64] os: [linux] - sass-embedded-linux-musl-x64@1.79.2: - resolution: {integrity: sha512-A9hSRjRrioxmiVgwt5UVqgWJPsO0YK5DJZTzkAotHGIAp84/xYy1MSsT596vyjj0IFx2VEfHtPHi0+wGW9nEoQ==} + sass-embedded-linux-musl-x64@1.79.4: + resolution: {integrity: sha512-kQm8dCU3DXf7DtUGWYPiPs03KJYKvFeiZJHhSx993DCM8D2b0wCXWky0S0Z46gf1sEur0SN4Lvnt1WczTqxIBw==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - sass-embedded-linux-riscv64@1.79.2: - resolution: {integrity: sha512-beffwiBsw25kOYSKhEZNmmh2x7c9yAIXolD+wLWAc59nuOPYziDDh4mMa1z8P90ffyHPf13QeTom+Sv5vQve4w==} + sass-embedded-linux-riscv64@1.79.4: + resolution: {integrity: sha512-GaTI/mXYWYSzG5wxtM4H2cozLpATyh+4l+rO9FFKOL8e1sUOLAzTeRdU2nSBYCuRqsxRuTZIwCXhSz9Q3NRuNA==} engines: {node: '>=14.0.0'} cpu: [riscv64] os: [linux] - sass-embedded-linux-x64@1.79.2: - resolution: {integrity: sha512-EsbuwjzVnKihisZp0a+fVFhzUFfS/pesfhReElalzXHKeKHiHQhnY5+cRJuNi/4u03kroVXDUrcpI2FsVVIxfw==} + sass-embedded-linux-x64@1.79.4: + resolution: {integrity: sha512-f9laGkqHgC01h99Qt4LsOV+OLMffjvUcTu14hYWqMS9QVX5a4ihMwpf1NoAtTUytb7cVF3rYY/NVGuXt6G3ppQ==} engines: {node: '>=14.0.0'} cpu: [x64] os: [linux] - sass-embedded-win32-arm64@1.79.2: - resolution: {integrity: sha512-b6v4cFEgp/DtoDt+OKO6dd4NtuuemAGuI70RQ+R1iIqEioe3AWNi4i6c4uHWfj3eJwWXD9IX1iCPCGPILoQwUw==} + sass-embedded-win32-arm64@1.79.4: + resolution: {integrity: sha512-cidBvtaA2cJ6dNlwQEa8qak+ezypurzKs0h0QAHLH324+j/6Jum7LCnQhZRPYJBFjHl+WYd7KwzPnJ2X5USWnQ==} engines: {node: '>=14.0.0'} cpu: [arm64] os: [win32] - sass-embedded-win32-ia32@1.79.2: - resolution: {integrity: sha512-WxPytzrV3D3wD6CMy+4XWfQhQ7zHuJHw9n0z4dvA6w26v0VUSIEGWO/f0Zb6f3ddVZWCv44PBfmMVVCxm32etw==} + sass-embedded-win32-ia32@1.79.4: + resolution: {integrity: sha512-hexdmNTIZGTKNTzlMcdvEXzYuxOJcY89zqgsf45aQ2YMy4y2M8dTOxRI/Vz7p4iRxVp1Jow6LCtaLHrNI2Ordg==} engines: {node: '>=14.0.0'} cpu: [ia32] os: [win32] - sass-embedded-win32-x64@1.79.2: - resolution: {integrity: sha512-47KA0lXz11MuQeAjclua5FM7o2ebVz+YHmaQs4zZ13daec76IAMGexoe+KodkueDlGpMbWdhgfcyJVT6aGqQgQ==} + sass-embedded-win32-x64@1.79.4: + resolution: {integrity: sha512-73yrpiWIbti6DkxhWURklkgSLYKfU9itDmvHxB+oYSb4vQveIApqTwSyTOuIUb/6Da/EsgEpdJ4Lbj4sLaMZWA==} engines: {node: '>=14.0.0'} cpu: [x64] os: [win32] - sass-embedded@1.79.2: - resolution: {integrity: sha512-PYnPJJJcZ79NBLhC72MfZ+EWLkTIA2pizTEiNTtxXjLmqtKNkXO+TL9qXgTmot4F72ERVZqjQjBQUcfkNbXg/w==} + sass-embedded@1.79.4: + resolution: {integrity: sha512-3AATrtStMgxYjkit02/Ix8vx/P7qderYG6DHjmehfk5jiw53OaWVScmcGJSwp/d77kAkxDQ+Y0r+79VynGmrkw==} engines: {node: '>=16.0.0'} hasBin: true @@ -7332,8 +7515,8 @@ packages: webpack: optional: true - sass@1.79.2: - resolution: {integrity: sha512-YmT1aoF1MwHsZEu/eXhbAJNsPGAhNP4UixW9ckEwWCvPcVdVF0/C104OGDVEqtoctKq0N+wM20O/rj+sSPsWeg==} + sass@1.79.4: + resolution: {integrity: sha512-K0QDSNPXgyqO4GZq2HO5Q70TLxTH6cIT59RdoCHMivrC8rqzaTw5ab9prjz9KUN1El4FLXrBXJhik61JR4HcGg==} engines: {node: '>=14.0.0'} hasBin: true @@ -7421,8 +7604,8 @@ packages: shell-quote@1.8.1: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} - shiki@1.18.0: - resolution: {integrity: sha512-8jo7tOXr96h9PBQmOHVrltnETn1honZZY76YA79MHheGQg55jBvbm9dtU+MI5pjC5NJCFuA6rvVTLVeSW5cE4A==} + shiki@1.21.0: + resolution: {integrity: sha512-apCH5BoWTrmHDPGgg3RF8+HAAbEL/CdbYr8rMw7eIrdhCkZHdVGat5mMNlRtd1erNG01VPMIKHNQ0Pj2HMAiog==} side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -7533,6 +7716,10 @@ packages: resolution: {integrity: sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==} engines: {node: '>=6.0.0'} + speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + speech-rule-engine@4.0.7: resolution: {integrity: sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==} hasBin: true @@ -7727,6 +7914,10 @@ packages: subarg@1.0.0: resolution: {integrity: sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==} + superjson@2.2.1: + resolution: {integrity: sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==} + engines: {node: '>=16'} + supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -7799,8 +7990,8 @@ packages: uglify-js: optional: true - terser@5.33.0: - resolution: {integrity: sha512-JuPVaB7s1gdFKPKTelwUyRq5Sid2A3Gko2S0PncwdBq7kN9Ti9HPWDQ06MPsEDGsZeVESjKEnyGy68quBk1w6g==} + terser@5.34.1: + resolution: {integrity: sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==} engines: {node: '>=10'} hasBin: true @@ -8062,8 +8253,8 @@ packages: resolution: {integrity: sha512-1uEe95xksV1O0CYKXo8vQvN1JEbtJp7lb7C5U9HMsIp6IVwntkH/oNUzyVNQSd4S1sYk2FpSSW44FqMc8qee5w==} engines: {node: '>=4'} - update-browserslist-db@1.1.0: - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -8121,8 +8312,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite@5.4.6: - resolution: {integrity: sha512-IeL5f8OO5nylsgzd9tq4qD2QqI0k2CQLGrWD0rCN0EQJZpBK5vJAx0I+GDkMOXxQX/OfFHMuLIx6ddAxGX/k+Q==} + vite@5.4.8: + resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -8231,22 +8422,22 @@ packages: peerDependencies: vue: ^3.2.0 - vue@3.5.7: - resolution: {integrity: sha512-JcFm0f5j8DQO9E07pZRxqZ/ZsNopMVzHYXpKvnfqXFcA4JTi+4YcrikRn9wkzWsdj0YsLzlLIsR0zzGxA2P6Wg==} + vue@3.5.10: + resolution: {integrity: sha512-Vy2kmJwHPlouC/tSnIgXVg03SG+9wSqT1xu1Vehc+ChsXsRd7jLkKgMltVEFOzUdBr3uFwBCG+41LJtfAcBRng==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true - vuepress@2.0.0-rc.15: - resolution: {integrity: sha512-8DRaONwIaG0Jn3P8OKBysTfcO1yPO1UwfUUNQjbToLrbYSsGFiFwpuTMSL3HbdaX7ou6TuJHgK/wuslsUV8jCQ==} - engines: {node: '>=18.16.0'} + vuepress@2.0.0-rc.17: + resolution: {integrity: sha512-KUWHbB4c9bEeFa8Zx9OAz0e1n8Ae9bEvu0T+Yuhm73cnLONxvhLveBdaLjCwrQZC78auP1L5xL8R1voq0ahXYQ==} + engines: {node: ^18.19.0 || >=20.4.0} hasBin: true peerDependencies: - '@vuepress/bundler-vite': 2.0.0-rc.15 - '@vuepress/bundler-webpack': 2.0.0-rc.15 - vue: ^3.4.0 + '@vuepress/bundler-vite': 2.0.0-rc.17 + '@vuepress/bundler-webpack': 2.0.0-rc.17 + vue: ^3.5.0 peerDependenciesMeta: '@vuepress/bundler-vite': optional: true @@ -8260,9 +8451,9 @@ packages: resolution: {integrity: sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==} engines: {node: '>=10.13.0'} - watermark-js-plus@1.5.6: - resolution: {integrity: sha512-hidrfErYr7n3YPQIPcLdzqe01Z3dB3eenkC3e1Mv0KaNI5mi7fJDx4ug+3ueSTdH4q49omO692MSx2JYhywL6Q==} - engines: {node: '>=16.0.0'} + watermark-js-plus@1.5.7: + resolution: {integrity: sha512-KaQEUnvBX5em2hBeuKcpAASpV+sO1j8NbXY7FL7jb0w1TCKmMSyn8nkj2e+KeleuQ1iwyXHEMFdSWXDIQsACYQ==} + engines: {node: '>=20.0.0'} wbuf@1.7.3: resolution: {integrity: sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==} @@ -8314,8 +8505,8 @@ packages: resolution: {integrity: sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==} engines: {node: '>=10.13.0'} - webpack@5.94.0: - resolution: {integrity: sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg==} + webpack@5.95.0: + resolution: {integrity: sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==} engines: {node: '>=10.13.0'} hasBin: true peerDependencies: @@ -8499,8 +8690,8 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} - yaml@2.4.5: - resolution: {integrity: sha512-aBx2bnqDzVOyNKfsysjA2ms5ZlnjSAW2eG3/L5G/CSujfjLJTJsEw1bGw8kCf04KodQWk1pxlGnZ56CRxiawmg==} + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} engines: {node: '>= 14'} hasBin: true @@ -8708,7 +8899,7 @@ snapshots: dependencies: '@babel/compat-data': 7.25.4 '@babel/helper-validator-option': 7.24.8 - browserslist: 4.23.3 + browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 @@ -9441,11 +9632,11 @@ snapshots: '@chevrotain/utils@11.0.3': {} - '@commitlint/cli@19.5.0(@types/node@22.5.5)(typescript@5.6.2)': + '@commitlint/cli@19.5.0(@types/node@22.7.4)(typescript@5.6.2)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.5.0 - '@commitlint/load': 19.5.0(@types/node@22.5.5)(typescript@5.6.2) + '@commitlint/load': 19.5.0(@types/node@22.7.4)(typescript@5.6.2) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.0 @@ -9492,7 +9683,7 @@ snapshots: '@commitlint/rules': 19.5.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.5.0(@types/node@22.5.5)(typescript@5.6.2)': + '@commitlint/load@19.5.0(@types/node@22.7.4)(typescript@5.6.2)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 @@ -9500,7 +9691,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.3.0 cosmiconfig: 9.0.0(typescript@5.6.2) - cosmiconfig-typescript-loader: 5.0.0(@types/node@22.5.5)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) + cosmiconfig-typescript-loader: 5.0.0(@types/node@22.7.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -9574,12 +9765,12 @@ snapshots: dependencies: postcss-selector-parser: 6.1.2 - '@docsearch/css@3.6.1': {} + '@docsearch/css@3.6.2': {} - '@docsearch/js@3.6.1(@algolia/client-search@4.24.0)(search-insights@2.13.0)': + '@docsearch/js@3.6.2(@algolia/client-search@4.24.0)(search-insights@2.13.0)': dependencies: - '@docsearch/react': 3.6.1(@algolia/client-search@4.24.0)(search-insights@2.13.0) - preact: 10.24.0 + '@docsearch/react': 3.6.2(@algolia/client-search@4.24.0)(search-insights@2.13.0) + preact: 10.24.1 transitivePeerDependencies: - '@algolia/client-search' - '@types/react' @@ -9587,11 +9778,11 @@ snapshots: - react-dom - search-insights - '@docsearch/react@3.6.1(@algolia/client-search@4.24.0)(search-insights@2.13.0)': + '@docsearch/react@3.6.2(@algolia/client-search@4.24.0)(search-insights@2.13.0)': dependencies: '@algolia/autocomplete-core': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0)(search-insights@2.13.0) '@algolia/autocomplete-preset-algolia': 1.9.3(@algolia/client-search@4.24.0)(algoliasearch@4.24.0) - '@docsearch/css': 3.6.1 + '@docsearch/css': 3.6.2 algoliasearch: 4.24.0 optionalDependencies: search-insights: 2.13.0 @@ -9741,9 +9932,9 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@9.11.0(jiti@1.21.6))': + '@eslint-community/eslint-utils@4.4.0(eslint@9.11.1(jiti@1.21.6))': dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.1': {} @@ -9756,11 +9947,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/core@0.6.0': {} + '@eslint/eslintrc@3.1.0': dependencies: ajv: 6.12.6 debug: 4.3.7 - espree: 10.1.0 + espree: 10.2.0 globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 @@ -9770,7 +9963,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@9.11.0': {} + '@eslint/js@9.11.1': {} '@eslint/object-schema@2.1.4': {} @@ -9824,7 +10017,7 @@ snapshots: '@inquirer/figures': 1.0.6 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -9840,12 +10033,6 @@ snapshots: '@inquirer/type': 2.0.0 external-editor: 3.1.0 - '@inquirer/expand@2.3.0': - dependencies: - '@inquirer/core': 9.2.1 - '@inquirer/type': 1.5.5 - yoctocolors-cjs: 2.1.2 - '@inquirer/expand@3.0.1': dependencies: '@inquirer/core': 9.2.1 @@ -9854,11 +10041,6 @@ snapshots: '@inquirer/figures@1.0.6': {} - '@inquirer/input@2.3.0': - dependencies: - '@inquirer/core': 9.2.1 - '@inquirer/type': 1.5.5 - '@inquirer/input@3.0.1': dependencies: '@inquirer/core': 9.2.1 @@ -9901,14 +10083,6 @@ snapshots: '@inquirer/type': 2.0.0 yoctocolors-cjs: 2.1.2 - '@inquirer/select@2.5.0': - dependencies: - '@inquirer/core': 9.2.1 - '@inquirer/figures': 1.0.6 - '@inquirer/type': 1.5.5 - ansi-escapes: 4.3.2 - yoctocolors-cjs: 2.1.2 - '@inquirer/select@3.0.1': dependencies: '@inquirer/core': 9.2.1 @@ -9917,10 +10091,6 @@ snapshots: ansi-escapes: 4.3.2 yoctocolors-cjs: 2.1.2 - '@inquirer/type@1.5.5': - dependencies: - mute-stream: 1.0.0 - '@inquirer/type@2.0.0': dependencies: mute-stream: 1.0.0 @@ -9947,7 +10117,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -9993,10 +10163,10 @@ snapshots: '@leichtgewicht/ip-codec@2.0.5': {} - '@lerna-lite/cli@3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(@lerna-lite/version@3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2)': + '@lerna-lite/cli@3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(@lerna-lite/version@3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2)': dependencies: - '@lerna-lite/core': 3.9.1(typescript@5.6.2) - '@lerna-lite/init': 3.9.1(typescript@5.6.2) + '@lerna-lite/core': 3.9.2(typescript@5.6.2) + '@lerna-lite/init': 3.9.2(typescript@5.6.2) '@lerna-lite/npmlog': 3.8.0 dedent: 1.5.3 dotenv: 16.4.5 @@ -10004,22 +10174,21 @@ snapshots: load-json-file: 7.0.1 yargs: 17.7.2 optionalDependencies: - '@lerna-lite/publish': 3.9.1(typescript@5.6.2) - '@lerna-lite/version': 3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2) + '@lerna-lite/publish': 3.9.2(typescript@5.6.2) + '@lerna-lite/version': 3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2) transitivePeerDependencies: - babel-plugin-macros - bluebird - supports-color - typescript - '@lerna-lite/core@3.9.1(typescript@5.6.2)': + '@lerna-lite/core@3.9.2(typescript@5.6.2)': dependencies: - '@inquirer/expand': 2.3.0 - '@inquirer/input': 2.3.0 - '@inquirer/select': 2.5.0 + '@inquirer/expand': 3.0.1 + '@inquirer/input': 3.0.1 + '@inquirer/select': 3.0.1 '@lerna-lite/npmlog': 3.8.0 '@npmcli/run-script': 8.1.0 - chalk: 5.3.0 clone-deep: 4.0.1 config-chain: 1.1.13 cosmiconfig: 9.0.0(typescript@5.6.2) @@ -10035,6 +10204,7 @@ snapshots: npm-package-arg: 11.0.3 p-map: 7.0.2 p-queue: 8.0.1 + picocolors: 1.1.0 resolve-from: 5.0.0 semver: 7.6.3 slash: 5.1.0 @@ -10048,9 +10218,9 @@ snapshots: - supports-color - typescript - '@lerna-lite/init@3.9.1(typescript@5.6.2)': + '@lerna-lite/init@3.9.2(typescript@5.6.2)': dependencies: - '@lerna-lite/core': 3.9.1(typescript@5.6.2) + '@lerna-lite/core': 3.9.2(typescript@5.6.2) fs-extra: 11.2.0 p-map: 7.0.2 write-json-file: 6.0.0 @@ -10072,19 +10242,18 @@ snapshots: strip-ansi: 7.1.0 wide-align: 1.1.5 - '@lerna-lite/publish@3.9.1(typescript@5.6.2)': + '@lerna-lite/publish@3.9.2(typescript@5.6.2)': dependencies: - '@lerna-lite/cli': 3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(@lerna-lite/version@3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2) - '@lerna-lite/core': 3.9.1(typescript@5.6.2) + '@lerna-lite/cli': 3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(@lerna-lite/version@3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2) + '@lerna-lite/core': 3.9.2(typescript@5.6.2) '@lerna-lite/npmlog': 3.8.0 - '@lerna-lite/version': 3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2) + '@lerna-lite/version': 3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2) '@npmcli/arborist': 7.5.4 '@npmcli/package-json': 5.2.1 byte-size: 9.0.0 - chalk: 5.3.0 columnify: 1.6.0 fs-extra: 11.2.0 - glob: 10.4.5 + globby: 14.0.2 has-unicode: 2.0.1 libnpmaccess: 8.0.6 libnpmpublish: 9.0.9 @@ -10095,6 +10264,7 @@ snapshots: p-map: 7.0.2 p-pipe: 4.0.0 pacote: 18.0.6 + picocolors: 1.1.0 semver: 7.6.3 ssri: 11.0.0 tar: 6.2.1 @@ -10109,14 +10279,13 @@ snapshots: - supports-color - typescript - '@lerna-lite/version@3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2)': + '@lerna-lite/version@3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2)': dependencies: - '@lerna-lite/cli': 3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(@lerna-lite/version@3.9.1(@lerna-lite/publish@3.9.1(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2) - '@lerna-lite/core': 3.9.1(typescript@5.6.2) + '@lerna-lite/cli': 3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(@lerna-lite/version@3.9.2(@lerna-lite/publish@3.9.2(typescript@5.6.2))(typescript@5.6.2))(typescript@5.6.2) + '@lerna-lite/core': 3.9.2(typescript@5.6.2) '@lerna-lite/npmlog': 3.8.0 '@octokit/plugin-enterprise-rest': 6.0.1 '@octokit/rest': 21.0.2 - chalk: 5.3.0 conventional-changelog-angular: 7.0.0 conventional-changelog-core: 7.0.0 conventional-changelog-writer: 7.0.1 @@ -10138,6 +10307,7 @@ snapshots: p-map: 7.0.2 p-pipe: 4.0.0 p-reduce: 3.0.0 + picocolors: 1.1.0 pify: 6.1.0 semver: 7.6.3 slash: 5.1.0 @@ -10274,6 +10444,12 @@ snapshots: optionalDependencies: markdown-it: 14.1.0 + '@mdit/plugin-tab@0.13.2(markdown-it@14.1.0)': + dependencies: + '@types/markdown-it': 14.1.2 + optionalDependencies: + markdown-it: 14.1.0 + '@mdit/plugin-tex@0.13.1(markdown-it@14.1.0)': dependencies: '@types/markdown-it': 14.1.2 @@ -10290,20 +10466,20 @@ snapshots: dependencies: langium: 3.0.0 - '@meteorlxy/eslint-config@4.5.1(eslint-plugin-vue@9.28.0(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.0(jiti@1.21.6)))': + '@meteorlxy/eslint-config@4.6.0(eslint-plugin-vue@9.28.0(eslint@9.11.1(jiti@1.21.6)))(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.1(jiti@1.21.6)))': dependencies: - '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) confusing-browser-globals: 1.0.11 - eslint-config-prettier: 9.1.0(eslint@9.11.0(jiti@1.21.6)) - eslint-plugin-eslint-comments: 3.2.0(eslint@9.11.0(jiti@1.21.6)) - eslint-plugin-import-x: 4.2.1(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - eslint-plugin-markdown: 5.1.0(eslint@9.11.0(jiti@1.21.6)) + eslint-config-prettier: 9.1.0(eslint@9.11.1(jiti@1.21.6)) + eslint-plugin-eslint-comments: 3.2.0(eslint@9.11.1(jiti@1.21.6)) + eslint-plugin-import-x: 4.3.1(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + eslint-plugin-markdown: 5.1.0(eslint@9.11.1(jiti@1.21.6)) globals: 15.9.0 optionalDependencies: - eslint-plugin-vue: 9.28.0(eslint@9.11.0(jiti@1.21.6)) - vue-eslint-parser: 9.4.3(eslint@9.11.0(jiti@1.21.6)) + eslint-plugin-vue: 9.28.0(eslint@9.11.1(jiti@1.21.6)) + vue-eslint-parser: 9.4.3(eslint@9.11.1(jiti@1.21.6)) transitivePeerDependencies: - eslint - supports-color @@ -10458,193 +10634,222 @@ snapshots: '@octokit/auth-token': 5.1.1 '@octokit/graphql': 8.1.1 '@octokit/request': 9.1.3 - '@octokit/request-error': 6.1.4 - '@octokit/types': 13.5.0 + '@octokit/request-error': 6.1.5 + '@octokit/types': 13.6.0 before-after-hook: 3.0.2 universal-user-agent: 7.0.2 '@octokit/endpoint@10.1.1': dependencies: - '@octokit/types': 13.5.0 + '@octokit/types': 13.6.0 universal-user-agent: 7.0.2 '@octokit/graphql@8.1.1': dependencies: '@octokit/request': 9.1.3 - '@octokit/types': 13.5.0 + '@octokit/types': 13.6.0 universal-user-agent: 7.0.2 '@octokit/openapi-types@22.2.0': {} '@octokit/plugin-enterprise-rest@6.0.1': {} - '@octokit/plugin-paginate-rest@11.3.3(@octokit/core@6.1.2)': + '@octokit/plugin-paginate-rest@11.3.5(@octokit/core@6.1.2)': dependencies: '@octokit/core': 6.1.2 - '@octokit/types': 13.5.0 + '@octokit/types': 13.6.0 '@octokit/plugin-request-log@5.3.1(@octokit/core@6.1.2)': dependencies: '@octokit/core': 6.1.2 - '@octokit/plugin-rest-endpoint-methods@13.2.4(@octokit/core@6.1.2)': + '@octokit/plugin-rest-endpoint-methods@13.2.5(@octokit/core@6.1.2)': dependencies: '@octokit/core': 6.1.2 - '@octokit/types': 13.5.0 + '@octokit/types': 13.6.0 - '@octokit/request-error@6.1.4': + '@octokit/request-error@6.1.5': dependencies: - '@octokit/types': 13.5.0 + '@octokit/types': 13.6.0 '@octokit/request@9.1.3': dependencies: '@octokit/endpoint': 10.1.1 - '@octokit/request-error': 6.1.4 - '@octokit/types': 13.5.0 + '@octokit/request-error': 6.1.5 + '@octokit/types': 13.6.0 universal-user-agent: 7.0.2 '@octokit/rest@21.0.2': dependencies: '@octokit/core': 6.1.2 - '@octokit/plugin-paginate-rest': 11.3.3(@octokit/core@6.1.2) + '@octokit/plugin-paginate-rest': 11.3.5(@octokit/core@6.1.2) '@octokit/plugin-request-log': 5.3.1(@octokit/core@6.1.2) - '@octokit/plugin-rest-endpoint-methods': 13.2.4(@octokit/core@6.1.2) + '@octokit/plugin-rest-endpoint-methods': 13.2.5(@octokit/core@6.1.2) - '@octokit/types@13.5.0': + '@octokit/types@13.6.0': dependencies: '@octokit/openapi-types': 22.2.0 '@pkgjs/parseargs@0.11.0': optional: true - '@playwright/test@1.47.1': + '@playwright/test@1.47.2': dependencies: - playwright: 1.47.1 + playwright: 1.47.2 - '@rollup/plugin-babel@5.3.1(@babel/core@7.25.2)(rollup@2.79.1)': + '@rollup/plugin-babel@5.3.1(@babel/core@7.25.2)(rollup@2.79.2)': dependencies: '@babel/core': 7.25.2 '@babel/helper-module-imports': 7.24.7 - '@rollup/pluginutils': 3.1.0(rollup@2.79.1) - rollup: 2.79.1 + '@rollup/pluginutils': 3.1.0(rollup@2.79.2) + rollup: 2.79.2 transitivePeerDependencies: - supports-color - '@rollup/plugin-node-resolve@15.2.3(rollup@2.79.1)': + '@rollup/plugin-commonjs@28.0.0(rollup@4.22.5)': dependencies: - '@rollup/pluginutils': 5.1.0(rollup@2.79.1) + '@rollup/pluginutils': 5.1.2(rollup@4.22.5) + commondir: 1.0.1 + estree-walker: 2.0.2 + fdir: 6.4.0(picomatch@2.3.1) + is-reference: 1.2.1 + magic-string: 0.30.11 + picomatch: 2.3.1 + optionalDependencies: + rollup: 4.22.5 + + '@rollup/plugin-node-resolve@15.3.0(rollup@2.79.2)': + dependencies: + '@rollup/pluginutils': 5.1.2(rollup@2.79.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 - is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 optionalDependencies: - rollup: 2.79.1 + rollup: 2.79.2 - '@rollup/plugin-replace@2.4.2(rollup@2.79.1)': + '@rollup/plugin-node-resolve@15.3.0(rollup@4.22.5)': dependencies: - '@rollup/pluginutils': 3.1.0(rollup@2.79.1) + '@rollup/pluginutils': 5.1.2(rollup@4.22.5) + '@types/resolve': 1.20.2 + deepmerge: 4.3.1 + is-module: 1.0.0 + resolve: 1.22.8 + optionalDependencies: + rollup: 4.22.5 + + '@rollup/plugin-replace@2.4.2(rollup@2.79.2)': + dependencies: + '@rollup/pluginutils': 3.1.0(rollup@2.79.2) magic-string: 0.25.9 - rollup: 2.79.1 + rollup: 2.79.2 - '@rollup/plugin-terser@0.4.4(rollup@2.79.1)': + '@rollup/plugin-terser@0.4.4(rollup@2.79.2)': dependencies: serialize-javascript: 6.0.2 smob: 1.5.0 - terser: 5.33.0 + terser: 5.34.1 optionalDependencies: - rollup: 2.79.1 + rollup: 2.79.2 - '@rollup/pluginutils@3.1.0(rollup@2.79.1)': + '@rollup/pluginutils@3.1.0(rollup@2.79.2)': dependencies: '@types/estree': 0.0.39 estree-walker: 1.0.1 picomatch: 2.3.1 - rollup: 2.79.1 + rollup: 2.79.2 - '@rollup/pluginutils@5.1.0(rollup@2.79.1)': + '@rollup/pluginutils@5.1.2(rollup@2.79.2)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 2.79.1 + rollup: 2.79.2 - '@rollup/rollup-android-arm-eabi@4.22.2': + '@rollup/pluginutils@5.1.2(rollup@4.22.5)': + dependencies: + '@types/estree': 1.0.6 + estree-walker: 2.0.2 + picomatch: 2.3.1 + optionalDependencies: + rollup: 4.22.5 + + '@rollup/rollup-android-arm-eabi@4.22.5': optional: true - '@rollup/rollup-android-arm64@4.22.2': + '@rollup/rollup-android-arm64@4.22.5': optional: true - '@rollup/rollup-darwin-arm64@4.22.2': + '@rollup/rollup-darwin-arm64@4.22.5': optional: true - '@rollup/rollup-darwin-x64@4.22.2': + '@rollup/rollup-darwin-x64@4.22.5': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.2': + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.2': + '@rollup/rollup-linux-arm-musleabihf@4.22.5': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.2': + '@rollup/rollup-linux-arm64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.2': + '@rollup/rollup-linux-arm64-musl@4.22.5': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.2': + '@rollup/rollup-linux-riscv64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.2': + '@rollup/rollup-linux-s390x-gnu@4.22.5': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.2': + '@rollup/rollup-linux-x64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-x64-musl@4.22.2': + '@rollup/rollup-linux-x64-musl@4.22.5': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.2': + '@rollup/rollup-win32-arm64-msvc@4.22.5': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.2': + '@rollup/rollup-win32-ia32-msvc@4.22.5': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.2': + '@rollup/rollup-win32-x64-msvc@4.22.5': optional: true '@sec-ant/readable-stream@0.4.1': {} - '@shikijs/core@1.18.0': + '@shikijs/core@1.21.0': dependencies: - '@shikijs/engine-javascript': 1.18.0 - '@shikijs/engine-oniguruma': 1.18.0 - '@shikijs/types': 1.18.0 + '@shikijs/engine-javascript': 1.21.0 + '@shikijs/engine-oniguruma': 1.21.0 + '@shikijs/types': 1.21.0 '@shikijs/vscode-textmate': 9.2.2 '@types/hast': 3.0.4 hast-util-to-html: 9.0.3 - '@shikijs/engine-javascript@1.18.0': + '@shikijs/engine-javascript@1.21.0': dependencies: - '@shikijs/types': 1.18.0 + '@shikijs/types': 1.21.0 '@shikijs/vscode-textmate': 9.2.2 oniguruma-to-js: 0.4.3 - '@shikijs/engine-oniguruma@1.18.0': + '@shikijs/engine-oniguruma@1.21.0': dependencies: - '@shikijs/types': 1.18.0 + '@shikijs/types': 1.21.0 '@shikijs/vscode-textmate': 9.2.2 - '@shikijs/transformers@1.18.0': + '@shikijs/transformers@1.21.0': dependencies: - shiki: 1.18.0 + shiki: 1.21.0 - '@shikijs/types@1.18.0': + '@shikijs/types@1.21.0': dependencies: '@shikijs/vscode-textmate': 9.2.2 '@types/hast': 3.0.4 @@ -10708,24 +10913,24 @@ snapshots: '@types/body-parser@1.19.5': dependencies: '@types/connect': 3.4.38 - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/bonjour@3.5.13': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/connect-history-api-fallback@1.5.4': dependencies: - '@types/express-serve-static-core': 4.19.5 - '@types/node': 22.5.5 + '@types/express-serve-static-core': 5.0.0 + '@types/node': 22.7.4 '@types/connect@3.4.38': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/conventional-commits-parser@5.0.0': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/d3-array@3.2.1': {} @@ -10850,13 +11055,18 @@ snapshots: '@types/estree@0.0.39': {} - '@types/estree@1.0.5': {} - '@types/estree@1.0.6': {} - '@types/express-serve-static-core@4.19.5': + '@types/express-serve-static-core@4.19.6': + dependencies: + '@types/node': 22.7.4 + '@types/qs': 6.9.16 + '@types/range-parser': 1.2.7 + '@types/send': 0.17.4 + + '@types/express-serve-static-core@5.0.0': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/qs': 6.9.16 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -10864,14 +11074,14 @@ snapshots: '@types/express@4.17.21': dependencies: '@types/body-parser': 1.19.5 - '@types/express-serve-static-core': 4.19.5 + '@types/express-serve-static-core': 4.19.6 '@types/qs': 6.9.16 '@types/serve-static': 1.15.7 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/geojson@7946.0.14': {} @@ -10887,7 +11097,7 @@ snapshots: '@types/http-proxy@1.17.15': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/istanbul-lib-coverage@2.0.6': {} @@ -10903,7 +11113,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/katex@0.16.7': {} @@ -10934,15 +11144,15 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/node@17.0.45': {} - '@types/node@22.5.5': + '@types/node@22.7.4': dependencies: undici-types: 6.19.8 @@ -10960,6 +11170,8 @@ snapshots: '@types/retry@0.12.2': {} + '@types/reveal.js@5.0.3': {} + '@types/sax@1.2.7': dependencies: '@types/node': 17.0.45 @@ -10969,7 +11181,7 @@ snapshots: '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/serve-index@1.9.4': dependencies: @@ -10978,12 +11190,12 @@ snapshots: '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/send': 0.17.4 '@types/sockjs@0.3.36': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/trusted-types@2.0.7': {} @@ -10999,7 +11211,7 @@ snapshots: '@types/ws@8.5.12': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 '@types/yargs-parser@21.0.3': {} @@ -11007,15 +11219,15 @@ snapshots: dependencies: '@types/yargs-parser': 21.0.3 - '@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2))(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/type-utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.6.0 - eslint: 9.11.0(jiti@1.21.6) + '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/type-utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.7.0 + eslint: 9.11.1(jiti@1.21.6) graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -11025,28 +11237,28 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.6.0 + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.7.0 debug: 4.3.7 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.6.0': + '@typescript-eslint/scope-manager@8.7.0': dependencies: - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/visitor-keys': 8.6.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/visitor-keys': 8.7.0 - '@typescript-eslint/type-utils@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -11055,12 +11267,12 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.6.0': {} + '@typescript-eslint/types@8.7.0': {} - '@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.7.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/visitor-keys': 8.6.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/visitor-keys': 8.7.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -11072,30 +11284,30 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)': + '@typescript-eslint/utils@8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - eslint: 9.11.0(jiti@1.21.6) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) + '@typescript-eslint/scope-manager': 8.7.0 + '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + eslint: 9.11.1(jiti@1.21.6) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.6.0': + '@typescript-eslint/visitor-keys@8.7.0': dependencies: - '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/types': 8.7.0 eslint-visitor-keys: 3.4.3 '@ungap/structured-clone@1.2.0': {} - '@vitejs/plugin-vue@5.1.4(vite@5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0))(vue@3.5.7(typescript@5.6.2))': + '@vitejs/plugin-vue@5.1.4(vite@5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1))(vue@3.5.10(typescript@5.6.2))': dependencies: - vite: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) - vue: 3.5.7(typescript@5.6.2) + vite: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) + vue: 3.5.10(typescript@5.6.2) - '@vitest/coverage-istanbul@2.1.1(vitest@2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0))': + '@vitest/coverage-istanbul@2.1.1(vitest@2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1))': dependencies: '@istanbuljs/schema': 0.1.3 debug: 4.3.7 @@ -11107,7 +11319,7 @@ snapshots: magicast: 0.3.5 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + vitest: 2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) transitivePeerDependencies: - supports-color @@ -11118,13 +11330,13 @@ snapshots: chai: 5.1.1 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0))': + '@vitest/mocker@2.1.1(@vitest/spy@2.1.1)(vite@5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1))': dependencies: '@vitest/spy': 2.1.1 estree-walker: 3.0.3 magic-string: 0.30.11 optionalDependencies: - vite: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + vite: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) '@vitest/pretty-format@2.1.1': dependencies: @@ -11151,77 +11363,96 @@ snapshots: loupe: 3.1.1 tinyrainbow: 1.2.0 - '@vue/compiler-core@3.5.7': + '@vue/compiler-core@3.5.10': dependencies: '@babel/parser': 7.25.6 - '@vue/shared': 3.5.7 + '@vue/shared': 3.5.10 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.7': + '@vue/compiler-dom@3.5.10': dependencies: - '@vue/compiler-core': 3.5.7 - '@vue/shared': 3.5.7 + '@vue/compiler-core': 3.5.10 + '@vue/shared': 3.5.10 - '@vue/compiler-sfc@3.5.7': + '@vue/compiler-sfc@3.5.10': dependencies: '@babel/parser': 7.25.6 - '@vue/compiler-core': 3.5.7 - '@vue/compiler-dom': 3.5.7 - '@vue/compiler-ssr': 3.5.7 - '@vue/shared': 3.5.7 + '@vue/compiler-core': 3.5.10 + '@vue/compiler-dom': 3.5.10 + '@vue/compiler-ssr': 3.5.10 + '@vue/shared': 3.5.10 estree-walker: 2.0.2 magic-string: 0.30.11 postcss: 8.4.47 source-map-js: 1.2.1 - '@vue/compiler-ssr@3.5.7': + '@vue/compiler-ssr@3.5.10': dependencies: - '@vue/compiler-dom': 3.5.7 - '@vue/shared': 3.5.7 + '@vue/compiler-dom': 3.5.10 + '@vue/shared': 3.5.10 '@vue/devtools-api@6.6.4': {} - '@vue/reactivity@3.5.7': + '@vue/devtools-api@7.4.6': + dependencies: + '@vue/devtools-kit': 7.4.6 + + '@vue/devtools-kit@7.4.6': + dependencies: + '@vue/devtools-shared': 7.4.6 + birpc: 0.2.17 + hookable: 5.5.3 + mitt: 3.0.1 + perfect-debounce: 1.0.0 + speakingurl: 14.0.1 + superjson: 2.2.1 + + '@vue/devtools-shared@7.4.6': + dependencies: + rfdc: 1.4.1 + + '@vue/reactivity@3.5.10': dependencies: - '@vue/shared': 3.5.7 + '@vue/shared': 3.5.10 - '@vue/runtime-core@3.5.7': + '@vue/runtime-core@3.5.10': dependencies: - '@vue/reactivity': 3.5.7 - '@vue/shared': 3.5.7 + '@vue/reactivity': 3.5.10 + '@vue/shared': 3.5.10 - '@vue/runtime-dom@3.5.7': + '@vue/runtime-dom@3.5.10': dependencies: - '@vue/reactivity': 3.5.7 - '@vue/runtime-core': 3.5.7 - '@vue/shared': 3.5.7 + '@vue/reactivity': 3.5.10 + '@vue/runtime-core': 3.5.10 + '@vue/shared': 3.5.10 csstype: 3.1.3 - '@vue/server-renderer@3.5.7(vue@3.5.7(typescript@5.6.2))': + '@vue/server-renderer@3.5.10(vue@3.5.10(typescript@5.6.2))': dependencies: - '@vue/compiler-ssr': 3.5.7 - '@vue/shared': 3.5.7 - vue: 3.5.7(typescript@5.6.2) + '@vue/compiler-ssr': 3.5.10 + '@vue/shared': 3.5.10 + vue: 3.5.10(typescript@5.6.2) - '@vue/shared@3.5.7': {} + '@vue/shared@3.5.10': {} - '@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5)': + '@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1)': dependencies: - '@vitejs/plugin-vue': 5.1.4(vite@5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0))(vue@3.5.7(typescript@5.6.2)) - '@vuepress/client': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/core': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/shared': 2.0.0-rc.15 - '@vuepress/utils': 2.0.0-rc.15 + '@vitejs/plugin-vue': 5.1.4(vite@5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1))(vue@3.5.10(typescript@5.6.2)) + '@vuepress/bundlerutils': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/client': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/core': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 autoprefixer: 10.4.20(postcss@8.4.47) connect-history-api-fallback: 2.0.0 postcss: 8.4.47 - postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.4.5) - rollup: 4.22.2 - vite: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) - vue: 3.5.7(typescript@5.6.2) - vue-router: 4.4.5(vue@3.5.7(typescript@5.6.2)) + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1) + rollup: 4.22.5 + vite: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) + vue: 3.5.10(typescript@5.6.2) + vue-router: 4.4.5(vue@3.5.10(typescript@5.6.2)) transitivePeerDependencies: - '@types/node' - jiti @@ -11237,33 +11468,34 @@ snapshots: - typescript - yaml - '@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2)': + '@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2)': dependencies: '@types/express': 4.17.21 '@types/webpack-env': 1.18.5 - '@vuepress/client': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/core': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/shared': 2.0.0-rc.15 - '@vuepress/utils': 2.0.0-rc.15 + '@vuepress/bundlerutils': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/client': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/core': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 autoprefixer: 10.4.20(postcss@8.4.47) chokidar: 3.6.0 - copy-webpack-plugin: 12.0.2(webpack@5.94.0) - css-loader: 7.1.2(webpack@5.94.0) - css-minimizer-webpack-plugin: 7.0.0(lightningcss@1.27.0)(webpack@5.94.0) - esbuild-loader: 4.2.2(webpack@5.94.0) + copy-webpack-plugin: 12.0.2(webpack@5.95.0(esbuild@0.23.1)) + css-loader: 7.1.2(webpack@5.95.0(esbuild@0.23.1)) + css-minimizer-webpack-plugin: 7.0.0(esbuild@0.23.1)(lightningcss@1.27.0)(webpack@5.95.0(esbuild@0.23.1)) + esbuild-loader: 4.2.2(webpack@5.95.0(esbuild@0.23.1)) express: 4.21.0 - html-webpack-plugin: 5.6.0(webpack@5.94.0) + html-webpack-plugin: 5.6.0(webpack@5.95.0(esbuild@0.23.1)) lightningcss: 1.27.0 - mini-css-extract-plugin: 2.9.1(webpack@5.94.0) + mini-css-extract-plugin: 2.9.1(webpack@5.95.0(esbuild@0.23.1)) postcss: 8.4.47 - postcss-loader: 8.1.1(postcss@8.4.47)(typescript@5.6.2)(webpack@5.94.0) - style-loader: 4.0.0(webpack@5.94.0) - vue: 3.5.7(typescript@5.6.2) - vue-loader: 17.4.2(vue@3.5.7(typescript@5.6.2))(webpack@5.94.0) - vue-router: 4.4.5(vue@3.5.7(typescript@5.6.2)) - webpack: 5.94.0 + postcss-loader: 8.1.1(postcss@8.4.47)(typescript@5.6.2)(webpack@5.95.0(esbuild@0.23.1)) + style-loader: 4.0.0(webpack@5.95.0(esbuild@0.23.1)) + vue: 3.5.10(typescript@5.6.2) + vue-loader: 17.4.2(vue@3.5.10(typescript@5.6.2))(webpack@5.95.0(esbuild@0.23.1)) + vue-router: 4.4.5(vue@3.5.10(typescript@5.6.2)) + webpack: 5.95.0(esbuild@0.23.1) webpack-5-chain: 8.0.2 - webpack-dev-server: 5.1.0(webpack@5.94.0) + webpack-dev-server: 5.1.0(webpack@5.95.0(esbuild@0.23.1)) webpack-merge: 6.0.1 transitivePeerDependencies: - '@parcel/css' @@ -11282,11 +11514,23 @@ snapshots: - utf-8-validate - webpack-cli - '@vuepress/cli@2.0.0-rc.15(typescript@5.6.2)': + '@vuepress/bundlerutils@2.0.0-rc.17(typescript@5.6.2)': + dependencies: + '@vuepress/client': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/core': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 + vue: 3.5.10(typescript@5.6.2) + vue-router: 4.4.5(vue@3.5.10(typescript@5.6.2)) + transitivePeerDependencies: + - supports-color + - typescript + + '@vuepress/cli@2.0.0-rc.17(typescript@5.6.2)': dependencies: - '@vuepress/core': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/shared': 2.0.0-rc.15 - '@vuepress/utils': 2.0.0-rc.15 + '@vuepress/core': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 cac: 6.7.14 chokidar: 3.6.0 envinfo: 7.14.0 @@ -11295,27 +11539,27 @@ snapshots: - supports-color - typescript - '@vuepress/client@2.0.0-rc.15(typescript@5.6.2)': + '@vuepress/client@2.0.0-rc.17(typescript@5.6.2)': dependencies: - '@vue/devtools-api': 6.6.4 - '@vuepress/shared': 2.0.0-rc.15 - vue: 3.5.7(typescript@5.6.2) - vue-router: 4.4.5(vue@3.5.7(typescript@5.6.2)) + '@vue/devtools-api': 7.4.6 + '@vuepress/shared': 2.0.0-rc.17 + vue: 3.5.10(typescript@5.6.2) + vue-router: 4.4.5(vue@3.5.10(typescript@5.6.2)) transitivePeerDependencies: - typescript - '@vuepress/core@2.0.0-rc.15(typescript@5.6.2)': + '@vuepress/core@2.0.0-rc.17(typescript@5.6.2)': dependencies: - '@vuepress/client': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/markdown': 2.0.0-rc.15 - '@vuepress/shared': 2.0.0-rc.15 - '@vuepress/utils': 2.0.0-rc.15 - vue: 3.5.7(typescript@5.6.2) + '@vuepress/client': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/markdown': 2.0.0-rc.17 + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 + vue: 3.5.10(typescript@5.6.2) transitivePeerDependencies: - supports-color - typescript - '@vuepress/markdown@2.0.0-rc.15': + '@vuepress/markdown@2.0.0-rc.17': dependencies: '@mdit-vue/plugin-component': 2.1.3 '@mdit-vue/plugin-frontmatter': 2.1.3 @@ -11327,8 +11571,8 @@ snapshots: '@mdit-vue/types': 2.1.0 '@types/markdown-it': 14.1.2 '@types/markdown-it-emoji': 3.0.1 - '@vuepress/shared': 2.0.0-rc.15 - '@vuepress/utils': 2.0.0-rc.15 + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 markdown-it: 14.1.0 markdown-it-anchor: 9.2.0(@types/markdown-it@14.1.2)(markdown-it@14.1.0) markdown-it-emoji: 3.0.0 @@ -11336,16 +11580,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@vuepress/shared@2.0.0-rc.15': + '@vuepress/shared@2.0.0-rc.17': dependencies: '@mdit-vue/types': 2.1.0 - '@vuepress/utils@2.0.0-rc.15': + '@vuepress/utils@2.0.0-rc.17': dependencies: '@types/debug': 4.1.12 '@types/fs-extra': 11.0.4 '@types/hash-sum': 1.0.2 - '@vuepress/shared': 2.0.0-rc.15 + '@vuepress/shared': 2.0.0-rc.17 debug: 4.3.7 fs-extra: 11.2.0 globby: 14.0.2 @@ -11356,21 +11600,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@vueuse/core@11.1.0(vue@3.5.7(typescript@5.6.2))': + '@vueuse/core@11.1.0(vue@3.5.10(typescript@5.6.2))': dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 11.1.0 - '@vueuse/shared': 11.1.0(vue@3.5.7(typescript@5.6.2)) - vue-demi: 0.14.10(vue@3.5.7(typescript@5.6.2)) + '@vueuse/shared': 11.1.0(vue@3.5.10(typescript@5.6.2)) + vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.2)) transitivePeerDependencies: - '@vue/composition-api' - vue '@vueuse/metadata@11.1.0': {} - '@vueuse/shared@11.1.0(vue@3.5.7(typescript@5.6.2))': + '@vueuse/shared@11.1.0(vue@3.5.10(typescript@5.6.2))': dependencies: - vue-demi: 0.14.10(vue@3.5.7(typescript@5.6.2)) + vue-demi: 0.14.10(vue@3.5.10(typescript@5.6.2)) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -11379,13 +11623,13 @@ snapshots: '@waline/client@3.3.2(typescript@5.6.2)': dependencies: - '@vueuse/core': 11.1.0(vue@3.5.7(typescript@5.6.2)) + '@vueuse/core': 11.1.0(vue@3.5.10(typescript@5.6.2)) '@waline/api': 1.0.0-alpha.8 autosize: 6.0.1 marked: 14.1.2 marked-highlight: 2.1.4(marked@14.1.2) recaptcha-v3: 1.11.3 - vue: 3.5.7(typescript@5.6.2) + vue: 3.5.10(typescript@5.6.2) transitivePeerDependencies: - '@vue/composition-api' - typescript @@ -11528,7 +11772,7 @@ snapshots: ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.1 + fast-uri: 3.0.2 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 @@ -11625,8 +11869,8 @@ snapshots: autoprefixer@10.4.20(postcss@8.4.47): dependencies: - browserslist: 4.23.3 - caniuse-lite: 1.0.30001662 + browserslist: 4.24.0 + caniuse-lite: 1.0.30001664 fraction.js: 4.3.7 normalize-range: 0.1.2 picocolors: 1.1.0 @@ -11686,6 +11930,8 @@ snapshots: binary-extensions@2.3.0: {} + birpc@0.2.17: {} + body-parser@1.20.3: dependencies: bytes: 3.1.2 @@ -11723,19 +11969,17 @@ snapshots: dependencies: fill-range: 7.1.1 - browserslist@4.23.3: + browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001662 - electron-to-chromium: 1.5.26 + caniuse-lite: 1.0.30001664 + electron-to-chromium: 1.5.29 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) + update-browserslist-db: 1.1.1(browserslist@4.24.0) buffer-builder@0.2.0: {} buffer-from@1.1.2: {} - builtin-modules@3.3.0: {} - bundle-name@4.1.0: dependencies: run-applescript: 7.0.0 @@ -11780,12 +12024,12 @@ snapshots: caniuse-api@3.0.0: dependencies: - browserslist: 4.23.3 - caniuse-lite: 1.0.30001662 + browserslist: 4.24.0 + caniuse-lite: 1.0.30001664 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 - caniuse-lite@1.0.30001662: {} + caniuse-lite@1.0.30001664: {} ccount@2.0.1: {} @@ -11887,7 +12131,7 @@ snapshots: optionalDependencies: fsevents: 2.3.3 - chokidar@4.0.0: + chokidar@4.0.1: dependencies: readdirp: 4.0.1 @@ -11968,6 +12212,8 @@ snapshots: common-tags@1.8.2: {} + commondir@1.0.1: {} + compare-func@2.0.0: dependencies: array-ify: 1.0.0 @@ -12146,7 +12392,11 @@ snapshots: cookie@0.6.0: {} - copy-webpack-plugin@12.0.2(webpack@5.94.0): + copy-anything@3.0.5: + dependencies: + is-what: 4.1.16 + + copy-webpack-plugin@12.0.2(webpack@5.95.0(esbuild@0.23.1)): dependencies: fast-glob: 3.3.2 glob-parent: 6.0.2 @@ -12154,11 +12404,11 @@ snapshots: normalize-path: 3.0.0 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) core-js-compat@3.38.1: dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 core-util-is@1.0.3: {} @@ -12172,9 +12422,9 @@ snapshots: dependencies: layout-base: 2.0.1 - cosmiconfig-typescript-loader@5.0.0(@types/node@22.5.5)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): + cosmiconfig-typescript-loader@5.0.0(@types/node@22.7.4)(cosmiconfig@9.0.0(typescript@5.6.2))(typescript@5.6.2): dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 cosmiconfig: 9.0.0(typescript@5.6.2) jiti: 1.21.6 typescript: 5.6.2 @@ -12224,7 +12474,7 @@ snapshots: css-functions-list@3.2.2: {} - css-loader@7.1.2(webpack@5.94.0): + css-loader@7.1.2(webpack@5.95.0(esbuild@0.23.1)): dependencies: icss-utils: 5.1.0(postcss@8.4.47) postcss: 8.4.47 @@ -12235,9 +12485,9 @@ snapshots: postcss-value-parser: 4.2.0 semver: 7.6.3 optionalDependencies: - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) - css-minimizer-webpack-plugin@7.0.0(lightningcss@1.27.0)(webpack@5.94.0): + css-minimizer-webpack-plugin@7.0.0(esbuild@0.23.1)(lightningcss@1.27.0)(webpack@5.95.0(esbuild@0.23.1)): dependencies: '@jridgewell/trace-mapping': 0.3.25 cssnano: 7.0.6(postcss@8.4.47) @@ -12245,8 +12495,9 @@ snapshots: postcss: 8.4.47 schema-utils: 4.2.0 serialize-javascript: 6.0.2 - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) optionalDependencies: + esbuild: 0.23.1 lightningcss: 1.27.0 css-select@4.3.0: @@ -12281,7 +12532,7 @@ snapshots: cssnano-preset-default@7.0.6(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 css-declaration-sorter: 7.2.0(postcss@8.4.47) cssnano-utils: 5.0.0(postcss@8.4.47) postcss: 8.4.47 @@ -12696,7 +12947,7 @@ snapshots: dependencies: jake: 10.9.2 - electron-to-chromium@1.5.26: {} + electron-to-chromium@1.5.29: {} emoji-regex@10.4.0: {} @@ -12812,12 +13063,12 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 - esbuild-loader@4.2.2(webpack@5.94.0): + esbuild-loader@4.2.2(webpack@5.95.0(esbuild@0.23.1)): dependencies: esbuild: 0.21.5 get-tsconfig: 4.8.1 loader-utils: 2.0.4 - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) webpack-sources: 1.4.3 esbuild@0.21.5: @@ -12881,15 +13132,15 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-prettier@9.1.0(eslint@9.11.0(jiti@1.21.6)): + eslint-config-prettier@9.1.0(eslint@9.11.1(jiti@1.21.6)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) - eslint-config-vuepress@5.2.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.0(jiti@1.21.6))): + eslint-config-vuepress@5.2.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.1(jiti@1.21.6))): dependencies: - '@meteorlxy/eslint-config': 4.5.1(eslint-plugin-vue@9.28.0(eslint@9.11.0(jiti@1.21.6)))(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.0(jiti@1.21.6))) - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) - eslint-plugin-vue: 9.28.0(eslint@9.11.0(jiti@1.21.6)) + '@meteorlxy/eslint-config': 4.6.0(eslint-plugin-vue@9.28.0(eslint@9.11.1(jiti@1.21.6)))(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2)(vue-eslint-parser@9.4.3(eslint@9.11.1(jiti@1.21.6))) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) + eslint-plugin-vue: 9.28.0(eslint@9.11.1(jiti@1.21.6)) transitivePeerDependencies: - eslint - eslint-plugin-react @@ -12907,18 +13158,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-eslint-comments@3.2.0(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-eslint-comments@3.2.0(eslint@9.11.1(jiti@1.21.6)): dependencies: escape-string-regexp: 1.0.5 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) ignore: 5.3.2 - eslint-plugin-import-x@4.2.1(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2): + eslint-plugin-import-x@4.3.1(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2): dependencies: - '@typescript-eslint/utils': 8.6.0(eslint@9.11.0(jiti@1.21.6))(typescript@5.6.2) + '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.6))(typescript@5.6.2) debug: 4.3.7 doctrine: 3.0.0 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) eslint-import-resolver-node: 0.3.9 get-tsconfig: 4.8.1 is-glob: 4.0.3 @@ -12930,23 +13181,23 @@ snapshots: - supports-color - typescript - eslint-plugin-markdown@5.1.0(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-markdown@5.1.0(eslint@9.11.1(jiti@1.21.6)): dependencies: - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color - eslint-plugin-vue@9.28.0(eslint@9.11.0(jiti@1.21.6)): + eslint-plugin-vue@9.28.0(eslint@9.11.1(jiti@1.21.6)): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) - eslint: 9.11.0(jiti@1.21.6) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) + eslint: 9.11.1(jiti@1.21.6) globals: 13.24.0 natural-compare: 1.4.0 nth-check: 2.1.1 postcss-selector-parser: 6.1.2 semver: 7.6.3 - vue-eslint-parser: 9.4.3(eslint@9.11.0(jiti@1.21.6)) + vue-eslint-parser: 9.4.3(eslint@9.11.1(jiti@1.21.6)) xml-name-validator: 4.0.0 transitivePeerDependencies: - supports-color @@ -12961,34 +13212,37 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.0.2: + eslint-scope@8.1.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} + eslint-visitor-keys@4.1.0: {} - eslint@9.11.0(jiti@1.21.6): + eslint@9.11.1(jiti@1.21.6): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.0(jiti@1.21.6)) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.6)) '@eslint-community/regexpp': 4.11.1 '@eslint/config-array': 0.18.0 + '@eslint/core': 0.6.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.11.0 + '@eslint/js': 9.11.1 '@eslint/plugin-kit': 0.2.0 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.0 '@nodelib/fs.walk': 1.2.8 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 8.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -13013,11 +13267,11 @@ snapshots: esm@3.2.25: {} - espree@10.1.0: + espree@10.2.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 4.1.0 espree@9.6.1: dependencies: @@ -13148,7 +13402,7 @@ snapshots: fast-levenshtein@2.0.6: {} - fast-uri@3.0.1: {} + fast-uri@3.0.2: {} fastest-levenshtein@1.0.16: {} @@ -13160,6 +13414,10 @@ snapshots: dependencies: websocket-driver: 0.7.4 + fdir@6.4.0(picomatch@2.3.1): + optionalDependencies: + picomatch: 2.3.1 + fetch-blob@3.2.0: dependencies: node-domexception: 1.0.0 @@ -13404,16 +13662,16 @@ snapshots: jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 1.11.1 glob@11.0.0: dependencies: foreground-child: 3.3.0 - jackspeak: 4.0.1 + jackspeak: 4.0.2 minimatch: 10.0.1 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 2.0.0 glob@7.2.3: @@ -13558,6 +13816,8 @@ snapshots: highlight.js@11.10.0: {} + hookable@5.5.3: {} + hosted-git-info@7.0.2: dependencies: lru-cache: 10.4.3 @@ -13585,13 +13845,13 @@ snapshots: he: 1.2.0 param-case: 3.0.4 relateurl: 0.2.7 - terser: 5.33.0 + terser: 5.34.1 html-tags@3.3.1: {} html-void-elements@3.0.0: {} - html-webpack-plugin@5.6.0(webpack@5.94.0): + html-webpack-plugin@5.6.0(webpack@5.95.0(esbuild@0.23.1)): dependencies: '@types/html-minifier-terser': 6.1.0 html-minifier-terser: 6.1.0 @@ -13599,7 +13859,7 @@ snapshots: pretty-error: 4.0.0 tapable: 2.2.1 optionalDependencies: - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) htmlparser2@6.1.0: dependencies: @@ -13805,10 +14065,6 @@ snapshots: call-bind: 1.0.7 has-tostringtag: 1.0.2 - is-builtin-module@3.2.1: - dependencies: - builtin-modules: 3.3.0 - is-callable@1.2.7: {} is-ci@3.0.1: @@ -13879,6 +14135,10 @@ snapshots: is-plain-object@5.0.0: {} + is-reference@1.2.1: + dependencies: + '@types/estree': 1.0.6 + is-regex@1.1.4: dependencies: call-bind: 1.0.7 @@ -13924,6 +14184,8 @@ snapshots: dependencies: call-bind: 1.0.7 + is-what@4.1.16: {} + is-wsl@3.1.0: dependencies: is-inside-container: 1.0.0 @@ -13975,11 +14237,9 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jackspeak@4.0.1: + jackspeak@4.0.2: dependencies: '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 jake@10.9.2: dependencies: @@ -13993,7 +14253,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.7.4 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -14001,13 +14261,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -14351,49 +14611,49 @@ snapshots: marked@14.1.2: {} - markmap-common@0.17.0: + markmap-common@0.17.1: dependencies: '@babel/runtime': 7.25.6 '@gera2ld/jsx-dom': 2.2.2 npm2url: 0.2.4 - markmap-html-parser@0.17.0(markmap-common@0.17.0): + markmap-html-parser@0.17.1(markmap-common@0.17.1): dependencies: '@babel/runtime': 7.25.6 cheerio: 1.0.0-rc.12 - markmap-common: 0.17.0 + markmap-common: 0.17.1 - markmap-lib@0.17.0(markmap-common@0.17.0): + markmap-lib@0.17.2(markmap-common@0.17.1): dependencies: '@babel/runtime': 7.25.6 '@iktakahiro/markdown-it-katex': 4.0.1 highlight.js: 11.10.0 - js-yaml: 4.1.0 katex: 0.16.11 markdown-it: 14.1.0 markdown-it-ins: 4.0.0 markdown-it-mark: 4.0.0 markdown-it-sub: 2.0.0 markdown-it-sup: 2.0.0 - markmap-common: 0.17.0 - markmap-html-parser: 0.17.0(markmap-common@0.17.0) - markmap-view: 0.17.0(markmap-common@0.17.0) + markmap-common: 0.17.1 + markmap-html-parser: 0.17.1(markmap-common@0.17.1) + markmap-view: 0.17.2(markmap-common@0.17.1) prismjs: 1.29.0 + yaml: 2.5.1 - markmap-toolbar@0.17.0(markmap-common@0.17.0): + markmap-toolbar@0.17.2(markmap-common@0.17.1): dependencies: '@babel/runtime': 7.25.6 '@gera2ld/jsx-dom': 2.2.2 - markmap-common: 0.17.0 + markmap-common: 0.17.1 - markmap-view@0.17.0(markmap-common@0.17.0): + markmap-view@0.17.2(markmap-common@0.17.1): dependencies: '@babel/runtime': 7.25.6 '@gera2ld/jsx-dom': 2.2.2 '@types/d3': 7.4.3 d3: 7.9.0 d3-flextree: 2.1.2 - markmap-common: 0.17.0 + markmap-common: 0.17.1 mathjax-full@3.2.2: dependencies: @@ -14526,11 +14786,11 @@ snapshots: mimic-function@5.0.1: {} - mini-css-extract-plugin@2.9.1(webpack@5.94.0): + mini-css-extract-plugin@2.9.1(webpack@5.95.0(esbuild@0.23.1)): dependencies: schema-utils: 4.2.0 tapable: 2.2.1 - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) minimalistic-assert@1.0.1: {} @@ -14859,7 +15119,7 @@ snapshots: p-try@2.2.0: {} - package-json-from-dist@1.0.0: {} + package-json-from-dist@1.0.1: {} package-manager-detector@0.2.0: {} @@ -14995,6 +15255,8 @@ snapshots: pathval@2.0.0: {} + perfect-debounce@1.0.0: {} + photoswipe@5.4.4: {} picocolors@1.1.0: {} @@ -15013,11 +15275,11 @@ snapshots: mlly: 1.7.1 pathe: 1.1.2 - playwright-core@1.47.1: {} + playwright-core@1.47.2: {} - playwright@1.47.1: + playwright@1.47.2: dependencies: - playwright-core: 1.47.1 + playwright-core: 1.47.2 optionalDependencies: fsevents: 2.3.2 @@ -15046,7 +15308,7 @@ snapshots: postcss-colormin@7.0.2(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 caniuse-api: 3.0.0 colord: 2.9.3 postcss: 8.4.47 @@ -15054,7 +15316,7 @@ snapshots: postcss-convert-values@7.0.4(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 postcss: 8.4.47 postcss-value-parser: 4.2.0 @@ -15082,23 +15344,23 @@ snapshots: postcss: 8.4.47 postcss-safe-parser: 6.0.0(postcss@8.4.47) - postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.4.5): + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(tsx@4.19.1)(yaml@2.5.1): dependencies: lilconfig: 3.1.2 optionalDependencies: jiti: 1.21.6 postcss: 8.4.47 tsx: 4.19.1 - yaml: 2.4.5 + yaml: 2.5.1 - postcss-loader@8.1.1(postcss@8.4.47)(typescript@5.6.2)(webpack@5.94.0): + postcss-loader@8.1.1(postcss@8.4.47)(typescript@5.6.2)(webpack@5.95.0(esbuild@0.23.1)): dependencies: cosmiconfig: 9.0.0(typescript@5.6.2) jiti: 1.21.6 postcss: 8.4.47 semver: 7.6.3 optionalDependencies: - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) transitivePeerDependencies: - typescript @@ -15112,7 +15374,7 @@ snapshots: postcss-merge-rules@7.0.4(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 caniuse-api: 3.0.0 cssnano-utils: 5.0.0(postcss@8.4.47) postcss: 8.4.47 @@ -15132,7 +15394,7 @@ snapshots: postcss-minify-params@7.0.2(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 cssnano-utils: 5.0.0(postcss@8.4.47) postcss: 8.4.47 postcss-value-parser: 4.2.0 @@ -15195,7 +15457,7 @@ snapshots: postcss-normalize-unicode@7.0.2(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 postcss: 8.4.47 postcss-value-parser: 4.2.0 @@ -15217,7 +15479,7 @@ snapshots: postcss-reduce-initial@7.0.2(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 caniuse-api: 3.0.0 postcss: 8.4.47 @@ -15268,7 +15530,7 @@ snapshots: picocolors: 1.1.0 source-map-js: 1.2.1 - preact@10.24.0: {} + preact@10.24.1: {} prelude-ls@1.2.1: {} @@ -15481,37 +15743,65 @@ snapshots: reusify@1.0.4: {} + reveal.js@5.1.0: {} + + rfdc@1.4.1: {} + rimraf@6.0.1: dependencies: glob: 11.0.0 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 robust-predicates@3.0.2: {} - rollup@2.79.1: + rollup-plugin-dts@6.1.1(rollup@4.22.5)(typescript@5.6.2): + dependencies: + magic-string: 0.30.11 + rollup: 4.22.5 + typescript: 5.6.2 + optionalDependencies: + '@babel/code-frame': 7.24.7 + + rollup-plugin-esbuild@6.1.1(esbuild@0.23.1)(rollup@4.22.5): + dependencies: + '@rollup/pluginutils': 5.1.2(rollup@4.22.5) + debug: 4.3.7 + es-module-lexer: 1.5.4 + esbuild: 0.23.1 + get-tsconfig: 4.8.1 + rollup: 4.22.5 + transitivePeerDependencies: + - supports-color + + rollup-plugin-resolve-shebang@1.0.1(rollup@4.22.5): + dependencies: + magic-string: 0.30.11 + rollup: 4.22.5 + + rollup@2.79.2: optionalDependencies: fsevents: 2.3.3 - rollup@4.22.2: + rollup@4.22.5: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.2 - '@rollup/rollup-android-arm64': 4.22.2 - '@rollup/rollup-darwin-arm64': 4.22.2 - '@rollup/rollup-darwin-x64': 4.22.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.2 - '@rollup/rollup-linux-arm-musleabihf': 4.22.2 - '@rollup/rollup-linux-arm64-gnu': 4.22.2 - '@rollup/rollup-linux-arm64-musl': 4.22.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.2 - '@rollup/rollup-linux-riscv64-gnu': 4.22.2 - '@rollup/rollup-linux-s390x-gnu': 4.22.2 - '@rollup/rollup-linux-x64-gnu': 4.22.2 - '@rollup/rollup-linux-x64-musl': 4.22.2 - '@rollup/rollup-win32-arm64-msvc': 4.22.2 - '@rollup/rollup-win32-ia32-msvc': 4.22.2 - '@rollup/rollup-win32-x64-msvc': 4.22.2 + '@rollup/rollup-android-arm-eabi': 4.22.5 + '@rollup/rollup-android-arm64': 4.22.5 + '@rollup/rollup-darwin-arm64': 4.22.5 + '@rollup/rollup-darwin-x64': 4.22.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.5 + '@rollup/rollup-linux-arm-musleabihf': 4.22.5 + '@rollup/rollup-linux-arm64-gnu': 4.22.5 + '@rollup/rollup-linux-arm64-musl': 4.22.5 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.5 + '@rollup/rollup-linux-riscv64-gnu': 4.22.5 + '@rollup/rollup-linux-s390x-gnu': 4.22.5 + '@rollup/rollup-linux-x64-gnu': 4.22.5 + '@rollup/rollup-linux-x64-musl': 4.22.5 + '@rollup/rollup-win32-arm64-msvc': 4.22.5 + '@rollup/rollup-win32-ia32-msvc': 4.22.5 + '@rollup/rollup-win32-x64-msvc': 4.22.5 fsevents: 2.3.3 roughjs@4.6.6: @@ -15552,67 +15842,67 @@ snapshots: safer-buffer@2.1.2: {} - sass-embedded-android-arm64@1.79.2: + sass-embedded-android-arm64@1.79.4: optional: true - sass-embedded-android-arm@1.79.2: + sass-embedded-android-arm@1.79.4: optional: true - sass-embedded-android-ia32@1.79.2: + sass-embedded-android-ia32@1.79.4: optional: true - sass-embedded-android-riscv64@1.79.2: + sass-embedded-android-riscv64@1.79.4: optional: true - sass-embedded-android-x64@1.79.2: + sass-embedded-android-x64@1.79.4: optional: true - sass-embedded-darwin-arm64@1.79.2: + sass-embedded-darwin-arm64@1.79.4: optional: true - sass-embedded-darwin-x64@1.79.2: + sass-embedded-darwin-x64@1.79.4: optional: true - sass-embedded-linux-arm64@1.79.2: + sass-embedded-linux-arm64@1.79.4: optional: true - sass-embedded-linux-arm@1.79.2: + sass-embedded-linux-arm@1.79.4: optional: true - sass-embedded-linux-ia32@1.79.2: + sass-embedded-linux-ia32@1.79.4: optional: true - sass-embedded-linux-musl-arm64@1.79.2: + sass-embedded-linux-musl-arm64@1.79.4: optional: true - sass-embedded-linux-musl-arm@1.79.2: + sass-embedded-linux-musl-arm@1.79.4: optional: true - sass-embedded-linux-musl-ia32@1.79.2: + sass-embedded-linux-musl-ia32@1.79.4: optional: true - sass-embedded-linux-musl-riscv64@1.79.2: + sass-embedded-linux-musl-riscv64@1.79.4: optional: true - sass-embedded-linux-musl-x64@1.79.2: + sass-embedded-linux-musl-x64@1.79.4: optional: true - sass-embedded-linux-riscv64@1.79.2: + sass-embedded-linux-riscv64@1.79.4: optional: true - sass-embedded-linux-x64@1.79.2: + sass-embedded-linux-x64@1.79.4: optional: true - sass-embedded-win32-arm64@1.79.2: + sass-embedded-win32-arm64@1.79.4: optional: true - sass-embedded-win32-ia32@1.79.2: + sass-embedded-win32-ia32@1.79.4: optional: true - sass-embedded-win32-x64@1.79.2: + sass-embedded-win32-x64@1.79.4: optional: true - sass-embedded@1.79.2: + sass-embedded@1.79.4: dependencies: '@bufbuild/protobuf': 2.1.0 buffer-builder: 0.2.0 @@ -15622,38 +15912,38 @@ snapshots: supports-color: 8.1.1 varint: 6.0.0 optionalDependencies: - sass-embedded-android-arm: 1.79.2 - sass-embedded-android-arm64: 1.79.2 - sass-embedded-android-ia32: 1.79.2 - sass-embedded-android-riscv64: 1.79.2 - sass-embedded-android-x64: 1.79.2 - sass-embedded-darwin-arm64: 1.79.2 - sass-embedded-darwin-x64: 1.79.2 - sass-embedded-linux-arm: 1.79.2 - sass-embedded-linux-arm64: 1.79.2 - sass-embedded-linux-ia32: 1.79.2 - sass-embedded-linux-musl-arm: 1.79.2 - sass-embedded-linux-musl-arm64: 1.79.2 - sass-embedded-linux-musl-ia32: 1.79.2 - sass-embedded-linux-musl-riscv64: 1.79.2 - sass-embedded-linux-musl-x64: 1.79.2 - sass-embedded-linux-riscv64: 1.79.2 - sass-embedded-linux-x64: 1.79.2 - sass-embedded-win32-arm64: 1.79.2 - sass-embedded-win32-ia32: 1.79.2 - sass-embedded-win32-x64: 1.79.2 - - sass-loader@16.0.2(sass-embedded@1.79.2)(sass@1.79.2)(webpack@5.94.0): + sass-embedded-android-arm: 1.79.4 + sass-embedded-android-arm64: 1.79.4 + sass-embedded-android-ia32: 1.79.4 + sass-embedded-android-riscv64: 1.79.4 + sass-embedded-android-x64: 1.79.4 + sass-embedded-darwin-arm64: 1.79.4 + sass-embedded-darwin-x64: 1.79.4 + sass-embedded-linux-arm: 1.79.4 + sass-embedded-linux-arm64: 1.79.4 + sass-embedded-linux-ia32: 1.79.4 + sass-embedded-linux-musl-arm: 1.79.4 + sass-embedded-linux-musl-arm64: 1.79.4 + sass-embedded-linux-musl-ia32: 1.79.4 + sass-embedded-linux-musl-riscv64: 1.79.4 + sass-embedded-linux-musl-x64: 1.79.4 + sass-embedded-linux-riscv64: 1.79.4 + sass-embedded-linux-x64: 1.79.4 + sass-embedded-win32-arm64: 1.79.4 + sass-embedded-win32-ia32: 1.79.4 + sass-embedded-win32-x64: 1.79.4 + + sass-loader@16.0.2(sass-embedded@1.79.4)(sass@1.79.4)(webpack@5.95.0(esbuild@0.23.1)): dependencies: neo-async: 2.6.2 optionalDependencies: - sass: 1.79.2 - sass-embedded: 1.79.2 - webpack: 5.94.0 + sass: 1.79.4 + sass-embedded: 1.79.4 + webpack: 5.95.0(esbuild@0.23.1) - sass@1.79.2: + sass@1.79.4: dependencies: - chokidar: 4.0.0 + chokidar: 4.0.1 immutable: 4.3.7 source-map-js: 1.2.1 @@ -15769,12 +16059,12 @@ snapshots: shell-quote@1.8.1: {} - shiki@1.18.0: + shiki@1.21.0: dependencies: - '@shikijs/core': 1.18.0 - '@shikijs/engine-javascript': 1.18.0 - '@shikijs/engine-oniguruma': 1.18.0 - '@shikijs/types': 1.18.0 + '@shikijs/core': 1.21.0 + '@shikijs/engine-javascript': 1.21.0 + '@shikijs/engine-oniguruma': 1.21.0 + '@shikijs/types': 1.21.0 '@shikijs/vscode-textmate': 9.2.2 '@types/hast': 3.0.4 @@ -15913,6 +16203,8 @@ snapshots: transitivePeerDependencies: - supports-color + speakingurl@14.0.1: {} + speech-rule-engine@4.0.7: dependencies: commander: 9.2.0 @@ -16040,13 +16332,13 @@ snapshots: minimist: 1.2.8 through: 2.3.8 - style-loader@4.0.0(webpack@5.94.0): + style-loader@4.0.0(webpack@5.95.0(esbuild@0.23.1)): dependencies: - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) stylehacks@7.0.4(postcss@8.4.47): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 postcss: 8.4.47 postcss-selector-parser: 6.1.2 @@ -16157,6 +16449,10 @@ snapshots: dependencies: minimist: 1.2.8 + superjson@2.2.1: + dependencies: + copy-anything: 3.0.5 + supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -16222,16 +16518,18 @@ snapshots: type-fest: 0.16.0 unique-string: 2.0.0 - terser-webpack-plugin@5.3.10(webpack@5.94.0): + terser-webpack-plugin@5.3.10(esbuild@0.23.1)(webpack@5.95.0(esbuild@0.23.1)): dependencies: '@jridgewell/trace-mapping': 0.3.25 jest-worker: 27.5.1 schema-utils: 3.3.0 serialize-javascript: 6.0.2 - terser: 5.33.0 - webpack: 5.94.0 + terser: 5.34.1 + webpack: 5.95.0(esbuild@0.23.1) + optionalDependencies: + esbuild: 0.23.1 - terser@5.33.0: + terser@5.34.1: dependencies: '@jridgewell/source-map': 0.3.6 acorn: 8.12.1 @@ -16462,9 +16760,9 @@ snapshots: upath@2.0.1: {} - update-browserslist-db@1.1.0(browserslist@4.23.3): + update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: - browserslist: 4.23.3 + browserslist: 4.24.0 escalade: 3.2.0 picocolors: 1.1.0 @@ -16507,12 +16805,12 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0): + vite-node@2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 - vite: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + vite: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) transitivePeerDependencies: - '@types/node' - less @@ -16524,23 +16822,23 @@ snapshots: - supports-color - terser - vite@5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0): + vite@5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1): dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.22.2 + rollup: 4.22.5 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 fsevents: 2.3.3 lightningcss: 1.27.0 - sass: 1.79.2 - sass-embedded: 1.79.2 - terser: 5.33.0 + sass: 1.79.4 + sass-embedded: 1.79.4 + terser: 5.34.1 - vitest@2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0): + vitest@2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1): dependencies: '@vitest/expect': 2.1.1 - '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)) + '@vitest/mocker': 2.1.1(@vitest/spy@2.1.1)(vite@5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)) '@vitest/pretty-format': 2.1.1 '@vitest/runner': 2.1.1 '@vitest/snapshot': 2.1.1 @@ -16555,11 +16853,11 @@ snapshots: tinyexec: 0.3.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.6(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) - vite-node: 2.1.1(@types/node@22.5.5)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0) + vite: 5.4.8(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) + vite-node: 2.1.1(@types/node@22.7.4)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.5.5 + '@types/node': 22.7.4 transitivePeerDependencies: - less - lightningcss @@ -16588,14 +16886,14 @@ snapshots: vscode-uri@3.0.8: {} - vue-demi@0.14.10(vue@3.5.7(typescript@5.6.2)): + vue-demi@0.14.10(vue@3.5.10(typescript@5.6.2)): dependencies: - vue: 3.5.7(typescript@5.6.2) + vue: 3.5.10(typescript@5.6.2) - vue-eslint-parser@9.4.3(eslint@9.11.0(jiti@1.21.6)): + vue-eslint-parser@9.4.3(eslint@9.11.1(jiti@1.21.6)): dependencies: debug: 4.3.7 - eslint: 9.11.0(jiti@1.21.6) + eslint: 9.11.1(jiti@1.21.6) eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 @@ -16605,42 +16903,42 @@ snapshots: transitivePeerDependencies: - supports-color - vue-loader@17.4.2(vue@3.5.7(typescript@5.6.2))(webpack@5.94.0): + vue-loader@17.4.2(vue@3.5.10(typescript@5.6.2))(webpack@5.95.0(esbuild@0.23.1)): dependencies: chalk: 4.1.2 hash-sum: 2.0.0 watchpack: 2.4.2 - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) optionalDependencies: - vue: 3.5.7(typescript@5.6.2) + vue: 3.5.10(typescript@5.6.2) - vue-router@4.4.5(vue@3.5.7(typescript@5.6.2)): + vue-router@4.4.5(vue@3.5.10(typescript@5.6.2)): dependencies: '@vue/devtools-api': 6.6.4 - vue: 3.5.7(typescript@5.6.2) + vue: 3.5.10(typescript@5.6.2) - vue@3.5.7(typescript@5.6.2): + vue@3.5.10(typescript@5.6.2): dependencies: - '@vue/compiler-dom': 3.5.7 - '@vue/compiler-sfc': 3.5.7 - '@vue/runtime-dom': 3.5.7 - '@vue/server-renderer': 3.5.7(vue@3.5.7(typescript@5.6.2)) - '@vue/shared': 3.5.7 + '@vue/compiler-dom': 3.5.10 + '@vue/compiler-sfc': 3.5.10 + '@vue/runtime-dom': 3.5.10 + '@vue/server-renderer': 3.5.10(vue@3.5.10(typescript@5.6.2)) + '@vue/shared': 3.5.10 optionalDependencies: typescript: 5.6.2 - vuepress@2.0.0-rc.15(@vuepress/bundler-vite@2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5))(@vuepress/bundler-webpack@2.0.0-rc.15(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.7(typescript@5.6.2)): + vuepress@2.0.0-rc.17(@vuepress/bundler-vite@2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1))(@vuepress/bundler-webpack@2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2))(typescript@5.6.2)(vue@3.5.10(typescript@5.6.2)): dependencies: - '@vuepress/cli': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/client': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/core': 2.0.0-rc.15(typescript@5.6.2) - '@vuepress/markdown': 2.0.0-rc.15 - '@vuepress/shared': 2.0.0-rc.15 - '@vuepress/utils': 2.0.0-rc.15 - vue: 3.5.7(typescript@5.6.2) + '@vuepress/cli': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/client': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/core': 2.0.0-rc.17(typescript@5.6.2) + '@vuepress/markdown': 2.0.0-rc.17 + '@vuepress/shared': 2.0.0-rc.17 + '@vuepress/utils': 2.0.0-rc.17 + vue: 3.5.10(typescript@5.6.2) optionalDependencies: - '@vuepress/bundler-vite': 2.0.0-rc.15(@types/node@22.5.5)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.2)(sass@1.79.2)(terser@5.33.0)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.4.5) - '@vuepress/bundler-webpack': 2.0.0-rc.15(typescript@5.6.2) + '@vuepress/bundler-vite': 2.0.0-rc.17(@types/node@22.7.4)(jiti@1.21.6)(lightningcss@1.27.0)(sass-embedded@1.79.4)(sass@1.79.4)(terser@5.34.1)(tsx@4.19.1)(typescript@5.6.2)(yaml@2.5.1) + '@vuepress/bundler-webpack': 2.0.0-rc.17(esbuild@0.23.1)(typescript@5.6.2) transitivePeerDependencies: - supports-color - typescript @@ -16652,7 +16950,7 @@ snapshots: glob-to-regexp: 0.4.1 graceful-fs: 4.2.11 - watermark-js-plus@1.5.6: {} + watermark-js-plus@1.5.7: {} wbuf@1.7.3: dependencies: @@ -16671,7 +16969,7 @@ snapshots: deepmerge: 1.5.2 javascript-stringify: 2.1.0 - webpack-dev-middleware@7.4.2(webpack@5.94.0): + webpack-dev-middleware@7.4.2(webpack@5.95.0(esbuild@0.23.1)): dependencies: colorette: 2.0.20 memfs: 4.12.0 @@ -16680,9 +16978,9 @@ snapshots: range-parser: 1.2.1 schema-utils: 4.2.0 optionalDependencies: - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) - webpack-dev-server@5.1.0(webpack@5.94.0): + webpack-dev-server@5.1.0(webpack@5.95.0(esbuild@0.23.1)): dependencies: '@types/bonjour': 3.5.13 '@types/connect-history-api-fallback': 1.5.4 @@ -16710,10 +17008,10 @@ snapshots: serve-index: 1.9.1 sockjs: 0.3.24 spdy: 4.0.2 - webpack-dev-middleware: 7.4.2(webpack@5.94.0) + webpack-dev-middleware: 7.4.2(webpack@5.95.0(esbuild@0.23.1)) ws: 8.18.0 optionalDependencies: - webpack: 5.94.0 + webpack: 5.95.0(esbuild@0.23.1) transitivePeerDependencies: - bufferutil - debug @@ -16733,7 +17031,7 @@ snapshots: webpack-sources@3.2.3: {} - webpack@5.94.0: + webpack@5.95.0(esbuild@0.23.1): dependencies: '@types/estree': 1.0.6 '@webassemblyjs/ast': 1.12.1 @@ -16741,7 +17039,7 @@ snapshots: '@webassemblyjs/wasm-parser': 1.12.1 acorn: 8.12.1 acorn-import-attributes: 1.9.5(acorn@8.12.1) - browserslist: 4.23.3 + browserslist: 4.24.0 chrome-trace-event: 1.0.4 enhanced-resolve: 5.17.1 es-module-lexer: 1.5.4 @@ -16755,7 +17053,7 @@ snapshots: neo-async: 2.6.2 schema-utils: 3.3.0 tapable: 2.2.1 - terser-webpack-plugin: 5.3.10(webpack@5.94.0) + terser-webpack-plugin: 5.3.10(esbuild@0.23.1)(webpack@5.95.0(esbuild@0.23.1)) watchpack: 2.4.2 webpack-sources: 3.2.3 transitivePeerDependencies: @@ -16847,10 +17145,10 @@ snapshots: '@babel/core': 7.25.2 '@babel/preset-env': 7.25.4(@babel/core@7.25.2) '@babel/runtime': 7.25.6 - '@rollup/plugin-babel': 5.3.1(@babel/core@7.25.2)(rollup@2.79.1) - '@rollup/plugin-node-resolve': 15.2.3(rollup@2.79.1) - '@rollup/plugin-replace': 2.4.2(rollup@2.79.1) - '@rollup/plugin-terser': 0.4.4(rollup@2.79.1) + '@rollup/plugin-babel': 5.3.1(@babel/core@7.25.2)(rollup@2.79.2) + '@rollup/plugin-node-resolve': 15.3.0(rollup@2.79.2) + '@rollup/plugin-replace': 2.4.2(rollup@2.79.2) + '@rollup/plugin-terser': 0.4.4(rollup@2.79.2) '@surma/rollup-plugin-off-main-thread': 2.2.3 ajv: 8.17.1 common-tags: 1.8.2 @@ -16859,7 +17157,7 @@ snapshots: glob: 7.2.3 lodash: 4.17.21 pretty-bytes: 5.6.0 - rollup: 2.79.1 + rollup: 2.79.2 source-map: 0.8.0-beta.0 stringify-object: 3.3.0 strip-comments: 2.0.1 @@ -17001,8 +17299,7 @@ snapshots: yallist@4.0.0: {} - yaml@2.4.5: - optional: true + yaml@2.5.1: {} yargs-parser@21.1.1: {} diff --git a/scripts/rollup.ts b/scripts/rollup.ts new file mode 100644 index 0000000000..b97ad13ba7 --- /dev/null +++ b/scripts/rollup.ts @@ -0,0 +1,185 @@ +import commonjs from '@rollup/plugin-commonjs' +import { nodeResolve } from '@rollup/plugin-node-resolve' +import type { ModuleSideEffectsOption, RollupOptions } from 'rollup' +import dts from 'rollup-plugin-dts' +// eslint-disable-next-line import/no-rename-default +import esbuild from 'rollup-plugin-esbuild' +import { shebang } from 'rollup-plugin-resolve-shebang' + +export interface FileInfo { + base: string + files: string[] + target?: string +} + +export interface BundleOptions { + dts?: boolean + external?: (RegExp | string)[] + dtsExternal?: (RegExp | string)[] + resolve?: boolean + output?: Record + inlineDynamicImports?: boolean + moduleSideEffects?: ModuleSideEffectsOption + preserveShebang?: boolean +} + +export const rollupBundle = ( + filePath: FileInfo | string, + { + dts: enableDts = typeof filePath === 'object' + ? !filePath.base.startsWith('cli/') && filePath.base !== 'cli' + : !filePath.startsWith('cli/'), + external = [], + dtsExternal = [], + resolve = false, + output = {}, + inlineDynamicImports = typeof filePath !== 'object', + moduleSideEffects = (id): boolean => + id.endsWith('.css') || id.endsWith('.scss'), + preserveShebang = typeof filePath === 'object' + ? filePath.base.startsWith('cli') + : filePath.startsWith('cli/'), + }: BundleOptions = {}, +): RollupOptions[] => [ + { + input: + typeof filePath === 'object' + ? Object.fromEntries( + filePath.files.map((item) => [ + item, + `./src/${filePath.base}/${item}.ts`, + ]), + ) + : `./src/${filePath}.ts`, + + output: [ + { + ...(typeof filePath === 'object' + ? { + dir: `./lib/${filePath.target ?? filePath.base}`, + entryFileNames: '[name].js', + } + : { file: `./lib/${filePath}.js` }), + format: 'esm', + sourcemap: true, + exports: 'named', + inlineDynamicImports, + ...output, + }, + ], + + plugins: [ + preserveShebang ? shebang() : null, + ...(resolve ? [nodeResolve({ preferBuiltins: true }), commonjs()] : []), + esbuild({ + charset: 'utf8', + minify: true, + target: 'node18.19.0', + }), + ], + + external: [ + resolve + ? [] + : ( + typeof filePath === 'object' + ? filePath.base.startsWith('client') + : filePath.startsWith('client/') + ) + ? [ + /^@temp/, + '@vuepress/helper/client', + '@vuepress/helper/shared', + '@vueuse/core', + 'vue', + 'vuepress/client', + 'vuepress/shared', + /\.s?css$/, + ] + : ( + typeof filePath === 'object' + ? filePath.base.startsWith('node') || + filePath.base.startsWith('cli') + : filePath.startsWith('node/') || filePath.startsWith('cli/') + ) + ? [ + /^node:/, + '@vuepress/highlighter-helper', + '@vuepress/helper', + '@vuepress/helper/shared', + /^@vuepress\/plugin-/, + 'vuepress/cli', + 'vuepress/core', + 'vuepress/markdown', + 'vuepress/shared', + 'vuepress/utils', + ] + : [], + external, + ].flat(), + + treeshake: { + moduleSideEffects, + preset: 'smallest', + }, + }, + ...(enableDts + ? [ + { + input: + typeof filePath === 'object' + ? Object.fromEntries( + filePath.files.map((item) => [ + item, + `./src/${filePath.base}/${item}.ts`, + ]), + ) + : `./src/${filePath}.ts`, + output: [ + { + ...(typeof filePath === 'object' + ? { + dir: `./lib/${filePath.target ?? filePath.base}`, + entryFileNames: '[name].d.ts', + } + : { file: `./lib/${filePath}.d.ts` }), + + format: 'esm', + }, + ], + plugins: [ + dts({ + compilerOptions: { + preserveSymlinks: false, + }, + }), + ], + external: [ + resolve + ? [] + : ( + typeof filePath === 'object' + ? filePath.base.startsWith('client') + : filePath.startsWith('client/') + ) + ? [/^@temp/, 'vuepress/client', 'vuepress/shared', /\.s?css$/] + : ( + typeof filePath === 'object' + ? filePath.base.startsWith('node') + : filePath.startsWith('node/') + ) + ? [ + /^node:/, + 'vuepress/cli', + 'vuepress/core', + 'vuepress/markdown', + 'vuepress/shared', + 'vuepress/utils', + ] + : [], + dtsExternal, + ].flat(), + } as RollupOptions, + ] + : []), +] diff --git a/themes/theme-default/CHANGELOG.md b/themes/theme-default/CHANGELOG.md index bb49dbb3b4..c17a436058 100644 --- a/themes/theme-default/CHANGELOG.md +++ b/themes/theme-default/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- **plugin-markdown-hint:** improve hint container outlook ([#264](https://github.com/vuepress/ecosystem/issues/264)) ([340fff5](https://github.com/vuepress/ecosystem/commit/340fff5ced3f720f2d6204a230ed320031f9faa9)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.49](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2024-09-23) + +**Note:** Version bump only for package @vuepress/theme-default + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +### Bug Fixes + +- **theme-default:** fix hero action button color ([12a8d5d](https://github.com/vuepress/ecosystem/commit/12a8d5dc44198f58999c6ad88c750c775aba4950)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Bug Fixes diff --git a/themes/theme-default/package.json b/themes/theme-default/package.json index 02dea81fa8..a846d8edd2 100644 --- a/themes/theme-default/package.json +++ b/themes/theme-default/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/theme-default", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "Default theme of VuePress", "keywords": [ "vuepress-theme", @@ -38,6 +38,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "tsc -b tsconfig.build.json", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "copy": "cpx \"src/**/*.{d.ts,vue,scss}\" lib" }, @@ -48,8 +49,8 @@ "@vuepress/plugin-copy-code": "workspace:*", "@vuepress/plugin-git": "workspace:*", "@vuepress/plugin-links-check": "workspace:*", - "@vuepress/plugin-markdown-container": "workspace:*", "@vuepress/plugin-markdown-hint": "workspace:*", + "@vuepress/plugin-markdown-tab": "workspace:*", "@vuepress/plugin-medium-zoom": "workspace:*", "@vuepress/plugin-nprogress": "workspace:*", "@vuepress/plugin-palette": "workspace:*", @@ -58,13 +59,13 @@ "@vuepress/plugin-sitemap": "workspace:*", "@vuepress/plugin-theme-data": "workspace:*", "@vueuse/core": "^11.1.0", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "peerDependencies": { "sass": "^1.79.2", "sass-embedded": "^1.79.2", "sass-loader": "^16.0.1", - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "peerDependenciesMeta": { "sass": { diff --git a/themes/theme-default/src/client/components/VPHomeHero.vue b/themes/theme-default/src/client/components/VPHomeHero.vue index 56fb0b349d..c19d359ec1 100644 --- a/themes/theme-default/src/client/components/VPHomeHero.vue +++ b/themes/theme-default/src/client/components/VPHomeHero.vue @@ -159,9 +159,12 @@ const HomeHeroImage: FunctionalComponent = () => { box-sizing: border-box; padding: 0.8rem 1.6rem; - border: 2px solid var(--vp-c-accent); + border: 2px solid var(--vp-c-accent-bg); border-radius: 4px; + background-color: var(--vp-c-bg); + color: var(--vp-c-accent); + font-size: 1.2rem; transition: background-color border-color color var(--vp-t-color); @@ -171,23 +174,18 @@ const HomeHeroImage: FunctionalComponent = () => { font-size: 1rem; } - &.primary { - background-color: var(--vp-c-accent); + &:hover { color: var(--vp-c-accent-text); } - &.secondary { - background-color: var(--vp-c-bg); - color: var(--vp-c-accent); + &.primary { + background-color: var(--vp-c-accent-bg); + color: var(--vp-c-accent-text); &:hover { - color: var(--vp-c-accent-text); + border-color: var(--vp-c-accent-hover); + background-color: var(--vp-c-accent-hover); } } - - &:hover { - border-color: var(--vp-c-accent-hover); - background-color: var(--vp-c-accent-hover); - } } diff --git a/themes/theme-default/src/client/components/global/CodeGroup.ts b/themes/theme-default/src/client/components/global/CodeGroup.ts deleted file mode 100644 index 1cfa95585a..0000000000 --- a/themes/theme-default/src/client/components/global/CodeGroup.ts +++ /dev/null @@ -1,197 +0,0 @@ -import { useStorage } from '@vueuse/core' -import type { Component, SlotsType, VNode } from 'vue' -import { - computed, - defineComponent, - h, - onBeforeUpdate, - onMounted, - ref, - watch, -} from 'vue' -import { useDarkMode } from '../../composables/useDarkMode.js' - -import '../../styles/code-group.scss' - -export const CodeGroup = defineComponent({ - name: 'CodeGroup', - - slots: Object as SlotsType<{ - default?: () => VNode[] - }>, - - setup(_, { slots }) { - // refs of the tab buttons - const tabRefs = ref([]) - - if (__VUEPRESS_DEV__) { - // in dev mode, we need to clear the tabs ref to avoid HMR issues - // after removing a code-group-item - onBeforeUpdate(() => { - tabRefs.value = [] - }) - } - const isDark = useDarkMode() - const groupRef = ref() - // shiki highlighter color & background - onMounted(() => { - if (!groupRef.value) return - - const codeBlock = groupRef.value.querySelector( - 'div[class*="language-"]', - ) - - if (codeBlock && codeBlock.dataset.highlighter === 'shiki') { - const lightColor = codeBlock.style.getPropertyValue('--shiki-light') - const darkColor = codeBlock.style.getPropertyValue('--shiki-dark') - const lightBg = codeBlock.style.getPropertyValue('--shiki-light-bg') - const darkBg = codeBlock.style.getPropertyValue('--shiki-dark-bg') - watch( - isDark, - (val) => { - groupRef.value!.style.setProperty( - '--vp-c-code-tab-bg', - val ? darkBg : lightBg, - ) - groupRef.value!.style.setProperty( - '--vp-c-code-tab-title', - val ? darkColor : lightColor, - ) - }, - { immediate: true }, - ) - } - }) - - // index of current active item - const activeIndex = ref(-1) - const codeGroupStorage = useStorage>( - 'vuepress-code-group', - {}, - ) - const codeGroupKey = computed(() => - tabRefs.value.map((tab) => tab.innerText).join(','), - ) - onMounted(() => { - watch( - () => codeGroupStorage.value[codeGroupKey.value], - (val = -1) => { - if (activeIndex.value !== val) { - activeIndex.value = val - } - }, - { immediate: true }, - ) - watch(activeIndex, (val) => { - if (codeGroupStorage.value[codeGroupKey.value] !== val) { - codeGroupStorage.value[codeGroupKey.value] = val - } - }) - }) - - // activate next tab - const activateNext = (i = activeIndex.value): void => { - if (i < tabRefs.value.length - 1) { - activeIndex.value = i + 1 - } else { - activeIndex.value = 0 - } - tabRefs.value[activeIndex.value].focus() - } - - // activate previous tab - const activatePrev = (i = activeIndex.value): void => { - if (i > 0) { - activeIndex.value = i - 1 - } else { - activeIndex.value = tabRefs.value.length - 1 - } - tabRefs.value[activeIndex.value].focus() - } - - // handle keyboard event - const keyboardHandler = (event: KeyboardEvent, i: number): void => { - if (event.key === ' ' || event.key === 'Enter') { - event.preventDefault() - activeIndex.value = i - } else if (event.key === 'ArrowRight') { - event.preventDefault() - activateNext(i) - } else if (event.key === 'ArrowLeft') { - event.preventDefault() - activatePrev(i) - } - } - - return () => { - // get children code-group-item from default slots - const items = (slots.default?.() ?? []) - .filter((vNode) => (vNode.type as Component).name === 'CodeGroupItem') - .map((vNode) => { - if (vNode.props === null) { - vNode.props = {} - } - return vNode as VNode & { props: Exclude } - }) - - // do not render anything if there is no code-group-item - if (items.length === 0) { - return null - } - - // if activeIndex is invalid - if (activeIndex.value < 0 || activeIndex.value > items.length - 1) { - // find the index of the code-group-item with `active` props - activeIndex.value = items.findIndex( - (vnode) => vnode.props.active === '' || vnode.props.active === true, - ) - - // if there is no `active` props on code-group-item, set the first item active - if (activeIndex.value === -1) { - activeIndex.value = 0 - } - } - // if activeIndex is valid - else { - // set the active item - items.forEach((vnode, i) => { - vnode.props.active = i === activeIndex.value - }) - } - - return h('div', { class: 'code-group', ref: groupRef }, [ - h( - 'div', - { class: 'code-group-nav', role: 'tablist' }, - items.map((vnode, i) => { - const isActive = i === activeIndex.value - return h( - 'button', - { - ref: (element) => { - if (element) { - tabRefs.value[i] = element as HTMLButtonElement - } - }, - class: { - 'code-group-nav-tab': true, - 'active': isActive, - }, - role: 'tab', - ariaSelected: isActive, - onClick: () => { - activeIndex.value = i - }, - onKeydown: (e) => { - keyboardHandler(e, i) - }, - }, - vnode.props.title as string, - ) - }), - ), - items, - ]) - } - }, -}) diff --git a/themes/theme-default/src/client/components/global/CodeGroupItem.vue b/themes/theme-default/src/client/components/global/CodeGroupItem.vue deleted file mode 100644 index 55fddec85c..0000000000 --- a/themes/theme-default/src/client/components/global/CodeGroupItem.vue +++ /dev/null @@ -1,29 +0,0 @@ - - - diff --git a/themes/theme-default/src/client/components/global/index.ts b/themes/theme-default/src/client/components/global/index.ts index 8f86a92009..b77c3b0df8 100644 --- a/themes/theme-default/src/client/components/global/index.ts +++ b/themes/theme-default/src/client/components/global/index.ts @@ -1,5 +1,3 @@ import Badge from './Badge.vue' -import { CodeGroup } from './CodeGroup.js' -import CodeGroupItem from './CodeGroupItem.vue' -export { Badge, CodeGroup, CodeGroupItem } +export { Badge } diff --git a/themes/theme-default/src/client/composables/useRelatedLinks.ts b/themes/theme-default/src/client/composables/useRelatedLinks.ts index 0bf04d42c9..789972a32b 100644 --- a/themes/theme-default/src/client/composables/useRelatedLinks.ts +++ b/themes/theme-default/src/client/composables/useRelatedLinks.ts @@ -12,7 +12,7 @@ import type { SidebarItem } from '../typings.js' import { getAutoLink } from '../utils/index.js' const resolveFromFrontmatterConfig = ( - config: unknown, + config: AutoLinkOptions | string | false | undefined, currentPath: string, ): AutoLinkOptions | false | null => { if (config === false) { @@ -23,7 +23,7 @@ const resolveFromFrontmatterConfig = ( return getAutoLink(config, currentPath) } - if (isPlainObject(config)) { + if (isPlainObject(config)) { return { ...config, link: getAutoLink(config.link, currentPath).link, diff --git a/themes/theme-default/src/client/config.ts b/themes/theme-default/src/client/config.ts index 6d7ae16aaa..d54660b071 100644 --- a/themes/theme-default/src/client/config.ts +++ b/themes/theme-default/src/client/config.ts @@ -3,7 +3,7 @@ import { useScrollPromise } from '@theme/useScrollPromise' import { setupSidebarItems } from '@theme/useSidebarItems' import { hasGlobalComponent } from '@vuepress/helper/client' import { defineClientConfig } from 'vuepress/client' -import { Badge, CodeGroup, CodeGroupItem } from './components/global/index.js' +import { Badge } from './components/global/index.js' import Layout from './layouts/Layout.vue' import NotFound from './layouts/NotFound.vue' @@ -14,9 +14,6 @@ import './styles/index.scss' export default defineClientConfig({ enhance({ app, router }) { if (!hasGlobalComponent('Badge')) app.component('Badge', Badge) - if (!hasGlobalComponent('CodeGroup')) app.component('CodeGroup', CodeGroup) - if (!hasGlobalComponent('CodeGroupItem')) - app.component('CodeGroupItem', CodeGroupItem) // handle scrollBehavior with transition const scrollBehavior = router.options.scrollBehavior! diff --git a/themes/theme-default/src/client/index.ts b/themes/theme-default/src/client/index.ts index 81d998fa4c..ed6f350d23 100644 --- a/themes/theme-default/src/client/index.ts +++ b/themes/theme-default/src/client/index.ts @@ -1,4 +1,4 @@ export * from './composables/index.js' -export * from './typings.js' +export type * from './typings.js' export * from './utils/index.js' export type * from '../shared/index.js' diff --git a/themes/theme-default/src/client/styles/plugins.scss b/themes/theme-default/src/client/styles/plugins.scss index 52e2388755..88bb5af545 100644 --- a/themes/theme-default/src/client/styles/plugins.scss +++ b/themes/theme-default/src/client/styles/plugins.scss @@ -1,4 +1,5 @@ @use 'mixins'; +@import 'variables'; // plugin-comment .vp-comment { @@ -18,3 +19,10 @@ flex: 0 0 auto; } } + +// plugin-markdown-hint +.hint-container { + @media screen and (max-width: $MQMobile) { + margin-inline: -0.75rem; + } +} diff --git a/themes/theme-default/src/node/defaultTheme.ts b/themes/theme-default/src/node/defaultTheme.ts index 53a48ddc83..883264104e 100644 --- a/themes/theme-default/src/node/defaultTheme.ts +++ b/themes/theme-default/src/node/defaultTheme.ts @@ -8,8 +8,8 @@ import { backToTopPlugin } from '@vuepress/plugin-back-to-top' import { copyCodePlugin } from '@vuepress/plugin-copy-code' import { gitPlugin } from '@vuepress/plugin-git' import { linksCheckPlugin } from '@vuepress/plugin-links-check' -import { markdownContainerPlugin } from '@vuepress/plugin-markdown-container' import { markdownHintPlugin } from '@vuepress/plugin-markdown-hint' +import { markdownTabPlugin } from '@vuepress/plugin-markdown-tab' import { mediumZoomPlugin } from '@vuepress/plugin-medium-zoom' import { nprogressPlugin } from '@vuepress/plugin-nprogress' import { palettePlugin } from '@vuepress/plugin-palette' @@ -23,8 +23,8 @@ import { fs, getDirname, path } from 'vuepress/utils' import type { DefaultThemeLocaleOptions, DefaultThemePageData, - DefaultThemePluginsOptions, } from '../shared/index.js' +import type { DefaultThemePluginsOptions } from './typings.js' import { assignDefaultLocaleOptions, resolveMarkdownHintLocales, @@ -125,8 +125,6 @@ export const defaultTheme = ({ // @vuepress/plugin-active-header-link themePlugins.activeHeaderLinks !== false ? activeHeaderLinksPlugin({ - headerLinkSelector: 'a.vp-sidebar-item', - headerAnchorSelector: '.header-anchor', // should greater than page transition duration delay: 300, }) @@ -156,21 +154,6 @@ export const defaultTheme = ({ }) : [], - themePlugins.container?.codeGroup !== false - ? markdownContainerPlugin({ - type: 'code-group', - before: () => `\n`, - after: () => '\n', - }) - : [], - themePlugins.container?.codeGroupItem !== false - ? markdownContainerPlugin({ - type: 'code-group-item', - before: (info) => `\n`, - after: () => '\n', - }) - : [], - // @vuepress/plugin-git themePlugins.git !== false ? gitPlugin({ @@ -228,6 +211,15 @@ export const defaultTheme = ({ }) : [], + // @vuepress/plugin-markdown-tab + themePlugins.tab !== false + ? markdownTabPlugin( + isPlainObject(themePlugins.tab) + ? themePlugins.tab + : { codeTabs: true, tabs: true }, + ) + : [], + // @vuepress/plugin-theme-data themeDataPlugin({ themeData: localeOptions }), ], diff --git a/themes/theme-default/src/node/index.ts b/themes/theme-default/src/node/index.ts index de1b4c9cee..784500a200 100644 --- a/themes/theme-default/src/node/index.ts +++ b/themes/theme-default/src/node/index.ts @@ -1,6 +1,7 @@ import { defaultTheme } from './defaultTheme.js' export * from './defaultTheme.js' +export type * from './typings.js' export * from './utils/index.js' export type * from '../shared/index.js' /** @deprecated Use named export instead */ diff --git a/themes/theme-default/src/node/typings.ts b/themes/theme-default/src/node/typings.ts new file mode 100644 index 0000000000..f59b2e47b3 --- /dev/null +++ b/themes/theme-default/src/node/typings.ts @@ -0,0 +1,70 @@ +import type { BackToTopPluginOptions } from '@vuepress/plugin-back-to-top' +import type { CopyCodePluginOptions } from '@vuepress/plugin-copy-code' +import type { LinksCheckPluginOptions } from '@vuepress/plugin-links-check' +import type { MarkdownHintPluginOptions } from '@vuepress/plugin-markdown-hint' +import type { MarkdownTabPluginOptions } from '@vuepress/plugin-markdown-tab' +import type { PrismjsPluginOptions } from '@vuepress/plugin-prismjs' +import type { SeoPluginOptions } from '@vuepress/plugin-seo' +import type { SitemapPluginOptions } from '@vuepress/plugin-sitemap' + +export interface DefaultThemePluginsOptions { + /** + * Enable @vuepress/plugin-active-header-links or not + */ + activeHeaderLinks?: boolean + + /** + * Enable @vuepress/plugin-back-to-top or not + */ + backToTop?: BackToTopPluginOptions | boolean + + /** + * Enable @vuepress/plugin-copy-code or not + */ + copyCode?: CopyCodePluginOptions | boolean + + /** + * Enable @vuepress/plugin-git or not + */ + git?: boolean + + /** + * Enable @vuepress/plugin-markdown-hint or not + */ + hint?: MarkdownHintPluginOptions | boolean + + /** + * Enable @vuepress/plugin-links-check or not + */ + linksCheck?: LinksCheckPluginOptions | boolean + + /** + * Enable @vuepress/plugin-medium-zoom or not + */ + mediumZoom?: boolean + + /** + * Enable @vuepress/plugin-nprogress or not + */ + nprogress?: boolean + + /** + * Enable @vuepress/plugin-prismjs or not + */ + prismjs?: PrismjsPluginOptions | boolean + + /** + * Enable @vuepress/plugin-seo or not + */ + seo?: Partial | boolean + + /** + * Enable @vuepress/plugin-sitemap or not + */ + sitemap?: Partial | boolean + + /** + * Enable @vuepress/plugin-markdown-tab or not + */ + tab?: MarkdownTabPluginOptions | boolean +} diff --git a/themes/theme-default/src/shared/index.ts b/themes/theme-default/src/shared/index.ts index cd01bb2685..f323b75f9e 100644 --- a/themes/theme-default/src/shared/index.ts +++ b/themes/theme-default/src/shared/index.ts @@ -1,5 +1,5 @@ -export * from './nav.js' -export * from './navbar.js' -export * from './options.js' -export * from './page.js' -export * from './sidebar.js' +export type * from './nav.js' +export type * from './navbar.js' +export type * from './options.js' +export type * from './page.js' +export type * from './sidebar.js' diff --git a/themes/theme-default/src/shared/options.ts b/themes/theme-default/src/shared/options.ts index b385bce626..3e591afee7 100644 --- a/themes/theme-default/src/shared/options.ts +++ b/themes/theme-default/src/shared/options.ts @@ -1,77 +1,8 @@ -import type { BackToTopPluginOptions } from '@vuepress/plugin-back-to-top' -import type { CopyCodePluginOptions } from '@vuepress/plugin-copy-code' -import type { LinksCheckPluginOptions } from '@vuepress/plugin-links-check' -import type { MarkdownHintPluginOptions } from '@vuepress/plugin-markdown-hint' -import type { PrismjsPluginOptions } from '@vuepress/plugin-prismjs' -import type { SeoPluginOptions } from '@vuepress/plugin-seo' -import type { SitemapPluginOptions } from '@vuepress/plugin-sitemap' import type { ThemeData } from '@vuepress/plugin-theme-data' import type { LocaleData } from 'vuepress/shared' import type { NavbarOptions } from './navbar.js' import type { SidebarOptions } from './sidebar.js' -export interface DefaultThemePluginsOptions { - /** - * Enable @vuepress/plugin-active-header-links or not - */ - activeHeaderLinks?: boolean - - /** - * Enable @vuepress/plugin-back-to-top or not - */ - backToTop?: BackToTopPluginOptions | boolean - - /** - * Enable @vuepress/plugin-markdown-container or not - */ - container?: { - codeGroup?: boolean - codeGroupItem?: boolean - } - - /** - * Enable @vuepress/plugin-copy-code or not - */ - copyCode?: CopyCodePluginOptions | boolean - - /** - * Enable @vuepress/plugin-git or not - */ - git?: boolean - - hint?: MarkdownHintPluginOptions | boolean - - /** - * Enable @vuepress/plugin-links-check or not - */ - linksCheck?: LinksCheckPluginOptions | boolean - - /** - * Enable @vuepress/plugin-medium-zoom or not - */ - mediumZoom?: boolean - - /** - * Enable @vuepress/plugin-nprogress or not - */ - nprogress?: boolean - - /** - * Enable @vuepress/plugin-prismjs or not - */ - prismjs?: PrismjsPluginOptions | boolean - - /** - * Enable @vuepress/plugin-seo or not - */ - seo?: Partial | boolean - - /** - * Enable @vuepress/plugin-sitemap or not - */ - sitemap?: Partial | boolean -} - export type DefaultThemeLocaleOptions = DefaultThemeData export type DefaultThemeData = ThemeData diff --git a/themes/theme-default/src/shared/page.ts b/themes/theme-default/src/shared/page.ts index a8e09c013d..aaed5839ca 100644 --- a/themes/theme-default/src/shared/page.ts +++ b/themes/theme-default/src/shared/page.ts @@ -1,12 +1,13 @@ import type { GitPluginPageData } from '@vuepress/plugin-git' -import type { AutoLinkConfig } from 'vuepress/client' +import type { PageFrontmatter } from 'vuepress/shared' +import type { AutoLinkOptions } from './nav.js' import type { SidebarArrayOptions } from './sidebar.js' export interface DefaultThemePageData extends Partial { filePathRelative: string | null } -export interface DefaultThemePageFrontmatter { +export interface DefaultThemePageFrontmatter extends PageFrontmatter { home?: boolean navbar?: boolean pageClass?: string @@ -44,6 +45,6 @@ export interface DefaultThemeNormalPageFrontmatter contributors?: boolean sidebar?: SidebarArrayOptions | 'heading' | false sidebarDepth?: number - prev?: AutoLinkConfig | string - next?: AutoLinkConfig | string + prev?: AutoLinkOptions | string + next?: AutoLinkOptions | string } diff --git a/tools/create-vuepress/CHANGELOG.md b/tools/create-vuepress/CHANGELOG.md index 91aaf03640..add563dfa6 100644 --- a/tools/create-vuepress/CHANGELOG.md +++ b/tools/create-vuepress/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.49](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.48...v2.0.0-rc.49) (2024-09-23) + +**Note:** Version bump only for package create-vuepress + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package create-vuepress + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) **Note:** Version bump only for package create-vuepress diff --git a/tools/create-vuepress/package.json b/tools/create-vuepress/package.json index 4c34ca43e3..63be8a8c9f 100644 --- a/tools/create-vuepress/package.json +++ b/tools/create-vuepress/package.json @@ -1,6 +1,6 @@ { "name": "create-vuepress", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress template helper", "keywords": [ "vuepress", @@ -38,6 +38,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { diff --git a/tools/create-vuepress/rollup.config.ts b/tools/create-vuepress/rollup.config.ts new file mode 100644 index 0000000000..201287a998 --- /dev/null +++ b/tools/create-vuepress/rollup.config.ts @@ -0,0 +1,6 @@ +import { rollupBundle } from '../../scripts/rollup.js' + +export default rollupBundle('index', { + external: [/^node:/, '@inquirer/prompts', 'cac', 'execa'], + dts: false, +}) diff --git a/tools/create-vuepress/src/flow/createPackageJson.ts b/tools/create-vuepress/src/flow/createPackageJson.ts index d73936fdaf..b269f8ef43 100644 --- a/tools/create-vuepress/src/flow/createPackageJson.ts +++ b/tools/create-vuepress/src/flow/createPackageJson.ts @@ -31,10 +31,10 @@ export const createPackageJson = async ({ }: CreatePackageJsonOptions): Promise => { const packageJsonPath = join(targetDir, 'package.json') const devDependencies = { - [`@vuepress/bundler-${bundler}`]: '2.0.0-rc.15', + [`@vuepress/bundler-${bundler}`]: '2.0.0-rc.17', '@vuepress/theme-default': peerDependencies['@vuepress/theme-default'], - 'vue': '^3.5.7', - 'vuepress': '2.0.0-rc.15', + 'vue': '^3.5.10', + 'vuepress': '2.0.0-rc.17', } if (preset === 'blog') { diff --git a/tools/create-vuepress/src/i18n/index.ts b/tools/create-vuepress/src/i18n/index.ts index 3931edd96c..5c5facf292 100644 --- a/tools/create-vuepress/src/i18n/index.ts +++ b/tools/create-vuepress/src/i18n/index.ts @@ -3,7 +3,7 @@ import { en } from './en.js' import type { CreateLocaleOptions, Lang } from './typings.js' import { zh } from './zh.js' -export * from './typings.js' +export type * from './typings.js' const i18n: Record = { en, diff --git a/tools/helper/CHANGELOG.md b/tools/helper/CHANGELOG.md index d036c97721..9bf2050eb8 100644 --- a/tools/helper/CHANGELOG.md +++ b/tools/helper/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- **helper:** improve header anchor normalize ([ef2c444](https://github.com/vuepress/ecosystem/commit/ef2c444dd432b89dd49655e11bd678f3d73400bd)) +- **helper:** sync mergeViteConfig with vite ([6e17c80](https://github.com/vuepress/ecosystem/commit/6e17c809daf6cd5f633051fbd29b1988e14e82df)) +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + +# [2.0.0-rc.47](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.46...v2.0.0-rc.47) (2024-09-22) + +**Note:** Version bump only for package @vuepress/helper + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Features diff --git a/tools/helper/package.json b/tools/helper/package.json index d0d51fd0d3..d35914a2b1 100644 --- a/tools/helper/package.json +++ b/tools/helper/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/helper", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress helper", "keywords": [ "vuepress", @@ -27,7 +27,6 @@ "exports": { ".": "./lib/node/index.js", "./client": "./lib/client/index.js", - "./client/*": "./lib/client/*", "./shared": "./lib/shared/index.js", "./noopComponent": "./lib/client/noopComponent.js", "./noopModule": "./lib/client/noopModule.js", @@ -42,27 +41,28 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, "dependencies": { - "@vue/shared": "^3.5.7", + "@vue/shared": "^3.5.10", "@vueuse/core": "^11.1.0", "cheerio": "1.0.0", "fflate": "^0.8.2", "gray-matter": "^4.0.3", - "vue": "^3.5.7" + "vue": "^3.5.10" }, "devDependencies": { "@types/connect": "3.4.38", - "@vuepress/bundler-vite": "2.0.0-rc.15", - "@vuepress/bundler-webpack": "2.0.0-rc.15", + "@vuepress/bundler-vite": "2.0.0-rc.17", + "@vuepress/bundler-webpack": "2.0.0-rc.17", "@vuepress/plugin-git": "workspace:*", "domhandler": "5.0.3", - "vite": "~5.4.6" + "vite": "~5.4.8" }, "peerDependencies": { - "vuepress": "2.0.0-rc.15" + "vuepress": "2.0.0-rc.17" }, "publishConfig": { "access": "public" diff --git a/tools/helper/rollup.config.ts b/tools/helper/rollup.config.ts new file mode 100644 index 0000000000..431a13dc15 --- /dev/null +++ b/tools/helper/rollup.config.ts @@ -0,0 +1,20 @@ +import { rollupBundle } from '../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index', { + external: ['@vue/shared', 'cheerio', 'fflate/node', 'gray-matter'], + }), + ...rollupBundle( + { + base: 'client', + files: ['noopComponent', 'noopModule', 'index'], + }, + { + external: ['fflate/browser'], + }, + ), + ...rollupBundle('shared/index', { + external: ['vuepress/shared'], + dtsExternal: ['vuepress/shared'], + }), +] diff --git a/tools/helper/src/client/components/LoadingIcon.ts b/tools/helper/src/client/components/LoadingIcon.ts index 272b044568..c2522f3f64 100644 --- a/tools/helper/src/client/components/LoadingIcon.ts +++ b/tools/helper/src/client/components/LoadingIcon.ts @@ -1,6 +1,9 @@ import type { FunctionalComponent, VNode } from 'vue' import { h } from 'vue' +/** + * Loading icon + */ export const LoadingIcon: FunctionalComponent<{ size?: number stroke?: number diff --git a/tools/helper/src/client/composables/useDarkmode.ts b/tools/helper/src/client/composables/useDarkmode.ts index 2cfd964329..04b02a64c3 100644 --- a/tools/helper/src/client/composables/useDarkmode.ts +++ b/tools/helper/src/client/composables/useDarkmode.ts @@ -28,6 +28,11 @@ const _useDarkmode = (): Readonly> => { return readonly(isDarkmode) } +/** + * Get darkmode status + * + * @returns readonly darkmode ref + */ // eslint-disable-next-line no-return-assign export const useDarkmode = (): Readonly> => (darkmode ??= _useDarkmode()) diff --git a/tools/helper/src/client/composables/useRoutePaths.ts b/tools/helper/src/client/composables/useRoutePaths.ts index 637085f01a..2e3b0369d1 100644 --- a/tools/helper/src/client/composables/useRoutePaths.ts +++ b/tools/helper/src/client/composables/useRoutePaths.ts @@ -2,6 +2,9 @@ import type { ComputedRef } from 'vue' import { computed } from 'vue' import { useRoutes } from 'vuepress/client' +/** + * get all route paths + */ export const useRoutePaths = (): ComputedRef => { const routes = useRoutes() diff --git a/tools/helper/src/client/noopComponent.ts b/tools/helper/src/client/noopComponent.ts index 3dcfcc7720..ac369d7699 100644 --- a/tools/helper/src/client/noopComponent.ts +++ b/tools/helper/src/client/noopComponent.ts @@ -1,5 +1,8 @@ import type { FunctionalComponent } from 'vue' +/** + * A noop component that renders nothing + */ const noopComponent: FunctionalComponent = () => null export default noopComponent diff --git a/tools/helper/src/client/noopModule.ts b/tools/helper/src/client/noopModule.ts index b1c6ea436a..ba7b5c207b 100644 --- a/tools/helper/src/client/noopModule.ts +++ b/tools/helper/src/client/noopModule.ts @@ -1 +1,4 @@ +/** + * Noop module + */ export default {} diff --git a/tools/helper/src/client/styles/normalize.scss b/tools/helper/src/client/styles/normalize.scss index c188414013..816a36f4d2 100644 --- a/tools/helper/src/client/styles/normalize.scss +++ b/tools/helper/src/client/styles/normalize.scss @@ -112,30 +112,33 @@ a { color: inherit; text-decoration: none; - &:hover { - &::before { - content: '¶'; + &::before { + content: '¶'; + + position: absolute; + top: 0.4167em; + left: -0.75em; - position: absolute; - top: 0.4167em; - left: -0.75em; + display: none; - color: var(--vp-c-accent, #299764); + color: var(--vp-c-accent, #299764); - font-size: 0.75em; + font-size: 0.75em; + + [dir='rtl'] & { + right: -0.75em; } } + &:hover::before { + display: block; + } + &:focus-visible { outline: none; &::before { - content: '¶'; - - position: absolute; - left: -0.75em; - - color: var(--vp-c-accent, #299764); + display: block; outline: auto; } } diff --git a/tools/helper/src/client/utils/data.ts b/tools/helper/src/client/utils/data.ts index 54515702e8..4866340905 100644 --- a/tools/helper/src/client/utils/data.ts +++ b/tools/helper/src/client/utils/data.ts @@ -3,6 +3,9 @@ import { strFromU8, strToU8, unzlibSync, zlibSync } from 'fflate/browser' declare const __VUEPRESS_SSR__: boolean +/** + * Encode and compress data + */ export const encodeData = ( data: string, level: DeflateOptions['level'] = 6, @@ -17,6 +20,9 @@ export const encodeData = ( : btoa(binary) } +/** + * Decode and unzip data + */ export const decodeData = (base64: string): string => { const binary = __VUEPRESS_SSR__ ? Buffer.from(base64, 'base64').toString('binary') diff --git a/tools/helper/src/client/utils/getDarkmode.ts b/tools/helper/src/client/utils/getDarkmode.ts index e7a9ec31e6..0fc1821a57 100644 --- a/tools/helper/src/client/utils/getDarkmode.ts +++ b/tools/helper/src/client/utils/getDarkmode.ts @@ -1,2 +1,7 @@ +/** + * Get darkmode status from DOM + * + * @returns darkmode status + */ export const getDarkmode = (): boolean => document.documentElement.getAttribute('data-theme') === 'dark' diff --git a/tools/helper/src/client/utils/getHeaders.ts b/tools/helper/src/client/utils/getHeaders.ts index 3dea500e27..439e26b6d0 100644 --- a/tools/helper/src/client/utils/getHeaders.ts +++ b/tools/helper/src/client/utils/getHeaders.ts @@ -125,6 +125,9 @@ export interface GetHeadersOptions { levels?: HeaderLevels } +/** + * Get headers of current page. + */ export const getHeaders = ({ selector = [...new Array(6)] .map((_, i) => `[vp-content] h${i + 1}`) diff --git a/tools/helper/src/client/utils/hasGlobalComponent.ts b/tools/helper/src/client/utils/hasGlobalComponent.ts index 84fa6c1f33..7455800d8e 100644 --- a/tools/helper/src/client/utils/hasGlobalComponent.ts +++ b/tools/helper/src/client/utils/hasGlobalComponent.ts @@ -1,6 +1,13 @@ import type { App } from 'vue' import { camelize, capitalize, getCurrentInstance } from 'vue' +/** + * Check if a global component with the given name exists + * + * @param name component name + * @param app Vue app instance + * @returns whether the global component with the given name exists + */ export const hasGlobalComponent = (name: string, app?: App): boolean => { const globalComponents = (app?._instance ?? getCurrentInstance())?.appContext .components diff --git a/tools/helper/src/client/utils/wait.ts b/tools/helper/src/client/utils/wait.ts index dc57c9ee78..ae9682375e 100644 --- a/tools/helper/src/client/utils/wait.ts +++ b/tools/helper/src/client/utils/wait.ts @@ -1,3 +1,9 @@ +/** + * Wait for a given time + * + * @param ms wait time in milliseconds + * @returns a promise that resolves after the given time + */ export const wait = (ms: number): Promise => new Promise((resolve) => { setTimeout(resolve, ms) diff --git a/tools/helper/src/node/bundler/customizeDevServer.ts b/tools/helper/src/node/bundler/customizeDevServer.ts index cc9087a8cc..2d14e72e94 100644 --- a/tools/helper/src/node/bundler/customizeDevServer.ts +++ b/tools/helper/src/node/bundler/customizeDevServer.ts @@ -11,13 +11,16 @@ import { removeLeadingSlash } from 'vuepress/shared' import { getBundlerName } from './getBundlerName.js' import { mergeViteConfig } from './vite/index.js' +/** + * Options for customizing VuePress Dev Server + */ export interface DevServerOptions { /** * Path to be responded */ path: string /** - * Respond function + * Respond handler */ response: ( request: IncomingMessage, @@ -33,7 +36,7 @@ export interface DevServerOptions { /** * Handle specific path when running VuePress Dev Server * - * @param config VuePress Bundler config + * @param bundlerOptions VuePress Bundler config * @param app VuePress Node App * @param path Path to be responded * @param response respond function diff --git a/tools/helper/src/node/bundler/getBundlerName.ts b/tools/helper/src/node/bundler/getBundlerName.ts index b45691bf4e..d20ecb8c91 100644 --- a/tools/helper/src/node/bundler/getBundlerName.ts +++ b/tools/helper/src/node/bundler/getBundlerName.ts @@ -1,5 +1,10 @@ import type { App } from 'vuepress/core' +/** + * Get current bundler name + * + * @param app VuePress Node App + */ export const getBundlerName = (app: App): string => { const { name } = app.options.bundler diff --git a/tools/helper/src/node/bundler/index.ts b/tools/helper/src/node/bundler/index.ts index c2eb5c429e..1769ac0e09 100644 --- a/tools/helper/src/node/bundler/index.ts +++ b/tools/helper/src/node/bundler/index.ts @@ -2,4 +2,4 @@ export * from './addCustomElement.js' export * from './customizeDevServer.js' export * from './getBundlerName.js' export * from './vite/index.js' -export * from './webpack.js' +export * from './webpack/index.js' diff --git a/tools/helper/src/node/bundler/vite/mergeViteConfig.ts b/tools/helper/src/node/bundler/vite/mergeViteConfig.ts index 242d1b4791..943337e941 100644 --- a/tools/helper/src/node/bundler/vite/mergeViteConfig.ts +++ b/tools/helper/src/node/bundler/vite/mergeViteConfig.ts @@ -94,22 +94,24 @@ const normalizeSingleAlias = ({ replacement, } - if (customResolver) alias.customResolver = customResolver + if (customResolver) { + alias.customResolver = customResolver + } return alias } -const normalizeAlias = (aliasOption: AliasOptions): Alias[] => +const normalizeAlias = (aliasOption: AliasOptions = []): Alias[] => isArray(aliasOption) ? aliasOption.map(normalizeSingleAlias) : keys(aliasOption).map((find) => normalizeSingleAlias({ find, - replacement: (aliasOption as Record)[find], + replacement: aliasOption[find], }), ) -export const mergeAlias = ( +const mergeAlias = ( defaults?: AliasOptions, overrides?: AliasOptions, ): AliasOptions | undefined => { @@ -124,17 +126,30 @@ export const mergeAlias = ( return [...normalizeAlias(overrides), ...normalizeAlias(defaults)] } +const backwardCompatibleWorkerPlugins = (plugins: any): any[] => { + if (Array.isArray(plugins)) { + return plugins + } + + if (typeof plugins === 'function') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-call + return plugins() as any[] + } + + return [] +} + const mergeConfigRecursively = ( - defaults: Record, + { ...merged }: Record, overrides: Record, rootPath: string, ): Record => { - const merged: Record = { ...defaults } - for (const key in overrides) { const value = overrides[key] - if (value == null) continue + if (value == null) { + continue + } const existing = merged[key] @@ -152,17 +167,28 @@ const mergeConfigRecursively = ( continue } else if ( key === 'noExternal' && - rootPath === 'ssr' && + (rootPath === 'ssr' || rootPath === 'resolve') && (existing === true || value === true) ) { merged[key] = true continue + } else if (key === 'plugins' && rootPath === 'worker') { + // eslint-disable-next-line @typescript-eslint/no-unsafe-return + merged[key] = () => [ + ...backwardCompatibleWorkerPlugins(existing), + ...backwardCompatibleWorkerPlugins(value), + ] + continue + } else if (key === 'server' && rootPath === 'server.hmr') { + merged[key] = value + continue } if (isArray(existing) || isArray(value)) { merged[key] = [...arraify(existing), ...arraify(value)] continue } + if (isObject(existing) && isObject(value)) { merged[key] = mergeConfigRecursively( existing, diff --git a/tools/helper/src/node/bundler/webpack/chainWebpack.ts b/tools/helper/src/node/bundler/webpack/chainWebpack.ts new file mode 100644 index 0000000000..4cd4d9ee96 --- /dev/null +++ b/tools/helper/src/node/bundler/webpack/chainWebpack.ts @@ -0,0 +1,33 @@ +import type { + WebpackBundlerOptions, + WebpackChainConfig, +} from '@vuepress/bundler-webpack' +import type { App } from 'vuepress/core' +import { getBundlerName } from '../getBundlerName.js' + +/** + * Chain webpack + * + * @param bundlerOptions VuePress Bundler config + * @param app VuePress Node App + * @param chain chain function + */ +export const chainWebpack = ( + bundlerOptions: unknown, + app: App, + chain: ( + config: WebpackChainConfig, + isServer: boolean, + isBuild: boolean, + ) => void, +): void => { + if (getBundlerName(app) === 'webpack') { + const webpackBundlerOptions = bundlerOptions as WebpackBundlerOptions + const { chainWebpack: originalChainWebpack } = webpackBundlerOptions + + webpackBundlerOptions.chainWebpack = (config, isServer, isBuild): void => { + originalChainWebpack?.(config, isServer, isBuild) + chain(config, isServer, isBuild) + } + } +} diff --git a/tools/helper/src/node/bundler/webpack.ts b/tools/helper/src/node/bundler/webpack/configWebpack.ts similarity index 56% rename from tools/helper/src/node/bundler/webpack.ts rename to tools/helper/src/node/bundler/webpack/configWebpack.ts index 12fc3d385a..a18a816a26 100644 --- a/tools/helper/src/node/bundler/webpack.ts +++ b/tools/helper/src/node/bundler/webpack/configWebpack.ts @@ -1,31 +1,17 @@ import type { WebpackBundlerOptions, - WebpackChainConfig, WebpackConfiguration, } from '@vuepress/bundler-webpack' import type { App } from 'vuepress/core' -import { getBundlerName } from './getBundlerName.js' - -export const chainWebpack = ( - bundlerOptions: unknown, - app: App, - chain: ( - config: WebpackChainConfig, - isServer: boolean, - isBuild: boolean, - ) => void, -): void => { - if (getBundlerName(app) === 'webpack') { - const webpackBundlerOptions = bundlerOptions as WebpackBundlerOptions - const { chainWebpack: originalChainWebpack } = webpackBundlerOptions - - webpackBundlerOptions.chainWebpack = (config, isServer, isBuild): void => { - originalChainWebpack?.(config, isServer, isBuild) - chain(config, isServer, isBuild) - } - } -} +import { getBundlerName } from '../getBundlerName.js' +/** + * Configure webpack options + * + * @param bundlerOptions VuePress Bundler config + * @param app VuePress Node App + * @param configureWebpack function to configure webpack + */ export const configWebpack = ( bundlerOptions: unknown, app: App, diff --git a/tools/helper/src/node/bundler/webpack/index.ts b/tools/helper/src/node/bundler/webpack/index.ts new file mode 100644 index 0000000000..39edab0997 --- /dev/null +++ b/tools/helper/src/node/bundler/webpack/index.ts @@ -0,0 +1,2 @@ +export * from './chainWebpack.js' +export * from './configWebpack.js' diff --git a/tools/helper/src/node/locales/helpers.ts b/tools/helper/src/node/locales/helpers.ts index 9cbed0f10d..87ddf0d155 100644 --- a/tools/helper/src/node/locales/helpers.ts +++ b/tools/helper/src/node/locales/helpers.ts @@ -6,21 +6,24 @@ import { Logger } from '../utils/index.js' import { lang2PathConfig, path2langConfig } from './config.js' import type { KnownLangCode } from './types.js' -/** Get language from path */ -export const path2Lang = (path = '', debug = false): KnownLangCode => { - if (path in path2langConfig) return path2langConfig[path] +/** Infer language from locale path */ +export const inferLocaleLang = ( + localePath = '', + debug = false, +): KnownLangCode => { + if (localePath in path2langConfig) return path2langConfig[localePath] if (debug) // eslint-disable-next-line no-console console.warn( - `${path} isn’t assign with a lang, and will return "en-US" instead.`, + `${localePath} isn’t assign with a lang, and will return "en-US" instead.`, ) return 'en-US' } -/** Get path from language */ -export const lang2Path = (lang = '', debug = false): string => { +/** Infer locale path from language */ +export const inferLocalePath = (lang = '', debug = false): string => { if (lang in lang2PathConfig) return lang2PathConfig[lang as KnownLangCode] if (debug) @@ -47,13 +50,13 @@ export const getRootLang = (app: App): string => { } /** - * Get the infer language path from root directory language + * Infer language path from root directory language * * @param app VuePress Node App - * @returns infer language + * @returns inferred locale path of root directory */ export const getRootLangPath = (app: App): string => - lang2Path(getRootLang(app), app.env.isDebug) + inferLocalePath(getRootLang(app), app.env.isDebug) /** * Get locale paths @@ -96,10 +99,10 @@ export const getLocaleConfig = ({ const defaultLocaleData = // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition defaultLocalesConfig[localePath] || - (lang2Path(app.options.locales[localePath].lang) === '/' + (inferLocalePath(app.options.locales[localePath].lang) === '/' ? null : defaultLocalesConfig[ - lang2Path(app.options.locales[localePath].lang) + inferLocalePath(app.options.locales[localePath].lang) ]) // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition diff --git a/tools/helper/src/node/locales/index.ts b/tools/helper/src/node/locales/index.ts index 71b3d845de..eec0c2f47f 100644 --- a/tools/helper/src/node/locales/index.ts +++ b/tools/helper/src/node/locales/index.ts @@ -1,2 +1,2 @@ export * from './helpers.js' -export * from './types.js' +export type * from './types.js' diff --git a/tools/helper/src/node/page/excerpt.ts b/tools/helper/src/node/page/excerpt.ts index 41bce148e9..9ff7c16647 100644 --- a/tools/helper/src/node/page/excerpt.ts +++ b/tools/helper/src/node/page/excerpt.ts @@ -9,59 +9,6 @@ import { isArray, isLinkAbsolute, startsWith } from '../../shared/index.js' const HEADING_TAGS = ['h1', 'h2', 'h3', 'h4', 'h5', 'h6'] -export interface PageExcerptOptions { - /** - * Excerpt separator - * - * 摘要分隔符 - * - * @default "" - */ - separator?: string - - /** - * Length of excerpt - * - * @description Excerpt length will be the minimal possible length reaching this value - * - * 摘要的长度 - * - * @description 摘要的长度会尽可能的接近这个值 - * - * @default 300 - */ - length?: number - - /** - * Tags which is considered as custom elements - * - * @description This is used to determine whether a tag is a custom element since all unknown tags are removed in excerpt. - * - * 被认为是自定义元素的标签 - * - * @description 用于判断一个标签是否是自定义元素,因为在摘要中,所有的未知标签都会被移除。 - */ - isCustomElement?: (tagName: string) => boolean - - /** - * Whether keep page title (first h1) in excerpt - * - * 是否保留页面标题 (第一个 h1) - * - * @default false - */ - keepPageTitle?: boolean - - /** - * Whether preserve tags like line numbers and highlight lines for code blocks - * - * 是否保留代码块的标签,诸如行号和高亮行 - * - * @default false - */ - keepFenceDom?: boolean -} - interface NodeOptions extends Required< Pick @@ -198,6 +145,13 @@ const $ = load('') const isH1Tag = (node: AnyNode): boolean => node.type === 'tag' && node.tagName === 'h1' +/** + * Get raw content of excerpt from page content + * + * @param content raw content of page + * @param separator excerpt separator + * @returns raw content of excerpt + */ export const getPageExcerptContent = ( content: string, separator = '', @@ -207,6 +161,70 @@ export const getPageExcerptContent = ( excerpt_separator: separator, }).excerpt +/** + * Options for `getPageExcerpt` + */ +export interface PageExcerptOptions { + /** + * Excerpt separator + * + * 摘要分隔符 + * + * @default "" + */ + separator?: string + + /** + * Length of excerpt + * + * @description Excerpt length will be the minimal possible length reaching this value + * + * 摘要的长度 + * + * @description 摘要的长度会尽可能的接近这个值 + * + * @default 300 + */ + length?: number + + /** + * Tags which is considered as custom elements + * + * @description This is used to determine whether a tag is a custom element since all unknown tags are removed in excerpt. + * + * 被认为是自定义元素的标签 + * + * @description 用于判断一个标签是否是自定义元素,因为在摘要中,所有的未知标签都会被移除。 + */ + isCustomElement?: (tagName: string) => boolean + + /** + * Whether keep page title (first h1) in excerpt + * + * 是否保留页面标题 (第一个 h1) + * + * @default false + */ + keepPageTitle?: boolean + + /** + * Whether preserve tags like line numbers and highlight lines for code blocks + * + * 是否保留代码块的标签,诸如行号和高亮行 + * + * @default false + */ + keepFenceDom?: boolean +} + +/** + * Get excerpt content of a page + * + * @param app VuePress App + * @param page VuePress Page + * @param excerptOptions excerpt behavior options + * @returns page excerpt + */ export const getPageExcerpt = ( { markdown, options: { base } }: App, { content, contentRendered, filePath, filePathRelative, frontmatter }: Page, diff --git a/tools/helper/src/node/page/text.ts b/tools/helper/src/node/page/text.ts index 0ea56c99af..38f3cefbed 100644 --- a/tools/helper/src/node/page/text.ts +++ b/tools/helper/src/node/page/text.ts @@ -135,8 +135,15 @@ export interface PageTextOptions { removedTags?: string[] } +/** + * Get plain text from html content + * + * @param html html content + * @param base base url of site + * @param options options for getting text + */ export const getText = ( - content: string, + html: string, base: string, { length = 300, @@ -145,7 +152,7 @@ export const getText = ( }: PageTextOptions = {}, ): string => { let result = '' - const rootNodes = content ? $.parseHTML(content) : [] + const rootNodes = html ? $.parseHTML(html) : [] for (const node of rootNodes) { const text = handleNode(node, { base, removedTags }) @@ -160,8 +167,19 @@ export const getText = ( ).trim() } +/** + * Get plain text of page content + * + * @param app VuePress App + * @param page VuePress Page + * @param options options for getting text + * @returns plain text of page content + */ export const getPageText = ( { options: { base } }: App, - { contentRendered }: Page, + { + contentRendered, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + }: Page, Record, Record>, options: PageTextOptions = {}, ): string => getText(contentRendered, base, options) diff --git a/tools/helper/src/node/utils/getInstalledStatus.ts b/tools/helper/src/node/utils/getInstalledStatus.ts index 91d57702c6..e81abce592 100644 --- a/tools/helper/src/node/utils/getInstalledStatus.ts +++ b/tools/helper/src/node/utils/getInstalledStatus.ts @@ -1,5 +1,8 @@ import { createRequire } from 'node:module' +/** + * Check if a peer package is available + */ export const getInstalledStatus = ( pkg: string, currentUrl: string, diff --git a/tools/helper/src/node/utils/getRealPath.ts b/tools/helper/src/node/utils/getRealPath.ts index b04c0a1155..df4fa1a197 100644 --- a/tools/helper/src/node/utils/getRealPath.ts +++ b/tools/helper/src/node/utils/getRealPath.ts @@ -1,8 +1,11 @@ import { createRequire } from 'node:module' import { path } from 'vuepress/utils' -export const getRealPath = (fileUrl: string, currentUrl: string): string => { +/** + * Get file path of a given module url + */ +export const getRealPath = (module: string, currentUrl: string): string => { const require = createRequire(currentUrl) - return path.normalize(require.resolve(fileUrl)) + return path.normalize(require.resolve(module)) } diff --git a/tools/helper/src/shared/date.ts b/tools/helper/src/shared/date.ts index 0b03935bd8..1c0f2bb043 100644 --- a/tools/helper/src/shared/date.ts +++ b/tools/helper/src/shared/date.ts @@ -1,7 +1,7 @@ /** - * Get Date info from user input, return null when input is invalid + * Get Date info from user input * - * 从用户输入中获取日期信息,输入无效时返回 null + * @description return `null` when input is invalid */ export const getDate = (input: unknown): Date | null => { if (input) { @@ -19,11 +19,7 @@ export const getDate = (input: unknown): Date | null => { /** * Date sorter from latest to oldest * - * @description Invalid date will appear at last - * - * 最新到最旧的日期排序器 - * - * @description 无效日期将出现在最后 + * @description Inputs that are invalid date will appear at last */ export const dateSorter = ( valueA: Date | number | string | undefined, diff --git a/tools/helper/src/shared/deepAssign.ts b/tools/helper/src/shared/deepAssign.ts index 1f694cf3ef..7cc16be627 100644 --- a/tools/helper/src/shared/deepAssign.ts +++ b/tools/helper/src/shared/deepAssign.ts @@ -3,7 +3,9 @@ import { entries, isArray, isPlainObject } from './helper.js' // eslint-disable-next-line @typescript-eslint/no-explicit-any type IAnyObject = Record -/** Deep merge objects to the first one */ +/** + * Deep merge objects to the first one + */ export const deepAssign = < T extends IAnyObject, U extends IAnyObject = T, diff --git a/tools/helper/src/shared/helper.ts b/tools/helper/src/shared/helper.ts index 45becb9ab1..f7cd6694e7 100644 --- a/tools/helper/src/shared/helper.ts +++ b/tools/helper/src/shared/helper.ts @@ -3,19 +3,46 @@ import { isString } from 'vuepress/shared' export { isFunction, isString, isPlainObject } from 'vuepress/shared' /* Type helper */ + +/** + * Check if a value is defined + */ // eslint-disable-next-line @typescript-eslint/no-explicit-any export const isDef = (val?: T): val is T => typeof val !== 'undefined' + +/** + * Check if a value is boolean + */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any export const isBoolean = (val: any): val is boolean => typeof val === 'boolean' + +/** + * Check if a value is number + */ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any export const isNumber = (val: any): val is number => typeof val === 'number' + +/** + * Check if a value is array + */ export const { isArray } = Array + +/** + * Check if a value is regexp + */ export const isRegExp = (val: unknown): val is RegExp => val instanceof RegExp /* String helper */ + +/** + * Check if a value is starting with the given prefix + */ export const startsWith = (str: unknown, prefix: string): boolean => isString(str) && str.startsWith(prefix) +/** + * Check if a value is ending with the given suffix + */ export const endsWith = (str: unknown, suffix: string): boolean => isString(str) && str.endsWith(suffix) diff --git a/tools/helper/src/shared/index.ts b/tools/helper/src/shared/index.ts index 0051efa207..ccdfab03a0 100644 --- a/tools/helper/src/shared/index.ts +++ b/tools/helper/src/shared/index.ts @@ -1,5 +1,5 @@ export * from './deepAssign.js' export * from './date.js' export * from './helper.js' -export * from './locales.js' +export type * from './locales.js' export * from './link.js' diff --git a/tools/helper/src/shared/link.ts b/tools/helper/src/shared/link.ts index c641bf2f56..c0fe9b0022 100644 --- a/tools/helper/src/shared/link.ts +++ b/tools/helper/src/shared/link.ts @@ -3,6 +3,6 @@ import { startsWith } from './helper.js' export { isLinkExternal, isLinkHttp, isLinkWithProtocol } from 'vuepress/shared' /** - * Whether a variable is a valid absolute url + * Check if a value is a valid absolute url */ export const isLinkAbsolute = (test: unknown): boolean => startsWith(test, '/') diff --git a/tools/helper/src/shared/locales.ts b/tools/helper/src/shared/locales.ts index f30b710d20..38ada79fc3 100644 --- a/tools/helper/src/shared/locales.ts +++ b/tools/helper/src/shared/locales.ts @@ -1,5 +1,8 @@ import type { LocaleData } from 'vuepress/shared' +/** + * Generate locale config with exact locale data + */ export type ExactLocaleConfig = Record< string, T diff --git a/tools/helper/tests/node/locales.spec.ts b/tools/helper/tests/node/locales.spec.ts index b440216741..86894eccd4 100644 --- a/tools/helper/tests/node/locales.spec.ts +++ b/tools/helper/tests/node/locales.spec.ts @@ -5,8 +5,8 @@ import { path } from 'vuepress/utils' import { getLocaleConfig, getRootLang, - lang2Path, - path2Lang, + inferLocaleLang, + inferLocalePath, } from '../../src/node/locales/helpers.js' import { emptyTheme } from '../__fixtures__/theme/empty.js' @@ -38,19 +38,19 @@ const defaultLocaleConfig = { } it('lang2Path() should convert lang to path', () => { - expect(lang2Path('en-US')).toEqual('/en/') - expect(lang2Path('zh-CN')).toEqual('/zh/') - expect(lang2Path('ja-JP')).toEqual('/ja/') - expect(lang2Path('id-ID')).toEqual('/id/') - expect(lang2Path('nl-NL')).toEqual('/nl/') + expect(inferLocalePath('en-US')).toEqual('/en/') + expect(inferLocalePath('zh-CN')).toEqual('/zh/') + expect(inferLocalePath('ja-JP')).toEqual('/ja/') + expect(inferLocalePath('id-ID')).toEqual('/id/') + expect(inferLocalePath('nl-NL')).toEqual('/nl/') }) it('path2lang() should convert path to lang', () => { - expect(path2Lang('/en/')).toEqual('en-US') - expect(path2Lang('/zh/')).toEqual('zh-CN') - expect(path2Lang('/ja/')).toEqual('ja-JP') - expect(path2Lang('/id/')).toEqual('id-ID') - expect(path2Lang('/nl/')).toEqual('nl-NL') + expect(inferLocaleLang('/en/')).toEqual('en-US') + expect(inferLocaleLang('/zh/')).toEqual('zh-CN') + expect(inferLocaleLang('/ja/')).toEqual('ja-JP') + expect(inferLocaleLang('/id/')).toEqual('id-ID') + expect(inferLocaleLang('/nl/')).toEqual('nl-NL') }) describe('getRootLang() should get root locale lang', () => { diff --git a/tools/highlighter-helper/CHANGELOG.md b/tools/highlighter-helper/CHANGELOG.md index 7dca334bf8..eb62384095 100644 --- a/tools/highlighter-helper/CHANGELOG.md +++ b/tools/highlighter-helper/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.46](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.45...v2.0.0-rc.46) (2024-09-20) ### Bug Fixes diff --git a/tools/highlighter-helper/package.json b/tools/highlighter-helper/package.json index 64ffd922c1..5254b61d60 100644 --- a/tools/highlighter-helper/package.json +++ b/tools/highlighter-helper/package.json @@ -1,6 +1,6 @@ { "name": "@vuepress/highlighter-helper", - "version": "2.0.0-rc.46", + "version": "2.0.0-rc.52", "description": "VuePress Highlighter helper", "keywords": [ "vuepress", @@ -36,12 +36,13 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo", "style": "sass src:lib --embed-sources --style=compressed" }, "peerDependencies": { - "@vueuse/core": "^11.0.0", - "vuepress": "2.0.0-rc.15" + "@vueuse/core": "^11.1.0", + "vuepress": "2.0.0-rc.17" }, "peerDependenciesMeta": { "@vueuse/core": { diff --git a/tools/highlighter-helper/rollup.config.ts b/tools/highlighter-helper/rollup.config.ts new file mode 100644 index 0000000000..8a1e65b952 --- /dev/null +++ b/tools/highlighter-helper/rollup.config.ts @@ -0,0 +1,9 @@ +import { rollupBundle } from '../../scripts/rollup.js' + +export default [ + ...rollupBundle('node/index'), + ...rollupBundle({ + base: 'client', + files: ['composables/collapsedLines'], + }), +] diff --git a/tools/highlighter-helper/src/node/collapsedLines/index.ts b/tools/highlighter-helper/src/node/collapsedLines/index.ts index ea93e7a3f6..8ba9dcea13 100644 --- a/tools/highlighter-helper/src/node/collapsedLines/index.ts +++ b/tools/highlighter-helper/src/node/collapsedLines/index.ts @@ -1,2 +1,2 @@ -export * from './options.js' +export type * from './options.js' export * from './plugin.js' diff --git a/tools/highlighter-helper/src/node/collapsedLines/options.ts b/tools/highlighter-helper/src/node/collapsedLines/options.ts index 90488869d9..e8b1eb66ee 100644 --- a/tools/highlighter-helper/src/node/collapsedLines/options.ts +++ b/tools/highlighter-helper/src/node/collapsedLines/options.ts @@ -4,8 +4,8 @@ export interface MarkdownItCollapsedLinesOptions { * * - If `number`, collapse starts from line `number`. * - If `true`, collapse starts from line 15 by default. - * - If `false`, do not enable `collapsedLines` globally, but you can enable it for individual code blocks using `:collapsed-lines` - * - If `'disable'`, Completely disable `collapsedLines` + * - If `false`, do not enable code block collapsing globally, but you can enable it for individual code blocks using `:collapsed-lines` + * - If `'disable'`, Completely disable code block collapsing * @default 'disable' */ collapsedLines?: boolean | number | 'disable' diff --git a/tools/highlighter-helper/src/node/lineNumbers/index.ts b/tools/highlighter-helper/src/node/lineNumbers/index.ts index ea93e7a3f6..8ba9dcea13 100644 --- a/tools/highlighter-helper/src/node/lineNumbers/index.ts +++ b/tools/highlighter-helper/src/node/lineNumbers/index.ts @@ -1,2 +1,2 @@ -export * from './options.js' +export type * from './options.js' export * from './plugin.js' diff --git a/tools/highlighter-helper/src/node/lineNumbers/options.ts b/tools/highlighter-helper/src/node/lineNumbers/options.ts index ef5a74bb8d..3580b54fb2 100644 --- a/tools/highlighter-helper/src/node/lineNumbers/options.ts +++ b/tools/highlighter-helper/src/node/lineNumbers/options.ts @@ -1,9 +1,14 @@ export interface MarkdownItLineNumbersOptions { /** * Show line numbers in code blocks - * @default true + * + * - If `number`, show line numbers with code block lines not less than `number`. + * - If `true`, show line number always + * - If `false`, do not enable line numbers globally, but you can enable it for individual code blocks using `:line-numbers` + * - If `'disable'`, Completely disable line number + * @default 'disable' */ - lineNumbers?: boolean | number + lineNumbers?: boolean | number | 'disable' /** * @default false diff --git a/tools/vp-update/CHANGELOG.md b/tools/vp-update/CHANGELOG.md index ec0dc82a24..2a55addf41 100644 --- a/tools/vp-update/CHANGELOG.md +++ b/tools/vp-update/CHANGELOG.md @@ -3,6 +3,12 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +# [2.0.0-rc.52](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.51...v2.0.0-rc.52) (2024-09-30) + +### Features + +- use rollup to bundle files ([#267](https://github.com/vuepress/ecosystem/issues/267)) ([164252d](https://github.com/vuepress/ecosystem/commit/164252d350b73a9d6d7cbe0e713be4ee2be47c08)) + # [2.0.0-rc.43](https://github.com/vuepress/ecosystem/compare/v2.0.0-rc.42...v2.0.0-rc.43) (2024-09-12) **Note:** Version bump only for package vp-update diff --git a/tools/vp-update/package.json b/tools/vp-update/package.json index e93b458ed1..d93aae9ace 100644 --- a/tools/vp-update/package.json +++ b/tools/vp-update/package.json @@ -1,6 +1,6 @@ { "name": "vp-update", - "version": "2.0.0-rc.43", + "version": "2.0.0-rc.52", "description": "Update helper for VuePress2", "keywords": [ "vuepress", @@ -34,6 +34,7 @@ ], "scripts": { "build": "tsc -b tsconfig.build.json", + "bundle": "rollup -c rollup.config.ts --configPlugin esbuild", "clean": "rimraf --glob ./lib ./*.tsbuildinfo" }, "dependencies": { diff --git a/tools/vp-update/rollup.config.ts b/tools/vp-update/rollup.config.ts new file mode 100644 index 0000000000..9b74749206 --- /dev/null +++ b/tools/vp-update/rollup.config.ts @@ -0,0 +1,6 @@ +import { rollupBundle } from '../../scripts/rollup.js' + +export default rollupBundle('index', { + external: [/^node:/, 'cac', 'semver'], + dts: false, +}) diff --git a/tsconfig.build.json b/tsconfig.build.json index 789a079a2e..f2da68112e 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -42,6 +42,9 @@ { "path": "./plugins/markdown/plugin-append-date/tsconfig.build.json" }, { "path": "./plugins/markdown/plugin-links-check/tsconfig.build.json" }, { "path": "./plugins/markdown/plugin-markdown-chart/tsconfig.build.json" }, + { + "path": "./plugins/markdown/plugin-markdown-chart/tsconfig.build.json" + }, { "path": "./plugins/markdown/plugin-markdown-container/tsconfig.build.json" }, @@ -51,9 +54,11 @@ }, { "path": "./plugins/markdown/plugin-markdown-image/tsconfig.build.json" }, { "path": "./plugins/markdown/plugin-markdown-math/tsconfig.build.json" }, + { "path": "./plugins/markdown/plugin-markdown-tab/tsconfig.build.json" }, { "path": "./plugins/markdown/plugin-prismjs/tsconfig.build.json" }, + { "path": "./plugins/markdown/plugin-revealjs/tsconfig.build.json" }, { "path": "./plugins/markdown/plugin-shiki/tsconfig.build.json" }, // features