vitepress 1.3.3 → 1.4.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/components/Content.js +3 -2
- package/dist/client/app/router.js +1 -0
- package/dist/client/index.d.ts +9 -5
- package/dist/client/theme-default/components/VPButton.vue +1 -1
- package/dist/client/theme-default/components/VPFlyout.vue +6 -6
- package/dist/client/theme-default/composables/outline.js +28 -26
- package/dist/client/theme-default/styles/fonts.css +1 -5
- package/dist/client/theme-default/without-fonts.js +3 -0
- package/dist/node/cli.js +228 -217
- package/dist/node/index.d.ts +24 -7
- package/dist/node/index.js +9 -87
- package/dist/node/{serve-lJPQ9bCN.js → serve-Bvg4Nr_L.js} +28130 -26345
- package/package.json +40 -39
- package/template/.vitepress/theme/style.css +1 -1
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,
|
|
4
|
-
export { S as ScaffoldThemeType, b as build,
|
|
3
|
+
import { g as glob, c as createMarkdownRenderer, f as fs, m as matter, p as postcssPrefixSelector } from './serve-Bvg4Nr_L.js';
|
|
4
|
+
export { S as ScaffoldThemeType, b as build, o as createServer, a as defineConfig, e as defineConfigWithTheme, d as defineLoader, l as init, i as mergeConfig, r as resolveConfig, k as resolvePages, j as resolveSiteData, h as resolveUserConfig, s as scaffold, n as serve } from './serve-Bvg4Nr_L.js';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import 'crypto';
|
|
7
7
|
import 'module';
|
|
@@ -17,8 +17,6 @@ import 'node:string_decoder';
|
|
|
17
17
|
import 'util';
|
|
18
18
|
import 'os';
|
|
19
19
|
import 'url';
|
|
20
|
-
import 'assert';
|
|
21
|
-
import 'events';
|
|
22
20
|
import 'stream';
|
|
23
21
|
import 'readline';
|
|
24
22
|
import 'child_process';
|
|
@@ -27,10 +25,13 @@ import 'zlib';
|
|
|
27
25
|
import '@vue/shared';
|
|
28
26
|
import 'node:readline';
|
|
29
27
|
import 'node:tty';
|
|
30
|
-
import '
|
|
31
|
-
import '
|
|
28
|
+
import 'node:zlib';
|
|
29
|
+
import 'node:http';
|
|
30
|
+
import 'node:timers';
|
|
31
|
+
import 'node:querystring';
|
|
32
32
|
import 'tty';
|
|
33
33
|
import 'constants';
|
|
34
|
+
import 'assert';
|
|
34
35
|
import 'node:crypto';
|
|
35
36
|
import 'shiki';
|
|
36
37
|
import '@shikijs/transformers';
|
|
@@ -59,6 +60,7 @@ function createContentLoader(pattern, {
|
|
|
59
60
|
if (!files) {
|
|
60
61
|
files = (await glob(pattern, {
|
|
61
62
|
ignore: ["**/node_modules/**", "**/dist/**"],
|
|
63
|
+
expandDirectories: false,
|
|
62
64
|
...globOptions
|
|
63
65
|
})).sort();
|
|
64
66
|
}
|
|
@@ -103,88 +105,8 @@ function createContentLoader(pattern, {
|
|
|
103
105
|
};
|
|
104
106
|
}
|
|
105
107
|
|
|
106
|
-
var postcssPrefixSelector = function postcssPrefixSelector(options) {
|
|
107
|
-
const prefix = options.prefix;
|
|
108
|
-
const prefixWithSpace = /\s+$/.test(prefix) ? prefix : `${prefix} `;
|
|
109
|
-
const ignoreFiles = options.ignoreFiles ? [].concat(options.ignoreFiles) : [];
|
|
110
|
-
const includeFiles = options.includeFiles
|
|
111
|
-
? [].concat(options.includeFiles)
|
|
112
|
-
: [];
|
|
113
|
-
|
|
114
|
-
return function (root) {
|
|
115
|
-
if (
|
|
116
|
-
ignoreFiles.length &&
|
|
117
|
-
root.source.input.file &&
|
|
118
|
-
isFileInArray(root.source.input.file, ignoreFiles)
|
|
119
|
-
) {
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
if (
|
|
123
|
-
includeFiles.length &&
|
|
124
|
-
root.source.input.file &&
|
|
125
|
-
!isFileInArray(root.source.input.file, includeFiles)
|
|
126
|
-
) {
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
root.walkRules((rule) => {
|
|
131
|
-
const keyframeRules = [
|
|
132
|
-
'keyframes',
|
|
133
|
-
'-webkit-keyframes',
|
|
134
|
-
'-moz-keyframes',
|
|
135
|
-
'-o-keyframes',
|
|
136
|
-
'-ms-keyframes',
|
|
137
|
-
];
|
|
138
|
-
|
|
139
|
-
if (rule.parent && keyframeRules.includes(rule.parent.name)) {
|
|
140
|
-
return;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
rule.selectors = rule.selectors.map((selector) => {
|
|
144
|
-
if (options.exclude && excludeSelector(selector, options.exclude)) {
|
|
145
|
-
return selector;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
if (options.transform) {
|
|
149
|
-
return options.transform(
|
|
150
|
-
prefix,
|
|
151
|
-
selector,
|
|
152
|
-
prefixWithSpace + selector,
|
|
153
|
-
root.source.input.file,
|
|
154
|
-
rule
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
return prefixWithSpace + selector;
|
|
159
|
-
});
|
|
160
|
-
});
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
function isFileInArray(file, arr) {
|
|
165
|
-
return arr.some((ruleOrString) => {
|
|
166
|
-
if (ruleOrString instanceof RegExp) {
|
|
167
|
-
return ruleOrString.test(file);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
return file.includes(ruleOrString);
|
|
171
|
-
});
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
function excludeSelector(selector, excludeArr) {
|
|
175
|
-
return excludeArr.some((excludeRule) => {
|
|
176
|
-
if (excludeRule instanceof RegExp) {
|
|
177
|
-
return excludeRule.test(selector);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
return selector === excludeRule;
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
var postcssPrefixSelector$1 = /*@__PURE__*/getDefaultExportFromCjs(postcssPrefixSelector);
|
|
185
|
-
|
|
186
108
|
function postcssIsolateStyles(options = {}) {
|
|
187
|
-
return postcssPrefixSelector
|
|
109
|
+
return postcssPrefixSelector({
|
|
188
110
|
prefix: ":not(:where(.vp-raw, .vp-raw *))",
|
|
189
111
|
includeFiles: [/base\.css/],
|
|
190
112
|
transform(prefix, _selector) {
|