vitepress 1.2.2 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/app/data.js +1 -1
- package/dist/client/app/router.js +41 -40
- package/dist/client/theme-default/components/VPDocFooter.vue +29 -13
- package/dist/client/theme-default/components/VPDocFooterLastUpdated.vue +2 -2
- package/dist/client/theme-default/components/VPMenu.vue +7 -2
- package/dist/client/theme-default/components/VPNavBar.vue +10 -3
- package/dist/client/theme-default/components/VPNavBarAppearance.vue +8 -1
- package/dist/client/theme-default/components/VPNavBarExtra.vue +17 -3
- package/dist/client/theme-default/components/VPNavBarMenu.vue +14 -3
- package/dist/client/theme-default/components/VPNavBarMenuGroup.vue +7 -7
- package/dist/client/theme-default/components/VPNavScreen.vue +2 -2
- package/dist/client/theme-default/components/VPNavScreenAppearance.vue +8 -1
- package/dist/client/theme-default/components/VPNavScreenMenu.vue +7 -4
- package/dist/client/theme-default/components/VPNavScreenMenuGroup.vue +9 -8
- package/dist/client/theme-default/components/VPSidebar.vue +18 -19
- package/dist/client/theme-default/components/VPSidebarGroup.vue +56 -0
- package/dist/client/theme-default/components/VPSidebarItem.vue +3 -3
- package/dist/client/theme-default/components/VPSwitchAppearance.vue +5 -3
- package/dist/client/theme-default/styles/base.css +1 -2
- package/dist/client/theme-default/styles/components/vp-doc.css +10 -2
- package/dist/client/theme-default/without-fonts.js +1 -0
- package/dist/node/cli.js +20 -14
- package/dist/node/index.d.ts +7 -6
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-BwR5EPUJ.js → serve-BhLFz9dF.js} +713 -395
- package/package.json +41 -44
- package/theme.d.ts +1 -0
- package/types/default-theme.d.ts +9 -4
- package/types/shared.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Vite & Vue powered static site generator",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -57,26 +57,25 @@
|
|
|
57
57
|
"pre-commit": "pnpm lint-staged"
|
|
58
58
|
},
|
|
59
59
|
"lint-staged": {
|
|
60
|
-
"*": "prettier --write --ignore-unknown"
|
|
61
|
-
"package.json": "sort-package-json"
|
|
60
|
+
"*": "prettier --write --ignore-unknown"
|
|
62
61
|
},
|
|
63
62
|
"dependencies": {
|
|
64
63
|
"@docsearch/css": "^3.6.0",
|
|
65
64
|
"@docsearch/js": "^3.6.0",
|
|
66
|
-
"@shikijs/core": "^1.
|
|
67
|
-
"@shikijs/transformers": "^1.
|
|
65
|
+
"@shikijs/core": "^1.10.3",
|
|
66
|
+
"@shikijs/transformers": "^1.10.3",
|
|
68
67
|
"@types/markdown-it": "^14.1.1",
|
|
69
|
-
"@vitejs/plugin-vue": "^5.0.
|
|
70
|
-
"@vue/devtools-api": "^7.
|
|
71
|
-
"@vue/shared": "^3.4.
|
|
72
|
-
"@vueuse/core": "^10.
|
|
73
|
-
"@vueuse/integrations": "^10.
|
|
68
|
+
"@vitejs/plugin-vue": "^5.0.5",
|
|
69
|
+
"@vue/devtools-api": "^7.3.5",
|
|
70
|
+
"@vue/shared": "^3.4.31",
|
|
71
|
+
"@vueuse/core": "^10.11.0",
|
|
72
|
+
"@vueuse/integrations": "^10.11.0",
|
|
74
73
|
"focus-trap": "^7.5.4",
|
|
75
74
|
"mark.js": "8.11.1",
|
|
76
75
|
"minisearch": "^6.3.0",
|
|
77
|
-
"shiki": "^1.
|
|
78
|
-
"vite": "^5.
|
|
79
|
-
"vue": "^3.4.
|
|
76
|
+
"shiki": "^1.10.3",
|
|
77
|
+
"vite": "^5.3.3",
|
|
78
|
+
"vue": "^3.4.31"
|
|
80
79
|
},
|
|
81
80
|
"devDependencies": {
|
|
82
81
|
"@clack/prompts": "^0.7.0",
|
|
@@ -87,12 +86,12 @@
|
|
|
87
86
|
"@mdit-vue/plugin-title": "^2.1.3",
|
|
88
87
|
"@mdit-vue/plugin-toc": "^2.1.3",
|
|
89
88
|
"@mdit-vue/shared": "^2.1.3",
|
|
90
|
-
"@polka/compression": "1.0.0-next.25",
|
|
89
|
+
"@polka/compression": "^1.0.0-next.25",
|
|
91
90
|
"@rollup/plugin-alias": "^5.1.0",
|
|
92
|
-
"@rollup/plugin-commonjs": "^
|
|
91
|
+
"@rollup/plugin-commonjs": "^26.0.1",
|
|
93
92
|
"@rollup/plugin-json": "^6.1.0",
|
|
94
93
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
95
|
-
"@rollup/plugin-replace": "^5.0.
|
|
94
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
96
95
|
"@types/cross-spawn": "^6.0.6",
|
|
97
96
|
"@types/debug": "^4.1.12",
|
|
98
97
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -101,58 +100,56 @@
|
|
|
101
100
|
"@types/markdown-it-attrs": "^4.1.3",
|
|
102
101
|
"@types/markdown-it-container": "^2.0.10",
|
|
103
102
|
"@types/markdown-it-emoji": "^3.0.1",
|
|
104
|
-
"@types/micromatch": "^4.0.
|
|
103
|
+
"@types/micromatch": "^4.0.9",
|
|
105
104
|
"@types/minimist": "^1.2.5",
|
|
106
|
-
"@types/node": "^20.
|
|
105
|
+
"@types/node": "^20.14.10",
|
|
107
106
|
"@types/postcss-prefix-selector": "^1.16.3",
|
|
108
107
|
"@types/prompts": "^2.4.9",
|
|
109
108
|
"chokidar": "^3.6.0",
|
|
110
109
|
"conventional-changelog-cli": "^5.0.0",
|
|
111
110
|
"cross-spawn": "^7.0.3",
|
|
112
|
-
"debug": "^4.3.
|
|
113
|
-
"esbuild": "^0.
|
|
114
|
-
"execa": "^9.
|
|
111
|
+
"debug": "^4.3.5",
|
|
112
|
+
"esbuild": "^0.23.0",
|
|
113
|
+
"execa": "^9.3.0",
|
|
115
114
|
"fast-glob": "^3.3.2",
|
|
116
115
|
"fs-extra": "^11.2.0",
|
|
117
116
|
"get-port": "^7.1.0",
|
|
118
117
|
"gray-matter": "^4.0.3",
|
|
119
|
-
"lint-staged": "^15.2.
|
|
118
|
+
"lint-staged": "^15.2.7",
|
|
120
119
|
"lodash.template": "^4.5.0",
|
|
121
|
-
"lru-cache": "^10.
|
|
120
|
+
"lru-cache": "^10.3.1",
|
|
122
121
|
"markdown-it": "^14.1.0",
|
|
123
122
|
"markdown-it-anchor": "^9.0.1",
|
|
124
123
|
"markdown-it-attrs": "^4.1.6",
|
|
125
124
|
"markdown-it-container": "^4.0.0",
|
|
126
125
|
"markdown-it-emoji": "^3.0.0",
|
|
127
126
|
"markdown-it-mathjax3": "^4.3.2",
|
|
128
|
-
"micromatch": "^4.0.
|
|
127
|
+
"micromatch": "^4.0.7",
|
|
129
128
|
"minimist": "^1.2.8",
|
|
130
129
|
"nanoid": "^5.0.7",
|
|
131
|
-
"npm-run-all": "^4.1.5",
|
|
132
130
|
"ora": "^8.0.1",
|
|
133
131
|
"p-map": "^7.0.2",
|
|
134
132
|
"path-to-regexp": "^6.2.2",
|
|
135
133
|
"picocolors": "^1.0.1",
|
|
136
134
|
"pkg-dir": "^8.0.0",
|
|
137
|
-
"playwright-chromium": "^1.
|
|
138
|
-
"polka": "1.0.0-next.25",
|
|
135
|
+
"playwright-chromium": "^1.45.1",
|
|
136
|
+
"polka": "^1.0.0-next.25",
|
|
139
137
|
"postcss-prefix-selector": "^1.16.1",
|
|
140
|
-
"prettier": "^3.2
|
|
138
|
+
"prettier": "^3.3.2",
|
|
141
139
|
"prompts": "^2.4.2",
|
|
142
140
|
"punycode": "^2.3.1",
|
|
143
|
-
"rimraf": "^5.0.
|
|
144
|
-
"rollup": "^4.
|
|
145
|
-
"rollup-plugin-dts": "^6.1.
|
|
141
|
+
"rimraf": "^5.0.8",
|
|
142
|
+
"rollup": "^4.18.0",
|
|
143
|
+
"rollup-plugin-dts": "^6.1.1",
|
|
146
144
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
147
145
|
"semver": "^7.6.2",
|
|
148
146
|
"simple-git-hooks": "^2.11.1",
|
|
149
147
|
"sirv": "^2.0.4",
|
|
150
|
-
"sitemap": "^
|
|
151
|
-
"sort-package-json": "^2.10.0",
|
|
148
|
+
"sitemap": "^8.0.0",
|
|
152
149
|
"supports-color": "^9.4.0",
|
|
153
|
-
"typescript": "^5.
|
|
150
|
+
"typescript": "^5.5.3",
|
|
154
151
|
"vitest": "^1.6.0",
|
|
155
|
-
"vue-tsc": "^2.0.
|
|
152
|
+
"vue-tsc": "^2.0.26",
|
|
156
153
|
"wait-on": "^7.2.0"
|
|
157
154
|
},
|
|
158
155
|
"peerDependencies": {
|
|
@@ -168,20 +165,20 @@
|
|
|
168
165
|
}
|
|
169
166
|
},
|
|
170
167
|
"scripts": {
|
|
171
|
-
"dev": "rimraf dist &&
|
|
172
|
-
"dev:start": "
|
|
173
|
-
"dev:client": "tsc --sourcemap -w -p src/client",
|
|
168
|
+
"dev": "rimraf dist && pnpm dev:shared && pnpm dev:start",
|
|
169
|
+
"dev:start": "pnpm --stream '/^dev:(client|node|watch)$/'",
|
|
170
|
+
"dev:client": "tsc --sourcemap -w --preserveWatchOutput -p src/client",
|
|
174
171
|
"dev:node": "DEV=true pnpm build:node -w",
|
|
175
172
|
"dev:shared": "node scripts/copyShared",
|
|
176
173
|
"dev:watch": "node scripts/watchAndCopy",
|
|
177
|
-
"build": "
|
|
174
|
+
"build": "pnpm build:prepare && pnpm build:client && pnpm build:node",
|
|
178
175
|
"build:prepare": "rimraf dist && node scripts/copyShared",
|
|
179
176
|
"build:client": "vue-tsc --noEmit -p src/client && tsc -p src/client && node scripts/copyClient",
|
|
180
177
|
"build:node": "tsc -p src/node --noEmit && rollup --config rollup.config.ts --configPlugin esbuild",
|
|
181
|
-
"test": "
|
|
178
|
+
"test": "pnpm --aggregate-output --reporter=append-only '/^test:(unit|e2e|init)$/'",
|
|
182
179
|
"test:unit": "vitest run -r __tests__/unit",
|
|
183
180
|
"test:unit:watch": "vitest -r __tests__/unit",
|
|
184
|
-
"test:e2e": "
|
|
181
|
+
"test:e2e": "pnpm test:e2e-dev && pnpm test:e2e-build",
|
|
185
182
|
"test:e2e:site:dev": "pnpm -F=tests-e2e site:dev",
|
|
186
183
|
"test:e2e:site:build": "pnpm -F=tests-e2e site:build",
|
|
187
184
|
"test:e2e:site:preview": "pnpm -F=tests-e2e site:preview",
|
|
@@ -191,17 +188,17 @@
|
|
|
191
188
|
"test:e2e-build:watch": "VITE_TEST_BUILD=1 pnpm test:e2e-dev:watch",
|
|
192
189
|
"test:init": "pnpm -F=tests-init test",
|
|
193
190
|
"test:init:watch": "pnpm -F=tests-init watch",
|
|
194
|
-
"docs": "
|
|
191
|
+
"docs": "pnpm --stream '/^(docs:)?dev$/'",
|
|
195
192
|
"docs:dev": "wait-on -d 100 dist/node/cli.js && pnpm -F=docs dev",
|
|
196
193
|
"docs:debug": "NODE_OPTIONS='--inspect-brk' pnpm docs:dev",
|
|
197
|
-
"docs:build": "
|
|
194
|
+
"docs:build": "pnpm build && pnpm docs:build:only",
|
|
198
195
|
"docs:build:only": "pnpm -F=docs build",
|
|
199
196
|
"docs:preview": "pnpm -F=docs preview",
|
|
200
197
|
"docs:lunaria:build": "pnpm -F=docs lunaria:build",
|
|
201
198
|
"docs:lunaria:open": "pnpm -F=docs lunaria:open",
|
|
202
199
|
"format": "prettier --check --write .",
|
|
203
200
|
"format:fail": "prettier --check .",
|
|
204
|
-
"check": "
|
|
201
|
+
"check": "pnpm format:fail && pnpm build && pnpm test",
|
|
205
202
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
206
203
|
"release": "node scripts/release.js"
|
|
207
204
|
}
|
package/theme.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const useLocalNav: () => DefaultTheme.DocLocalNav
|
|
|
19
19
|
export declare const VPBadge: DefineComponent
|
|
20
20
|
export declare const VPButton: DefineComponent
|
|
21
21
|
export declare const VPDocAsideSponsors: DefineComponent
|
|
22
|
+
export declare const VPHomeContent: DefineComponent
|
|
22
23
|
export declare const VPHomeFeatures: DefineComponent
|
|
23
24
|
export declare const VPHomeHero: DefineComponent
|
|
24
25
|
export declare const VPHomeSponsors: DefineComponent
|
package/types/default-theme.d.ts
CHANGED
|
@@ -162,7 +162,12 @@ export namespace DefaultTheme {
|
|
|
162
162
|
|
|
163
163
|
// nav -----------------------------------------------------------------------
|
|
164
164
|
|
|
165
|
-
export type NavItem = NavItemWithLink | NavItemWithChildren
|
|
165
|
+
export type NavItem = NavItemComponent | NavItemWithLink | NavItemWithChildren
|
|
166
|
+
|
|
167
|
+
export interface NavItemComponent {
|
|
168
|
+
component: string
|
|
169
|
+
props?: Record<string, any>
|
|
170
|
+
}
|
|
166
171
|
|
|
167
172
|
export interface NavItemWithLink {
|
|
168
173
|
text: string
|
|
@@ -186,7 +191,7 @@ export namespace DefaultTheme {
|
|
|
186
191
|
|
|
187
192
|
export interface NavItemWithChildren {
|
|
188
193
|
text?: string
|
|
189
|
-
items: (NavItemChildren | NavItemWithLink)[]
|
|
194
|
+
items: (NavItemComponent | NavItemChildren | NavItemWithLink)[]
|
|
190
195
|
|
|
191
196
|
/**
|
|
192
197
|
* `activeMatch` is expected to be a regex string. We can't use actual
|
|
@@ -417,14 +422,14 @@ export namespace DefaultTheme {
|
|
|
417
422
|
|
|
418
423
|
miniSearch?: {
|
|
419
424
|
/**
|
|
420
|
-
* @see https://lucaong.github.io/minisearch/
|
|
425
|
+
* @see https://lucaong.github.io/minisearch/types/MiniSearch.Options.html
|
|
421
426
|
*/
|
|
422
427
|
options?: Pick<
|
|
423
428
|
MiniSearchOptions,
|
|
424
429
|
'extractField' | 'tokenize' | 'processTerm'
|
|
425
430
|
>
|
|
426
431
|
/**
|
|
427
|
-
* @see https://lucaong.github.io/minisearch/
|
|
432
|
+
* @see https://lucaong.github.io/minisearch/types/MiniSearch.SearchOptions.html
|
|
428
433
|
*/
|
|
429
434
|
searchOptions?: MiniSearchOptions['searchOptions']
|
|
430
435
|
|
package/types/shared.d.ts
CHANGED