diff --git a/.github/workflows/lock-threads.yml b/.github/workflows/lock-threads.yml index a39cefc4..73ffade6 100644 --- a/.github/workflows/lock-threads.yml +++ b/.github/workflows/lock-threads.yml @@ -22,3 +22,4 @@ jobs: issue-inactive-days: 7 pr-inactive-days: 7 exclude-any-issue-labels: 'keep-open' + exclude-any-pr-labels: 'keep-open' diff --git a/CHANGELOG.md b/CHANGELOG.md index da9f58d4..7665a718 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,29 @@ +# [1.0.0-rc.36](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.35...v1.0.0-rc.36) (2024-1-8) + +### Bug Fixes + +- avoid pushing to history when clicking on the current link ([#3405](https://github.com/vuejs/vitepress/issues/3405)) ([d279e63](https://github.com/vuejs/vitepress/commit/d279e63cb4d417420cdc3fb3e6e03c96b777289f)) +- **theme/regression:** external link icon not working ([c236570](https://github.com/vuejs/vitepress/commit/c236570f2806fe76bbc6a69568cf64ed5a3fc2ce)), closes [#3424](https://github.com/vuejs/vitepress/issues/3424) +- **theme/regression:** inter getting bundled even importing without-fonts entry ([#3412](https://github.com/vuejs/vitepress/issues/3412)) ([b03fb83](https://github.com/vuejs/vitepress/commit/b03fb83a4e67d92a865d90908ccbde3dd0f97373)) + +# [1.0.0-rc.35](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.34...v1.0.0-rc.35) (2024-1-3) + +### Bug Fixes + +- **client:** add computed dir and lang to html root ([c2b4c66](https://github.com/vuejs/vitepress/commit/c2b4c66e79fde7479f5f43841e1921a5c220c9a5)), closes [#3353](https://github.com//github.com/vuejs/vitepress/pull/3353/issues/issuecomment-1874753809) +- fill all empty code lines ([563020b](https://github.com/vuejs/vitepress/commit/563020ba61abda254af9a124ddafd12de644cd4e)), closes [#3305](https://github.com/vuejs/vitepress/issues/3305) +- fix theme chunking logic causing out-of-order styles ([#3403](https://github.com/vuejs/vitepress/issues/3403)) ([a6cd891](https://github.com/vuejs/vitepress/commit/a6cd891d95454b3130aaf08f499659d2585acc63)) +- invalidate module cache for subsequent builds ([#3398](https://github.com/vuejs/vitepress/issues/3398)) ([27f60e0](https://github.com/vuejs/vitepress/commit/27f60e0b7784603c6fb300bd8dce64515eb98962)) + +### Features + +- allow passing options to emoji plugin ([09e48db](https://github.com/vuejs/vitepress/commit/09e48db355f530c7a138437004659b61239f4b75)), closes [#3174](https://github.com/vuejs/vitepress/issues/3174) +- **theme:** allow specifying rel and target in logoLink ([6c89943](https://github.com/vuejs/vitepress/commit/6c899437c15b126b488e73c99cdaad77fc7e5611)), closes [#3264](https://github.com/vuejs/vitepress/issues/3264) [#3271](https://github.com/vuejs/vitepress/issues/3271) + +### Performance Improvements + +- **localSearch:** add concurrency pooling, cleanup logic, improve performance ([#3374](https://github.com/vuejs/vitepress/issues/3374)) ([ac5881e](https://github.com/vuejs/vitepress/commit/ac5881eeac3f042a8fbf034edb99e5f2b45eaa2a)) + # [1.0.0-rc.34](https://github.com/vuejs/vitepress/compare/v1.0.0-rc.33...v1.0.0-rc.34) (2023-12-30) ### Bug Fixes diff --git a/docs/guide/markdown.md b/docs/guide/markdown.md index ef3cc0e8..568155bd 100644 --- a/docs/guide/markdown.md +++ b/docs/guide/markdown.md @@ -587,7 +587,7 @@ It also supports [line highlighting](#line-highlighting-in-code-blocks): **Output** -<<< @/snippets/snippet.js +<<< @/snippets/snippet.js{2} ::: tip The value of `@` corresponds to the source root. By default it's the VitePress project root, unless `srcDir` is configured. Alternatively, you can also import from relative paths: diff --git a/docs/zh/guide/deploy.md b/docs/zh/guide/deploy.md index c2514be0..9c757bb8 100644 --- a/docs/zh/guide/deploy.md +++ b/docs/zh/guide/deploy.md @@ -33,7 +33,7 @@ outline: deep $ npm run docs:preview ``` - `preview` 命令将启动一个本地静态 Web 服务器`http://localhost:4173`,该服务器以 `.vitepress/dist` 作为源文件。这是检查生产版本在本地环境中是否正常的一种简单方法。 + `preview` 命令将启动一个本地静态 Web 服务器`http://localhost:4173`,该服务器以 `.vitepress/dist` 作为源文件。这是检查生产版本在本地环境中是否正常的一种简单方法。 3. 可以通过传递 `--port` 作为参数来配置服务器的端口。 @@ -45,7 +45,7 @@ outline: deep } ``` - 现在 `docs:preview` 方法将在 `http://localhost:8080` 启动服务器。 + 现在 `docs:preview` 方法将在 `http://localhost:8080` 启动服务器。 ## 设定 public 根目录 {#setting-a-public-base-path} @@ -121,7 +121,7 @@ Cache-Control: max-age=31536000,immutable 1. 在项目的 `.github/workflows` 目录中创建一个名为 `deploy.yml` 的文件,其中包含这样的内容: - ```yaml + ```yaml # 构建 VitePress 站点并将其部署到 GitHub Pages 的示例工作流程 # name: Deploy VitePress site to Pages @@ -191,7 +191,7 @@ Cache-Control: max-age=31536000,immutable ``` ::: warning - 确保 VitePress 中的 `base` 选项配置正确。有关更多详细信息,请参阅[设置根路径](#setting-a-public-base-path)。 + 确保 VitePress 中的 `base` 选项配置正确。有关更多详细信息,请参阅[设置根路径](#setting-a-public-base-path)。 ::: 2. 在存储库设置中的“Pages”菜单项下,选择“Build and deployment > Source > GitHub Actions”。 diff --git a/docs/zh/guide/markdown.md b/docs/zh/guide/markdown.md index 93db97e0..7832170d 100644 --- a/docs/zh/guide/markdown.md +++ b/docs/zh/guide/markdown.md @@ -593,7 +593,7 @@ const line4 = 'This is line 4' **输出** -<<< @/snippets/snippet.js +<<< @/snippets/snippet.js{2} ::: tip `@` 的值对应于源代码根目录,默认情况下是 VitePress 项目根目录,除非配置了 `srcDir`。或者也可以从相对路径导入: @@ -625,11 +625,11 @@ const line4 = 'This is line 4' ```md <<< @/snippets/snippet.cs{c#} - + <<< @/snippets/snippet.cs{1,2,4-6 c#} - + <<< @/snippets/snippet.cs{1,2,4-6 c#:line-numbers} ``` diff --git a/docs/zh/guide/what-is-vitepress.md b/docs/zh/guide/what-is-vitepress.md index 4b620168..8ca91d0b 100644 --- a/docs/zh/guide/what-is-vitepress.md +++ b/docs/zh/guide/what-is-vitepress.md @@ -12,7 +12,7 @@ VitePress 是一个[静态站点生成器](https://en.wikipedia.org/wiki/Static_ - **文档** - VitePress 附带一个专为技术文档设计的默认主题,尤其是那些需要嵌入交互式演示的主题。它支持你正在阅读的这个页面,以及 [Vite](https://vitejs.dev/)、[Pinia](https://pinia.vuejs.org/)、[VueUse](https://vueuse.org/)、[Mermaid](https://mermaid.js.org/)、[Wikimedia Codex](https://doc.wikimedia.org/codex/latest/) 等文档。 + VitePress 附带一个专为技术文档设计的默认主题。它为您现在正在阅读的这个页面以及 [Vite](https://vitejs.dev/)、[Rollup](https://rollupjs.org/)、[Pinia](https://pinia.vuejs.org/)、[VueUse](https://vueuse.org/)、[Vitest](https://vitest.dev/)、[D3](https://d3js.org/)、[UnoCSS](https://unocss.dev/)、[Iconify](https://iconify.design/) [等](https://www.vuetelescope.com/explore?framework.slug=vitepress)文档提供了支持。 [Vue.js 官方文档](https://vuejs.org/)也是基于 VitePress 的。但是为了可以在不同的翻译文档之间共享,它自定义了自己的主题 diff --git a/package.json b/package.json index 39f0016a..307817e6 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "vitepress", - "version": "1.0.0-rc.34", + "version": "1.0.0-rc.36", "description": "Vite & Vue powered static site generator", "type": "module", - "packageManager": "pnpm@8.13.1", + "packageManager": "pnpm@8.14.0", "main": "dist/node/index.js", "types": "types/index.d.ts", "exports": { @@ -100,15 +100,15 @@ "focus-trap": "^7.5.4", "mark.js": "8.11.1", "minisearch": "^6.3.0", - "shikiji": "^0.9.16", - "shikiji-core": "^0.9.16", - "shikiji-transformers": "^0.9.16", - "vite": "^5.0.10", - "vue": "^3.4.3" + "shikiji": "^0.9.17", + "shikiji-core": "^0.9.17", + "shikiji-transformers": "^0.9.17", + "vite": "^5.0.11", + "vue": "^3.4.5" }, "peerDependencies": { "markdown-it-mathjax3": "^4.3.2", - "postcss": "^8.4.32" + "postcss": "^8.4.33" }, "peerDependenciesMeta": { "markdown-it-mathjax3": { @@ -145,10 +145,10 @@ "@types/markdown-it-emoji": "^2.0.4", "@types/micromatch": "^4.0.6", "@types/minimist": "^1.2.5", - "@types/node": "^20.10.6", + "@types/node": "^20.10.7", "@types/postcss-prefix-selector": "^1.16.3", "@types/prompts": "^2.4.9", - "@vue/shared": "^3.4.3", + "@vue/shared": "^3.4.5", "chokidar": "^3.5.3", "compression": "^1.7.4", "conventional-changelog-cli": "^4.1.0", @@ -187,7 +187,7 @@ "prompts": "^2.4.2", "punycode": "^2.3.1", "rimraf": "^5.0.5", - "rollup": "^4.9.2", + "rollup": "^4.9.4", "rollup-plugin-dts": "^6.1.0", "rollup-plugin-esbuild": "^6.1.0", "semver": "^7.5.4", @@ -196,7 +196,7 @@ "sitemap": "^7.1.1", "supports-color": "^9.4.0", "typescript": "^5.3.3", - "vitest": "^1.1.1", + "vitest": "^1.1.3", "vue-tsc": "^1.8.27", "wait-on": "^7.2.0" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f9012d11..7d99d831 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,16 +22,16 @@ importers: version: 13.0.7 '@vitejs/plugin-vue': specifier: ^5.0.2 - version: 5.0.2(vite@5.0.10)(vue@3.4.3) + version: 5.0.2(vite@5.0.11)(vue@3.4.5) '@vue/devtools-api': specifier: ^6.5.1 version: 6.5.1 '@vueuse/core': specifier: ^10.7.1 - version: 10.7.1(vue@3.4.3) + version: 10.7.1(vue@3.4.5) '@vueuse/integrations': specifier: ^10.7.1 - version: 10.7.1(focus-trap@7.5.4)(vue@3.4.3) + version: 10.7.1(focus-trap@7.5.4)(vue@3.4.5) focus-trap: specifier: ^7.5.4 version: 7.5.4 @@ -42,20 +42,20 @@ importers: specifier: ^6.3.0 version: 6.3.0 shikiji: - specifier: ^0.9.16 - version: 0.9.16 + specifier: ^0.9.17 + version: 0.9.17 shikiji-core: - specifier: ^0.9.16 - version: 0.9.16 + specifier: ^0.9.17 + version: 0.9.17 shikiji-transformers: - specifier: ^0.9.16 - version: 0.9.16 + specifier: ^0.9.17 + version: 0.9.17 vite: - specifier: ^5.0.10 - version: 5.0.10(@types/node@20.10.6) + specifier: ^5.0.11 + version: 5.0.11(@types/node@20.10.7) vue: - specifier: ^3.4.3 - version: 3.4.3(typescript@5.3.3) + specifier: ^3.4.5 + version: 3.4.5(typescript@5.3.3) devDependencies: '@clack/prompts': specifier: ^0.7.0 @@ -83,19 +83,19 @@ importers: version: 2.0.0 '@rollup/plugin-alias': specifier: ^5.1.0 - version: 5.1.0(rollup@4.9.2) + version: 5.1.0(rollup@4.9.4) '@rollup/plugin-commonjs': specifier: ^25.0.7 - version: 25.0.7(rollup@4.9.2) + version: 25.0.7(rollup@4.9.4) '@rollup/plugin-json': specifier: ^6.1.0 - version: 6.1.0(rollup@4.9.2) + version: 6.1.0(rollup@4.9.4) '@rollup/plugin-node-resolve': specifier: ^15.2.3 - version: 15.2.3(rollup@4.9.2) + version: 15.2.3(rollup@4.9.4) '@rollup/plugin-replace': specifier: ^5.0.5 - version: 5.0.5(rollup@4.9.2) + version: 5.0.5(rollup@4.9.4) '@types/compression': specifier: ^1.7.5 version: 1.7.5 @@ -136,8 +136,8 @@ importers: specifier: ^1.2.5 version: 1.2.5 '@types/node': - specifier: ^20.10.6 - version: 20.10.6 + specifier: ^20.10.7 + version: 20.10.7 '@types/postcss-prefix-selector': specifier: ^1.16.3 version: 1.16.3 @@ -145,8 +145,8 @@ importers: specifier: ^2.4.9 version: 2.4.9 '@vue/shared': - specifier: ^3.4.3 - version: 3.4.3 + specifier: ^3.4.5 + version: 3.4.5 chokidar: specifier: ^3.5.3 version: 3.5.3 @@ -262,14 +262,14 @@ importers: specifier: ^5.0.5 version: 5.0.5 rollup: - specifier: ^4.9.2 - version: 4.9.2 + specifier: ^4.9.4 + version: 4.9.4 rollup-plugin-dts: specifier: ^6.1.0 - version: 6.1.0(rollup@4.9.2)(typescript@5.3.3) + version: 6.1.0(rollup@4.9.4)(typescript@5.3.3) rollup-plugin-esbuild: specifier: ^6.1.0 - version: 6.1.0(esbuild@0.19.11)(rollup@4.9.2)(supports-color@9.4.0) + version: 6.1.0(esbuild@0.19.11)(rollup@4.9.4)(supports-color@9.4.0) semver: specifier: ^7.5.4 version: 7.5.4 @@ -289,8 +289,8 @@ importers: specifier: ^5.3.3 version: 5.3.3 vitest: - specifier: ^1.1.1 - version: 1.1.1(@types/node@20.10.6)(supports-color@9.4.0) + specifier: ^1.1.3 + version: 1.1.3(@types/node@20.10.7)(supports-color@9.4.0) vue-tsc: specifier: ^1.8.27 version: 1.8.27(typescript@5.3.3) @@ -877,7 +877,7 @@ packages: resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} dev: true - /@rollup/plugin-alias@5.1.0(rollup@4.9.2): + /@rollup/plugin-alias@5.1.0(rollup@4.9.4): resolution: {integrity: sha512-lpA3RZ9PdIG7qqhEfv79tBffNaoDuukFDrmhLqg9ifv99u/ehn+lOg30x2zmhf8AQqQUZaMk/B9fZraQ6/acDQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -886,11 +886,11 @@ packages: rollup: optional: true dependencies: - rollup: 4.9.2 + rollup: 4.9.4 slash: 4.0.0 dev: true - /@rollup/plugin-commonjs@25.0.7(rollup@4.9.2): + /@rollup/plugin-commonjs@25.0.7(rollup@4.9.4): resolution: {integrity: sha512-nEvcR+LRjEjsaSsc4x3XZfCCvZIaSMenZu/OiwOKGN2UhQpAYI7ru7czFvyWbErlpoGjnSX3D5Ch5FcMA3kRWQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -899,16 +899,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) + '@rollup/pluginutils': 5.1.0(rollup@4.9.4) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.30.5 - rollup: 4.9.2 + rollup: 4.9.4 dev: true - /@rollup/plugin-json@6.1.0(rollup@4.9.2): + /@rollup/plugin-json@6.1.0(rollup@4.9.4): resolution: {integrity: sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -917,11 +917,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) - rollup: 4.9.2 + '@rollup/pluginutils': 5.1.0(rollup@4.9.4) + rollup: 4.9.4 dev: true - /@rollup/plugin-node-resolve@15.2.3(rollup@4.9.2): + /@rollup/plugin-node-resolve@15.2.3(rollup@4.9.4): resolution: {integrity: sha512-j/lym8nf5E21LwBT4Df1VD6hRO2L2iwUeUmP7litikRsVp1H6NWx20NEp0Y7su+7XGc476GnXXc4kFeZNGmaSQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -930,16 +930,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) + '@rollup/pluginutils': 5.1.0(rollup@4.9.4) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 resolve: 1.22.8 - rollup: 4.9.2 + rollup: 4.9.4 dev: true - /@rollup/plugin-replace@5.0.5(rollup@4.9.2): + /@rollup/plugin-replace@5.0.5(rollup@4.9.4): resolution: {integrity: sha512-rYO4fOi8lMaTg/z5Jb+hKnrHHVn8j2lwkqwyS4kTRhKyWOLf2wST2sWXr4WzWiTcoHTp2sTjqUbqIj2E39slKQ==} engines: {node: '>=14.0.0'} peerDependencies: @@ -948,12 +948,12 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) + '@rollup/pluginutils': 5.1.0(rollup@4.9.4) magic-string: 0.30.5 - rollup: 4.9.2 + rollup: 4.9.4 dev: true - /@rollup/pluginutils@5.1.0(rollup@4.9.2): + /@rollup/pluginutils@5.1.0(rollup@4.9.4): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -965,95 +965,95 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.9.2 + rollup: 4.9.4 dev: true - /@rollup/rollup-android-arm-eabi@4.9.2: - resolution: {integrity: sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==} + /@rollup/rollup-android-arm-eabi@4.9.4: + resolution: {integrity: sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==} cpu: [arm] os: [android] requiresBuild: true optional: true - /@rollup/rollup-android-arm64@4.9.2: - resolution: {integrity: sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==} + /@rollup/rollup-android-arm64@4.9.4: + resolution: {integrity: sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@rollup/rollup-darwin-arm64@4.9.2: - resolution: {integrity: sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==} + /@rollup/rollup-darwin-arm64@4.9.4: + resolution: {integrity: sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-darwin-x64@4.9.2: - resolution: {integrity: sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==} + /@rollup/rollup-darwin-x64@4.9.4: + resolution: {integrity: sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.9.2: - resolution: {integrity: sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==} + /@rollup/rollup-linux-arm-gnueabihf@4.9.4: + resolution: {integrity: sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.9.2: - resolution: {integrity: sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==} + /@rollup/rollup-linux-arm64-gnu@4.9.4: + resolution: {integrity: sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-musl@4.9.2: - resolution: {integrity: sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==} + /@rollup/rollup-linux-arm64-musl@4.9.4: + resolution: {integrity: sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.9.2: - resolution: {integrity: sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==} + /@rollup/rollup-linux-riscv64-gnu@4.9.4: + resolution: {integrity: sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-gnu@4.9.2: - resolution: {integrity: sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==} + /@rollup/rollup-linux-x64-gnu@4.9.4: + resolution: {integrity: sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-musl@4.9.2: - resolution: {integrity: sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==} + /@rollup/rollup-linux-x64-musl@4.9.4: + resolution: {integrity: sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.9.2: - resolution: {integrity: sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==} + /@rollup/rollup-win32-arm64-msvc@4.9.4: + resolution: {integrity: sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.9.2: - resolution: {integrity: sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==} + /@rollup/rollup-win32-ia32-msvc@4.9.4: + resolution: {integrity: sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-x64-msvc@4.9.2: - resolution: {integrity: sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==} + /@rollup/rollup-win32-x64-msvc@4.9.4: + resolution: {integrity: sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==} cpu: [x64] os: [win32] requiresBuild: true @@ -1081,7 +1081,7 @@ packages: resolution: {integrity: sha512-fB3Zu92ucau0iQ0JMCFQE7b/dv8Ot07NI3KaZIkIUNXq82k4eBAqUaneXfleGY9JWskeS9y+u0nXMyspcuQrCg==} dependencies: '@types/connect': 3.4.38 - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/braces@3.0.4: @@ -1097,13 +1097,13 @@ packages: /@types/connect@3.4.38: resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/cross-spawn@6.0.6: resolution: {integrity: sha512-fXRhhUkG4H3TQk5dBhQ7m/JDdSNHKwR2BBia62lhwEIq9xGiQKLxd6LymNhn47SjXhsUEPmxi+PKw2OkW4LLjA==} dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/debug@4.1.12: @@ -1118,12 +1118,11 @@ packages: /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - dev: true /@types/express-serve-static-core@4.17.41: resolution: {integrity: sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==} dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 '@types/qs': 6.9.11 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -1142,7 +1141,7 @@ packages: resolution: {integrity: sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==} dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/http-errors@2.0.4: @@ -1162,7 +1161,7 @@ packages: /@types/jsonfile@6.1.4: resolution: {integrity: sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==} dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/linkify-it@3.0.5: @@ -1237,8 +1236,8 @@ packages: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: true - /@types/node@20.10.6: - resolution: {integrity: sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==} + /@types/node@20.10.7: + resolution: {integrity: sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==} dependencies: undici-types: 5.26.5 @@ -1249,13 +1248,13 @@ packages: /@types/postcss-prefix-selector@1.16.3: resolution: {integrity: sha512-YZLPWRkJIrYjwaqojVDXzaRCAEYslRAm8Shznwwn+ZFA4iKQR4LZlS3d+ZMVteFz4iyQnngZZG7k/GIzV1f3mQ==} dependencies: - postcss: 8.4.32 + postcss: 8.4.33 dev: true /@types/prompts@2.4.9: resolution: {integrity: sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==} dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 kleur: 3.0.3 dev: true @@ -1274,14 +1273,14 @@ packages: /@types/sax@1.2.7: resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/send@0.17.4: resolution: {integrity: sha512-x2EM6TJOybec7c52BX0ZspPodMsQUd5L6PRwOunVyVUhXiBSKf3AezDL8Dgvgt5o0UfKNfuA0eMLr2wLT4AiBA==} dependencies: '@types/mime': 1.3.5 - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/serve-static@1.15.5: @@ -1289,7 +1288,7 @@ packages: dependencies: '@types/http-errors': 2.0.4 '@types/mime': 3.0.4 - '@types/node': 20.10.6 + '@types/node': 20.10.7 dev: true /@types/sizzle@2.3.8: @@ -1300,51 +1299,52 @@ packages: resolution: {integrity: sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==} dev: false - /@vitejs/plugin-vue@5.0.2(vite@5.0.10)(vue@3.4.3): + /@vitejs/plugin-vue@5.0.2(vite@5.0.11)(vue@3.4.5): resolution: {integrity: sha512-kEjJHrLb5ePBvjD0SPZwJlw1QTRcjjCA9sB5VyfonoXVBxTS7TMnqL6EkLt1Eu61RDeiuZ/WN9Hf6PxXhPI2uA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: vite: ^5.0.0 vue: ^3.2.25 dependencies: - vite: 5.0.10(@types/node@20.10.6) - vue: 3.4.3(typescript@5.3.3) + vite: 5.0.11(@types/node@20.10.7) + vue: 3.4.5(typescript@5.3.3) dev: false - /@vitest/expect@1.1.1: - resolution: {integrity: sha512-Qpw01C2Hyb3085jBkOJLQ7HRX0Ncnh2qV4p+xWmmhcIUlMykUF69zsnZ1vPmAjZpomw9+5tWEGOQ0GTfR8U+kA==} + /@vitest/expect@1.1.3: + resolution: {integrity: sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==} dependencies: - '@vitest/spy': 1.1.1 - '@vitest/utils': 1.1.1 - chai: 4.3.10 + '@vitest/spy': 1.1.3 + '@vitest/utils': 1.1.3 + chai: 4.4.0 dev: true - /@vitest/runner@1.1.1: - resolution: {integrity: sha512-8HokyJo1SnSi3uPFKfWm/Oq1qDwLC4QDcVsqpXIXwsRPAg3gIDh8EbZ1ri8cmQkBxdOu62aOF9B4xcqJhvt4xQ==} + /@vitest/runner@1.1.3: + resolution: {integrity: sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==} dependencies: - '@vitest/utils': 1.1.1 + '@vitest/utils': 1.1.3 p-limit: 5.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@1.1.1: - resolution: {integrity: sha512-WnMHjv4VdHLbFGgCdVVvyRkRPnOKN75JJg+LLTdr6ah7YnL75W+7CTIMdzPEPzaDxA8r5yvSVlc1d8lH3yE28w==} + /@vitest/snapshot@1.1.3: + resolution: {integrity: sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==} dependencies: magic-string: 0.30.5 pathe: 1.1.1 pretty-format: 29.7.0 dev: true - /@vitest/spy@1.1.1: - resolution: {integrity: sha512-hDU2KkOTfFp4WFFPWwHFauddwcKuGQ7gF6Un/ZZkCogoAiTMN7/7YKvUDbywPZZ754iCQGjdUmXN3t4k0jm1IQ==} + /@vitest/spy@1.1.3: + resolution: {integrity: sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/utils@1.1.1: - resolution: {integrity: sha512-E9LedH093vST/JuBSyHLFMpxJKW3dLhe/flUSPFedoyj4wKiFX7Jm8gYLtOIiin59dgrssfmFv0BJ1u8P/LC/A==} + /@vitest/utils@1.1.3: + resolution: {integrity: sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==} dependencies: diff-sequences: 29.6.3 + estree-walker: 3.0.3 loupe: 2.3.7 pretty-format: 29.7.0 dev: true @@ -1368,40 +1368,40 @@ packages: path-browserify: 1.0.1 dev: true - /@vue/compiler-core@3.4.3: - resolution: {integrity: sha512-u8jzgFg0EDtSrb/hG53Wwh1bAOQFtc1ZCegBpA/glyvTlgHl+tq13o1zvRfLbegYUw/E4mSTGOiCnAJ9SJ+lsg==} + /@vue/compiler-core@3.4.5: + resolution: {integrity: sha512-Daka7P1z2AgKjzuueWXhwzIsKu0NkLB6vGbNVEV2iJ8GJTrzraZo/Sk4GWCMRtd/qVi3zwnk+Owbd/xSZbwHtQ==} dependencies: '@babel/parser': 7.23.6 - '@vue/shared': 3.4.3 + '@vue/shared': 3.4.5 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.0.2 - /@vue/compiler-dom@3.4.3: - resolution: {integrity: sha512-oGF1E9/htI6JWj/lTJgr6UgxNCtNHbM6xKVreBWeZL9QhRGABRVoWGAzxmtBfSOd+w0Zi5BY0Es/tlJrN6WgEg==} + /@vue/compiler-dom@3.4.5: + resolution: {integrity: sha512-J8YlxknJVd90SXFJ4HwGANSAXsx5I0lK30sO/zvYV7s5gXf7gZR7r/1BmZ2ju7RGH1lnc6bpBc6nL61yW+PsAQ==} dependencies: - '@vue/compiler-core': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/compiler-core': 3.4.5 + '@vue/shared': 3.4.5 - /@vue/compiler-sfc@3.4.3: - resolution: {integrity: sha512-NuJqb5is9I4uzv316VRUDYgIlPZCG8D+ARt5P4t5UDShIHKL25J3TGZAUryY/Aiy0DsY7srJnZL5ryB6DD63Zw==} + /@vue/compiler-sfc@3.4.5: + resolution: {integrity: sha512-jauvkDuSSUbP0ebhfNqljhShA90YEfX/0wZ+w40oZF43IjGyWYjqYaJbvMJwGOd+9+vODW6eSvnk28f0SGV7OQ==} dependencies: '@babel/parser': 7.23.6 - '@vue/compiler-core': 3.4.3 - '@vue/compiler-dom': 3.4.3 - '@vue/compiler-ssr': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/compiler-core': 3.4.5 + '@vue/compiler-dom': 3.4.5 + '@vue/compiler-ssr': 3.4.5 + '@vue/shared': 3.4.5 estree-walker: 2.0.2 magic-string: 0.30.5 - postcss: 8.4.32 + postcss: 8.4.33 source-map-js: 1.0.2 dev: false - /@vue/compiler-ssr@3.4.3: - resolution: {integrity: sha512-wnYQtMBkeFSxgSSQbYGQeXPhQacQiog2c6AlvMldQH6DB+gSXK/0F6DVXAJfEiuBSgBhUc8dwrrG5JQcqwalsA==} + /@vue/compiler-ssr@3.4.5: + resolution: {integrity: sha512-DDdEcDzj2lWTMfUMMtEpLDhURai9LhM0zSZ219jCt7b2Vyl0/jy3keFgCPMitG0V1S1YG4Cmws3lWHWdxHQOpg==} dependencies: - '@vue/compiler-dom': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/compiler-dom': 3.4.5 + '@vue/shared': 3.4.5 dev: false /@vue/devtools-api@6.5.1: @@ -1418,8 +1418,8 @@ packages: dependencies: '@volar/language-core': 1.11.1 '@volar/source-map': 1.11.1 - '@vue/compiler-dom': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/compiler-dom': 3.4.5 + '@vue/shared': 3.4.5 computeds: 0.0.1 minimatch: 9.0.3 muggle-string: 0.3.1 @@ -1428,53 +1428,53 @@ packages: vue-template-compiler: 2.7.16 dev: true - /@vue/reactivity@3.4.3: - resolution: {integrity: sha512-q5f9HLDU+5aBKizXHAx0w4whkIANs1Muiq9R5YXm0HtorSlflqv9u/ohaMxuuhHWCji4xqpQ1eL04WvmAmGnFg==} + /@vue/reactivity@3.4.5: + resolution: {integrity: sha512-BcWkKvjdvqJwb7BhhFkXPLDCecX4d4a6GATvCduJQDLv21PkPowAE5GKuIE5p6RC07/Lp9FMkkq4AYCTVF5KlQ==} dependencies: - '@vue/shared': 3.4.3 + '@vue/shared': 3.4.5 dev: false - /@vue/runtime-core@3.4.3: - resolution: {integrity: sha512-C1r6QhB1qY7D591RCSFhMULyzL9CuyrGc+3PpB0h7dU4Qqw6GNyo4BNFjHZVvsWncrUlKX3DIKg0Y7rNNr06NQ==} + /@vue/runtime-core@3.4.5: + resolution: {integrity: sha512-wh9ELIOQKeWT9SaUPdLrsxRkZv14jp+SJm9aiQGWio+/MWNM3Lib0wE6CoKEqQ9+SCYyGjDBhTOTtO47kCgbkg==} dependencies: - '@vue/reactivity': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/reactivity': 3.4.5 + '@vue/shared': 3.4.5 dev: false - /@vue/runtime-dom@3.4.3: - resolution: {integrity: sha512-wrsprg7An5Ec+EhPngWdPuzkp0BEUxAKaQtN9dPU/iZctPyD9aaXmVtehPJerdQxQale6gEnhpnfywNw3zOv2A==} + /@vue/runtime-dom@3.4.5: + resolution: {integrity: sha512-n5ewvOjyG3IEpqGBahdPXODFSpVlSz3H4LF76Sx0XAqpIOqyJ5bIb2PrdYuH2ogBMAQPh+o5tnoH4nJpBr8U0Q==} dependencies: - '@vue/runtime-core': 3.4.3 - '@vue/shared': 3.4.3 + '@vue/runtime-core': 3.4.5 + '@vue/shared': 3.4.5 csstype: 3.1.3 dev: false - /@vue/server-renderer@3.4.3(vue@3.4.3): - resolution: {integrity: sha512-BUxt8oVGMKKsqSkM1uU3d3Houyfy4WAc2SpSQRebNd+XJGATVkW/rO129jkyL+kpB/2VRKzE63zwf5RtJ3XuZw==} + /@vue/server-renderer@3.4.5(vue@3.4.5): + resolution: {integrity: sha512-jOFc/VE87yvifQpNju12VcqimH8pBLxdcT+t3xMeiED1K6DfH9SORyhFEoZlW5TG2Vwfn3Ul5KE+1aC99xnSBg==} peerDependencies: - vue: 3.4.3 + vue: 3.4.5 dependencies: - '@vue/compiler-ssr': 3.4.3 - '@vue/shared': 3.4.3 - vue: 3.4.3(typescript@5.3.3) + '@vue/compiler-ssr': 3.4.5 + '@vue/shared': 3.4.5 + vue: 3.4.5(typescript@5.3.3) dev: false - /@vue/shared@3.4.3: - resolution: {integrity: sha512-rIwlkkP1n4uKrRzivAKPZIEkHiuwY5mmhMJ2nZKCBLz8lTUlE73rQh4n1OnnMurXt1vcUNyH4ZPfdh8QweTjpQ==} + /@vue/shared@3.4.5: + resolution: {integrity: sha512-6XptuzlMvN4l4cDnDw36pdGEV+9njYkQ1ZE0Q6iZLwrKefKaOJyiFmcP3/KBDHbt72cJZGtllAc1GaHe6XGAyg==} - /@vueuse/core@10.7.1(vue@3.4.3): + /@vueuse/core@10.7.1(vue@3.4.5): resolution: {integrity: sha512-74mWHlaesJSWGp1ihg76vAnfVq9NTv1YT0SYhAQ6zwFNdBkkP+CKKJmVOEHcdSnLXCXYiL5e7MaewblfiYLP7g==} dependencies: '@types/web-bluetooth': 0.0.20 '@vueuse/metadata': 10.7.1 - '@vueuse/shared': 10.7.1(vue@3.4.3) - vue-demi: 0.14.6(vue@3.4.3) + '@vueuse/shared': 10.7.1(vue@3.4.5) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/integrations@10.7.1(focus-trap@7.5.4)(vue@3.4.3): + /@vueuse/integrations@10.7.1(focus-trap@7.5.4)(vue@3.4.5): resolution: {integrity: sha512-cKo5LEeKVHdBRBtMTOrDPdR0YNtrmN9IBfdcnY2P3m5LHVrsD0xiHUtAH1WKjHQRIErZG6rJUa6GA4tWZt89Og==} peerDependencies: async-validator: '*' @@ -1515,10 +1515,10 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.7.1(vue@3.4.3) - '@vueuse/shared': 10.7.1(vue@3.4.3) + '@vueuse/core': 10.7.1(vue@3.4.5) + '@vueuse/shared': 10.7.1(vue@3.4.5) focus-trap: 7.5.4 - vue-demi: 0.14.6(vue@3.4.3) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -1528,10 +1528,10 @@ packages: resolution: {integrity: sha512-jX8MbX5UX067DYVsbtrmKn6eG6KMcXxLRLlurGkZku5ZYT3vxgBjui2zajvUZ18QLIjrgBkFRsu7CqTAg18QFw==} dev: false - /@vueuse/shared@10.7.1(vue@3.4.3): + /@vueuse/shared@10.7.1(vue@3.4.5): resolution: {integrity: sha512-v0jbRR31LSgRY/C5i5X279A/WQjD6/JsMzGa+eqt658oJ75IvQXAeONmwvEMrvJQKnRElq/frzBR7fhmWY5uLw==} dependencies: - vue-demi: 0.14.6(vue@3.4.3) + vue-demi: 0.14.6(vue@3.4.5) transitivePeerDependencies: - '@vue/composition-api' - vue @@ -1692,8 +1692,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /axios@1.6.3(debug@4.3.4): - resolution: {integrity: sha512-fWyNdeawGam70jXSVlKl+SUNVcL6j6W79CuSIPfi6HnDUmSCH6gyUys/HrqHeA/wU0Az41rRgean494d0Jb+ww==} + /axios@1.6.5(debug@4.3.4): + resolution: {integrity: sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==} dependencies: follow-redirects: 1.15.4(debug@4.3.4) form-data: 4.0.0 @@ -1758,8 +1758,8 @@ packages: set-function-length: 1.1.1 dev: true - /chai@4.3.10: - resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + /chai@4.4.0: + resolution: {integrity: sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 @@ -2375,6 +2375,12 @@ packages: /estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.5 + dev: true + /eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} dev: true @@ -3506,7 +3512,7 @@ packages: is-interactive: 2.0.0 is-unicode-supported: 2.0.0 log-symbols: 6.0.0 - stdin-discarder: 0.2.1 + stdin-discarder: 0.2.2 string-width: 5.1.2 strip-ansi: 7.1.0 dev: true @@ -3693,8 +3699,8 @@ packages: optional: true dev: true - /postcss@8.4.32: - resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} + /postcss@8.4.33: + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 @@ -3837,7 +3843,7 @@ packages: glob: 10.3.10 dev: true - /rollup-plugin-dts@6.1.0(rollup@4.9.2)(typescript@5.3.3): + /rollup-plugin-dts@6.1.0(rollup@4.9.4)(typescript@5.3.3): resolution: {integrity: sha512-ijSCPICkRMDKDLBK9torss07+8dl9UpY9z1N/zTeA1cIqdzMlpkV3MOOC7zukyvQfDyxa1s3Dl2+DeiP/G6DOw==} engines: {node: '>=16'} peerDependencies: @@ -3845,47 +3851,49 @@ packages: typescript: ^4.5 || ^5.0 dependencies: magic-string: 0.30.5 - rollup: 4.9.2 + rollup: 4.9.4 typescript: 5.3.3 optionalDependencies: '@babel/code-frame': 7.23.5 dev: true - /rollup-plugin-esbuild@6.1.0(esbuild@0.19.11)(rollup@4.9.2)(supports-color@9.4.0): + /rollup-plugin-esbuild@6.1.0(esbuild@0.19.11)(rollup@4.9.4)(supports-color@9.4.0): resolution: {integrity: sha512-HPpXU65V8bSpW8eSYPahtUJaJHmbxJGybuf/M8B3bz/6i11YaYHlNNJIQ38gSEV0FyohQOgVxJ2YMEEZtEmwvA==} engines: {node: '>=14.18.0'} peerDependencies: esbuild: '>=0.18.0' rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 || ^4.0.0 dependencies: - '@rollup/pluginutils': 5.1.0(rollup@4.9.2) + '@rollup/pluginutils': 5.1.0(rollup@4.9.4) debug: 4.3.4(supports-color@9.4.0) es-module-lexer: 1.4.1 esbuild: 0.19.11 get-tsconfig: 4.7.2 - rollup: 4.9.2 + rollup: 4.9.4 transitivePeerDependencies: - supports-color dev: true - /rollup@4.9.2: - resolution: {integrity: sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==} + /rollup@4.9.4: + resolution: {integrity: sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + dependencies: + '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.2 - '@rollup/rollup-android-arm64': 4.9.2 - '@rollup/rollup-darwin-arm64': 4.9.2 - '@rollup/rollup-darwin-x64': 4.9.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.2 - '@rollup/rollup-linux-arm64-gnu': 4.9.2 - '@rollup/rollup-linux-arm64-musl': 4.9.2 - '@rollup/rollup-linux-riscv64-gnu': 4.9.2 - '@rollup/rollup-linux-x64-gnu': 4.9.2 - '@rollup/rollup-linux-x64-musl': 4.9.2 - '@rollup/rollup-win32-arm64-msvc': 4.9.2 - '@rollup/rollup-win32-ia32-msvc': 4.9.2 - '@rollup/rollup-win32-x64-msvc': 4.9.2 + '@rollup/rollup-android-arm-eabi': 4.9.4 + '@rollup/rollup-android-arm64': 4.9.4 + '@rollup/rollup-darwin-arm64': 4.9.4 + '@rollup/rollup-darwin-x64': 4.9.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.4 + '@rollup/rollup-linux-arm64-gnu': 4.9.4 + '@rollup/rollup-linux-arm64-musl': 4.9.4 + '@rollup/rollup-linux-riscv64-gnu': 4.9.4 + '@rollup/rollup-linux-x64-gnu': 4.9.4 + '@rollup/rollup-linux-x64-musl': 4.9.4 + '@rollup/rollup-win32-arm64-msvc': 4.9.4 + '@rollup/rollup-win32-ia32-msvc': 4.9.4 + '@rollup/rollup-win32-x64-msvc': 4.9.4 fsevents: 2.3.3 /run-parallel@1.2.0: @@ -3994,20 +4002,20 @@ packages: resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==} dev: true - /shikiji-core@0.9.16: - resolution: {integrity: sha512-eJIK8/IpzvAGnbckCE2Qf/fOSfpjVLSosUfI3pQAnbphGXagEqiRcT/gyVtL4llqmBh0nexqRdJKMFZF3A6ayw==} + /shikiji-core@0.9.17: + resolution: {integrity: sha512-r1FWTXk6SO2aYqfWgcsJ11MuVQ1ymPSdXzJjK7q8EXuyqu8yc2N5qrQy5+BL6gTVOaF4yLjbxFjF+KTRM1Sp8Q==} dev: false - /shikiji-transformers@0.9.16: - resolution: {integrity: sha512-DcvhYtLc3Xtme070vgyyeHX0XrNK0zHrKIiPk8wcptFbFUuS65qYDd/UFl68+R8KhdoSFTM9EXlBa9MhrGlbaw==} + /shikiji-transformers@0.9.17: + resolution: {integrity: sha512-2CCG9qSLS6Bn/jbeUTEuvC6YSuP8gm8VyX5VjmCvDKyCPGhlLJbH1k/kg9wfRt7cJqpYjhdMDgT5rkdYrOZnsA==} dependencies: - shikiji: 0.9.16 + shikiji: 0.9.17 dev: false - /shikiji@0.9.16: - resolution: {integrity: sha512-QeSwiW88gHke9deQ5Av1f6CEVPGW/riRMPT3vMDGPnASCOhBZK4TYk5ZRoa2qYLncPZS5kXKwcggccQvg3+U7Q==} + /shikiji@0.9.17: + resolution: {integrity: sha512-0z/1NfkhBkm3ijrfFeHg3G9yDNuHhXdAGbQm7tRxj4WQ5z2y0XDbnagFyKyuV2ebCTS1Mwy1I3n0Fzcc/4xdmw==} dependencies: - shikiji-core: 0.9.16 + shikiji-core: 0.9.17 dev: false /side-channel@1.0.4: @@ -4143,8 +4151,8 @@ packages: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} dev: true - /stdin-discarder@0.2.1: - resolution: {integrity: sha512-wRXvkxiYhOAduH+LFL/Qpim5zIWKYH1yEGvU0W8PgmabrZZ29iC1LKS8i443SYct12oZmQH7nyEonKiV8RTIsg==} + /stdin-discarder@0.2.2: + resolution: {integrity: sha512-UhDfHmA92YAlNnCfhmq0VeNL5bDbiZGg7sZ2IvPsXubGkiNa9EC+tUTsjBRsYUAz87btI6/1wf4XoVvQ3uRnmQ==} engines: {node: '>=18'} dev: true @@ -4444,8 +4452,8 @@ packages: engines: {node: '>= 0.8'} dev: true - /vite-node@1.1.1(@types/node@20.10.6)(supports-color@9.4.0): - resolution: {integrity: sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==} + /vite-node@1.1.3(@types/node@20.10.7)(supports-color@9.4.0): + resolution: {integrity: sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: @@ -4453,7 +4461,7 @@ packages: debug: 4.3.4(supports-color@9.4.0) pathe: 1.1.1 picocolors: 1.0.0 - vite: 5.0.10(@types/node@20.10.6) + vite: 5.0.11(@types/node@20.10.7) transitivePeerDependencies: - '@types/node' - less @@ -4465,8 +4473,8 @@ packages: - terser dev: true - /vite@5.0.10(@types/node@20.10.6): - resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} + /vite@5.0.11(@types/node@20.10.7): + resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4493,15 +4501,15 @@ packages: terser: optional: true dependencies: - '@types/node': 20.10.6 + '@types/node': 20.10.7 esbuild: 0.19.11 - postcss: 8.4.32 - rollup: 4.9.2 + postcss: 8.4.33 + rollup: 4.9.4 optionalDependencies: fsevents: 2.3.3 - /vitest@1.1.1(@types/node@20.10.6)(supports-color@9.4.0): - resolution: {integrity: sha512-Ry2qs4UOu/KjpXVfOCfQkTnwSXYGrqTbBZxw6reIYEFjSy1QUARRg5pxiI5BEXy+kBVntxUYNMlq4Co+2vD3fQ==} + /vitest@1.1.3(@types/node@20.10.7)(supports-color@9.4.0): + resolution: {integrity: sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -4525,15 +4533,15 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.10.6 - '@vitest/expect': 1.1.1 - '@vitest/runner': 1.1.1 - '@vitest/snapshot': 1.1.1 - '@vitest/spy': 1.1.1 - '@vitest/utils': 1.1.1 + '@types/node': 20.10.7 + '@vitest/expect': 1.1.3 + '@vitest/runner': 1.1.3 + '@vitest/snapshot': 1.1.3 + '@vitest/spy': 1.1.3 + '@vitest/utils': 1.1.3 acorn-walk: 8.3.1 cac: 6.7.14 - chai: 4.3.10 + chai: 4.4.0 debug: 4.3.4(supports-color@9.4.0) execa: 8.0.1 local-pkg: 0.5.0 @@ -4544,8 +4552,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.8.1 - vite: 5.0.10(@types/node@20.10.6) - vite-node: 1.1.1(@types/node@20.10.6)(supports-color@9.4.0) + vite: 5.0.11(@types/node@20.10.7) + vite-node: 1.1.3(@types/node@20.10.7)(supports-color@9.4.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -4557,7 +4565,7 @@ packages: - terser dev: true - /vue-demi@0.14.6(vue@3.4.3): + /vue-demi@0.14.6(vue@3.4.5): resolution: {integrity: sha512-8QA7wrYSHKaYgUxDA5ZC24w+eHm3sYCbp0EzcDwKqN3p6HqtTCGR/GVsPyZW92unff4UlcSh++lmqDWN3ZIq4w==} engines: {node: '>=12'} hasBin: true @@ -4569,7 +4577,7 @@ packages: '@vue/composition-api': optional: true dependencies: - vue: 3.4.3(typescript@5.3.3) + vue: 3.4.5(typescript@5.3.3) dev: false /vue-template-compiler@2.7.16: @@ -4591,19 +4599,19 @@ packages: typescript: 5.3.3 dev: true - /vue@3.4.3(typescript@5.3.3): - resolution: {integrity: sha512-GjN+culMAGv/mUbkIv8zMKItno8npcj5gWlXkSxf1SPTQf8eJ4A+YfHIvQFyL1IfuJcMl3soA7SmN1fRxbf/wA==} + /vue@3.4.5(typescript@5.3.3): + resolution: {integrity: sha512-VH6nHFhLPjgu2oh5vEBXoNZxsGHuZNr3qf4PHClwJWw6IDqw6B3x+4J+ABdoZ0aJuT8Zi0zf3GpGlLQCrGWHrw==} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@vue/compiler-dom': 3.4.3 - '@vue/compiler-sfc': 3.4.3 - '@vue/runtime-dom': 3.4.3 - '@vue/server-renderer': 3.4.3(vue@3.4.3) - '@vue/shared': 3.4.3 + '@vue/compiler-dom': 3.4.5 + '@vue/compiler-sfc': 3.4.5 + '@vue/runtime-dom': 3.4.5 + '@vue/server-renderer': 3.4.5(vue@3.4.5) + '@vue/shared': 3.4.5 typescript: 5.3.3 dev: false @@ -4612,7 +4620,7 @@ packages: engines: {node: '>=12.0.0'} hasBin: true dependencies: - axios: 1.6.3(debug@4.3.4) + axios: 1.6.5(debug@4.3.4) joi: 17.11.0 lodash: 4.17.21 minimist: 1.2.8 diff --git a/src/client/app/data.ts b/src/client/app/data.ts index ccca8123..c75f79e7 100644 --- a/src/client/app/data.ts +++ b/src/client/app/data.ts @@ -44,9 +44,9 @@ export interface VitePressData { title: Ref description: Ref lang: Ref - isDark: Ref dir: Ref localeIndex: Ref + isDark: Ref } // site data is a singleton @@ -89,14 +89,12 @@ export function initData(route: Route): VitePressData { frontmatter: computed(() => route.data.frontmatter), params: computed(() => route.data.params), lang: computed(() => site.value.lang), - dir: computed(() => route.data.frontmatter.dir || site.value.dir || 'ltr'), + dir: computed(() => route.data.frontmatter.dir || site.value.dir), localeIndex: computed(() => site.value.localeIndex || 'root'), - title: computed(() => { - return createTitle(site.value, route.data) - }), - description: computed(() => { - return route.data.description || site.value.description - }), + title: computed(() => createTitle(site.value, route.data)), + description: computed( + () => route.data.description || site.value.description + ), isDark } } diff --git a/src/client/app/index.ts b/src/client/app/index.ts index a7db0c23..57cfe15a 100644 --- a/src/client/app/index.ts +++ b/src/client/app/index.ts @@ -38,13 +38,13 @@ const Theme = resolveThemeExtends(RawTheme) const VitePressApp = defineComponent({ name: 'VitePressApp', setup() { - const { site } = useData() + const { site, lang, dir } = useData() // change the language on the HTML element based on the current lang onMounted(() => { watchEffect(() => { - document.documentElement.lang = site.value.lang - document.documentElement.dir = site.value.dir + document.documentElement.lang = lang.value + document.documentElement.dir = dir.value }) }) diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 02d98944..a1397018 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -329,7 +329,7 @@ function shouldHotReload(payload: PageDataPayload): boolean { } function updateHistory(href: string) { - if (inBrowser && href !== normalizeHref(location.href)) { + if (inBrowser && normalizeHref(href) !== normalizeHref(location.href)) { // save scroll position before changing url history.replaceState({ scrollPosition: window.scrollY }, document.title) history.pushState(null, '', href) diff --git a/src/client/theme-default/components/VPDoc.vue b/src/client/theme-default/components/VPDoc.vue index af54aa70..dd87ee95 100644 --- a/src/client/theme-default/components/VPDoc.vue +++ b/src/client/theme-default/components/VPDoc.vue @@ -190,9 +190,4 @@ const pageName = computed(() => .VPDoc.has-aside .content-container { max-width: 688px; } - -.external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank'])::after { - content: ''; - color: currentColor; -} diff --git a/src/client/theme-default/composables/local-nav.ts b/src/client/theme-default/composables/local-nav.ts index dc49ed42..ef9084c0 100644 --- a/src/client/theme-default/composables/local-nav.ts +++ b/src/client/theme-default/composables/local-nav.ts @@ -1,5 +1,5 @@ import { onContentUpdated } from 'vitepress' -import { type DefaultTheme } from 'vitepress/theme' +import type { DefaultTheme } from 'vitepress/theme' import { computed, shallowRef } from 'vue' import { getHeaders, type MenuItem } from '../composables/outline' import { useData } from './data' diff --git a/src/client/theme-default/composables/outline.ts b/src/client/theme-default/composables/outline.ts index 59ee7447..8ec4f3e5 100644 --- a/src/client/theme-default/composables/outline.ts +++ b/src/client/theme-default/composables/outline.ts @@ -4,10 +4,11 @@ import type { Header } from '../../shared' import { useAside } from './aside' import { throttleAndDebounce } from '../support/utils' -// magic number to avoid repeated retrieval -const PAGE_OFFSET = 71 +// cached list of anchor elements from resolveHeaders +const resolvedHeaders: { element: HTMLHeadElement; link: string }[] = [] export type MenuItem = Omit & { + element: HTMLHeadElement children?: MenuItem[] } @@ -29,6 +30,7 @@ export function getHeaders(range: DefaultTheme.Config['outline']) { .map((el) => { const level = Number(el.tagName[1]) return { + element: el as HTMLHeadElement, title: serializeHeader(el), link: '#' + el.id, level @@ -78,6 +80,12 @@ export function resolveHeaders( : levelsRange headers = headers.filter((h) => h.level >= high && h.level <= low) + // clear previous caches + resolvedHeaders.length = 0 + // update global header list for active link rendering + for (const { element, link } of headers) { + resolvedHeaders.push({ element, link }) + } const ret: MenuItem[] = [] outer: for (let i = 0; i < headers.length; i++) { @@ -128,40 +136,55 @@ export function useActiveAnchor( return } - const links = [].slice.call( - container.value.querySelectorAll('.outline-link') - ) as HTMLAnchorElement[] - - const anchors = [].slice - .call(document.querySelectorAll('.content .header-anchor')) - .filter((anchor: HTMLAnchorElement) => { - return links.some((link) => { - return link.hash === anchor.hash && anchor.offsetParent !== null - }) - }) as HTMLAnchorElement[] + // pixel offset, start of main content + const offsetDocTop = (() => { + const container = + document.querySelector('#VPContent .VPDoc')?.firstElementChild + if (container) return getAbsoluteTop(container as HTMLElement) + else return 78 + })() const scrollY = window.scrollY const innerHeight = window.innerHeight const offsetHeight = document.body.offsetHeight const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1 - // page bottom - highlight last one - if (anchors.length && isBottom) { - activateLink(anchors[anchors.length - 1].hash) + // resolvedHeaders may be repositioned, hidden or fix positioned + const headers = resolvedHeaders + .map(({ element, link }) => ({ + link, + top: getAbsoluteTop(element) + })) + .filter(({ top }) => !Number.isNaN(top)) + .sort((a, b) => a.top - b.top) + + // no headers available for active link + if (!headers.length) { + activateLink(null) return } - for (let i = 0; i < anchors.length; i++) { - const anchor = anchors[i] - const nextAnchor = anchors[i + 1] + // page top + if (scrollY < 1) { + activateLink(null) + return + } - const [isActive, hash] = isAnchorActive(i, anchor, nextAnchor) + // page bottom - highlight last link + if (isBottom) { + activateLink(headers[headers.length - 1].link) + return + } - if (isActive) { - activateLink(hash) - return + // find the last header above the top of viewport + let activeLink: string | null = null + for (const { link, top } of headers) { + if (top > scrollY + offsetDocTop) { + break } + activeLink = link } + activateLink(activeLink) } function activateLink(hash: string | null) { @@ -190,28 +213,18 @@ export function useActiveAnchor( } } -function getAnchorTop(anchor: HTMLAnchorElement): number { - return anchor.parentElement!.offsetTop - PAGE_OFFSET -} - -function isAnchorActive( - index: number, - anchor: HTMLAnchorElement, - nextAnchor: HTMLAnchorElement | undefined -): [boolean, string | null] { - const scrollTop = window.scrollY - - if (index === 0 && scrollTop === 0) { - return [true, null] - } - - if (scrollTop < getAnchorTop(anchor)) { - return [false, null] - } - - if (!nextAnchor || scrollTop < getAnchorTop(nextAnchor)) { - return [true, anchor.hash] +function getAbsoluteTop(element: HTMLElement): number { + let offsetTop = 0 + while (element !== document.body) { + if (element === null) { + // child element is: + // - not attached to the DOM (display: none) + // - set to fixed position (not scrollable) + // - body or html element (null offsetParent) + return NaN + } + offsetTop += element.offsetTop + element = element.offsetParent as HTMLElement } - - return [false, null] + return offsetTop } diff --git a/src/client/theme-default/styles/components/vp-doc.css b/src/client/theme-default/styles/components/vp-doc.css index d489995f..50181a2f 100644 --- a/src/client/theme-default/styles/components/vp-doc.css +++ b/src/client/theme-default/styles/components/vp-doc.css @@ -558,3 +558,9 @@ .vp-external-link-icon::after { content: ''; } + +/* prettier-ignore */ +.external-link-icon-enabled :is(.vp-doc a[href*='://'], .vp-doc a[target='_blank'])::after { + content: ''; + color: currentColor; +} diff --git a/src/node/build/render.ts b/src/node/build/render.ts index 92768185..7aacff68 100644 --- a/src/node/build/render.ts +++ b/src/node/build/render.ts @@ -152,8 +152,10 @@ export async function renderPage( } } + const dir = pageData.frontmatter.dir || siteData.dir || 'ltr' + const html = ` - + ${ diff --git a/src/shared/shared.ts b/src/shared/shared.ts index 8c8e4884..dce15728 100644 --- a/src/shared/shared.ts +++ b/src/shared/shared.ts @@ -186,7 +186,7 @@ const KNOWN_EXTENSIONS = new Set( 'p7c,p7m,p7r,p7s,pbm,pdf,pfx,php,png,ppt,pptx,ps,pub,qt,rar,roff,rtf,' + 'rtx,ser,sh,spc,svg,swf,t,tar,tcl,tex,texi,texinfo,tgz,tif,tiff,tr,ts,' + 'tsv,ttf,txt,ua,viv,vivo,vsd,wav,weba,webm,webp,woff,woff2,xbm,xhtml,' + - 'xls,xlsx,xml,xul,zip' + 'xls,xlsx,xml,xul,zip,conf' ).split(',') )