@slidev/cli 0.37.0 → 0.38.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/{build-5M4DFC4V.js → build-GDFRNKG7.js} +13 -13
- package/dist/{build-W5TRXU2P.mjs → build-N6ZUPVQG.mjs} +4 -4
- package/dist/{chunk-JRB7BOBW.js → chunk-BQ7BP5DL.js} +66 -63
- package/dist/{chunk-CD72RFPC.mjs → chunk-D2NFFVC4.mjs} +9 -8
- package/dist/{chunk-VEKFQOM7.mjs → chunk-HLY2TTS3.mjs} +22 -19
- package/dist/{chunk-6G6VEIZI.js → chunk-NDMEWYLR.js} +141 -140
- package/dist/{chunk-N6L4BUFD.js → chunk-OVFYMGU6.js} +2 -2
- package/dist/{chunk-XNT34UVI.mjs → chunk-T5WFA52O.mjs} +2 -2
- package/dist/cli.js +35 -33
- package/dist/cli.mjs +10 -8
- package/dist/{export-2HDTZ4BF.mjs → export-BI2J2JAY.mjs} +13 -5
- package/dist/{export-YW4ZBY3A.js → export-KLTUGSHH.js} +18 -10
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/package.json +20 -20
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkBQ7BP5DLjs = require('./chunk-BQ7BP5DL.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkOVFYMGU6js = require('./chunk-OVFYMGU6.js');
|
|
11
11
|
|
|
12
12
|
// node/build.ts
|
|
13
|
-
|
|
13
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
14
14
|
var _path = require('path');
|
|
15
15
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
16
16
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -18,12 +18,12 @@ var _vite = require('vite');
|
|
|
18
18
|
var _connect = require('connect'); var _connect2 = _interopRequireDefault(_connect);
|
|
19
19
|
|
|
20
20
|
// ../../node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.mjs
|
|
21
|
-
|
|
21
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
22
22
|
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
// ../../node_modules/.pnpm/totalist@3.0.0/node_modules/totalist/sync/index.mjs
|
|
26
|
-
|
|
26
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
function totalist(dir, callback, pre = "") {
|
|
@@ -38,7 +38,7 @@ function totalist(dir, callback, pre = "") {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.21/node_modules/@polka/url/build.mjs
|
|
41
|
-
|
|
41
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
42
42
|
var _querystring = require('querystring'); var qs = _interopRequireWildcard(_querystring);
|
|
43
43
|
function parse2(req) {
|
|
44
44
|
let raw = req.url;
|
|
@@ -61,8 +61,8 @@ function parse2(req) {
|
|
|
61
61
|
return req._parsedUrl = { pathname, search, query, raw };
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// ../../node_modules/.pnpm/mrmime@1.0.
|
|
65
|
-
|
|
64
|
+
// ../../node_modules/.pnpm/mrmime@1.0.1/node_modules/mrmime/index.mjs
|
|
65
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
66
66
|
var mimes = {
|
|
67
67
|
"ez": "application/andrew-inset",
|
|
68
68
|
"aw": "application/applixware",
|
|
@@ -655,16 +655,16 @@ async function build(options, viteConfig = {}) {
|
|
|
655
655
|
let originalIndexHTML;
|
|
656
656
|
if (_fsextra2.default.existsSync(indexPath))
|
|
657
657
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
658
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
658
|
+
await _fsextra2.default.writeFile(indexPath, await _chunkBQ7BP5DLjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
659
659
|
let config = void 0;
|
|
660
660
|
try {
|
|
661
|
-
const inlineConfig = await
|
|
661
|
+
const inlineConfig = await _chunkBQ7BP5DLjs.mergeViteConfigs.call(void 0,
|
|
662
662
|
options,
|
|
663
663
|
viteConfig,
|
|
664
664
|
{
|
|
665
665
|
root: options.userRoot,
|
|
666
666
|
plugins: [
|
|
667
|
-
await
|
|
667
|
+
await _chunkBQ7BP5DLjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
668
668
|
{
|
|
669
669
|
name: "resolve-config",
|
|
670
670
|
configResolved(_config) {
|
|
@@ -685,7 +685,7 @@ async function build(options, viteConfig = {}) {
|
|
|
685
685
|
} else {
|
|
686
686
|
console.log(_kolorist.blue.call(void 0, " building for Monaco...\n"));
|
|
687
687
|
await _vite.build.call(void 0,
|
|
688
|
-
await
|
|
688
|
+
await _chunkBQ7BP5DLjs.mergeViteConfigs.call(void 0,
|
|
689
689
|
options,
|
|
690
690
|
inlineConfig,
|
|
691
691
|
{
|
|
@@ -725,7 +725,7 @@ async function build(options, viteConfig = {}) {
|
|
|
725
725
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
726
726
|
`, "utf-8");
|
|
727
727
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
728
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
728
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkOVFYMGU6js.__toESM.call(void 0, _chunkOVFYMGU6js.__require.call(void 0, "./export-KLTUGSHH.js")));
|
|
729
729
|
const port = 12445;
|
|
730
730
|
const app = _connect2.default.call(void 0, );
|
|
731
731
|
const server = _http2.default.createServer(app);
|
|
@@ -2,12 +2,12 @@ import {
|
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml,
|
|
4
4
|
mergeViteConfigs
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HLY2TTS3.mjs";
|
|
6
6
|
import {
|
|
7
7
|
__require,
|
|
8
8
|
__toESM,
|
|
9
9
|
init_esm_shims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-T5WFA52O.mjs";
|
|
11
11
|
|
|
12
12
|
// node/build.ts
|
|
13
13
|
init_esm_shims();
|
|
@@ -61,7 +61,7 @@ function parse2(req) {
|
|
|
61
61
|
return req._parsedUrl = { pathname, search, query, raw };
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
// ../../node_modules/.pnpm/mrmime@1.0.
|
|
64
|
+
// ../../node_modules/.pnpm/mrmime@1.0.1/node_modules/mrmime/index.mjs
|
|
65
65
|
init_esm_shims();
|
|
66
66
|
var mimes = {
|
|
67
67
|
"ez": "application/andrew-inset",
|
|
@@ -725,7 +725,7 @@ async function build(options, viteConfig = {}) {
|
|
|
725
725
|
await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
726
726
|
`, "utf-8");
|
|
727
727
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
728
|
-
const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-
|
|
728
|
+
const { exportSlides } = await Promise.resolve().then(() => __toESM(__require("./export-BI2J2JAY.mjs")));
|
|
729
729
|
const port = 12445;
|
|
730
730
|
const app = connect();
|
|
731
731
|
const server = http.createServer(app);
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkOVFYMGU6js = require('./chunk-OVFYMGU6.js');
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
14
|
-
var require_fast_deep_equal =
|
|
14
|
+
var require_fast_deep_equal = _chunkOVFYMGU6js.__commonJS.call(void 0, {
|
|
15
15
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
16
16
|
"use strict";
|
|
17
|
-
|
|
17
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
18
18
|
module.exports = function equal2(a, b) {
|
|
19
19
|
if (a === b)
|
|
20
20
|
return true;
|
|
@@ -57,12 +57,12 @@ var require_fast_deep_equal = _chunkN6L4BUFDjs.__commonJS.call(void 0, {
|
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
// node/common.ts
|
|
60
|
-
|
|
60
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
61
61
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
62
62
|
var _path = require('path');
|
|
63
63
|
var _utils = require('@antfu/utils');
|
|
64
64
|
var _vite = require('vite');
|
|
65
|
-
async function getIndexHtml({ clientRoot, themeRoots, data, userRoot }) {
|
|
65
|
+
async function getIndexHtml({ clientRoot, themeRoots, addonRoots, data, userRoot }) {
|
|
66
66
|
var _a, _b;
|
|
67
67
|
let main = await _fs.promises.readFile(_path.join.call(void 0, clientRoot, "index.html"), "utf-8");
|
|
68
68
|
let head = "";
|
|
@@ -70,6 +70,7 @@ async function getIndexHtml({ clientRoot, themeRoots, data, userRoot }) {
|
|
|
70
70
|
head += `<link rel="icon" href="${data.config.favicon}">`;
|
|
71
71
|
const roots = _utils.uniq.call(void 0, [
|
|
72
72
|
...themeRoots,
|
|
73
|
+
...addonRoots,
|
|
73
74
|
userRoot
|
|
74
75
|
]);
|
|
75
76
|
for (const root of roots) {
|
|
@@ -86,8 +87,8 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
86
87
|
body += '\n<script async src="https://platform.twitter.com/widgets.js"><\/script>';
|
|
87
88
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
88
89
|
head += `
|
|
89
|
-
<link rel="stylesheet" href="${
|
|
90
|
-
main = main.replace("__ENTRY__",
|
|
90
|
+
<link rel="stylesheet" href="${_chunkOVFYMGU6js.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
91
|
+
main = main.replace("__ENTRY__", _chunkOVFYMGU6js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
|
|
91
92
|
return main;
|
|
92
93
|
}
|
|
93
94
|
async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config, command) {
|
|
@@ -111,7 +112,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
|
|
|
111
112
|
}
|
|
112
113
|
|
|
113
114
|
// node/plugins/setupNode.ts
|
|
114
|
-
|
|
115
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
115
116
|
|
|
116
117
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
117
118
|
|
|
@@ -128,7 +129,7 @@ function deepMerge(a, b, rootPath = "") {
|
|
|
128
129
|
});
|
|
129
130
|
return a;
|
|
130
131
|
}
|
|
131
|
-
async function loadSetups(roots, name, arg, initial, merge = true, accumulate
|
|
132
|
+
async function loadSetups(roots, name, arg, initial, merge = true, accumulate) {
|
|
132
133
|
let returns = initial;
|
|
133
134
|
for (const root of roots) {
|
|
134
135
|
const path = _path.resolve.call(void 0, root, "setup", name);
|
|
@@ -144,13 +145,13 @@ async function loadSetups(roots, name, arg, initial, merge = true, accumulate =
|
|
|
144
145
|
}
|
|
145
146
|
|
|
146
147
|
// node/plugins/windicss.ts
|
|
147
|
-
|
|
148
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
148
149
|
|
|
149
150
|
|
|
150
151
|
|
|
151
152
|
|
|
152
153
|
async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
|
|
153
|
-
const { default: WindiCSS, defaultConfigureFiles } = await Promise.resolve().then(() =>
|
|
154
|
+
const { default: WindiCSS, defaultConfigureFiles } = await Promise.resolve().then(() => _chunkOVFYMGU6js.__toESM.call(void 0, _chunkOVFYMGU6js.__require.call(void 0, "vite-plugin-windicss")));
|
|
154
155
|
const configFiles = _utils.uniq.call(void 0, [
|
|
155
156
|
...defaultConfigureFiles.map((i) => _path.resolve.call(void 0, userRoot, i)),
|
|
156
157
|
...themeRoots.map((i) => `${i}/windi.config.ts`),
|
|
@@ -189,9 +190,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
189
190
|
config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
|
|
190
191
|
});
|
|
191
192
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
192
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
193
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
194
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
193
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkOVFYMGU6js.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
194
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkOVFYMGU6js.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
195
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkOVFYMGU6js.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
195
196
|
},
|
|
196
197
|
...windiOptions
|
|
197
198
|
}
|
|
@@ -199,7 +200,7 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
199
200
|
}
|
|
200
201
|
|
|
201
202
|
// node/plugins/preset.ts
|
|
202
|
-
|
|
203
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
203
204
|
|
|
204
205
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
205
206
|
var _vite3 = require('unplugin-icons/vite'); var _vite4 = _interopRequireDefault(_vite3);
|
|
@@ -211,7 +212,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
211
212
|
var _viteplugininspect = require('vite-plugin-inspect'); var _viteplugininspect2 = _interopRequireDefault(_viteplugininspect);
|
|
212
213
|
|
|
213
214
|
// node/drawings.ts
|
|
214
|
-
|
|
215
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
215
216
|
|
|
216
217
|
|
|
217
218
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -263,7 +264,7 @@ ${value}
|
|
|
263
264
|
}
|
|
264
265
|
|
|
265
266
|
// node/plugins/extendConfig.ts
|
|
266
|
-
|
|
267
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
267
268
|
|
|
268
269
|
|
|
269
270
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -271,37 +272,37 @@ var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglo
|
|
|
271
272
|
|
|
272
273
|
// ../client/package.json
|
|
273
274
|
var dependencies = {
|
|
274
|
-
"@antfu/utils": "^0.
|
|
275
|
+
"@antfu/utils": "^0.7.2",
|
|
275
276
|
"@slidev/parser": "workspace:*",
|
|
276
277
|
"@slidev/types": "workspace:*",
|
|
277
|
-
"@unocss/reset": "^0.
|
|
278
|
-
"@vueuse/core": "^9.
|
|
279
|
-
"@vueuse/head": "^0.
|
|
280
|
-
"@vueuse/math": "^9.
|
|
281
|
-
"@vueuse/motion": "^2.0.0-beta.
|
|
278
|
+
"@unocss/reset": "^0.47.6",
|
|
279
|
+
"@vueuse/core": "^9.6.0",
|
|
280
|
+
"@vueuse/head": "^1.0.22",
|
|
281
|
+
"@vueuse/math": "^9.6.0",
|
|
282
|
+
"@vueuse/motion": "^2.0.0-beta.26",
|
|
282
283
|
codemirror: "^5.65.5",
|
|
283
|
-
defu: "^6.1.
|
|
284
|
+
defu: "^6.1.1",
|
|
284
285
|
drauu: "^0.3.2",
|
|
285
286
|
"file-saver": "^2.0.5",
|
|
286
|
-
"js-base64": "^3.7.
|
|
287
|
+
"js-base64": "^3.7.3",
|
|
287
288
|
"js-yaml": "^4.1.0",
|
|
288
|
-
katex: "^0.16.
|
|
289
|
-
mermaid: "^9.2.
|
|
289
|
+
katex: "^0.16.4",
|
|
290
|
+
mermaid: "^9.2.2",
|
|
290
291
|
"monaco-editor": "^0.33.0",
|
|
291
292
|
nanoid: "^4.0.0",
|
|
292
|
-
prettier: "^2.
|
|
293
|
+
prettier: "^2.8.1",
|
|
293
294
|
recordrtc: "^5.6.2",
|
|
294
295
|
resolve: "^1.22.1",
|
|
295
|
-
unocss: "^0.
|
|
296
|
-
"vite-plugin-windicss": "^1.8.
|
|
297
|
-
vue: "^3.2.
|
|
296
|
+
unocss: "^0.47.6",
|
|
297
|
+
"vite-plugin-windicss": "^1.8.9",
|
|
298
|
+
vue: "^3.2.45",
|
|
298
299
|
"vue-router": "^4.1.6",
|
|
299
300
|
"vue-starport": "^0.3.0",
|
|
300
301
|
windicss: "^3.5.6"
|
|
301
302
|
};
|
|
302
303
|
|
|
303
304
|
// node/vite/searchRoot.ts
|
|
304
|
-
|
|
305
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
305
306
|
|
|
306
307
|
|
|
307
308
|
var ROOT_FILES = [
|
|
@@ -356,7 +357,8 @@ var EXCLUDE = [
|
|
|
356
357
|
"unocss",
|
|
357
358
|
"mermaid",
|
|
358
359
|
"vite-plugin-windicss",
|
|
359
|
-
"vue-demi"
|
|
360
|
+
"vue-demi",
|
|
361
|
+
"vue"
|
|
360
362
|
];
|
|
361
363
|
function createConfigPlugin(options) {
|
|
362
364
|
return {
|
|
@@ -366,8 +368,9 @@ function createConfigPlugin(options) {
|
|
|
366
368
|
define: getDefine(options),
|
|
367
369
|
resolve: {
|
|
368
370
|
alias: {
|
|
369
|
-
"@slidev/client/": `${
|
|
370
|
-
}
|
|
371
|
+
"@slidev/client/": `${_chunkOVFYMGU6js.toAtFS.call(void 0, options.clientRoot)}/`
|
|
372
|
+
},
|
|
373
|
+
dedupe: ["vue"]
|
|
371
374
|
},
|
|
372
375
|
optimizeDeps: {
|
|
373
376
|
include: [
|
|
@@ -390,7 +393,7 @@ function createConfigPlugin(options) {
|
|
|
390
393
|
css: options.data.config.css === "unocss" ? {
|
|
391
394
|
postcss: {
|
|
392
395
|
plugins: [
|
|
393
|
-
await Promise.resolve().then(() =>
|
|
396
|
+
await Promise.resolve().then(() => _chunkOVFYMGU6js.__toESM.call(void 0, _chunkOVFYMGU6js.__require.call(void 0, "postcss-nested"))).then((r) => r.default())
|
|
394
397
|
]
|
|
395
398
|
}
|
|
396
399
|
} : {},
|
|
@@ -400,7 +403,7 @@ function createConfigPlugin(options) {
|
|
|
400
403
|
allow: _utils.uniq.call(void 0, [
|
|
401
404
|
searchForWorkspaceRoot(options.userRoot),
|
|
402
405
|
searchForWorkspaceRoot(options.cliRoot),
|
|
403
|
-
..._isinstalledglobally2.default ? [_path.dirname.call(void 0,
|
|
406
|
+
..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunkOVFYMGU6js.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunkOVFYMGU6js.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
|
|
404
407
|
])
|
|
405
408
|
}
|
|
406
409
|
}
|
|
@@ -409,7 +412,7 @@ function createConfigPlugin(options) {
|
|
|
409
412
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
410
413
|
injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
|
|
411
414
|
injection.root = options.cliRoot;
|
|
412
|
-
injection.resolve.alias.vue = `${
|
|
415
|
+
injection.resolve.alias.vue = `${_chunkOVFYMGU6js.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
413
416
|
}
|
|
414
417
|
return _vite.mergeConfig.call(void 0, config, injection);
|
|
415
418
|
},
|
|
@@ -430,7 +433,7 @@ function createConfigPlugin(options) {
|
|
|
430
433
|
}
|
|
431
434
|
function getDefine(options) {
|
|
432
435
|
return {
|
|
433
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
436
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkOVFYMGU6js.toAtFS.call(void 0, options.clientRoot)),
|
|
434
437
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
435
438
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
436
439
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -440,8 +443,8 @@ function getDefine(options) {
|
|
|
440
443
|
}
|
|
441
444
|
|
|
442
445
|
// node/plugins/loaders.ts
|
|
443
|
-
|
|
444
|
-
var import_fast_deep_equal =
|
|
446
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
447
|
+
var import_fast_deep_equal = _chunkOVFYMGU6js.__toESM.call(void 0, require_fast_deep_equal());
|
|
445
448
|
|
|
446
449
|
|
|
447
450
|
|
|
@@ -705,7 +708,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, addonRoots, u
|
|
|
705
708
|
delete frontmatter.title;
|
|
706
709
|
const imports = [
|
|
707
710
|
'import { inject as vueInject } from "vue"',
|
|
708
|
-
`import InjectedLayout from "${
|
|
711
|
+
`import InjectedLayout from "${_chunkOVFYMGU6js.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
709
712
|
'import { injectionSlidevContext } from "@slidev/client/constants"',
|
|
710
713
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
711
714
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -810,9 +813,9 @@ defineProps<{ no: number | string }>()`);
|
|
|
810
813
|
}
|
|
811
814
|
async function generateUserStyles() {
|
|
812
815
|
const imports = [
|
|
813
|
-
`import "${
|
|
814
|
-
`import "${
|
|
815
|
-
`import "${
|
|
816
|
+
`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
817
|
+
`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
818
|
+
`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
|
|
816
819
|
];
|
|
817
820
|
const roots2 = _utils.uniq.call(void 0, [
|
|
818
821
|
...themeRoots,
|
|
@@ -829,13 +832,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
829
832
|
];
|
|
830
833
|
for (const style of styles) {
|
|
831
834
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
832
|
-
imports.push(`import "${
|
|
835
|
+
imports.push(`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, style)}"`);
|
|
833
836
|
continue;
|
|
834
837
|
}
|
|
835
838
|
}
|
|
836
839
|
}
|
|
837
840
|
if (data.features.katex)
|
|
838
|
-
imports.push(`import "${
|
|
841
|
+
imports.push(`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, _chunkOVFYMGU6js.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
839
842
|
if (data.config.css === "unocss") {
|
|
840
843
|
imports.unshift(
|
|
841
844
|
'import "@unocss/reset/tailwind.css"',
|
|
@@ -864,7 +867,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
864
867
|
const layouts = _utils.objectMap.call(void 0,
|
|
865
868
|
await getLayouts(),
|
|
866
869
|
(k, v) => {
|
|
867
|
-
imports.push(`import __layout_${k} from "${
|
|
870
|
+
imports.push(`import __layout_${k} from "${_chunkOVFYMGU6js.toAtFS.call(void 0, v)}"`);
|
|
868
871
|
return [k, `__layout_${k}`];
|
|
869
872
|
}
|
|
870
873
|
);
|
|
@@ -913,7 +916,7 @@ ${routes.join(",\n")}
|
|
|
913
916
|
const config = { ...data.config, remote };
|
|
914
917
|
if (_utils.isString.call(void 0, config.title)) {
|
|
915
918
|
const tokens = md.parseInline(config.title, {});
|
|
916
|
-
config.title =
|
|
919
|
+
config.title = _chunkOVFYMGU6js.stringifyMarkdownTokens.call(void 0, tokens);
|
|
917
920
|
}
|
|
918
921
|
if (_utils.isString.call(void 0, config.info))
|
|
919
922
|
config.info = md.render(config.info);
|
|
@@ -934,7 +937,7 @@ ${routes.join(",\n")}
|
|
|
934
937
|
];
|
|
935
938
|
}
|
|
936
939
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
937
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
940
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkOVFYMGU6js.toAtFS.call(void 0, i)}'`).join("\n");
|
|
938
941
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
939
942
|
return `
|
|
940
943
|
${imports}
|
|
@@ -953,7 +956,7 @@ export default {
|
|
|
953
956
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
954
957
|
];
|
|
955
958
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
956
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
959
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkOVFYMGU6js.toAtFS.call(void 0, i)}'`).join("\n");
|
|
957
960
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
958
961
|
return `
|
|
959
962
|
${imports}
|
|
@@ -968,7 +971,7 @@ export default {
|
|
|
968
971
|
}
|
|
969
972
|
|
|
970
973
|
// node/plugins/monacoTransform.ts
|
|
971
|
-
|
|
974
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
972
975
|
|
|
973
976
|
|
|
974
977
|
|
|
@@ -1002,7 +1005,7 @@ function createMonacoTypesLoader() {
|
|
|
1002
1005
|
}
|
|
1003
1006
|
|
|
1004
1007
|
// node/plugins/setupClient.ts
|
|
1005
|
-
|
|
1008
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1006
1009
|
|
|
1007
1010
|
|
|
1008
1011
|
|
|
@@ -1028,7 +1031,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
1028
1031
|
setups.forEach((path, idx) => {
|
|
1029
1032
|
if (!_fs.existsSync.call(void 0, path))
|
|
1030
1033
|
return;
|
|
1031
|
-
imports.push(`import __n${idx} from '${
|
|
1034
|
+
imports.push(`import __n${idx} from '${_chunkOVFYMGU6js.toAtFS.call(void 0, path)}'`);
|
|
1032
1035
|
let fn = `:AWAIT:__n${idx}`;
|
|
1033
1036
|
if (/\binjection_return\b/g.test(code))
|
|
1034
1037
|
fn = `injection_return = ${fn}`;
|
|
@@ -1059,7 +1062,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
1059
1062
|
}
|
|
1060
1063
|
|
|
1061
1064
|
// node/plugins/markdown.ts
|
|
1062
|
-
|
|
1065
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1063
1066
|
var _vitepluginvuemarkdown = require('vite-plugin-vue-markdown'); var _vitepluginvuemarkdown2 = _interopRequireDefault(_vitepluginvuemarkdown);
|
|
1064
1067
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
1065
1068
|
|
|
@@ -1070,7 +1073,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
1070
1073
|
var _plantumlencoder = require('plantuml-encoder');
|
|
1071
1074
|
|
|
1072
1075
|
// node/plugins/markdown-it-katex.ts
|
|
1073
|
-
|
|
1076
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1074
1077
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
1075
1078
|
function isValidDelim(state, pos) {
|
|
1076
1079
|
const max = state.posMax;
|
|
@@ -1217,7 +1220,7 @@ function math_plugin(md2, options) {
|
|
|
1217
1220
|
}
|
|
1218
1221
|
|
|
1219
1222
|
// node/plugins/markdown-it-prism.ts
|
|
1220
|
-
|
|
1223
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1221
1224
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1222
1225
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1223
1226
|
var DEFAULTS = {
|
|
@@ -1240,7 +1243,7 @@ function loadPrismLang(lang) {
|
|
|
1240
1243
|
}
|
|
1241
1244
|
function loadPrismPlugin(name) {
|
|
1242
1245
|
try {
|
|
1243
|
-
|
|
1246
|
+
_chunkOVFYMGU6js.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1244
1247
|
} catch (e) {
|
|
1245
1248
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1246
1249
|
}
|
|
@@ -1280,7 +1283,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1280
1283
|
}
|
|
1281
1284
|
|
|
1282
1285
|
// node/plugins/markdown-it-shiki.ts
|
|
1283
|
-
|
|
1286
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1284
1287
|
function getThemeName(theme) {
|
|
1285
1288
|
if (typeof theme === "string")
|
|
1286
1289
|
return theme;
|
|
@@ -1343,7 +1346,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1343
1346
|
const setups = [];
|
|
1344
1347
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1345
1348
|
if (config.highlighter === "shiki") {
|
|
1346
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1349
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkOVFYMGU6js.__toESM.call(void 0, _chunkOVFYMGU6js.__require.call(void 0, "shiki")));
|
|
1347
1350
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1348
1351
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1349
1352
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1497,7 +1500,7 @@ function escapeVueInCode(md2) {
|
|
|
1497
1500
|
}
|
|
1498
1501
|
|
|
1499
1502
|
// node/plugins/patchTransform.ts
|
|
1500
|
-
|
|
1503
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1501
1504
|
|
|
1502
1505
|
function createFixPlugins(options) {
|
|
1503
1506
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1520,14 +1523,14 @@ function createFixPlugins(options) {
|
|
|
1520
1523
|
}
|
|
1521
1524
|
|
|
1522
1525
|
// node/plugins/unocss.ts
|
|
1523
|
-
|
|
1526
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1524
1527
|
|
|
1525
1528
|
|
|
1526
1529
|
|
|
1527
1530
|
|
|
1528
1531
|
async function createUnocssPlugin({ themeRoots, addonRoots, clientRoot, roots, data }, { unocss: unoOptions }) {
|
|
1529
1532
|
var _a, _b, _c, _d;
|
|
1530
|
-
const UnoCSS = await Promise.resolve().then(() =>
|
|
1533
|
+
const UnoCSS = await Promise.resolve().then(() => _chunkOVFYMGU6js.__toESM.call(void 0, _chunkOVFYMGU6js.__require.call(void 0, "unocss/vite"))).then((r) => r.default);
|
|
1531
1534
|
const configFiles = _utils.uniq.call(void 0, [
|
|
1532
1535
|
...themeRoots.map((i) => `${i}/uno.config.ts`),
|
|
1533
1536
|
...addonRoots.map((i) => `${i}/uno.config.ts`),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
mergeViteConfigs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-HLY2TTS3.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__dirname,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
init_esm_shims,
|
|
14
14
|
packageExists,
|
|
15
15
|
resolveImportPath
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-T5WFA52O.mjs";
|
|
17
17
|
|
|
18
18
|
// ../../node_modules/.pnpm/semver@7.3.8/node_modules/semver/internal/constants.js
|
|
19
19
|
var require_constants = __commonJS({
|
|
@@ -2451,16 +2451,16 @@ init_esm_shims();
|
|
|
2451
2451
|
import * as parser from "@slidev/parser/fs";
|
|
2452
2452
|
|
|
2453
2453
|
// package.json
|
|
2454
|
-
var version = "0.
|
|
2454
|
+
var version = "0.38.0";
|
|
2455
2455
|
|
|
2456
2456
|
// node/themes.ts
|
|
2457
2457
|
init_esm_shims();
|
|
2458
2458
|
import prompts2 from "prompts";
|
|
2459
2459
|
|
|
2460
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.18.
|
|
2460
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.18.8/node_modules/@antfu/ni/dist/index.mjs
|
|
2461
2461
|
init_esm_shims();
|
|
2462
2462
|
|
|
2463
|
-
// ../../node_modules/.pnpm/@antfu+ni@0.18.
|
|
2463
|
+
// ../../node_modules/.pnpm/@antfu+ni@0.18.8/node_modules/@antfu/ni/dist/shared/ni.e5a4e327.mjs
|
|
2464
2464
|
init_esm_shims();
|
|
2465
2465
|
import require$$0, { resolve } from "path";
|
|
2466
2466
|
import require$$0$5 from "readline";
|
|
@@ -2495,7 +2495,7 @@ var yarn = {
|
|
|
2495
2495
|
"add": "yarn add {0}",
|
|
2496
2496
|
"upgrade": "yarn upgrade {0}",
|
|
2497
2497
|
"upgrade-interactive": "yarn upgrade-interactive {0}",
|
|
2498
|
-
"execute": "
|
|
2498
|
+
"execute": "npx {0}",
|
|
2499
2499
|
"uninstall": "yarn remove {0}",
|
|
2500
2500
|
"global_uninstall": "yarn global remove {0}"
|
|
2501
2501
|
};
|
|
@@ -2545,6 +2545,7 @@ var AGENTS = {
|
|
|
2545
2545
|
"frozen": "yarn install --immutable",
|
|
2546
2546
|
"upgrade": "yarn up {0}",
|
|
2547
2547
|
"upgrade-interactive": "yarn up -i {0}",
|
|
2548
|
+
"execute": "yarn dlx {0}",
|
|
2548
2549
|
"global": "npm i -g {0}",
|
|
2549
2550
|
"global_uninstall": "npm uninstall -g {0}"
|
|
2550
2551
|
},
|
|
@@ -10116,7 +10117,7 @@ function init(open, close) {
|
|
|
10116
10117
|
return txt === void 0 ? chain([open], [blk]) : $.enabled ? run$1([blk], txt + "") : txt + "";
|
|
10117
10118
|
};
|
|
10118
10119
|
}
|
|
10119
|
-
var version2 = "0.18.
|
|
10120
|
+
var version2 = "0.18.8";
|
|
10120
10121
|
var DEBUG_SIGN = "?";
|
|
10121
10122
|
async function run(fn, args, options = {}) {
|
|
10122
10123
|
const debug2 = args.includes(DEBUG_SIGN);
|
|
@@ -10289,7 +10290,7 @@ async function resolveOptions(options, mode2, promptForInstallation = true) {
|
|
|
10289
10290
|
const themeRoots = getThemeRoots(theme, entry);
|
|
10290
10291
|
const addons = await getAddons(userRoot, data.config);
|
|
10291
10292
|
const addonRoots = getAddonRoots(addons, entry);
|
|
10292
|
-
const roots = uniq([clientRoot, ...themeRoots, userRoot]);
|
|
10293
|
+
const roots = uniq([clientRoot, ...themeRoots, ...addonRoots, userRoot]);
|
|
10293
10294
|
if (themeRoots.length) {
|
|
10294
10295
|
const themeMeta = await getThemeMeta(theme, join2(themeRoots[0], "package.json"));
|
|
10295
10296
|
data.themeMeta = themeMeta;
|