vitepress 1.1.0 → 1.1.2
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/router.js +10 -4
- package/dist/node/cli.js +1 -1
- package/dist/node/index.d.ts +311 -317
- package/dist/node/index.js +2 -2
- package/dist/node/{serve-Csn-CKFx.js → serve-DZ7Ijn1Q.js} +213 -127
- package/package.json +56 -57
- package/types/default-theme.d.ts +2 -2
package/dist/node/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalizePath } from 'vite';
|
|
2
2
|
export { loadEnv } from 'vite';
|
|
3
|
-
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-
|
|
4
|
-
export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, a as getDefaultExportFromCjs } from './serve-DZ7Ijn1Q.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, p as createServer, e as defineConfig, h as defineConfigWithTheme, d as defineLoader, n as init, j as mergeConfig, r as resolveConfig, l as resolvePages, k as resolveSiteData, i as resolveUserConfig, s as scaffold, o as serve } from './serve-DZ7Ijn1Q.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -20171,10 +20171,10 @@ const resolveHeadersFromTokens = (tokens, {
|
|
|
20171
20171
|
};
|
|
20172
20172
|
for (let i = 0; i < tokens.length; i += 1) {
|
|
20173
20173
|
const token = tokens[i];
|
|
20174
|
-
if (token
|
|
20174
|
+
if (token.type !== "heading_open") {
|
|
20175
20175
|
continue;
|
|
20176
20176
|
}
|
|
20177
|
-
if (token
|
|
20177
|
+
if (token.level !== 0 && !shouldAllowNested) {
|
|
20178
20178
|
continue;
|
|
20179
20179
|
}
|
|
20180
20180
|
const headerLevel = Number.parseInt(token.tag.slice(1), 10);
|
|
@@ -20182,6 +20182,7 @@ const resolveHeadersFromTokens = (tokens, {
|
|
|
20182
20182
|
continue;
|
|
20183
20183
|
}
|
|
20184
20184
|
const nextToken = tokens[i + 1];
|
|
20185
|
+
/* istanbul ignore if -- @preserve */
|
|
20185
20186
|
if (!nextToken) {
|
|
20186
20187
|
continue;
|
|
20187
20188
|
}
|
|
@@ -20206,74 +20207,6 @@ const rSpecial = /[\s~`!@#$%^&*()\-_+=[\]{}|\\;:"'“”‘’<>,.?/]+/g;
|
|
|
20206
20207
|
const rCombining = /[\u0300-\u036F]/g;
|
|
20207
20208
|
const slugify = (str) => str.normalize("NFKD").replace(rCombining, "").replace(rControl, "").replace(rSpecial, "-").replace(/-{2,}/g, "-").replace(/^-+|-+$/g, "").replace(/^(\d)/, "_$1").toLowerCase();
|
|
20208
20209
|
|
|
20209
|
-
// List of valid html blocks names, according to commonmark spec
|
|
20210
|
-
// https://spec.commonmark.org/0.30/#html-blocks
|
|
20211
|
-
|
|
20212
|
-
var block_names = [
|
|
20213
|
-
'address',
|
|
20214
|
-
'article',
|
|
20215
|
-
'aside',
|
|
20216
|
-
'base',
|
|
20217
|
-
'basefont',
|
|
20218
|
-
'blockquote',
|
|
20219
|
-
'body',
|
|
20220
|
-
'caption',
|
|
20221
|
-
'center',
|
|
20222
|
-
'col',
|
|
20223
|
-
'colgroup',
|
|
20224
|
-
'dd',
|
|
20225
|
-
'details',
|
|
20226
|
-
'dialog',
|
|
20227
|
-
'dir',
|
|
20228
|
-
'div',
|
|
20229
|
-
'dl',
|
|
20230
|
-
'dt',
|
|
20231
|
-
'fieldset',
|
|
20232
|
-
'figcaption',
|
|
20233
|
-
'figure',
|
|
20234
|
-
'footer',
|
|
20235
|
-
'form',
|
|
20236
|
-
'frame',
|
|
20237
|
-
'frameset',
|
|
20238
|
-
'h1',
|
|
20239
|
-
'h2',
|
|
20240
|
-
'h3',
|
|
20241
|
-
'h4',
|
|
20242
|
-
'h5',
|
|
20243
|
-
'h6',
|
|
20244
|
-
'head',
|
|
20245
|
-
'header',
|
|
20246
|
-
'hr',
|
|
20247
|
-
'html',
|
|
20248
|
-
'iframe',
|
|
20249
|
-
'legend',
|
|
20250
|
-
'li',
|
|
20251
|
-
'link',
|
|
20252
|
-
'main',
|
|
20253
|
-
'menu',
|
|
20254
|
-
'menuitem',
|
|
20255
|
-
'nav',
|
|
20256
|
-
'noframes',
|
|
20257
|
-
'ol',
|
|
20258
|
-
'optgroup',
|
|
20259
|
-
'option',
|
|
20260
|
-
'p',
|
|
20261
|
-
'param',
|
|
20262
|
-
'search',
|
|
20263
|
-
'section',
|
|
20264
|
-
'summary',
|
|
20265
|
-
'table',
|
|
20266
|
-
'tbody',
|
|
20267
|
-
'td',
|
|
20268
|
-
'tfoot',
|
|
20269
|
-
'th',
|
|
20270
|
-
'thead',
|
|
20271
|
-
'title',
|
|
20272
|
-
'tr',
|
|
20273
|
-
'track',
|
|
20274
|
-
'ul'
|
|
20275
|
-
];
|
|
20276
|
-
|
|
20277
20210
|
const attr_name$1 = "[a-zA-Z_:@][a-zA-Z0-9:._-]*";
|
|
20278
20211
|
const unquoted$1 = "[^\"'=<>`\\x00-\\x20]+";
|
|
20279
20212
|
const single_quoted$1 = "'[^']*'";
|
|
@@ -20299,7 +20232,70 @@ const HTML_OPEN_AND_CLOSE_TAG_IN_THE_SAME_LINE_RE = new RegExp(
|
|
|
20299
20232
|
"^<([A-Za-z][A-Za-z0-9\\-]*)" + attribute$1 + "*\\s*>.*<\\/\\1\\s*>"
|
|
20300
20233
|
);
|
|
20301
20234
|
|
|
20302
|
-
const TAGS_BLOCK =
|
|
20235
|
+
const TAGS_BLOCK = [
|
|
20236
|
+
"address",
|
|
20237
|
+
"article",
|
|
20238
|
+
"aside",
|
|
20239
|
+
"base",
|
|
20240
|
+
"basefont",
|
|
20241
|
+
"blockquote",
|
|
20242
|
+
"body",
|
|
20243
|
+
"caption",
|
|
20244
|
+
"center",
|
|
20245
|
+
"col",
|
|
20246
|
+
"colgroup",
|
|
20247
|
+
"dd",
|
|
20248
|
+
"details",
|
|
20249
|
+
"dialog",
|
|
20250
|
+
"dir",
|
|
20251
|
+
"div",
|
|
20252
|
+
"dl",
|
|
20253
|
+
"dt",
|
|
20254
|
+
"fieldset",
|
|
20255
|
+
"figcaption",
|
|
20256
|
+
"figure",
|
|
20257
|
+
"footer",
|
|
20258
|
+
"form",
|
|
20259
|
+
"frame",
|
|
20260
|
+
"frameset",
|
|
20261
|
+
"h1",
|
|
20262
|
+
"h2",
|
|
20263
|
+
"h3",
|
|
20264
|
+
"h4",
|
|
20265
|
+
"h5",
|
|
20266
|
+
"h6",
|
|
20267
|
+
"head",
|
|
20268
|
+
"header",
|
|
20269
|
+
"hr",
|
|
20270
|
+
"html",
|
|
20271
|
+
"iframe",
|
|
20272
|
+
"legend",
|
|
20273
|
+
"li",
|
|
20274
|
+
"link",
|
|
20275
|
+
"main",
|
|
20276
|
+
"menu",
|
|
20277
|
+
"menuitem",
|
|
20278
|
+
"nav",
|
|
20279
|
+
"noframes",
|
|
20280
|
+
"ol",
|
|
20281
|
+
"optgroup",
|
|
20282
|
+
"option",
|
|
20283
|
+
"p",
|
|
20284
|
+
"param",
|
|
20285
|
+
"search",
|
|
20286
|
+
"section",
|
|
20287
|
+
"summary",
|
|
20288
|
+
"table",
|
|
20289
|
+
"tbody",
|
|
20290
|
+
"td",
|
|
20291
|
+
"tfoot",
|
|
20292
|
+
"th",
|
|
20293
|
+
"thead",
|
|
20294
|
+
"title",
|
|
20295
|
+
"tr",
|
|
20296
|
+
"track",
|
|
20297
|
+
"ul"
|
|
20298
|
+
];
|
|
20303
20299
|
const TAGS_INLINE = [
|
|
20304
20300
|
"a",
|
|
20305
20301
|
"abbr",
|
|
@@ -25330,6 +25326,7 @@ const sfcPlugin = (md, { customBlocks = [] } = {}) => {
|
|
|
25330
25326
|
};
|
|
25331
25327
|
const htmlBlockRule = md.renderer.rules.html_block;
|
|
25332
25328
|
md.renderer.rules.html_block = (tokens, idx, options, env, self) => {
|
|
25329
|
+
/* istanbul ignore if -- @preserve */
|
|
25333
25330
|
if (!env.sfcBlocks) {
|
|
25334
25331
|
return htmlBlockRule(tokens, idx, options, env, self);
|
|
25335
25332
|
}
|
|
@@ -29855,6 +29852,74 @@ function reference (state, startLine, _endLine, silent) {
|
|
|
29855
29852
|
return true
|
|
29856
29853
|
}
|
|
29857
29854
|
|
|
29855
|
+
// List of valid html blocks names, according to commonmark spec
|
|
29856
|
+
// https://spec.commonmark.org/0.30/#html-blocks
|
|
29857
|
+
|
|
29858
|
+
var block_names = [
|
|
29859
|
+
'address',
|
|
29860
|
+
'article',
|
|
29861
|
+
'aside',
|
|
29862
|
+
'base',
|
|
29863
|
+
'basefont',
|
|
29864
|
+
'blockquote',
|
|
29865
|
+
'body',
|
|
29866
|
+
'caption',
|
|
29867
|
+
'center',
|
|
29868
|
+
'col',
|
|
29869
|
+
'colgroup',
|
|
29870
|
+
'dd',
|
|
29871
|
+
'details',
|
|
29872
|
+
'dialog',
|
|
29873
|
+
'dir',
|
|
29874
|
+
'div',
|
|
29875
|
+
'dl',
|
|
29876
|
+
'dt',
|
|
29877
|
+
'fieldset',
|
|
29878
|
+
'figcaption',
|
|
29879
|
+
'figure',
|
|
29880
|
+
'footer',
|
|
29881
|
+
'form',
|
|
29882
|
+
'frame',
|
|
29883
|
+
'frameset',
|
|
29884
|
+
'h1',
|
|
29885
|
+
'h2',
|
|
29886
|
+
'h3',
|
|
29887
|
+
'h4',
|
|
29888
|
+
'h5',
|
|
29889
|
+
'h6',
|
|
29890
|
+
'head',
|
|
29891
|
+
'header',
|
|
29892
|
+
'hr',
|
|
29893
|
+
'html',
|
|
29894
|
+
'iframe',
|
|
29895
|
+
'legend',
|
|
29896
|
+
'li',
|
|
29897
|
+
'link',
|
|
29898
|
+
'main',
|
|
29899
|
+
'menu',
|
|
29900
|
+
'menuitem',
|
|
29901
|
+
'nav',
|
|
29902
|
+
'noframes',
|
|
29903
|
+
'ol',
|
|
29904
|
+
'optgroup',
|
|
29905
|
+
'option',
|
|
29906
|
+
'p',
|
|
29907
|
+
'param',
|
|
29908
|
+
'search',
|
|
29909
|
+
'section',
|
|
29910
|
+
'summary',
|
|
29911
|
+
'table',
|
|
29912
|
+
'tbody',
|
|
29913
|
+
'td',
|
|
29914
|
+
'tfoot',
|
|
29915
|
+
'th',
|
|
29916
|
+
'thead',
|
|
29917
|
+
'title',
|
|
29918
|
+
'tr',
|
|
29919
|
+
'track',
|
|
29920
|
+
'ul'
|
|
29921
|
+
];
|
|
29922
|
+
|
|
29858
29923
|
// Regexps to match html elements
|
|
29859
29924
|
|
|
29860
29925
|
const attr_name = '[a-zA-Z_:][a-zA-Z0-9:._-]*';
|
|
@@ -36970,6 +37035,60 @@ function createCodeGroup(options) {
|
|
|
36970
37035
|
];
|
|
36971
37036
|
}
|
|
36972
37037
|
|
|
37038
|
+
const markerRE = /^\[\!(TIP|NOTE|INFO|IMPORTANT|WARNING|CAUTION|DANGER)\]([^\n\r]*)/i;
|
|
37039
|
+
const gitHubAlertsPlugin = (md, options) => {
|
|
37040
|
+
const titleMark = {
|
|
37041
|
+
tip: options?.tipLabel || "TIP",
|
|
37042
|
+
note: options?.noteLabel || "NOTE",
|
|
37043
|
+
info: options?.infoLabel || "INFO",
|
|
37044
|
+
important: options?.importantLabel || "IMPORTANT",
|
|
37045
|
+
warning: options?.warningLabel || "WARNING",
|
|
37046
|
+
caution: options?.cautionLabel || "CAUTION",
|
|
37047
|
+
danger: options?.dangerLabel || "DANGER"
|
|
37048
|
+
};
|
|
37049
|
+
md.core.ruler.after("block", "github-alerts", (state) => {
|
|
37050
|
+
const tokens = state.tokens;
|
|
37051
|
+
for (let i = 0; i < tokens.length; i++) {
|
|
37052
|
+
if (tokens[i].type === "blockquote_open") {
|
|
37053
|
+
const startIndex = i;
|
|
37054
|
+
const open = tokens[startIndex];
|
|
37055
|
+
let endIndex = i + 1;
|
|
37056
|
+
while (endIndex < tokens.length && (tokens[endIndex].type !== "blockquote_close" || tokens[endIndex].level !== open.level))
|
|
37057
|
+
endIndex++;
|
|
37058
|
+
if (endIndex === tokens.length)
|
|
37059
|
+
continue;
|
|
37060
|
+
const close = tokens[endIndex];
|
|
37061
|
+
const firstContent = tokens.slice(startIndex, endIndex + 1).find((token) => token.type === "inline");
|
|
37062
|
+
if (!firstContent)
|
|
37063
|
+
continue;
|
|
37064
|
+
const match = firstContent.content.match(markerRE);
|
|
37065
|
+
if (!match)
|
|
37066
|
+
continue;
|
|
37067
|
+
const type = match[1].toLowerCase();
|
|
37068
|
+
const title = match[2].trim() || titleMark[type] || capitalize(type);
|
|
37069
|
+
firstContent.content = firstContent.content.slice(match[0].length).trimStart();
|
|
37070
|
+
open.type = "github_alert_open";
|
|
37071
|
+
open.tag = "div";
|
|
37072
|
+
open.meta = {
|
|
37073
|
+
title,
|
|
37074
|
+
type
|
|
37075
|
+
};
|
|
37076
|
+
close.type = "github_alert_close";
|
|
37077
|
+
close.tag = "div";
|
|
37078
|
+
}
|
|
37079
|
+
}
|
|
37080
|
+
});
|
|
37081
|
+
md.renderer.rules.github_alert_open = function(tokens, idx) {
|
|
37082
|
+
const { title, type } = tokens[idx].meta;
|
|
37083
|
+
const attrs = "";
|
|
37084
|
+
return `<div class="${type} custom-block github-alert"${attrs}><p class="custom-block-title">${title}</p>
|
|
37085
|
+
`;
|
|
37086
|
+
};
|
|
37087
|
+
};
|
|
37088
|
+
function capitalize(str) {
|
|
37089
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
37090
|
+
}
|
|
37091
|
+
|
|
36973
37092
|
const nanoid = customAlphabet("abcdefghijklmnopqrstuvwxyz", 10);
|
|
36974
37093
|
const attrsToLines = (attrs) => {
|
|
36975
37094
|
attrs = attrs.replace(/^(?:\[.*?\])?.*?([\d,-]+).*/, "$1").trim();
|
|
@@ -37237,6 +37356,23 @@ const linkPlugin = (md, externalAttrs, base) => {
|
|
|
37237
37356
|
}
|
|
37238
37357
|
};
|
|
37239
37358
|
|
|
37359
|
+
function restoreEntities(md) {
|
|
37360
|
+
md.core.ruler.before("text_join", "entity", (state) => {
|
|
37361
|
+
for (const token of state.tokens) {
|
|
37362
|
+
if (token.type !== "inline" || !token.children)
|
|
37363
|
+
continue;
|
|
37364
|
+
for (const child of token.children) {
|
|
37365
|
+
if (child.type === "text_special" && child.info === "entity") {
|
|
37366
|
+
child.type = "entity";
|
|
37367
|
+
}
|
|
37368
|
+
}
|
|
37369
|
+
}
|
|
37370
|
+
});
|
|
37371
|
+
md.renderer.rules.entity = (tokens, idx) => {
|
|
37372
|
+
return tokens[idx].markup;
|
|
37373
|
+
};
|
|
37374
|
+
}
|
|
37375
|
+
|
|
37240
37376
|
const rawPathRegexp = /^(.+?(?:(?:\.([a-z0-9]+))?))(?:(#[\w-]+))?(?: ?(?:{(\d+(?:[,-]\d+)*)? ?(\S+)?}))? ?(?:\[(.+)\])?$/;
|
|
37241
37377
|
function rawPathToToken(rawPath) {
|
|
37242
37378
|
const [
|
|
@@ -37364,60 +37500,6 @@ const snippetPlugin = (md, srcDir) => {
|
|
|
37364
37500
|
md.block.ruler.before("fence", "snippet", parser);
|
|
37365
37501
|
};
|
|
37366
37502
|
|
|
37367
|
-
const markerRE = /^\[\!(TIP|NOTE|INFO|IMPORTANT|WARNING|CAUTION|DANGER)\]([^\n\r]*)/i;
|
|
37368
|
-
const gitHubAlertsPlugin = (md, options) => {
|
|
37369
|
-
const titleMark = {
|
|
37370
|
-
tip: options?.tipLabel || "TIP",
|
|
37371
|
-
note: options?.noteLabel || "NOTE",
|
|
37372
|
-
info: options?.infoLabel || "INFO",
|
|
37373
|
-
important: options?.importantLabel || "IMPORTANT",
|
|
37374
|
-
warning: options?.warningLabel || "WARNING",
|
|
37375
|
-
caution: options?.cautionLabel || "CAUTION",
|
|
37376
|
-
danger: options?.dangerLabel || "DANGER"
|
|
37377
|
-
};
|
|
37378
|
-
md.core.ruler.after("block", "github-alerts", (state) => {
|
|
37379
|
-
const tokens = state.tokens;
|
|
37380
|
-
for (let i = 0; i < tokens.length; i++) {
|
|
37381
|
-
if (tokens[i].type === "blockquote_open") {
|
|
37382
|
-
const startIndex = i;
|
|
37383
|
-
const open = tokens[startIndex];
|
|
37384
|
-
let endIndex = i + 1;
|
|
37385
|
-
while (endIndex < tokens.length && (tokens[endIndex].type !== "blockquote_close" || tokens[endIndex].level !== open.level))
|
|
37386
|
-
endIndex++;
|
|
37387
|
-
if (endIndex === tokens.length)
|
|
37388
|
-
continue;
|
|
37389
|
-
const close = tokens[endIndex];
|
|
37390
|
-
const firstContent = tokens.slice(startIndex, endIndex + 1).find((token) => token.type === "inline");
|
|
37391
|
-
if (!firstContent)
|
|
37392
|
-
continue;
|
|
37393
|
-
const match = firstContent.content.match(markerRE);
|
|
37394
|
-
if (!match)
|
|
37395
|
-
continue;
|
|
37396
|
-
const type = match[1].toLowerCase();
|
|
37397
|
-
const title = match[2].trim() || titleMark[type] || capitalize(type);
|
|
37398
|
-
firstContent.content = firstContent.content.slice(match[0].length).trimStart();
|
|
37399
|
-
open.type = "github_alert_open";
|
|
37400
|
-
open.tag = "div";
|
|
37401
|
-
open.meta = {
|
|
37402
|
-
title,
|
|
37403
|
-
type
|
|
37404
|
-
};
|
|
37405
|
-
close.type = "github_alert_close";
|
|
37406
|
-
close.tag = "div";
|
|
37407
|
-
}
|
|
37408
|
-
}
|
|
37409
|
-
});
|
|
37410
|
-
md.renderer.rules.github_alert_open = function(tokens, idx) {
|
|
37411
|
-
const { title, type } = tokens[idx].meta;
|
|
37412
|
-
const attrs = "";
|
|
37413
|
-
return `<div class="${type} custom-block github-alert"${attrs}><p class="custom-block-title">${title}</p>
|
|
37414
|
-
`;
|
|
37415
|
-
};
|
|
37416
|
-
};
|
|
37417
|
-
function capitalize(str) {
|
|
37418
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
37419
|
-
}
|
|
37420
|
-
|
|
37421
37503
|
const createMarkdownRenderer = async (srcDir, options = {}, base = "/", logger = console) => {
|
|
37422
37504
|
const theme = options.theme ?? { light: "github-light", dark: "github-dark" };
|
|
37423
37505
|
const hasSingleTheme = typeof theme === "string" || "name" in theme;
|
|
@@ -37428,6 +37510,7 @@ const createMarkdownRenderer = async (srcDir, options = {}, base = "/", logger =
|
|
|
37428
37510
|
...options
|
|
37429
37511
|
});
|
|
37430
37512
|
md.linkify.set({ fuzzyLink: false });
|
|
37513
|
+
md.use(restoreEntities);
|
|
37431
37514
|
if (options.preConfig) {
|
|
37432
37515
|
options.preConfig(md);
|
|
37433
37516
|
}
|
|
@@ -42456,6 +42539,7 @@ async function createVitePressPlugin(siteConfig, ssr = false, pageToHashMap, cli
|
|
|
42456
42539
|
try {
|
|
42457
42540
|
await resolveUserConfig(siteConfig.root, "serve", "development");
|
|
42458
42541
|
} catch (err) {
|
|
42542
|
+
siteConfig.logger.error(err);
|
|
42459
42543
|
return;
|
|
42460
42544
|
}
|
|
42461
42545
|
clearCache();
|
|
@@ -46446,10 +46530,12 @@ async function generateSitemap(siteConfig) {
|
|
|
46446
46530
|
}
|
|
46447
46531
|
|
|
46448
46532
|
/**
|
|
46449
|
-
* @vue/shared v3.4.
|
|
46533
|
+
* @vue/shared v3.4.23
|
|
46450
46534
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
46451
46535
|
* @license MIT
|
|
46452
46536
|
**/
|
|
46537
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
46538
|
+
// @__NO_SIDE_EFFECTS__
|
|
46453
46539
|
function makeMap(str, expectsLowerCase) {
|
|
46454
46540
|
const set = new Set(str.split(","));
|
|
46455
46541
|
return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);
|
|
@@ -46542,7 +46628,7 @@ function escapeHtml(string) {
|
|
|
46542
46628
|
|
|
46543
46629
|
var escape$1 = /*@__PURE__*/getDefaultExportFromCjs(escapeHtml_1);
|
|
46544
46630
|
|
|
46545
|
-
var version = "1.1.
|
|
46631
|
+
var version = "1.1.2";
|
|
46546
46632
|
|
|
46547
46633
|
async function renderPage(render, config, page, result, appChunk, cssChunk, assets, pageToHashMap, metadataScript, additionalHeadTags) {
|
|
46548
46634
|
const routePath = `/${page.replace(/\.md$/, "")}`;
|
package/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitepress",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Vite & Vue powered static site generator",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"vite",
|
|
7
|
+
"vue",
|
|
8
|
+
"vitepress"
|
|
9
|
+
],
|
|
10
|
+
"homepage": "https://github.com/vuejs/vitepress/tree/main/#readme",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/vuejs/vitepress/issues"
|
|
13
|
+
},
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/vuejs/vitepress.git"
|
|
17
|
+
},
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"author": "Evan You",
|
|
5
20
|
"type": "module",
|
|
6
|
-
"packageManager": "pnpm@8.15.6",
|
|
7
|
-
"main": "dist/node/index.js",
|
|
8
|
-
"types": "types/index.d.ts",
|
|
9
21
|
"exports": {
|
|
10
22
|
".": {
|
|
11
23
|
"types": "./types/index.d.ts",
|
|
@@ -29,6 +41,8 @@
|
|
|
29
41
|
"default": "./lib/vue-demi.mjs"
|
|
30
42
|
}
|
|
31
43
|
},
|
|
44
|
+
"main": "dist/node/index.js",
|
|
45
|
+
"types": "types/index.d.ts",
|
|
32
46
|
"bin": {
|
|
33
47
|
"vitepress": "bin/vitepress.js"
|
|
34
48
|
},
|
|
@@ -42,59 +56,39 @@
|
|
|
42
56
|
"theme-without-fonts.d.ts",
|
|
43
57
|
"lib"
|
|
44
58
|
],
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"url": "git+https://github.com/vuejs/vitepress.git"
|
|
59
|
+
"simple-git-hooks": {
|
|
60
|
+
"pre-commit": "pnpm lint-staged"
|
|
48
61
|
},
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"vitepress"
|
|
53
|
-
],
|
|
54
|
-
"author": "Evan You",
|
|
55
|
-
"license": "MIT",
|
|
56
|
-
"homepage": "https://github.com/vuejs/vitepress/tree/main/#readme",
|
|
57
|
-
"bugs": {
|
|
58
|
-
"url": "https://github.com/vuejs/vitepress/issues"
|
|
62
|
+
"lint-staged": {
|
|
63
|
+
"*": "prettier --write --ignore-unknown",
|
|
64
|
+
"package.json": "sort-package-json"
|
|
59
65
|
},
|
|
60
66
|
"dependencies": {
|
|
61
67
|
"@docsearch/css": "^3.6.0",
|
|
62
68
|
"@docsearch/js": "^3.6.0",
|
|
63
|
-
"@shikijs/core": "^1.
|
|
64
|
-
"@shikijs/transformers": "^1.
|
|
65
|
-
"@types/markdown-it": "^
|
|
69
|
+
"@shikijs/core": "^1.3.0",
|
|
70
|
+
"@shikijs/transformers": "^1.3.0",
|
|
71
|
+
"@types/markdown-it": "^14.0.1",
|
|
66
72
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
67
|
-
"@vue/devtools-api": "^7.0.
|
|
73
|
+
"@vue/devtools-api": "^7.0.27",
|
|
68
74
|
"@vueuse/core": "^10.9.0",
|
|
69
75
|
"@vueuse/integrations": "^10.9.0",
|
|
70
76
|
"focus-trap": "^7.5.4",
|
|
71
77
|
"mark.js": "8.11.1",
|
|
72
78
|
"minisearch": "^6.3.0",
|
|
73
|
-
"shiki": "^1.
|
|
74
|
-
"vite": "^5.2.
|
|
75
|
-
"vue": "^3.4.
|
|
76
|
-
},
|
|
77
|
-
"peerDependencies": {
|
|
78
|
-
"markdown-it-mathjax3": "^4",
|
|
79
|
-
"postcss": "^8"
|
|
80
|
-
},
|
|
81
|
-
"peerDependenciesMeta": {
|
|
82
|
-
"markdown-it-mathjax3": {
|
|
83
|
-
"optional": true
|
|
84
|
-
},
|
|
85
|
-
"postcss": {
|
|
86
|
-
"optional": true
|
|
87
|
-
}
|
|
79
|
+
"shiki": "^1.3.0",
|
|
80
|
+
"vite": "^5.2.9",
|
|
81
|
+
"vue": "^3.4.23"
|
|
88
82
|
},
|
|
89
83
|
"devDependencies": {
|
|
90
84
|
"@clack/prompts": "^0.7.0",
|
|
91
|
-
"@mdit-vue/plugin-component": "2.
|
|
92
|
-
"@mdit-vue/plugin-frontmatter": "2.
|
|
93
|
-
"@mdit-vue/plugin-headers": "2.
|
|
94
|
-
"@mdit-vue/plugin-sfc": "2.
|
|
95
|
-
"@mdit-vue/plugin-title": "2.
|
|
96
|
-
"@mdit-vue/plugin-toc": "2.
|
|
97
|
-
"@mdit-vue/shared": "2.
|
|
85
|
+
"@mdit-vue/plugin-component": "^2.1.2",
|
|
86
|
+
"@mdit-vue/plugin-frontmatter": "^2.1.2",
|
|
87
|
+
"@mdit-vue/plugin-headers": "^2.1.2",
|
|
88
|
+
"@mdit-vue/plugin-sfc": "^2.1.2",
|
|
89
|
+
"@mdit-vue/plugin-title": "^2.1.2",
|
|
90
|
+
"@mdit-vue/plugin-toc": "^2.1.2",
|
|
91
|
+
"@mdit-vue/shared": "^2.1.2",
|
|
98
92
|
"@polka/compression": "1.0.0-next.25",
|
|
99
93
|
"@rollup/plugin-alias": "^5.1.0",
|
|
100
94
|
"@rollup/plugin-commonjs": "^25.0.7",
|
|
@@ -110,12 +104,12 @@
|
|
|
110
104
|
"@types/markdown-it-attrs": "^4.1.3",
|
|
111
105
|
"@types/markdown-it-container": "^2.0.10",
|
|
112
106
|
"@types/markdown-it-emoji": "^2.0.5",
|
|
113
|
-
"@types/micromatch": "^4.0.
|
|
107
|
+
"@types/micromatch": "^4.0.7",
|
|
114
108
|
"@types/minimist": "^1.2.5",
|
|
115
|
-
"@types/node": "^20.12.
|
|
109
|
+
"@types/node": "^20.12.7",
|
|
116
110
|
"@types/postcss-prefix-selector": "^1.16.3",
|
|
117
111
|
"@types/prompts": "^2.4.9",
|
|
118
|
-
"@vue/shared": "^3.4.
|
|
112
|
+
"@vue/shared": "^3.4.23",
|
|
119
113
|
"chokidar": "^3.6.0",
|
|
120
114
|
"conventional-changelog-cli": "^4.1.0",
|
|
121
115
|
"cross-spawn": "^7.0.3",
|
|
@@ -145,33 +139,38 @@
|
|
|
145
139
|
"path-to-regexp": "^6.2.2",
|
|
146
140
|
"picocolors": "^1.0.0",
|
|
147
141
|
"pkg-dir": "^8.0.0",
|
|
148
|
-
"playwright-chromium": "^1.43.
|
|
142
|
+
"playwright-chromium": "^1.43.1",
|
|
149
143
|
"polka": "1.0.0-next.25",
|
|
150
144
|
"postcss-prefix-selector": "^1.16.0",
|
|
151
145
|
"prettier": "^3.2.5",
|
|
152
146
|
"prompts": "^2.4.2",
|
|
153
147
|
"punycode": "^2.3.1",
|
|
154
148
|
"rimraf": "^5.0.5",
|
|
155
|
-
"rollup": "^4.14.
|
|
149
|
+
"rollup": "^4.14.3",
|
|
156
150
|
"rollup-plugin-dts": "^6.1.0",
|
|
157
151
|
"rollup-plugin-esbuild": "^6.1.1",
|
|
158
152
|
"semver": "^7.6.0",
|
|
159
153
|
"simple-git-hooks": "^2.11.1",
|
|
160
154
|
"sirv": "^2.0.4",
|
|
161
155
|
"sitemap": "^7.1.1",
|
|
156
|
+
"sort-package-json": "^2.10.0",
|
|
162
157
|
"supports-color": "^9.4.0",
|
|
163
|
-
"typescript": "^5.4.
|
|
164
|
-
"vitest": "^1.
|
|
165
|
-
"vue-tsc": "^2.0.
|
|
158
|
+
"typescript": "^5.4.5",
|
|
159
|
+
"vitest": "^1.5.0",
|
|
160
|
+
"vue-tsc": "^2.0.13",
|
|
166
161
|
"wait-on": "^7.2.0"
|
|
167
162
|
},
|
|
168
|
-
"
|
|
169
|
-
"
|
|
163
|
+
"peerDependencies": {
|
|
164
|
+
"markdown-it-mathjax3": "^4",
|
|
165
|
+
"postcss": "^8"
|
|
170
166
|
},
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
|
|
167
|
+
"peerDependenciesMeta": {
|
|
168
|
+
"markdown-it-mathjax3": {
|
|
169
|
+
"optional": true
|
|
170
|
+
},
|
|
171
|
+
"postcss": {
|
|
172
|
+
"optional": true
|
|
173
|
+
}
|
|
175
174
|
},
|
|
176
175
|
"scripts": {
|
|
177
176
|
"dev": "rimraf dist && run-s dev:shared dev:start",
|
package/types/default-theme.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type MarkdownIt from 'markdown-it'
|
|
2
2
|
import type { Options as MiniSearchOptions } from 'minisearch'
|
|
3
|
-
import type { ComputedRef, Ref } from 'vue'
|
|
3
|
+
import type { ComputedRef, Ref, ShallowRef } from 'vue'
|
|
4
4
|
import type { DocSearchProps } from './docsearch.js'
|
|
5
5
|
import type {
|
|
6
6
|
LocalSearchTranslations,
|
|
@@ -372,7 +372,7 @@ export namespace DefaultTheme {
|
|
|
372
372
|
/**
|
|
373
373
|
* The outline headers of the current page.
|
|
374
374
|
*/
|
|
375
|
-
headers: ShallowRef<
|
|
375
|
+
headers: ShallowRef<any>
|
|
376
376
|
|
|
377
377
|
/**
|
|
378
378
|
* Whether the current page has a local nav. Local nav is shown when the
|