diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 516ff3f2eba3..70b6828d0874 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: - node_version: [16, 18, 20] + node_version: [18, 20] steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index b72b2ae80e22..ee639b560fff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,50 @@ +# [1.0.0-rc.1](https://github.com/vuejs/vitepress/compare/v1.0.0-beta.7...v1.0.0-rc.1) (2023-08-08) + +### Bug Fixes + +- `createContentLoader` generates invalid url when `base` is set ([#2714](https://github.com/vuejs/vitepress/issues/2714)) ([0f38eb4](https://github.com/vuejs/vitepress/commit/0f38eb440492f3a486517714976fbfe6dfb30a09)) +- **build:** make outDir from cli work properly ([17378c0](https://github.com/vuejs/vitepress/commit/17378c064f3e6f166ce180f8d7eeced2f1cc4224)), closes [#2716](https://github.com/vuejs/vitepress/issues/2716) +- **build:** nested rewrites not working properly ([0f421d7](https://github.com/vuejs/vitepress/commit/0f421d72221495b8ef14195db3e3df9297ebc6ff)) +- **client:** handle empty hash in links ([#2738](https://github.com/vuejs/vitepress/issues/2738)) ([c6c983e](https://github.com/vuejs/vitepress/commit/c6c983ed73a019027b452b3eaf0ee4b502d38818)) +- fix sitemap path resolution ([481a5e3](https://github.com/vuejs/vitepress/commit/481a5e3cb55c6fda2c318180cfa0532ed34e4fc5)), closes [#2749](https://github.com/vuejs/vitepress/issues/2749) +- **theme:** align max-width media queries ([d31051a](https://github.com/vuejs/vitepress/commit/d31051a05106f97924be3cdb3919f24acc232b59)) +- **theme:** allow using h1 headings in outline ([e3f8fc7](https://github.com/vuejs/vitepress/commit/e3f8fc7972f5506cd9def08ad13c62141737318f)), closes [#1529](https://github.com/vuejs/vitepress/issues/1529) +- **theme:** close dropdown menus after an item is clicked ([#2380](https://github.com/vuejs/vitepress/issues/2380)) ([e54eea3](https://github.com/vuejs/vitepress/commit/e54eea3da0de640e7b343381bddf9a439d638954)) +- **theme:** don't reset scroll position on changing tab in code groups ([039798a](https://github.com/vuejs/vitepress/commit/039798a8c14a8c455e1187c5584c7f518c40f66a)), closes [#2732](https://github.com/vuejs/vitepress/issues/2732) [#2362](https://github.com/vuejs/vitepress/issues/2362) +- **theme:** dont show transparent navbar other than home ([#2742](https://github.com/vuejs/vitepress/issues/2742)) ([1d6254b](https://github.com/vuejs/vitepress/commit/1d6254b615b48ceef85267045e8fce976a7eafd5)) +- **theme:** hide outline marker on scroll to top ([81e7405](https://github.com/vuejs/vitepress/commit/81e7405e193e832442db9aedb50ed3dc741e92ed)) +- **theme:** outline marker flicks when navigating towards above ([e8ebf1b](https://github.com/vuejs/vitepress/commit/e8ebf1b0483e025b7d3bc3ea6eb3fa02d4acac93)), closes [#2665](https://github.com/vuejs/vitepress/issues/2665) [#2676](https://github.com/vuejs/vitepress/issues/2676) +- **theme:** override docsearch button bg ([063b0e5](https://github.com/vuejs/vitepress/commit/063b0e520a0b34db934371f56ddba212ceb3ba4c)), closes [#2735](https://github.com/vuejs/vitepress/issues/2735) +- **theme:** respect feature icon dimensions set from frontmatter ([93823a8](https://github.com/vuejs/vitepress/commit/93823a8566df22c57cb4fbc81fa65c34222ece5e)), closes [#1886](https://github.com/vuejs/vitepress/issues/1886) +- **theme:** scroll code group tab into view on selection ([1a6efba](https://github.com/vuejs/vitepress/commit/1a6efbae8e13eb6612aacdb8d384554e72e5f562)), closes [#2355](https://github.com/vuejs/vitepress/issues/2355) +- **theme:** update sidebar active link status on hash change ([#2736](https://github.com/vuejs/vitepress/issues/2736)) ([3840eaa](https://github.com/vuejs/vitepress/commit/3840eaae163cc9307c8d8525ad03c59752443b2b)) + +### Features + +- **theme:** final re-brand ([#2727](https://github.com/vuejs/vitepress/pull/2727)) ([c0d838b](https://github.com/vuejs/vitepress/commit/c0d838bda0121fc162d1e6a43324f75290bc1b72)) +- allow html blocks inside code groups ([#2719](https://github.com/vuejs/vitepress/issues/2719)) ([7f0c18e](https://github.com/vuejs/vitepress/commit/7f0c18e01384d48380b64ba629229ec048f85453)) +- **build:** add `markdown.preConfig` option ([ce85726](https://github.com/vuejs/vitepress/commit/ce85726c127d9478274126374df9c37ee8b31167)), closes [#1382](https://github.com/vuejs/vitepress/issues/1382) +- **build:** allow overriding vite config loading ([#2750](https://github.com/vuejs/vitepress/issues/2750)) ([1bed154](https://github.com/vuejs/vitepress/commit/1bed154612661ac3783558cf82a7e94832ee4ff8)) +- **client:** allow customizing scrollOffset padding ([20b509c](https://github.com/vuejs/vitepress/commit/20b509c6e1d957c73be75da27635b23de42781d4)), closes [#2739](https://github.com/vuejs/vitepress/issues/2739) +- **client:** allow overriding props on Content ([1179484](https://github.com/vuejs/vitepress/commit/11794844327c65bd6086b1237b0d6568cb32a4cb)), closes [#2712](https://github.com/vuejs/vitepress/issues/2712) +- i18n with sitemap ([#2708](https://github.com/vuejs/vitepress/issues/2708)) ([7778187](https://github.com/vuejs/vitepress/commit/7778187f2dc31554fa7541da9648235c994d4ae8)) +- **search:** allow enabling detailed view by default ([4af5975](https://github.com/vuejs/vitepress/commit/4af597582cd8ae565e22c912f26f67123babcd61)), closes [#2690](https://github.com/vuejs/vitepress/issues/2690) +- **theme:** allow adding custom layouts ([f4a5c43](https://github.com/vuejs/vitepress/commit/f4a5c43cb00d70143cefcd9dfd9ba536f120ffda)), closes [#2547](https://github.com/vuejs/vitepress/issues/2547) +- **theme:** allow customizing default theme's 404 page ([d7e2254](https://github.com/vuejs/vitepress/commit/d7e225473bd072119c3ce76317db2b723be74f81)), closes [#2715](https://github.com/vuejs/vitepress/issues/2715) +- **theme:** allow customizing prev/next text from config file ([09a4fdc](https://github.com/vuejs/vitepress/commit/09a4fdc9b844a3e1877045afc496282b988f6f6b)), closes [#1373](https://github.com/vuejs/vitepress/issues/1373) +- **theme:** allow overriding logo link ([2a7422b](https://github.com/vuejs/vitepress/commit/2a7422bbbf91b852e27525d64627e9cff6eff294)), closes [#1683](https://github.com/vuejs/vitepress/issues/1683) +- **theme:** allow passing html in nav links ([69251b7](https://github.com/vuejs/vitepress/commit/69251b7484d8e4591841c32dd2f5a0179859cf14)), closes [#1652](https://github.com/vuejs/vitepress/issues/1652) +- **theme:** allow setting base path in sidebar items ([#2734](https://github.com/vuejs/vitepress/issues/2734)) ([52884d9](https://github.com/vuejs/vitepress/commit/52884d9d4b3ad294f4c4fcab637c4e07c80dde3a)) + +### Reverts + +- [#2689](https://github.com/vuejs/vitepress/issues/2689) ([#2722](https://github.com/vuejs/vitepress/issues/2722)) ([a56d608](https://github.com/vuejs/vitepress/commit/a56d608bec427ad51a9edb620d8fb01ebae29550)) + +### BREAKING CHANGES + +- Node v18+ is now required to run VitePress. +- VitePress now only provides ESM API. Refer [#2703](https://github.com/vuejs/vitepress/issues/2703) for details. + # [1.0.0-beta.7](https://github.com/vuejs/vitepress/compare/v1.0.0-beta.6...v1.0.0-beta.7) (2023-07-29) ### Bug Fixes diff --git a/__tests__/e2e/frontmatter/multiple-levels-outline.md b/__tests__/e2e/frontmatter/multiple-levels-outline.md index 332a7cda65db..09a1740691dd 100644 --- a/__tests__/e2e/frontmatter/multiple-levels-outline.md +++ b/__tests__/e2e/frontmatter/multiple-levels-outline.md @@ -1,7 +1,7 @@ --- title: Multiple Levels Outline editLink: true -outline: 'deep' +outline: deep --- # h1 - 1 diff --git a/__tests__/unit/client/theme-default/support/sidebar.test.ts b/__tests__/unit/client/theme-default/support/sidebar.test.ts index 5afdb95e3c9b..f33dcbd94401 100644 --- a/__tests__/unit/client/theme-default/support/sidebar.test.ts +++ b/__tests__/unit/client/theme-default/support/sidebar.test.ts @@ -28,15 +28,19 @@ describe('client/theme-default/support/sidebar', () => { } test('gets `/` sidebar', () => { - expect(getSidebar(normalSidebar, '/')).toBe(root) + expect(getSidebar(normalSidebar, '/')).toStrictEqual(root) }) test('gets `/multi-sidebar/` sidebar', () => { - expect(getSidebar(normalSidebar, '/multi-sidebar/')).toBe(another) + expect(getSidebar(normalSidebar, '/multi-sidebar/')).toStrictEqual( + another + ) }) test('gets `/` sidebar again', () => { - expect(getSidebar(normalSidebar, '/some-entry.html')).toBe(root) + expect(getSidebar(normalSidebar, '/some-entry.html')).toStrictEqual( + root + ) }) }) @@ -47,15 +51,19 @@ describe('client/theme-default/support/sidebar', () => { } test('gets `/` sidebar', () => { - expect(getSidebar(reversedSidebar, '/')).toBe(root) + expect(getSidebar(reversedSidebar, '/')).toStrictEqual(root) }) test('gets `/multi-sidebar/` sidebar', () => { - expect(getSidebar(reversedSidebar, '/multi-sidebar/')).toBe(another) + expect(getSidebar(reversedSidebar, '/multi-sidebar/')).toStrictEqual( + another + ) }) test('gets `/` sidebar again', () => { - expect(getSidebar(reversedSidebar, '/some-entry.html')).toBe(root) + expect(getSidebar(reversedSidebar, '/some-entry.html')).toStrictEqual( + root + ) }) }) @@ -74,19 +82,25 @@ describe('client/theme-default/support/sidebar', () => { } test('gets `/` sidebar', () => { - expect(getSidebar(nestedSidebar, '/')).toBe(root) + expect(getSidebar(nestedSidebar, '/')).toStrictEqual(root) }) test('gets `/multi-sidebar/` sidebar', () => { - expect(getSidebar(nestedSidebar, '/multi-sidebar/')).toBe(another) + expect(getSidebar(nestedSidebar, '/multi-sidebar/')).toStrictEqual( + another + ) }) test('gets `/multi-sidebar/nested/` sidebar', () => { - expect(getSidebar(nestedSidebar, '/multi-sidebar/nested/')).toBe(nested) + expect( + getSidebar(nestedSidebar, '/multi-sidebar/nested/') + ).toStrictEqual(nested) }) test('gets `/` sidebar again', () => { - expect(getSidebar(nestedSidebar, '/some-entry.html')).toBe(root) + expect(getSidebar(nestedSidebar, '/some-entry.html')).toStrictEqual( + root + ) }) }) }) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 7033ca61bb08..0bbeef1b1269 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,5 +1,5 @@ import { createRequire } from 'module' -import { defineConfig } from 'vitepress' +import { defineConfig, type DefaultTheme } from 'vitepress' const require = createRequire(import.meta.url) const pkg = require('vitepress/package.json') @@ -13,11 +13,29 @@ export default defineConfig({ cleanUrls: true, sitemap: { - hostname: 'https://vitepress.dev' + hostname: 'https://vitepress.dev', + transformItems(items) { + return items.filter((item) => !item.url.includes('migration')) + } }, head: [ - ['meta', { name: 'theme-color', content: '#3c8772' }], + ['link', { rel: 'icon', href: '/vitepress-logo-mini.svg' }], + ['meta', { name: 'theme-color', content: '#5f67ee' }], + ['meta', { name: 'og:type', content: 'website' }], + ['meta', { name: 'og:locale', content: 'en' }], + ['meta', { name: 'og:site_name', content: 'VitePress' }], + [ + 'meta', + { name: 'og:image', content: 'https://vitepress.dev/vitepress-og.jpg' } + ], + [ + 'meta', + { + name: 'twitter:image', + content: 'https://vitepress.dev/vitepress-og.jpg' + } + ], [ 'script', { @@ -30,11 +48,13 @@ export default defineConfig({ ], themeConfig: { + logo: { src: '/vitepress-logo-mini.svg', width: 24, height: 24 }, + nav: nav(), sidebar: { - '/guide/': sidebarGuide(), - '/reference/': sidebarReference() + '/guide/': { base: '/guide/', items: sidebarGuide() }, + '/reference/': { base: '/reference/', items: sidebarReference() } }, editLink: { @@ -67,9 +87,13 @@ export default defineConfig({ } }) -function nav() { +function nav(): DefaultTheme.NavItem[] { return [ - { text: 'Guide', link: '/guide/what-is-vitepress', activeMatch: '/guide/' }, + { + text: 'Guide', + link: '/guide/what-is-vitepress', + activeMatch: '/guide/' + }, { text: 'Reference', link: '/reference/site-config', @@ -91,142 +115,79 @@ function nav() { ] } -function sidebarGuide() { +/* prettier-ignore */ +function sidebarGuide(): DefaultTheme.SidebarItem[] { return [ { text: 'Introduction', collapsed: false, items: [ - { text: 'What is VitePress?', link: '/guide/what-is-vitepress' }, - { text: 'Getting Started', link: '/guide/getting-started' }, - { text: 'Routing', link: '/guide/routing' }, - { text: 'Deploy', link: '/guide/deploy' } + { text: 'What is VitePress?', link: 'what-is-vitepress' }, + { text: 'Getting Started', link: 'getting-started' }, + { text: 'Routing', link: 'routing' }, + { text: 'Deploy', link: 'deploy' } ] }, { text: 'Writing', collapsed: false, items: [ - { text: 'Markdown Extensions', link: '/guide/markdown' }, - { text: 'Asset Handling', link: '/guide/asset-handling' }, - { text: 'Frontmatter', link: '/guide/frontmatter' }, - { text: 'Using Vue in Markdown', link: '/guide/using-vue' }, - { text: 'Internationalization', link: '/guide/i18n' } + { text: 'Markdown Extensions', link: 'markdown' }, + { text: 'Asset Handling', link: 'asset-handling' }, + { text: 'Frontmatter', link: 'frontmatter' }, + { text: 'Using Vue in Markdown', link: 'using-vue' }, + { text: 'Internationalization', link: 'i18n' } ] }, { text: 'Customization', collapsed: false, items: [ - { text: 'Using a Custom Theme', link: '/guide/custom-theme' }, - { - text: 'Extending the Default Theme', - link: '/guide/extending-default-theme' - }, - { text: 'Build-Time Data Loading', link: '/guide/data-loading' }, - { text: 'SSR Compatibility', link: '/guide/ssr-compat' }, - { text: 'Connecting to a CMS', link: '/guide/cms' } + { text: 'Using a Custom Theme', link: 'custom-theme' }, + { text: 'Extending the Default Theme', link: 'extending-default-theme' }, + { text: 'Build-Time Data Loading', link: 'data-loading' }, + { text: 'SSR Compatibility', link: 'ssr-compat' }, + { text: 'Connecting to a CMS', link: 'cms' } ] }, { text: 'Experimental', collapsed: false, items: [ - { - text: 'MPA Mode', - link: '/guide/mpa-mode' - }, - { - text: 'Sitemap Generation', - link: '/guide/sitemap-generation' - } + { text: 'MPA Mode', link: 'mpa-mode' }, + { text: 'Sitemap Generation', link: 'sitemap-generation' } ] }, - // { - // text: 'Migrations', - // collapsed: false, - // items: [ - // { - // text: 'Migration from VuePress', - // link: '/guide/migration-from-vuepress' - // }, - // { - // text: 'Migration from VitePress 0.x', - // link: '/guide/migration-from-vitepress-0' - // } - // ] - // }, - { - text: 'Config & API Reference', - link: '/reference/site-config' - } + { text: 'Config & API Reference', base: '/reference/', link: 'site-config' } ] } -function sidebarReference() { +function sidebarReference(): DefaultTheme.SidebarItem[] { return [ { text: 'Reference', items: [ - { text: 'Site Config', link: '/reference/site-config' }, - { text: 'Frontmatter Config', link: '/reference/frontmatter-config' }, - { text: 'Runtime API', link: '/reference/runtime-api' }, - { text: 'CLI', link: '/reference/cli' }, + { text: 'Site Config', link: 'site-config' }, + { text: 'Frontmatter Config', link: 'frontmatter-config' }, + { text: 'Runtime API', link: 'runtime-api' }, + { text: 'CLI', link: 'cli' }, { text: 'Default Theme', + base: '/reference/default-theme-', items: [ - { - text: 'Overview', - link: '/reference/default-theme-config' - }, - { - text: 'Nav', - link: '/reference/default-theme-nav' - }, - { - text: 'Sidebar', - link: '/reference/default-theme-sidebar' - }, - { - text: 'Home Page', - link: '/reference/default-theme-home-page' - }, - { - text: 'Footer', - link: '/reference/default-theme-footer' - }, - { - text: 'Layout', - link: '/reference/default-theme-layout' - }, - { - text: 'Badge', - link: '/reference/default-theme-badge' - }, - { - text: 'Team Page', - link: '/reference/default-theme-team-page' - }, - { - text: 'Prev / Next Links', - link: '/reference/default-theme-prev-next-links' - }, - { - text: 'Edit Link', - link: '/reference/default-theme-edit-link' - }, - { - text: 'Last Updated Timestamp', - link: '/reference/default-theme-last-updated' - }, - { - text: 'Search', - link: '/reference/default-theme-search' - }, - { - text: 'Carbon Ads', - link: '/reference/default-theme-carbon-ads' - } + { text: 'Overview', link: 'config' }, + { text: 'Nav', link: 'nav' }, + { text: 'Sidebar', link: 'sidebar' }, + { text: 'Home Page', link: 'home-page' }, + { text: 'Footer', link: 'footer' }, + { text: 'Layout', link: 'layout' }, + { text: 'Badge', link: 'badge' }, + { text: 'Team Page', link: 'team-page' }, + { text: 'Prev / Next Links', link: 'prev-next-links' }, + { text: 'Edit Link', link: 'edit-link' }, + { text: 'Last Updated Timestamp', link: 'last-updated' }, + { text: 'Search', link: 'search' }, + { text: 'Carbon Ads', link: 'carbon-ads' } ] } ] diff --git a/docs/guide/deploy.md b/docs/guide/deploy.md index 679d9ff9c2b2..4994b3205359 100644 --- a/docs/guide/deploy.md +++ b/docs/guide/deploy.md @@ -111,7 +111,7 @@ Set up a new project and change these settings using your dashboard: - **Build Command:** `npm run docs:build` - **Output Directory:** `docs/.vitepress/dist` -- **Node Version:** `16` (or above, by default it usually will be 14 or 16, but on Cloudflare Pages the default is still 12, so you may need to [change that](https://developers.cloudflare.com/pages/platform/build-configuration/)) +- **Node Version:** `18` (or above) ::: warning Don't enable options like _Auto Minify_ for HTML code. It will remove comments from output which have meaning to Vue. You may see hydration mismatch errors if they get removed. diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index d1714f2850cd..f285d3ce8173 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -8,7 +8,7 @@ You can try VitePress directly in your browser on [StackBlitz](https://vitepress ### Prerequisites -- [Node.js](https://nodejs.org/) version 16 or higher. +- [Node.js](https://nodejs.org/) version 18 or higher. - Terminal for accessing VitePress via its command line interface (CLI). - Text Editor with [Markdown](https://en.wikipedia.org/wiki/Markdown) syntax support. - [VSCode](https://code.visualstudio.com/) is recommended, along with the [official Vue extension](https://marketplace.visualstudio.com/items?itemName=Vue.volar). @@ -47,6 +47,12 @@ If using PNPM, you will notice a missing peer warning for `@docsearch/js`. This ::: +::: tip NOTE + +VitePress is an ESM-only package. Don't use `require()` to import it, and make sure your nearest `package.json` contains `"type": "module"`, or change the file extension of your relevant files like `.vitepress/config.js` to `.mjs`/`.mts`. Refer [Vite's troubleshooting guide](http://vitejs.dev/guide/troubleshooting.html#this-package-is-esm-only) for more details. Also, inside async CJS contexts, you can use `await import('vitepress')` instead. + +::: + ### Setup Wizard VitePress ships with a command line setup wizard that will help you scaffold a basic project. After installation, start the wizard by running: diff --git a/docs/index.md b/docs/index.md index b40a9e9b9f0f..3f60c11d114d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -15,6 +15,9 @@ hero: - theme: alt text: View on GitHub link: https://github.com/vuejs/vitepress + image: + src: /vitepress-logo-large.webp + alt: VitePress features: - icon: 📝 @@ -30,3 +33,24 @@ features: title: Ship Fast Sites details: Fast initial load with static HTML, fast post-load navigation with client-side routing. --- + diff --git a/docs/public/vitepress-logo-large.webp b/docs/public/vitepress-logo-large.webp new file mode 100644 index 000000000000..2e47b15514c8 Binary files /dev/null and b/docs/public/vitepress-logo-large.webp differ diff --git a/docs/public/vitepress-logo-mini.svg b/docs/public/vitepress-logo-mini.svg new file mode 100644 index 000000000000..ed6438ade1a4 --- /dev/null +++ b/docs/public/vitepress-logo-mini.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/public/vitepress-og.jpg b/docs/public/vitepress-og.jpg new file mode 100644 index 000000000000..aa8a0ea8e03c Binary files /dev/null and b/docs/public/vitepress-og.jpg differ diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 0df6da0ecd94..85517620bfaa 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -16,14 +16,14 @@ vitepress dev [root] ### Options -| Option | Description | -| - | - | -| `--open [path]` | Open browser on startup (`boolean \| string`) | -| `--port ` | Specify port (`number`) | -| `--base ` | Public base path (default: `/`) (`string`) | -| `--cors` | Enable CORS | -| `--strictPort` | Exit if specified port is already in use (`boolean`) | -| `--force` | Force the optimizer to ignore the cache and re-bundle (`boolean`) | +| Option | Description | +| --------------- | ----------------------------------------------------------------- | +| `--open [path]` | Open browser on startup (`boolean \| string`) | +| `--port ` | Specify port (`number`) | +| `--base ` | Public base path (default: `/`) (`string`) | +| `--cors` | Enable CORS | +| `--strictPort` | Exit if specified port is already in use (`boolean`) | +| `--force` | Force the optimizer to ignore the cache and re-bundle (`boolean`) | ## `vitepress build` @@ -37,14 +37,14 @@ vitepress build [root] ### Options -| Option | Description | -| - | - | -| `--mpa` (experimental) | Build in [MPA mode](../guide/mpa-mode) without client-side hydration (`boolean`) | -| `--base ` | Public base path (default: `/`) (`string`) | -| `--target ` | Transpile target (default: `"modules"`) (`string`) | -| `--outDir ` | Output directory (default: `.vitepress/dist`) (`string`) | +| Option | Description | +| ------------------------------ | ------------------------------------------------------------------------------------------------------------------- | +| `--mpa` (experimental) | Build in [MPA mode](../guide/mpa-mode) without client-side hydration (`boolean`) | +| `--base ` | Public base path (default: `/`) (`string`) | +| `--target ` | Transpile target (default: `"modules"`) (`string`) | +| `--outDir ` | Output directory relative to **cwd** (default: `/.vitepress/dist`) (`string`) | | `--minify [minifier]` | Enable/disable minification, or specify minifier to use (default: `"esbuild"`) (`boolean \| "terser" \| "esbuild"`) | -| `--assetsInlineLimit ` | Static asset base64 inline threshold in bytes (default: `4096`) (`number`) | +| `--assetsInlineLimit ` | Static asset base64 inline threshold in bytes (default: `4096`) (`number`) | ## `vitepress preview` @@ -58,10 +58,10 @@ vitepress preview [root] ### Options -| Option | Description | -| - | - | -| `--base ` | Public base path (default: `/`) (`string`) | -| `--port ` | Specify port (`number`) | +| Option | Description | +| --------------- | ------------------------------------------ | +| `--base ` | Public base path (default: `/`) (`string`) | +| `--port ` | Specify port (`number`) | ## `vitepress init` diff --git a/docs/reference/default-theme-last-updated.md b/docs/reference/default-theme-last-updated.md index 046214c9440c..00fed72a08e8 100644 --- a/docs/reference/default-theme-last-updated.md +++ b/docs/reference/default-theme-last-updated.md @@ -24,4 +24,4 @@ lastUpdated: false --- ``` -Also refer [Default Theme: Last Updated](./default-theme-last-updated#last-updated) for more details. Any truthy value at theme-level will also enable the feature unless explicitly disabled at site or page level. +Also refer [Default Theme: Last Updated](./default-theme-config#lastupdated) for more details. Any truthy value at theme-level will also enable the feature unless explicitly disabled at site or page level. diff --git a/docs/reference/default-theme-layout.md b/docs/reference/default-theme-layout.md index 27426e9cb61d..246e20fa9f04 100644 --- a/docs/reference/default-theme-layout.md +++ b/docs/reference/default-theme-layout.md @@ -36,3 +36,27 @@ Option `home` will generate templated "Homepage". In this layout, you can set ex ## No Layout If you don't want any layout, you can pass `layout: false` through frontmatter. This option is helpful if you want a fully-customizable landing page (without any sidebar, navbar, or footer by default). + +## Custom Layout + +You can also use a custom layout: + +```md +--- +layout: foo +--- +``` + +This will look for a component named `foo` registered in context. For example, you can register your component globally in `.vitepress/theme/index.ts`: + +```ts +import DefaultTheme from 'vitepress/theme' +import Foo from './Foo.vue' + +export default { + extends: DefaultTheme, + enhanceApp({ app }) { + app.component('foo', Foo) + } +} +``` diff --git a/docs/reference/site-config.md b/docs/reference/site-config.md index 73fa895308cb..1bc97b92ecdb 100644 --- a/docs/reference/site-config.md +++ b/docs/reference/site-config.md @@ -10,7 +10,7 @@ Site config is where you can define the global settings of the site. App config ### Config Resolution -The config file is always resolved from `/.vitepress/config.[ext]`, where `` is your VitePress [project root](../guide/routing#root-and-source-directory), and `[ext]` is one of the supported file extensions. TypeScript is supported out of the box. Supported extensions include `.js`, `.ts`, `.cjs`, `.mjs`, `.cts`, and `.mts`. +The config file is always resolved from `/.vitepress/config.[ext]`, where `` is your VitePress [project root](../guide/routing#root-and-source-directory), and `[ext]` is one of the supported file extensions. TypeScript is supported out of the box. Supported extensions include `.js`, `.ts`, `.mjs`, and `.mts`. It is recommended to use ES modules syntax in config files. The config file should default export an object: @@ -155,17 +155,56 @@ export default { Additional elements to render in the `` tag in the page HTML. The user-added tags are rendered before the closing `head` tag, after VitePress tags. +```ts +type HeadConfig = + | [string, Record] + | [string, Record, string] +``` + +#### Example: Adding a favicon + +```ts +export default { + head: [['link', { rel: 'icon', href: '/favicon.ico' }]] +} // put favicon.ico in public directory, if base is set, use /base/favicon.ico + +/* Would render: + +*/ +``` + +#### Example: Adding Google Fonts + ```ts export default { head: [ + [ + 'link', + { rel: 'preconnect', href: 'https://fonts.googleapis.com' } + ], [ 'link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' } - // would render: - // - // ], + [ + 'link', + { href: 'https://fonts.googleapis.com/css2?family=Roboto&display=swap', rel: 'stylesheet' } + ] + ] +} + +/* Would render: + + + +*/ +``` + +#### Example: Registering a service worker +```ts +export default { + head: [ [ 'script', { id: 'register-sw' }, @@ -174,24 +213,50 @@ export default { navigator.serviceWorker.register('/sw.js') } })()` - // would render: - // - // ] ] } + +/* Would render: + +*/ ``` +#### Example: Using Google Analytics + ```ts -type HeadConfig = - | [string, Record] - | [string, Record, string] +export default { + head: [ + [ + 'script', + { async: '', src: 'https://www.googletagmanager.com/gtag/js?id=TAG_ID' } + ], + [ + 'script', + {}, + `window.dataLayer = window.dataLayer || []; + function gtag(){dataLayer.push(arguments);} + gtag('js', new Date()); + gtag('config', 'TAG_ID');` + ] + ] +} + +/* Would render: + + +*/ ``` ### lang @@ -239,7 +304,7 @@ Enabling this may require additional configuration on your hosting platform. For - Type: `Record` -Defines custom directory <-> URL mappings. See [Routing: Route Rewrites](../guide/routing#route-rewrites) for more details. +Defines custom directory <-> URL mappings. See [Routing: Route Rewrites](../guide/routing#route-rewrites) for more details. ```ts export default { diff --git a/netlify.toml b/netlify.toml index c1ae33d3b43d..f4e5c8022f3a 100644 --- a/netlify.toml +++ b/netlify.toml @@ -1,5 +1,5 @@ [build.environment] - NODE_VERSION = "16" + NODE_VERSION = "18" [build] publish = "docs/.vitepress/dist" diff --git a/package.json b/package.json index e17a30276ab1..72edaa2851b6 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,15 @@ { "name": "vitepress", - "version": "1.0.0-beta.7", + "version": "1.0.0-rc.1", "description": "Vite & Vue powered static site generator", "type": "module", - "packageManager": "pnpm@8.6.10", + "packageManager": "pnpm@8.6.12", "main": "dist/node/index.js", "types": "types/index.d.ts", "exports": { ".": { "types": "./types/index.d.ts", - "import": "./dist/node/index.js", - "require": "./dist/node-cjs/index.cjs" + "default": "./dist/node/index.js" }, "./dist/*": "./dist/*", "./package.json": "./package.json", @@ -95,14 +94,14 @@ "@docsearch/js": "^3.5.1", "@vitejs/plugin-vue": "^4.2.3", "@vue/devtools-api": "^6.5.0", - "@vueuse/core": "^10.2.1", - "@vueuse/integrations": "^10.2.1", + "@vueuse/core": "^10.3.0", + "@vueuse/integrations": "^10.3.0", "body-scroll-lock": "4.0.0-beta.0", "focus-trap": "^7.5.2", "mark.js": "8.11.1", "minisearch": "^6.1.0", "shiki": "^0.14.3", - "vite": "^4.4.7", + "vite": "^4.4.9", "vue": "^3.3.4" }, "devDependencies": { @@ -126,21 +125,21 @@ "@types/escape-html": "^1.0.2", "@types/fs-extra": "^11.0.1", "@types/mark.js": "^8.11.8", - "@types/markdown-it": "^12.2.3", + "@types/markdown-it": "^13.0.0", "@types/markdown-it-attrs": "^4.1.0", "@types/markdown-it-container": "^2.0.6", "@types/markdown-it-emoji": "^2.0.2", "@types/micromatch": "^4.0.2", "@types/minimist": "^1.2.2", - "@types/node": "^20.4.5", + "@types/node": "^20.4.8", "@types/prompts": "^2.4.4", "@vue/shared": "^3.3.4", "chokidar": "^3.5.3", "compression": "^1.7.4", - "conventional-changelog-cli": "^2", + "conventional-changelog-cli": "^3.0.0", "cross-spawn": "^7.0.3", "debug": "^4.3.4", - "esbuild": "^0.18.17", + "esbuild": "^0.18.20", "escape-html": "^1.0.3", "execa": "^7.2.0", "fast-glob": "^3.3.1", @@ -159,18 +158,18 @@ "minimist": "^1.2.8", "nanoid": "^4.0.2", "npm-run-all": "^4.1.5", - "ora": "^7.0.0", + "ora": "^7.0.1", "path-to-regexp": "^6.2.1", "picocolors": "^1.0.0", "pkg-dir": "^7.0.0", "playwright-chromium": "^1.36.2", "polka": "1.0.0-next.22", - "prettier": "^3.0.0", + "prettier": "^3.0.1", "prompts": "^2.4.2", "punycode": "^2.3.0", "rimraf": "^5.0.1", - "rollup": "^3.27.0", - "rollup-plugin-dts": "^5.3.0", + "rollup": "^3.27.2", + "rollup-plugin-dts": "^5.3.1", "rollup-plugin-esbuild": "^5.0.0", "semver": "^7.5.4", "shiki-processor": "^0.1.3", @@ -179,7 +178,7 @@ "sitemap": "^7.1.1", "supports-color": "^9.4.0", "typescript": "^5.1.6", - "vitest": "^0.33.0", + "vitest": "^0.34.1", "vue-tsc": "^1.8.8", "wait-on": "^7.0.1" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f75cb9f9bb5b..80137906fc7a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,16 +16,16 @@ importers: version: 3.5.1(@algolia/client-search@4.19.1)(search-insights@2.7.0) '@vitejs/plugin-vue': specifier: ^4.2.3 - version: 4.2.3(vite@4.4.7)(vue@3.3.4) + version: 4.2.3(vite@4.4.9)(vue@3.3.4) '@vue/devtools-api': specifier: ^6.5.0 version: 6.5.0 '@vueuse/core': - specifier: ^10.2.1 - version: 10.2.1(vue@3.3.4) + specifier: ^10.3.0 + version: 10.3.0(vue@3.3.4) '@vueuse/integrations': - specifier: ^10.2.1 - version: 10.2.1(focus-trap@7.5.2)(vue@3.3.4) + specifier: ^10.3.0 + version: 10.3.0(focus-trap@7.5.2)(vue@3.3.4) body-scroll-lock: specifier: 4.0.0-beta.0 version: 4.0.0-beta.0 @@ -42,8 +42,8 @@ importers: specifier: ^0.14.3 version: 0.14.3 vite: - specifier: ^4.4.7 - version: 4.4.7(@types/node@20.4.5) + specifier: ^4.4.9 + version: 4.4.9(@types/node@20.4.8) vue: specifier: ^3.3.4 version: 3.3.4 @@ -74,19 +74,19 @@ importers: version: 0.12.0 '@rollup/plugin-alias': specifier: ^5.0.0 - version: 5.0.0(rollup@3.27.0) + version: 5.0.0(rollup@3.27.2) '@rollup/plugin-commonjs': specifier: ^25.0.3 - version: 25.0.3(rollup@3.27.0) + version: 25.0.3(rollup@3.27.2) '@rollup/plugin-json': specifier: ^6.0.0 - version: 6.0.0(rollup@3.27.0) + version: 6.0.0(rollup@3.27.2) '@rollup/plugin-node-resolve': specifier: ^15.1.0 - version: 15.1.0(rollup@3.27.0) + version: 15.1.0(rollup@3.27.2) '@rollup/plugin-replace': specifier: ^5.0.2 - version: 5.0.2(rollup@3.27.0) + version: 5.0.2(rollup@3.27.2) '@types/body-scroll-lock': specifier: ^3.1.0 version: 3.1.0 @@ -109,8 +109,8 @@ importers: specifier: ^8.11.8 version: 8.11.8 '@types/markdown-it': - specifier: ^12.2.3 - version: 12.2.3 + specifier: ^13.0.0 + version: 13.0.0 '@types/markdown-it-attrs': specifier: ^4.1.0 version: 4.1.0 @@ -127,8 +127,8 @@ importers: specifier: ^1.2.2 version: 1.2.2 '@types/node': - specifier: ^20.4.5 - version: 20.4.5 + specifier: ^20.4.8 + version: 20.4.8 '@types/prompts': specifier: ^2.4.4 version: 2.4.4 @@ -142,8 +142,8 @@ importers: specifier: ^1.7.4 version: 1.7.4(supports-color@9.4.0) conventional-changelog-cli: - specifier: ^2 - version: 2.2.2 + specifier: ^3.0.0 + version: 3.0.0 cross-spawn: specifier: ^7.0.3 version: 7.0.3 @@ -151,8 +151,8 @@ importers: specifier: ^4.3.4 version: 4.3.4(supports-color@9.4.0) esbuild: - specifier: ^0.18.17 - version: 0.18.17 + specifier: ^0.18.20 + version: 0.18.20 escape-html: specifier: ^1.0.3 version: 1.0.3 @@ -185,7 +185,7 @@ importers: version: 13.0.1 markdown-it-anchor: specifier: ^8.6.7 - version: 8.6.7(@types/markdown-it@12.2.3)(markdown-it@13.0.1) + version: 8.6.7(@types/markdown-it@13.0.0)(markdown-it@13.0.1) markdown-it-attrs: specifier: ^4.1.6 version: 4.1.6(markdown-it@13.0.1) @@ -208,8 +208,8 @@ importers: specifier: ^4.1.5 version: 4.1.5 ora: - specifier: ^7.0.0 - version: 7.0.0 + specifier: ^7.0.1 + version: 7.0.1 path-to-regexp: specifier: ^6.2.1 version: 6.2.1 @@ -226,8 +226,8 @@ importers: specifier: 1.0.0-next.22 version: 1.0.0-next.22 prettier: - specifier: ^3.0.0 - version: 3.0.0 + specifier: ^3.0.1 + version: 3.0.1 prompts: specifier: ^2.4.2 version: 2.4.2 @@ -238,14 +238,14 @@ importers: specifier: ^5.0.1 version: 5.0.1 rollup: - specifier: ^3.27.0 - version: 3.27.0 + specifier: ^3.27.2 + version: 3.27.2 rollup-plugin-dts: - specifier: ^5.3.0 - version: 5.3.0(rollup@3.27.0)(typescript@5.1.6) + specifier: ^5.3.1 + version: 5.3.1(rollup@3.27.2)(typescript@5.1.6) rollup-plugin-esbuild: specifier: ^5.0.0 - version: 5.0.0(esbuild@0.18.17)(rollup@3.27.0)(supports-color@9.4.0) + version: 5.0.0(esbuild@0.18.20)(rollup@3.27.2)(supports-color@9.4.0) semver: specifier: ^7.5.4 version: 7.5.4 @@ -268,8 +268,8 @@ importers: specifier: ^5.1.6 version: 5.1.6 vitest: - specifier: ^0.33.0 - version: 0.33.0(supports-color@9.4.0) + specifier: ^0.34.1 + version: 0.34.1(supports-color@9.4.0) vue-tsc: specifier: ^1.8.8 version: 1.8.8(typescript@5.1.6) @@ -431,11 +431,12 @@ packages: '@algolia/requester-common': 4.19.1 dev: false - /@babel/code-frame@7.22.5: - resolution: {integrity: sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==} + /@babel/code-frame@7.22.10: + resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/highlight': 7.22.5 + '@babel/highlight': 7.22.10 + chalk: 2.4.2 dev: true /@babel/helper-string-parser@7.22.5: @@ -446,8 +447,8 @@ packages: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} - /@babel/highlight@7.22.5: - resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} + /@babel/highlight@7.22.10: + resolution: {integrity: sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==} engines: {node: '>=6.9.0'} requiresBuild: true dependencies: @@ -456,15 +457,15 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser@7.22.7: - resolution: {integrity: sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==} + /@babel/parser@7.22.10: + resolution: {integrity: sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.22.5 + '@babel/types': 7.22.10 - /@babel/types@7.22.5: - resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} + /@babel/types@7.22.10: + resolution: {integrity: sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.22.5 @@ -528,176 +529,176 @@ packages: - search-insights dev: false - /@esbuild/android-arm64@0.18.17: - resolution: {integrity: sha512-9np+YYdNDed5+Jgr1TdWBsozZ85U1Oa3xW0c7TWqH0y2aGghXtZsuT8nYRbzOMcl0bXZXjOGbksoTtVOlWrRZg==} + /@esbuild/android-arm64@0.18.20: + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} engines: {node: '>=12'} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@esbuild/android-arm@0.18.17: - resolution: {integrity: sha512-wHsmJG/dnL3OkpAcwbgoBTTMHVi4Uyou3F5mf58ZtmUyIKfcdA7TROav/6tCzET4A3QW2Q2FC+eFneMU+iyOxg==} + /@esbuild/android-arm@0.18.20: + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} engines: {node: '>=12'} cpu: [arm] os: [android] requiresBuild: true optional: true - /@esbuild/android-x64@0.18.17: - resolution: {integrity: sha512-O+FeWB/+xya0aLg23hHEM2E3hbfwZzjqumKMSIqcHbNvDa+dza2D0yLuymRBQQnC34CWrsJUXyH2MG5VnLd6uw==} + /@esbuild/android-x64@0.18.20: + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} engines: {node: '>=12'} cpu: [x64] os: [android] requiresBuild: true optional: true - /@esbuild/darwin-arm64@0.18.17: - resolution: {integrity: sha512-M9uJ9VSB1oli2BE/dJs3zVr9kcCBBsE883prage1NWz6pBS++1oNn/7soPNS3+1DGj0FrkSvnED4Bmlu1VAE9g==} + /@esbuild/darwin-arm64@0.18.20: + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@esbuild/darwin-x64@0.18.17: - resolution: {integrity: sha512-XDre+J5YeIJDMfp3n0279DFNrGCXlxOuGsWIkRb1NThMZ0BsrWXoTg23Jer7fEXQ9Ye5QjrvXpxnhzl3bHtk0g==} + /@esbuild/darwin-x64@0.18.20: + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@esbuild/freebsd-arm64@0.18.17: - resolution: {integrity: sha512-cjTzGa3QlNfERa0+ptykyxs5A6FEUQQF0MuilYXYBGdBxD3vxJcKnzDlhDCa1VAJCmAxed6mYhA2KaJIbtiNuQ==} + /@esbuild/freebsd-arm64@0.18.20: + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] requiresBuild: true optional: true - /@esbuild/freebsd-x64@0.18.17: - resolution: {integrity: sha512-sOxEvR8d7V7Kw8QqzxWc7bFfnWnGdaFBut1dRUYtu+EIRXefBc/eIsiUiShnW0hM3FmQ5Zf27suDuHsKgZ5QrA==} + /@esbuild/freebsd-x64@0.18.20: + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] requiresBuild: true optional: true - /@esbuild/linux-arm64@0.18.17: - resolution: {integrity: sha512-c9w3tE7qA3CYWjT+M3BMbwMt+0JYOp3vCMKgVBrCl1nwjAlOMYzEo+gG7QaZ9AtqZFj5MbUc885wuBBmu6aADQ==} + /@esbuild/linux-arm64@0.18.20: + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-arm@0.18.17: - resolution: {integrity: sha512-2d3Lw6wkwgSLC2fIvXKoMNGVaeY8qdN0IC3rfuVxJp89CRfA3e3VqWifGDfuakPmp90+ZirmTfye1n4ncjv2lg==} + /@esbuild/linux-arm@0.18.20: + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} engines: {node: '>=12'} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-ia32@0.18.17: - resolution: {integrity: sha512-1DS9F966pn5pPnqXYz16dQqWIB0dmDfAQZd6jSSpiT9eX1NzKh07J6VKR3AoXXXEk6CqZMojiVDSZi1SlmKVdg==} + /@esbuild/linux-ia32@0.18.20: + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-loong64@0.18.17: - resolution: {integrity: sha512-EvLsxCk6ZF0fpCB6w6eOI2Fc8KW5N6sHlIovNe8uOFObL2O+Mr0bflPHyHwLT6rwMg9r77WOAWb2FqCQrVnwFg==} + /@esbuild/linux-loong64@0.18.20: + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-mips64el@0.18.17: - resolution: {integrity: sha512-e0bIdHA5p6l+lwqTE36NAW5hHtw2tNRmHlGBygZC14QObsA3bD4C6sXLJjvnDIjSKhW1/0S3eDy+QmX/uZWEYQ==} + /@esbuild/linux-mips64el@0.18.20: + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-ppc64@0.18.17: - resolution: {integrity: sha512-BAAilJ0M5O2uMxHYGjFKn4nJKF6fNCdP1E0o5t5fvMYYzeIqy2JdAP88Az5LHt9qBoUa4tDaRpfWt21ep5/WqQ==} + /@esbuild/linux-ppc64@0.18.20: + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-riscv64@0.18.17: - resolution: {integrity: sha512-Wh/HW2MPnC3b8BqRSIme/9Zhab36PPH+3zam5pqGRH4pE+4xTrVLx2+XdGp6fVS3L2x+DrsIcsbMleex8fbE6g==} + /@esbuild/linux-riscv64@0.18.20: + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-s390x@0.18.17: - resolution: {integrity: sha512-j/34jAl3ul3PNcK3pfI0NSlBANduT2UO5kZ7FCaK33XFv3chDhICLY8wJJWIhiQ+YNdQ9dxqQctRg2bvrMlYgg==} + /@esbuild/linux-s390x@0.18.20: + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] requiresBuild: true optional: true - /@esbuild/linux-x64@0.18.17: - resolution: {integrity: sha512-QM50vJ/y+8I60qEmFxMoxIx4de03pGo2HwxdBeFd4nMh364X6TIBZ6VQ5UQmPbQWUVWHWws5MmJXlHAXvJEmpQ==} + /@esbuild/linux-x64@0.18.20: + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} engines: {node: '>=12'} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@esbuild/netbsd-x64@0.18.17: - resolution: {integrity: sha512-/jGlhWR7Sj9JPZHzXyyMZ1RFMkNPjC6QIAan0sDOtIo2TYk3tZn5UDrkE0XgsTQCxWTTOcMPf9p6Rh2hXtl5TQ==} + /@esbuild/netbsd-x64@0.18.20: + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] requiresBuild: true optional: true - /@esbuild/openbsd-x64@0.18.17: - resolution: {integrity: sha512-rSEeYaGgyGGf4qZM2NonMhMOP/5EHp4u9ehFiBrg7stH6BYEEjlkVREuDEcQ0LfIl53OXLxNbfuIj7mr5m29TA==} + /@esbuild/openbsd-x64@0.18.20: + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] requiresBuild: true optional: true - /@esbuild/sunos-x64@0.18.17: - resolution: {integrity: sha512-Y7ZBbkLqlSgn4+zot4KUNYst0bFoO68tRgI6mY2FIM+b7ZbyNVtNbDP5y8qlu4/knZZ73fgJDlXID+ohY5zt5g==} + /@esbuild/sunos-x64@0.18.20: + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] requiresBuild: true optional: true - /@esbuild/win32-arm64@0.18.17: - resolution: {integrity: sha512-bwPmTJsEQcbZk26oYpc4c/8PvTY3J5/QK8jM19DVlEsAB41M39aWovWoHtNm78sd6ip6prilxeHosPADXtEJFw==} + /@esbuild/win32-arm64@0.18.20: + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@esbuild/win32-ia32@0.18.17: - resolution: {integrity: sha512-H/XaPtPKli2MhW+3CQueo6Ni3Avggi6hP/YvgkEe1aSaxw+AeO8MFjq8DlgfTd9Iz4Yih3QCZI6YLMoyccnPRg==} + /@esbuild/win32-ia32@0.18.20: + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} engines: {node: '>=12'} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@esbuild/win32-x64@0.18.17: - resolution: {integrity: sha512-fGEb8f2BSA3CW7riJVurug65ACLuQAzKq0SSqkY2b2yHHH0MzDfbLyKIGzHwOI/gkHcxM/leuSW6D5w/LMNitA==} + /@esbuild/win32-x64@0.18.20: + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -836,7 +837,7 @@ packages: resolution: {integrity: sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==} dev: true - /@rollup/plugin-alias@5.0.0(rollup@3.27.0): + /@rollup/plugin-alias@5.0.0(rollup@3.27.2): resolution: {integrity: sha512-l9hY5chSCjuFRPsnRm16twWBiSApl2uYFLsepQYwtBuAxNMQ/1dJqADld40P0Jkqm65GRTLy/AC6hnpVebtLsA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -845,11 +846,11 @@ packages: rollup: optional: true dependencies: - rollup: 3.27.0 + rollup: 3.27.2 slash: 4.0.0 dev: true - /@rollup/plugin-commonjs@25.0.3(rollup@3.27.0): + /@rollup/plugin-commonjs@25.0.3(rollup@3.27.2): resolution: {integrity: sha512-uBdtWr/H3BVcgm97MUdq2oJmqBR23ny1hOrWe2PKo9FTbjsGqg32jfasJUKYAI5ouqacjRnj65mBB/S79F+GQA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -858,16 +859,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.27.0) + '@rollup/pluginutils': 5.0.2(rollup@3.27.2) commondir: 1.0.1 estree-walker: 2.0.2 glob: 8.1.0 is-reference: 1.2.1 magic-string: 0.27.0 - rollup: 3.27.0 + rollup: 3.27.2 dev: true - /@rollup/plugin-json@6.0.0(rollup@3.27.0): + /@rollup/plugin-json@6.0.0(rollup@3.27.2): resolution: {integrity: sha512-i/4C5Jrdr1XUarRhVu27EEwjt4GObltD7c+MkCIpO2QIbojw8MUs+CCTqOphQi3Qtg1FLmYt+l+6YeoIf51J7w==} engines: {node: '>=14.0.0'} peerDependencies: @@ -876,11 +877,11 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.27.0) - rollup: 3.27.0 + '@rollup/pluginutils': 5.0.2(rollup@3.27.2) + rollup: 3.27.2 dev: true - /@rollup/plugin-node-resolve@15.1.0(rollup@3.27.0): + /@rollup/plugin-node-resolve@15.1.0(rollup@3.27.2): resolution: {integrity: sha512-xeZHCgsiZ9pzYVgAo9580eCGqwh/XCEUM9q6iQfGNocjgkufHAqC3exA+45URvhiYV8sBF9RlBai650eNs7AsA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -889,16 +890,16 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.27.0) + '@rollup/pluginutils': 5.0.2(rollup@3.27.2) '@types/resolve': 1.20.2 deepmerge: 4.3.1 is-builtin-module: 3.2.1 is-module: 1.0.0 - resolve: 1.22.2 - rollup: 3.27.0 + resolve: 1.22.4 + rollup: 3.27.2 dev: true - /@rollup/plugin-replace@5.0.2(rollup@3.27.0): + /@rollup/plugin-replace@5.0.2(rollup@3.27.2): resolution: {integrity: sha512-M9YXNekv/C/iHHK+cvORzfRYfPbq0RDD8r0G+bMiTXjNGKulPnCT9O3Ss46WfhI6ZOCgApOP7xAdmCQJ+U2LAA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -907,12 +908,12 @@ packages: rollup: optional: true dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.27.0) + '@rollup/pluginutils': 5.0.2(rollup@3.27.2) magic-string: 0.27.0 - rollup: 3.27.0 + rollup: 3.27.2 dev: true - /@rollup/pluginutils@5.0.2(rollup@3.27.0): + /@rollup/pluginutils@5.0.2(rollup@3.27.2): resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==} engines: {node: '>=14.0.0'} peerDependencies: @@ -924,7 +925,7 @@ packages: '@types/estree': 1.0.1 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 3.27.0 + rollup: 3.27.2 dev: true /@sideway/address@4.1.4: @@ -949,7 +950,7 @@ packages: resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} dependencies: '@types/connect': 3.4.35 - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/body-scroll-lock@3.1.0: @@ -979,13 +980,13 @@ packages: /@types/connect@3.4.35: resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} dependencies: - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/cross-spawn@6.0.2: resolution: {integrity: sha512-KuwNhp3eza+Rhu8IFI5HUXRP0LIhqH5cAjubUvGXXthh4YYBuP2ntwEX+Cz8GJoZUHlKo247wPWOfA9LYEq4cw==} dependencies: - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/debug@4.1.8: @@ -1005,7 +1006,7 @@ packages: /@types/express-serve-static-core@4.17.35: resolution: {integrity: sha512-wALWQwrgiB2AWTT91CB62b6Yt0sNHpznUXeZEcnPU3DRdlDIz74x8Qg1UUYKSVFi+va5vKOLYRBI1bRKiLLKIg==} dependencies: - '@types/node': 20.4.5 + '@types/node': 20.4.8 '@types/qs': 6.9.7 '@types/range-parser': 1.2.4 '@types/send': 0.17.1 @@ -1024,7 +1025,7 @@ packages: resolution: {integrity: sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==} dependencies: '@types/jsonfile': 6.1.1 - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/http-errors@2.0.1: @@ -1040,7 +1041,7 @@ packages: /@types/jsonfile@6.1.1: resolution: {integrity: sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==} dependencies: - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/linkify-it@3.0.2: @@ -1056,19 +1057,19 @@ packages: /@types/markdown-it-attrs@4.1.0: resolution: {integrity: sha512-ILGUUJf7gydzxY3FrN2XwFT/f6rfxtkXZal478Jf4vqFn2AkQCwGCTx3TI+IPT+5ipOf+hUplem8wfVuCyK/Pw==} dependencies: - '@types/markdown-it': 12.2.3 + '@types/markdown-it': 13.0.0 dev: true /@types/markdown-it-container@2.0.6: resolution: {integrity: sha512-euUVSCx2+tGV8BlI7yA7AXmNsLzYCoUbg/O2jJ0wzV/0oxKbmd5RJZI2map8cuEKgmjNy13ndFWRZZO+6rl0GA==} dependencies: - '@types/markdown-it': 12.2.3 + '@types/markdown-it': 13.0.0 dev: true /@types/markdown-it-emoji@2.0.2: resolution: {integrity: sha512-2ln8Wjbcj/0oRi/6VnuMeWEHHuK8uapFttvcLmDIe1GKCsFBLOLBX+D+xhDa9oWOQV0IpvxwrSfKKssAqqroog==} dependencies: - '@types/markdown-it': 12.2.3 + '@types/markdown-it': 13.0.0 dev: true /@types/markdown-it@12.2.3: @@ -1078,6 +1079,13 @@ packages: '@types/mdurl': 1.0.2 dev: true + /@types/markdown-it@13.0.0: + resolution: {integrity: sha512-mPTaUl5glYfzdJFeCsvhXQwZKdyszNAZcMm5ZTP5SfpTu+vIbog7J3z8Fa4x/Fzv5TB4R6OA/pHBYIYmkYOWGQ==} + dependencies: + '@types/linkify-it': 3.0.2 + '@types/mdurl': 1.0.2 + dev: true + /@types/mdurl@1.0.2: resolution: {integrity: sha512-eC4U9MlIcu2q0KQmXszyn5Akca/0jrQmwDRgpAMJai7qBWq4amIQhZyNau4VYGtCeALvW1/NtjzJJ567aZxfKA==} dev: true @@ -1108,8 +1116,8 @@ packages: resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} dev: true - /@types/node@20.4.5: - resolution: {integrity: sha512-rt40Nk13II9JwQBdeYqmbn2Q6IVTA5uPhvSO+JVqdXw/6/4glI6oR9ezty/A9Hg5u7JH4OmYmuQ+XvjKm0Datg==} + /@types/node@20.4.8: + resolution: {integrity: sha512-0mHckf6D2DiIAzh8fM8f3HQCvMKDpK94YQ0DSVkfWTG9BZleYIWudw9cJxX8oCk9bM+vAkDyujDV6dmKHbvQpg==} /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -1118,7 +1126,7 @@ packages: /@types/prompts@2.4.4: resolution: {integrity: sha512-p5N9uoTH76lLvSAaYSZtBCdEXzpOOufsRjnhjVSrZGXikVGHX9+cc9ERtHRV4hvBKHyZb1bg4K+56Bd2TqUn4A==} dependencies: - '@types/node': 20.4.5 + '@types/node': 20.4.8 kleur: 3.0.3 dev: true @@ -1137,14 +1145,14 @@ packages: /@types/sax@1.2.4: resolution: {integrity: sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw==} dependencies: - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/send@0.17.1: resolution: {integrity: sha512-Cwo8LE/0rnvX7kIIa3QHCkcuF21c05Ayb0ZfxPiv0W8VRiZiNW/WuRupHKpqqGVGf7SUA44QSOUKaEd9lIrd/Q==} dependencies: '@types/mime': 1.3.2 - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/serve-static@1.15.2: @@ -1152,7 +1160,7 @@ packages: dependencies: '@types/http-errors': 2.0.1 '@types/mime': 3.0.1 - '@types/node': 20.4.5 + '@types/node': 20.4.8 dev: true /@types/sizzle@2.3.3: @@ -1163,49 +1171,49 @@ packages: resolution: {integrity: sha512-4p9vcSmxAayx72yn70joFoL44c9MO/0+iVEBIQXe3v2h2SiAsEIo/G5v6ObFWvNKRFjbrVadNf9LqEEZeQPzdA==} dev: false - /@vitejs/plugin-vue@4.2.3(vite@4.4.7)(vue@3.3.4): + /@vitejs/plugin-vue@4.2.3(vite@4.4.9)(vue@3.3.4): resolution: {integrity: sha512-R6JDUfiZbJA9cMiguQ7jxALsgiprjBeHL5ikpXfJCH62pPHtI+JdJ5xWj6Ev73yXSlYl86+blXn1kZHQ7uElxw==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.0.0 vue: ^3.2.25 dependencies: - vite: 4.4.7(@types/node@20.4.5) + vite: 4.4.9(@types/node@20.4.8) vue: 3.3.4 dev: false - /@vitest/expect@0.33.0: - resolution: {integrity: sha512-sVNf+Gla3mhTCxNJx+wJLDPp/WcstOe0Ksqz4Vec51MmgMth/ia0MGFEkIZmVGeTL5HtjYR4Wl/ZxBxBXZJTzQ==} + /@vitest/expect@0.34.1: + resolution: {integrity: sha512-q2CD8+XIsQ+tHwypnoCk8Mnv5e6afLFvinVGCq3/BOT4kQdVQmY6rRfyKkwcg635lbliLPqbunXZr+L1ssUWiQ==} dependencies: - '@vitest/spy': 0.33.0 - '@vitest/utils': 0.33.0 + '@vitest/spy': 0.34.1 + '@vitest/utils': 0.34.1 chai: 4.3.7 dev: true - /@vitest/runner@0.33.0: - resolution: {integrity: sha512-UPfACnmCB6HKRHTlcgCoBh6ppl6fDn+J/xR8dTufWiKt/74Y9bHci5CKB8tESSV82zKYtkBJo9whU3mNvfaisg==} + /@vitest/runner@0.34.1: + resolution: {integrity: sha512-YfQMpYzDsYB7yqgmlxZ06NI4LurHWfrH7Wy3Pvf/z/vwUSgq1zLAb1lWcItCzQG+NVox+VvzlKQrYEXb47645g==} dependencies: - '@vitest/utils': 0.33.0 + '@vitest/utils': 0.34.1 p-limit: 4.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@0.33.0: - resolution: {integrity: sha512-tJjrl//qAHbyHajpFvr8Wsk8DIOODEebTu7pgBrP07iOepR5jYkLFiqLq2Ltxv+r0uptUb4izv1J8XBOwKkVYA==} + /@vitest/snapshot@0.34.1: + resolution: {integrity: sha512-0O9LfLU0114OqdF8lENlrLsnn024Tb1CsS9UwG0YMWY2oGTQfPtkW+B/7ieyv0X9R2Oijhi3caB1xgGgEgclSQ==} dependencies: magic-string: 0.30.2 pathe: 1.1.1 pretty-format: 29.6.2 dev: true - /@vitest/spy@0.33.0: - resolution: {integrity: sha512-Kv+yZ4hnH1WdiAkPUQTpRxW8kGtH8VRTnus7ZTGovFYM1ZezJpvGtb9nPIjPnptHbsyIAxYZsEpVPYgtpjGnrg==} + /@vitest/spy@0.34.1: + resolution: {integrity: sha512-UT4WcI3EAPUNO8n6y9QoEqynGGEPmmRxC+cLzneFFXpmacivjHZsNbiKD88KUScv5DCHVDgdBsLD7O7s1enFcQ==} dependencies: tinyspy: 2.1.1 dev: true - /@vitest/utils@0.33.0: - resolution: {integrity: sha512-pF1w22ic965sv+EN6uoePkAOTkAPWM03Ri/jXNyMIKBb/XHLDPfhLvf/Fa9g0YECevAIz56oVYXhodLvLQ/awA==} + /@vitest/utils@0.34.1: + resolution: {integrity: sha512-/ql9dsFi4iuEbiNcjNHQWXBum7aL8pyhxvfnD9gNtbjR9fUKAjxhj4AA3yfLXg6gJpMGGecvtF8Au2G9y3q47Q==} dependencies: diff-sequences: 29.4.3 loupe: 2.3.6 @@ -1233,7 +1241,7 @@ packages: /@vue/compiler-core@3.3.4: resolution: {integrity: sha512-cquyDNvZ6jTbf/+x+AgM2Arrp6G4Dzbb0R64jiG804HRMfRiFXWI6kqUVqZ6ZR0bQhIoQjB4+2bhNtVwndW15g==} dependencies: - '@babel/parser': 7.22.7 + '@babel/parser': 7.22.10 '@vue/shared': 3.3.4 estree-walker: 2.0.2 source-map-js: 1.0.2 @@ -1247,7 +1255,7 @@ packages: /@vue/compiler-sfc@3.3.4: resolution: {integrity: sha512-6y/d8uw+5TkCuzBkgLS0v3lSM3hJDntFEiUORM11pQ/hKvkhSKZrXW6i69UyXlJQisJxuUEJKAWEqWbWsLeNKQ==} dependencies: - '@babel/parser': 7.22.7 + '@babel/parser': 7.22.10 '@vue/compiler-core': 3.3.4 '@vue/compiler-dom': 3.3.4 '@vue/compiler-ssr': 3.3.4 @@ -1292,7 +1300,7 @@ packages: /@vue/reactivity-transform@3.3.4: resolution: {integrity: sha512-MXgwjako4nu5WFLAjpBnCj/ieqcjE2aJBINUNQzkZQfzIZA4xn+0fV1tIYBJvvva3N3OvKGofRLvQIwEQPpaXw==} dependencies: - '@babel/parser': 7.22.7 + '@babel/parser': 7.22.10 '@vue/compiler-core': 3.3.4 '@vue/shared': 3.3.4 estree-walker: 2.0.2 @@ -1341,20 +1349,20 @@ packages: - typescript dev: true - /@vueuse/core@10.2.1(vue@3.3.4): - resolution: {integrity: sha512-c441bfMbkAwTNwVRHQ0zdYZNETK//P84rC01aP2Uy/aRFCiie9NE/k9KdIXbno0eDYP5NPUuWv0aA/I4Unr/7w==} + /@vueuse/core@10.3.0(vue@3.3.4): + resolution: {integrity: sha512-BEM5yxcFKb5btFjTSAFjTu5jmwoW66fyV9uJIP4wUXXU8aR5Hl44gndaaXp7dC5HSObmgbnR2RN+Un1p68Mf5Q==} dependencies: '@types/web-bluetooth': 0.0.17 - '@vueuse/metadata': 10.2.1 - '@vueuse/shared': 10.2.1(vue@3.3.4) + '@vueuse/metadata': 10.3.0 + '@vueuse/shared': 10.3.0(vue@3.3.4) vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: - '@vue/composition-api' - vue dev: false - /@vueuse/integrations@10.2.1(focus-trap@7.5.2)(vue@3.3.4): - resolution: {integrity: sha512-FDP5lni+z9FjHE9H3xuvwSjoRV9U8jmDvJpmHPCBjUgPGYRynwb60eHWXCFJXLUtb4gSIHy0e+iaEbrKdalCkQ==} + /@vueuse/integrations@10.3.0(focus-trap@7.5.2)(vue@3.3.4): + resolution: {integrity: sha512-Jgiv7oFyIgC6BxmDtiyG/fxyGysIds00YaY7sefwbhCZ2/tjEx1W/1WcsISSJPNI30in28+HC2J4uuU8184ekg==} peerDependencies: async-validator: '*' axios: '*' @@ -1394,8 +1402,8 @@ packages: universal-cookie: optional: true dependencies: - '@vueuse/core': 10.2.1(vue@3.3.4) - '@vueuse/shared': 10.2.1(vue@3.3.4) + '@vueuse/core': 10.3.0(vue@3.3.4) + '@vueuse/shared': 10.3.0(vue@3.3.4) focus-trap: 7.5.2 vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: @@ -1403,12 +1411,12 @@ packages: - vue dev: false - /@vueuse/metadata@10.2.1: - resolution: {integrity: sha512-3Gt68mY/i6bQvFqx7cuGBzrCCQu17OBaGWS5JdwISpMsHnMKKjC2FeB5OAfMcCQ0oINfADP3i9A4PPRo0peHdQ==} + /@vueuse/metadata@10.3.0: + resolution: {integrity: sha512-Ema3YhNOa4swDsV0V7CEY5JXvK19JI/o1szFO1iWxdFg3vhdFtCtSTP26PCvbUpnUtNHBY2wx5y3WDXND5Pvnw==} dev: false - /@vueuse/shared@10.2.1(vue@3.3.4): - resolution: {integrity: sha512-QWHq2bSuGptkcxx4f4M/fBYC3Y8d3M2UYyLsyzoPgEoVzJURQ0oJeWXu79OiLlBb8gTKkqe4mO85T/sf39mmiw==} + /@vueuse/shared@10.3.0(vue@3.3.4): + resolution: {integrity: sha512-kGqCTEuFPMK4+fNWy6dUOiYmxGcUbtznMwBZLC1PubidF4VZY05B+Oht7Jh7/6x4VOWGpvu3R37WHi81cKpiqg==} dependencies: vue-demi: 0.14.5(vue@3.3.4) transitivePeerDependencies: @@ -1856,162 +1864,138 @@ packages: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} dev: true - /conventional-changelog-angular@5.0.13: - resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} - engines: {node: '>=10'} + /conventional-changelog-angular@6.0.0: + resolution: {integrity: sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==} + engines: {node: '>=14'} dependencies: compare-func: 2.0.0 - q: 1.5.1 dev: true - /conventional-changelog-atom@2.0.8: - resolution: {integrity: sha512-xo6v46icsFTK3bb7dY/8m2qvc8sZemRgdqLb/bjpBsH2UyOS8rKNTgcb5025Hri6IpANPApbXMg15QLb1LJpBw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 + /conventional-changelog-atom@3.0.0: + resolution: {integrity: sha512-pnN5bWpH+iTUWU3FaYdw5lJmfWeqSyrUkG+wyHBI9tC1dLNnHkbAOg1SzTQ7zBqiFrfo55h40VsGXWMdopwc5g==} + engines: {node: '>=14'} dev: true - /conventional-changelog-cli@2.2.2: - resolution: {integrity: sha512-8grMV5Jo8S0kP3yoMeJxV2P5R6VJOqK72IiSV9t/4H5r/HiRqEBQ83bYGuz4Yzfdj4bjaAEhZN/FFbsFXr5bOA==} - engines: {node: '>=10'} + /conventional-changelog-cli@3.0.0: + resolution: {integrity: sha512-3zMYi0IrfNd6AAHdPMrcgCg5DbcffiqNaEBf8cYrlntXPbBIXaELTbnRmUy5TQAe0Hkgi0J6+/VmRCkkJQflcQ==} + engines: {node: '>=14'} hasBin: true dependencies: add-stream: 1.0.0 - conventional-changelog: 3.1.25 - lodash: 4.17.21 + conventional-changelog: 4.0.0 meow: 8.1.2 tempfile: 3.0.0 dev: true - /conventional-changelog-codemirror@2.0.8: - resolution: {integrity: sha512-z5DAsn3uj1Vfp7po3gpt2Boc+Bdwmw2++ZHa5Ak9k0UKsYAO5mH1UBTN0qSCuJZREIhX6WU4E1p3IW2oRCNzQw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 + /conventional-changelog-codemirror@3.0.0: + resolution: {integrity: sha512-wzchZt9HEaAZrenZAUUHMCFcuYzGoZ1wG/kTRMICxsnW5AXohYMRxnyecP9ob42Gvn5TilhC0q66AtTPRSNMfw==} + engines: {node: '>=14'} dev: true - /conventional-changelog-conventionalcommits@4.6.3: - resolution: {integrity: sha512-LTTQV4fwOM4oLPad317V/QNQ1FY4Hju5qeBIM1uTHbrnCE+Eg4CdRZ3gO2pUeR+tzWdp80M2j3qFFEDWVqOV4g==} - engines: {node: '>=10'} + /conventional-changelog-conventionalcommits@6.1.0: + resolution: {integrity: sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==} + engines: {node: '>=14'} dependencies: compare-func: 2.0.0 - lodash: 4.17.21 - q: 1.5.1 dev: true - /conventional-changelog-core@4.2.4: - resolution: {integrity: sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg==} - engines: {node: '>=10'} + /conventional-changelog-core@5.0.2: + resolution: {integrity: sha512-RhQOcDweXNWvlRwUDCpaqXzbZemKPKncCWZG50Alth72WITVd6nhVk9MJ6w1k9PFNBcZ3YwkdkChE+8+ZwtUug==} + engines: {node: '>=14'} dependencies: add-stream: 1.0.0 - conventional-changelog-writer: 5.0.1 - conventional-commits-parser: 3.2.4 + conventional-changelog-writer: 6.0.1 + conventional-commits-parser: 4.0.0 dateformat: 3.0.3 get-pkg-repo: 4.2.1 - git-raw-commits: 2.0.11 + git-raw-commits: 3.0.0 git-remote-origin-url: 2.0.0 - git-semver-tags: 4.1.1 - lodash: 4.17.21 + git-semver-tags: 5.0.1 normalize-package-data: 3.0.3 - q: 1.5.1 read-pkg: 3.0.0 read-pkg-up: 3.0.0 - through2: 4.0.2 dev: true - /conventional-changelog-ember@2.0.9: - resolution: {integrity: sha512-ulzIReoZEvZCBDhcNYfDIsLTHzYHc7awh+eI44ZtV5cx6LVxLlVtEmcO+2/kGIHGtw+qVabJYjdI5cJOQgXh1A==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 + /conventional-changelog-ember@3.0.0: + resolution: {integrity: sha512-7PYthCoSxIS98vWhVcSphMYM322OxptpKAuHYdVspryI0ooLDehRXWeRWgN+zWSBXKl/pwdgAg8IpLNSM1/61A==} + engines: {node: '>=14'} dev: true - /conventional-changelog-eslint@3.0.9: - resolution: {integrity: sha512-6NpUCMgU8qmWmyAMSZO5NrRd7rTgErjrm4VASam2u5jrZS0n38V7Y9CzTtLT2qwz5xEChDR4BduoWIr8TfwvXA==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 + /conventional-changelog-eslint@4.0.0: + resolution: {integrity: sha512-nEZ9byP89hIU0dMx37JXQkE1IpMmqKtsaR24X7aM3L6Yy/uAtbb+ogqthuNYJkeO1HyvK7JsX84z8649hvp43Q==} + engines: {node: '>=14'} dev: true - /conventional-changelog-express@2.0.6: - resolution: {integrity: sha512-SDez2f3iVJw6V563O3pRtNwXtQaSmEfTCaTBPCqn0oG0mfkq0rX4hHBq5P7De2MncoRixrALj3u3oQsNK+Q0pQ==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 + /conventional-changelog-express@3.0.0: + resolution: {integrity: sha512-HqxihpUMfIuxvlPvC6HltA4ZktQEUan/v3XQ77+/zbu8No/fqK3rxSZaYeHYant7zRxQNIIli7S+qLS9tX9zQA==} + engines: {node: '>=14'} dev: true - /conventional-changelog-jquery@3.0.11: - resolution: {integrity: sha512-x8AWz5/Td55F7+o/9LQ6cQIPwrCjfJQ5Zmfqi8thwUEKHstEn4kTIofXub7plf1xvFA2TqhZlq7fy5OmV6BOMw==} - engines: {node: '>=10'} - dependencies: - q: 1.5.1 + /conventional-changelog-jquery@4.0.0: + resolution: {integrity: sha512-TTIN5CyzRMf8PUwyy4IOLmLV2DFmPtasKN+x7EQKzwSX8086XYwo+NeaeA3VUT8bvKaIy5z/JoWUvi7huUOgaw==} + engines: {node: '>=14'} dev: true - /conventional-changelog-jshint@2.0.9: - resolution: {integrity: sha512-wMLdaIzq6TNnMHMy31hql02OEQ8nCQfExw1SE0hYL5KvU+JCTuPaDO+7JiogGT2gJAxiUGATdtYYfh+nT+6riA==} - engines: {node: '>=10'} + /conventional-changelog-jshint@3.0.0: + resolution: {integrity: sha512-bQof4byF4q+n+dwFRkJ/jGf9dCNUv4/kCDcjeCizBvfF81TeimPZBB6fT4HYbXgxxfxWXNl/i+J6T0nI4by6DA==} + engines: {node: '>=14'} dependencies: compare-func: 2.0.0 - q: 1.5.1 dev: true - /conventional-changelog-preset-loader@2.3.4: - resolution: {integrity: sha512-GEKRWkrSAZeTq5+YjUZOYxdHq+ci4dNwHvpaBC3+ENalzFWuCWa9EZXSuZBpkr72sMdKB+1fyDV4takK1Lf58g==} - engines: {node: '>=10'} + /conventional-changelog-preset-loader@3.0.0: + resolution: {integrity: sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==} + engines: {node: '>=14'} dev: true - /conventional-changelog-writer@5.0.1: - resolution: {integrity: sha512-5WsuKUfxW7suLblAbFnxAcrvf6r+0b7GvNaWUwUIk0bXMnENP/PEieGKVUQrjPqwPT4o3EPAASBXiY6iHooLOQ==} - engines: {node: '>=10'} + /conventional-changelog-writer@6.0.1: + resolution: {integrity: sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==} + engines: {node: '>=14'} hasBin: true dependencies: - conventional-commits-filter: 2.0.7 + conventional-commits-filter: 3.0.0 dateformat: 3.0.3 - handlebars: 4.7.7 + handlebars: 4.7.8 json-stringify-safe: 5.0.1 - lodash: 4.17.21 meow: 8.1.2 - semver: 6.3.1 + semver: 7.5.4 split: 1.0.1 - through2: 4.0.2 dev: true - /conventional-changelog@3.1.25: - resolution: {integrity: sha512-ryhi3fd1mKf3fSjbLXOfK2D06YwKNic1nC9mWqybBHdObPd8KJ2vjaXZfYj1U23t+V8T8n0d7gwnc9XbIdFbyQ==} - engines: {node: '>=10'} + /conventional-changelog@4.0.0: + resolution: {integrity: sha512-JbZjwE1PzxQCvm+HUTIr+pbSekS8qdOZzMakdFyPtdkEWwFvwEJYONzjgMm0txCb2yBcIcfKDmg8xtCKTdecNQ==} + engines: {node: '>=14'} dependencies: - conventional-changelog-angular: 5.0.13 - conventional-changelog-atom: 2.0.8 - conventional-changelog-codemirror: 2.0.8 - conventional-changelog-conventionalcommits: 4.6.3 - conventional-changelog-core: 4.2.4 - conventional-changelog-ember: 2.0.9 - conventional-changelog-eslint: 3.0.9 - conventional-changelog-express: 2.0.6 - conventional-changelog-jquery: 3.0.11 - conventional-changelog-jshint: 2.0.9 - conventional-changelog-preset-loader: 2.3.4 - dev: true - - /conventional-commits-filter@2.0.7: - resolution: {integrity: sha512-ASS9SamOP4TbCClsRHxIHXRfcGCnIoQqkvAzCSbZzTFLfcTqJVugB0agRgsEELsqaeWgsXv513eS116wnlSSPA==} - engines: {node: '>=10'} + conventional-changelog-angular: 6.0.0 + conventional-changelog-atom: 3.0.0 + conventional-changelog-codemirror: 3.0.0 + conventional-changelog-conventionalcommits: 6.1.0 + conventional-changelog-core: 5.0.2 + conventional-changelog-ember: 3.0.0 + conventional-changelog-eslint: 4.0.0 + conventional-changelog-express: 3.0.0 + conventional-changelog-jquery: 4.0.0 + conventional-changelog-jshint: 3.0.0 + conventional-changelog-preset-loader: 3.0.0 + dev: true + + /conventional-commits-filter@3.0.0: + resolution: {integrity: sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==} + engines: {node: '>=14'} dependencies: lodash.ismatch: 4.4.0 modify-values: 1.0.1 dev: true - /conventional-commits-parser@3.2.4: - resolution: {integrity: sha512-nK7sAtfi+QXbxHCYfhpZsfRtaitZLIA6889kFIouLvz6repszQDgxBu7wf2WbU+Dco7sAnNCJYERCwt54WPC2Q==} - engines: {node: '>=10'} + /conventional-commits-parser@4.0.0: + resolution: {integrity: sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==} + engines: {node: '>=14'} hasBin: true dependencies: JSONStream: 1.3.5 is-text-path: 1.0.1 - lodash: 4.17.21 meow: 8.1.2 split2: 3.2.2 - through2: 4.0.2 dev: true /core-util-is@1.0.3: @@ -2134,6 +2118,10 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true + /emoji-regex@10.2.1: + resolution: {integrity: sha512-97g6QgOk8zlDRdgq1WxwgTMgEWGVAQvB5Fdpgc1MkNy56la5SKP9GsMXKDOdqwn90/41a8yPwIGk1Y6WVbeMQA==} + dev: true + /emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} dev: true @@ -2220,34 +2208,34 @@ packages: is-symbol: 1.0.4 dev: true - /esbuild@0.18.17: - resolution: {integrity: sha512-1GJtYnUxsJreHYA0Y+iQz2UEykonY66HNWOb0yXYZi9/kNrORUEHVg87eQsCtqh59PEJ5YVZJO98JHznMJSWjg==} + /esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.18.17 - '@esbuild/android-arm64': 0.18.17 - '@esbuild/android-x64': 0.18.17 - '@esbuild/darwin-arm64': 0.18.17 - '@esbuild/darwin-x64': 0.18.17 - '@esbuild/freebsd-arm64': 0.18.17 - '@esbuild/freebsd-x64': 0.18.17 - '@esbuild/linux-arm': 0.18.17 - '@esbuild/linux-arm64': 0.18.17 - '@esbuild/linux-ia32': 0.18.17 - '@esbuild/linux-loong64': 0.18.17 - '@esbuild/linux-mips64el': 0.18.17 - '@esbuild/linux-ppc64': 0.18.17 - '@esbuild/linux-riscv64': 0.18.17 - '@esbuild/linux-s390x': 0.18.17 - '@esbuild/linux-x64': 0.18.17 - '@esbuild/netbsd-x64': 0.18.17 - '@esbuild/openbsd-x64': 0.18.17 - '@esbuild/sunos-x64': 0.18.17 - '@esbuild/win32-arm64': 0.18.17 - '@esbuild/win32-ia32': 0.18.17 - '@esbuild/win32-x64': 0.18.17 + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 /escalade@3.1.1: resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} @@ -2467,16 +2455,14 @@ packages: get-intrinsic: 1.2.1 dev: true - /git-raw-commits@2.0.11: - resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} - engines: {node: '>=10'} + /git-raw-commits@3.0.0: + resolution: {integrity: sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==} + engines: {node: '>=14'} hasBin: true dependencies: dargs: 7.0.0 - lodash: 4.17.21 meow: 8.1.2 split2: 3.2.2 - through2: 4.0.2 dev: true /git-remote-origin-url@2.0.0: @@ -2487,13 +2473,13 @@ packages: pify: 2.3.0 dev: true - /git-semver-tags@4.1.1: - resolution: {integrity: sha512-OWyMt5zBe7xFs8vglMmhM9lRQzCWL3WjHtxNNfJTMngGym7pC1kh8sP6jevfydJ6LP3ZvGxfb6ABYgPUM0mtsA==} - engines: {node: '>=10'} + /git-semver-tags@5.0.1: + resolution: {integrity: sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==} + engines: {node: '>=14'} hasBin: true dependencies: meow: 8.1.2 - semver: 6.3.1 + semver: 7.5.4 dev: true /gitconfiglocal@1.0.0: @@ -2559,8 +2545,8 @@ packages: strip-bom-string: 1.0.0 dev: true - /handlebars@4.7.7: - resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} + /handlebars@4.7.8: + resolution: {integrity: sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==} engines: {node: '>=0.4.7'} hasBin: true dependencies: @@ -2715,8 +2701,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /is-core-module@2.12.1: - resolution: {integrity: sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==} + /is-core-module@2.13.0: + resolution: {integrity: sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==} dependencies: has: 1.0.3 dev: true @@ -3124,13 +3110,13 @@ packages: resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} dev: false - /markdown-it-anchor@8.6.7(@types/markdown-it@12.2.3)(markdown-it@13.0.1): + /markdown-it-anchor@8.6.7(@types/markdown-it@13.0.0)(markdown-it@13.0.1): resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==} peerDependencies: '@types/markdown-it': '*' markdown-it: '*' dependencies: - '@types/markdown-it': 12.2.3 + '@types/markdown-it': 13.0.0 markdown-it: 13.0.1 dev: true @@ -3333,7 +3319,7 @@ packages: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: hosted-git-info: 2.8.9 - resolve: 1.22.2 + resolve: 1.22.4 semver: 5.7.2 validate-npm-package-license: 3.0.4 dev: true @@ -3343,7 +3329,7 @@ packages: engines: {node: '>=10'} dependencies: hosted-git-info: 4.1.0 - is-core-module: 2.12.1 + is-core-module: 2.13.0 semver: 7.5.4 validate-npm-package-license: 3.0.4 dev: true @@ -3420,8 +3406,8 @@ packages: mimic-fn: 4.0.0 dev: true - /ora@7.0.0: - resolution: {integrity: sha512-jYSRKdGWCA69vNIcpuJwf8zJ8n1wlEyYmT+P5ljsQHAn1stHi+HGXJQWKtCOybQ+7oOekPgIhTdj0xexo2F/Sg==} + /ora@7.0.1: + resolution: {integrity: sha512-0TUxTiFJWv+JnjWm4o9yvuskpEJLXTcng8MJuKd+SzAzp2o+OP3HWqNhB4OdJRt1Vsd9/mR0oyaEYlOnL7XIRw==} engines: {node: '>=16'} dependencies: chalk: 5.3.0 @@ -3431,6 +3417,7 @@ packages: is-unicode-supported: 1.3.0 log-symbols: 5.1.0 stdin-discarder: 0.1.0 + string-width: 6.1.0 strip-ansi: 7.1.0 dev: true @@ -3505,7 +3492,7 @@ packages: resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==} engines: {node: '>=8'} dependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -3652,8 +3639,8 @@ packages: resolution: {integrity: sha512-XTSj3dJ4roKIC93pald6rWuB2qQJO9gO2iLLyTe87MrjQN+HklueLsmskbywEWqCHlclgz3/M4YLL2iBr9UmMA==} dev: false - /prettier@3.0.0: - resolution: {integrity: sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==} + /prettier@3.0.1: + resolution: {integrity: sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==} engines: {node: '>=14'} hasBin: true dev: true @@ -3684,11 +3671,6 @@ packages: engines: {node: '>=6'} dev: true - /q@1.5.1: - resolution: {integrity: sha512-kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==} - engines: {node: '>=0.6.0', teleport: '>=0.2.0'} - dev: true - /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -3793,11 +3775,11 @@ packages: engines: {node: '>=0.10.0'} dev: true - /resolve@1.22.2: - resolution: {integrity: sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==} + /resolve@1.22.4: + resolution: {integrity: sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==} hasBin: true dependencies: - is-core-module: 2.12.1 + is-core-module: 2.13.0 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 dev: true @@ -3835,40 +3817,40 @@ packages: glob: 10.3.3 dev: true - /rollup-plugin-dts@5.3.0(rollup@3.27.0)(typescript@5.1.6): - resolution: {integrity: sha512-8FXp0ZkyZj1iU5klkIJYLjIq/YZSwBoERu33QBDxm/1yw5UU4txrEtcmMkrq+ZiKu3Q4qvPCNqc3ovX6rjqzbQ==} - engines: {node: '>=v14'} + /rollup-plugin-dts@5.3.1(rollup@3.27.2)(typescript@5.1.6): + resolution: {integrity: sha512-gusMi+Z4gY/JaEQeXnB0RUdU82h1kF0WYzCWgVmV4p3hWXqelaKuCvcJawfeg+EKn2T1Ie+YWF2OiN1/L8bTVg==} + engines: {node: '>=v14.21.3'} peerDependencies: - rollup: ^3.0.0 + rollup: ^3.0 typescript: ^4.1 || ^5.0 dependencies: magic-string: 0.30.2 - rollup: 3.27.0 + rollup: 3.27.2 typescript: 5.1.6 optionalDependencies: - '@babel/code-frame': 7.22.5 + '@babel/code-frame': 7.22.10 dev: true - /rollup-plugin-esbuild@5.0.0(esbuild@0.18.17)(rollup@3.27.0)(supports-color@9.4.0): + /rollup-plugin-esbuild@5.0.0(esbuild@0.18.20)(rollup@3.27.2)(supports-color@9.4.0): resolution: {integrity: sha512-1cRIOHAPh8WQgdQQyyvFdeOdxuiyk+zB5zJ5+YOwrZP4cJ0MT3Fs48pQxrZeyZHcn+klFherytILVfE4aYrneg==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} peerDependencies: esbuild: '>=0.10.1' rollup: ^1.20.0 || ^2.0.0 || ^3.0.0 dependencies: - '@rollup/pluginutils': 5.0.2(rollup@3.27.0) + '@rollup/pluginutils': 5.0.2(rollup@3.27.2) debug: 4.3.4(supports-color@9.4.0) es-module-lexer: 1.3.0 - esbuild: 0.18.17 + esbuild: 0.18.20 joycon: 3.1.1 jsonc-parser: 3.2.0 - rollup: 3.27.0 + rollup: 3.27.2 transitivePeerDependencies: - supports-color dev: true - /rollup@3.27.0: - resolution: {integrity: sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==} + /rollup@3.27.2: + resolution: {integrity: sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -3934,11 +3916,6 @@ packages: hasBin: true dev: true - /semver@6.3.1: - resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} - hasBin: true - dev: true - /semver@7.5.4: resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} engines: {node: '>=10'} @@ -4158,6 +4135,15 @@ packages: strip-ansi: 7.1.0 dev: true + /string-width@6.1.0: + resolution: {integrity: sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==} + engines: {node: '>=16'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 10.2.1 + strip-ansi: 7.1.0 + dev: true + /string.prototype.padend@3.1.4: resolution: {integrity: sha512-67otBXoksdjsnXXRUq+KMVTdlVRZ2af422Y0aTyTjVaoQkGr3mxl2Bc5emi7dOQ3OGVVQQskmLEWwFXwommpNw==} engines: {node: '>= 0.4'} @@ -4240,8 +4226,8 @@ packages: min-indent: 1.0.1 dev: true - /strip-literal@1.0.1: - resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} + /strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} dependencies: acorn: 8.10.0 dev: true @@ -4292,12 +4278,6 @@ packages: xtend: 4.0.2 dev: true - /through2@4.0.2: - resolution: {integrity: sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==} - dependencies: - readable-stream: 3.6.2 - dev: true - /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true @@ -4306,8 +4286,8 @@ packages: resolution: {integrity: sha512-kRwSG8Zx4tjF9ZiyH4bhaebu+EDz1BOx9hOigYHlUW4xxI/wKIUQUqo018UlU4ar6ATPBsaMrdbKZ+tmPdohFA==} dev: true - /tinypool@0.6.0: - resolution: {integrity: sha512-FdswUUo5SxRizcBc6b1GSuLpLjisa8N8qMyYoP3rl+bym+QauhtJP5bvZY1ytt8krKGmMLYIRl36HBZfeAoqhQ==} + /tinypool@0.7.0: + resolution: {integrity: sha512-zSYNUlYSMhJ6Zdou4cJwo/p7w5nmAH17GRfU/ui3ctvjXFErXXkruT4MWW6poDeXgCaIBlGLrfU6TbTXxyGMww==} engines: {node: '>=14.0.0'} dev: true @@ -4469,8 +4449,8 @@ packages: engines: {node: '>= 0.8'} dev: true - /vite-node@0.33.0(@types/node@20.4.5)(supports-color@9.4.0): - resolution: {integrity: sha512-19FpHYbwWWxDr73ruNahC+vtEdza52kA90Qb3La98yZ0xULqV8A5JLNPUff0f5zID4984tW7l3DH2przTJUZSw==} + /vite-node@0.34.1(@types/node@20.4.8)(supports-color@9.4.0): + resolution: {integrity: sha512-odAZAL9xFMuAg8aWd7nSPT+hU8u2r9gU3LRm9QKjxBEF2rRdWpMuqkrkjvyVQEdNFiBctqr2Gg4uJYizm5Le6w==} engines: {node: '>=v14.18.0'} hasBin: true dependencies: @@ -4479,7 +4459,7 @@ packages: mlly: 1.4.0 pathe: 1.1.1 picocolors: 1.0.0 - vite: 4.4.7(@types/node@20.4.5) + vite: 4.4.9(@types/node@20.4.8) transitivePeerDependencies: - '@types/node' - less @@ -4491,8 +4471,8 @@ packages: - terser dev: true - /vite@4.4.7(@types/node@20.4.5): - resolution: {integrity: sha512-6pYf9QJ1mHylfVh39HpuSfMPojPSKVxZvnclX1K1FyZ1PXDOcLBibdq5t1qxJSnL63ca8Wf4zts6mD8u8oc9Fw==} + /vite@4.4.9(@types/node@20.4.8): + resolution: {integrity: sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==} engines: {node: ^14.18.0 || >=16.0.0} hasBin: true peerDependencies: @@ -4519,15 +4499,15 @@ packages: terser: optional: true dependencies: - '@types/node': 20.4.5 - esbuild: 0.18.17 + '@types/node': 20.4.8 + esbuild: 0.18.20 postcss: 8.4.27 - rollup: 3.27.0 + rollup: 3.27.2 optionalDependencies: fsevents: 2.3.2 - /vitest@0.33.0(supports-color@9.4.0): - resolution: {integrity: sha512-1CxaugJ50xskkQ0e969R/hW47za4YXDUfWJDxip1hwbnhUjYolpfUn2AMOulqG/Dtd9WYAtkHmM/m3yKVrEejQ==} + /vitest@0.34.1(supports-color@9.4.0): + resolution: {integrity: sha512-G1PzuBEq9A75XSU88yO5G4vPT20UovbC/2osB2KEuV/FisSIIsw7m5y2xMdB7RsAGHAfg2lPmp2qKr3KWliVlQ==} engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: @@ -4559,12 +4539,12 @@ packages: dependencies: '@types/chai': 4.3.5 '@types/chai-subset': 1.3.3 - '@types/node': 20.4.5 - '@vitest/expect': 0.33.0 - '@vitest/runner': 0.33.0 - '@vitest/snapshot': 0.33.0 - '@vitest/spy': 0.33.0 - '@vitest/utils': 0.33.0 + '@types/node': 20.4.8 + '@vitest/expect': 0.34.1 + '@vitest/runner': 0.34.1 + '@vitest/snapshot': 0.34.1 + '@vitest/spy': 0.34.1 + '@vitest/utils': 0.34.1 acorn: 8.10.0 acorn-walk: 8.2.0 cac: 6.7.14 @@ -4575,11 +4555,11 @@ packages: pathe: 1.1.1 picocolors: 1.0.0 std-env: 3.3.3 - strip-literal: 1.0.1 + strip-literal: 1.3.0 tinybench: 2.5.0 - tinypool: 0.6.0 - vite: 4.4.7(@types/node@20.4.5) - vite-node: 0.33.0(@types/node@20.4.5)(supports-color@9.4.0) + tinypool: 0.7.0 + vite: 4.4.9(@types/node@20.4.8) + vite-node: 0.34.1(@types/node@20.4.8)(supports-color@9.4.0) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/rollup.config.ts b/rollup.config.ts index 1a5ec68453fe..91255ea4035a 100644 --- a/rollup.config.ts +++ b/rollup.config.ts @@ -42,7 +42,7 @@ const plugins = [ }), commonjs(), nodeResolve({ preferBuiltins: false }), - esbuild({ target: 'node14' }), + esbuild({ target: 'node18' }), json() ] @@ -62,21 +62,6 @@ const esmBuild: RollupOptions = { } } -const cjsBuild: RollupOptions = { - input: [r('src/node/index.ts'), r('src/node/cli.ts')], - output: { - format: 'cjs', - dir: r('dist/node-cjs'), - entryFileNames: `[name].cjs`, - chunkFileNames: 'serve-[hash].cjs' - }, - external, - plugins, - onwarn(warning, warn) { - if (warning.code !== 'EVAL') warn(warning) - } -} - const nodeTypes: RollupOptions = { input: r('src/node/index.ts'), output: { @@ -110,11 +95,6 @@ const clientTypes: RollupOptions = { const config = defineConfig([]) config.push(esmBuild) - -if (PROD) { - config.push(cjsBuild) -} - config.push(nodeTypes) config.push(clientTypes) diff --git a/src/client/app/components/Content.ts b/src/client/app/components/Content.ts index 4752554eb574..9e8b09218ef7 100644 --- a/src/client/app/components/Content.ts +++ b/src/client/app/components/Content.ts @@ -1,5 +1,5 @@ import { defineComponent, h } from 'vue' -import { useRoute } from '../router' +import { useData, useRoute } from 'vitepress' import { contentUpdatedCallbacks } from '../utils' const runCbs = () => contentUpdatedCallbacks.forEach((fn) => fn()) @@ -11,14 +11,19 @@ export const Content = defineComponent({ }, setup(props) { const route = useRoute() + const { site } = useData() return () => - h(props.as, { style: { position: 'relative' } }, [ - route.component - ? h(route.component, { - onVnodeMounted: runCbs, - onVnodeUpdated: runCbs - }) - : '404 Page Not Found' - ]) + h( + props.as, + site.value.contentProps ?? { style: { position: 'relative' } }, + [ + route.component + ? h(route.component, { + onVnodeMounted: runCbs, + onVnodeUpdated: runCbs + }) + : '404 Page Not Found' + ] + ) } }) diff --git a/src/client/app/composables/codeGroups.ts b/src/client/app/composables/codeGroups.ts index e4bd5c5c731c..d8a38ba72741 100644 --- a/src/client/app/composables/codeGroups.ts +++ b/src/client/app/composables/codeGroups.ts @@ -1,6 +1,17 @@ -import { inBrowser } from 'vitepress' +import { inBrowser, onContentUpdated } from 'vitepress' export function useCodeGroups() { + if (import.meta.env.DEV) { + onContentUpdated(() => { + document.querySelectorAll('.vp-code-group > .blocks').forEach((el) => { + Array.from(el.children).forEach((child) => { + child.classList.remove('active') + }) + el.children[0].classList.add('active') + }) + }) + } + if (inBrowser) { window.addEventListener('click', (e) => { const el = e.target as HTMLInputElement @@ -8,17 +19,27 @@ export function useCodeGroups() { if (el.matches('.vp-code-group input')) { // input <- .tabs <- .vp-code-group const group = el.parentElement?.parentElement - const i = Array.from(group?.querySelectorAll('input') || []).indexOf(el) + if (!group) return + + const i = Array.from(group.querySelectorAll('input')).indexOf(el) + if (i < 0) return + + const blocks = group.querySelector('.blocks') + if (!blocks) return + + const current = Array.from(blocks.children).find((child) => + child.classList.contains('active') + ) + if (!current) return + + const next = blocks.children[i] + if (!next || current === next) return - const current = group?.querySelector('div[class*="language-"].active') - const next = group?.querySelectorAll( - 'div[class*="language-"]:not(.language-id)' - )?.[i] + current.classList.remove('active') + next.classList.add('active') - if (current && next && current !== next) { - current.classList.remove('active') - next.classList.add('active') - } + const label = group?.querySelector(`label[for="${el.id}"]`) + label?.scrollIntoView({ block: 'nearest' }) } }) } diff --git a/src/client/app/index.ts b/src/client/app/index.ts index a766b4da2105..e613d84e5f9d 100644 --- a/src/client/app/index.ts +++ b/src/client/app/index.ts @@ -59,7 +59,7 @@ const VitePressApp = defineComponent({ useCodeGroups() if (Theme.setup) Theme.setup() - return () => h(Theme.Layout) + return () => h(Theme.Layout!) } }) diff --git a/src/client/app/router.ts b/src/client/app/router.ts index cbfc9e1460fe..5f656b83f3c1 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -74,11 +74,7 @@ export function createRouter( href = url.pathname + url.search + url.hash } } - if (inBrowser && href !== location.href) { - // save scroll position before changing url - history.replaceState({ scrollPosition: window.scrollY }, document.title) - history.pushState(null, '', href) - } + updateHistory(href) await loadPage(href) await router.onAfterRouteChanged?.(href) } @@ -211,15 +207,18 @@ export function createRouter( search === currentUrl.search ) { // scroll between hash anchors in the same page + // avoid duplicate history entries when the hash is same + if (hash !== currentUrl.hash) { + history.pushState(null, '', hash) + // still emit the event so we can listen to it in themes + window.dispatchEvent(new Event('hashchange')) + } if (hash) { - // avoid duplicate history entries when the hash is same - if (hash !== currentUrl.hash) { - history.pushState(null, '', hash) - // still emit the event so we can listen to it in themes - window.dispatchEvent(new Event('hashchange')) - } // use smooth scroll when clicking on header anchor links scrollTo(link, hash, link.classList.contains('header-anchor')) + } else { + updateHistory(href) + window.scrollTo(0, 0) } } else { go(href) @@ -268,15 +267,20 @@ export function scrollTo(el: Element, hash: string, smooth = false) { } if (target) { - const scrollOffset = siteDataRef.value.scrollOffset - let offset: number = 0 + let scrollOffset = siteDataRef.value.scrollOffset + let offset = 0 + let padding = 24 + if (typeof scrollOffset === 'object' && 'padding' in scrollOffset) { + padding = scrollOffset.padding + scrollOffset = scrollOffset.selector + } if (typeof scrollOffset === 'number') { offset = scrollOffset } else if (typeof scrollOffset === 'string') { - offset = tryOffsetSelector(scrollOffset) + offset = tryOffsetSelector(scrollOffset, padding) } else if (Array.isArray(scrollOffset)) { for (const selector of scrollOffset) { - const res = tryOffsetSelector(selector) + const res = tryOffsetSelector(selector, padding) if (res) { offset = res break @@ -292,31 +296,22 @@ export function scrollTo(el: Element, hash: string, smooth = false) { target.getBoundingClientRect().top - offset + targetPadding - // only smooth scroll if distance is smaller than screen height. function scrollToTarget() { - if ( - !smooth || - Math.abs(targetTop - window.scrollY) > window.innerHeight - ) { + // only smooth scroll if distance is smaller than screen height. + if (!smooth || Math.abs(targetTop - window.scrollY) > window.innerHeight) window.scrollTo(0, targetTop) - } else { - window.scrollTo({ - left: 0, - top: targetTop, - behavior: 'smooth' - }) - } + else window.scrollTo({ left: 0, top: targetTop, behavior: 'smooth' }) } requestAnimationFrame(scrollToTarget) } } -function tryOffsetSelector(selector: string): number { +function tryOffsetSelector(selector: string, padding: number): number { const el = document.querySelector(selector) if (!el) return 0 const bot = el.getBoundingClientRect().bottom if (bot < 0) return 0 - return bot + 24 + return bot + padding } function handleHMR(route: Route): void { @@ -338,3 +333,11 @@ function shouldHotReload(payload: PageDataPayload): boolean { .slice(siteDataRef.value.base.length - 1) return payloadPath === locationPath } + +function updateHistory(href: string) { + if (inBrowser && href !== location.href) { + // save scroll position before changing url + history.replaceState({ scrollPosition: window.scrollY }, document.title) + history.pushState(null, '', href) + } +} diff --git a/src/client/app/theme.ts b/src/client/app/theme.ts index 155ba1a7a10b..738a06ec3641 100644 --- a/src/client/app/theme.ts +++ b/src/client/app/theme.ts @@ -9,7 +9,7 @@ export interface EnhanceAppContext { } export interface Theme { - Layout: Component + Layout?: Component enhanceApp?: (ctx: EnhanceAppContext) => Awaitable extends?: Theme diff --git a/src/client/theme-default/NotFound.vue b/src/client/theme-default/NotFound.vue index 2c70934cc3ca..e909bbc90515 100644 --- a/src/client/theme-default/NotFound.vue +++ b/src/client/theme-default/NotFound.vue @@ -4,7 +4,7 @@ import { withBase } from 'vitepress' import { useData } from './composables/data' import { useLangs } from './composables/langs' -const { site } = useData() +const { site, theme } = useData() const { localeLinks } = useLangs({ removeCurrent: false }) const root = ref('/') @@ -22,16 +22,23 @@ onMounted(() => {