@slidev/cli 0.37.1 → 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-VHSIFE6E.js → build-GDFRNKG7.js} +13 -13
- package/dist/{build-SWYXOHDR.mjs → build-N6ZUPVQG.mjs} +4 -4
- package/dist/{chunk-4KNSRSYA.js → chunk-BQ7BP5DL.js} +64 -62
- package/dist/{chunk-XRKGEREL.mjs → chunk-D2NFFVC4.mjs} +8 -7
- package/dist/{chunk-ZONFWCC6.mjs → chunk-HLY2TTS3.mjs} +20 -18
- package/dist/{chunk-ORMJVCP4.js → chunk-NDMEWYLR.js} +140 -139
- 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-Q5J3CD5U.mjs → export-BI2J2JAY.mjs} +1 -1
- package/dist/{export-6T6GAVB2.js → export-KLTUGSHH.js} +6 -6
- 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,7 +57,7 @@ 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');
|
|
@@ -87,8 +87,8 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
87
87
|
body += '\n<script async src="https://platform.twitter.com/widgets.js"><\/script>';
|
|
88
88
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
89
89
|
head += `
|
|
90
|
-
<link rel="stylesheet" href="${
|
|
91
|
-
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);
|
|
92
92
|
return main;
|
|
93
93
|
}
|
|
94
94
|
async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config, command) {
|
|
@@ -112,7 +112,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
// node/plugins/setupNode.ts
|
|
115
|
-
|
|
115
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
116
116
|
|
|
117
117
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
118
118
|
|
|
@@ -129,7 +129,7 @@ function deepMerge(a, b, rootPath = "") {
|
|
|
129
129
|
});
|
|
130
130
|
return a;
|
|
131
131
|
}
|
|
132
|
-
async function loadSetups(roots, name, arg, initial, merge = true, accumulate
|
|
132
|
+
async function loadSetups(roots, name, arg, initial, merge = true, accumulate) {
|
|
133
133
|
let returns = initial;
|
|
134
134
|
for (const root of roots) {
|
|
135
135
|
const path = _path.resolve.call(void 0, root, "setup", name);
|
|
@@ -145,13 +145,13 @@ async function loadSetups(roots, name, arg, initial, merge = true, accumulate =
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// node/plugins/windicss.ts
|
|
148
|
-
|
|
148
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
149
149
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
|
|
153
153
|
async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
|
|
154
|
-
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")));
|
|
155
155
|
const configFiles = _utils.uniq.call(void 0, [
|
|
156
156
|
...defaultConfigureFiles.map((i) => _path.resolve.call(void 0, userRoot, i)),
|
|
157
157
|
...themeRoots.map((i) => `${i}/windi.config.ts`),
|
|
@@ -190,9 +190,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
190
190
|
config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
|
|
191
191
|
});
|
|
192
192
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
193
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
194
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
195
|
-
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)));
|
|
196
196
|
},
|
|
197
197
|
...windiOptions
|
|
198
198
|
}
|
|
@@ -200,7 +200,7 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
// node/plugins/preset.ts
|
|
203
|
-
|
|
203
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
204
204
|
|
|
205
205
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
206
206
|
var _vite3 = require('unplugin-icons/vite'); var _vite4 = _interopRequireDefault(_vite3);
|
|
@@ -212,7 +212,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
212
212
|
var _viteplugininspect = require('vite-plugin-inspect'); var _viteplugininspect2 = _interopRequireDefault(_viteplugininspect);
|
|
213
213
|
|
|
214
214
|
// node/drawings.ts
|
|
215
|
-
|
|
215
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
216
216
|
|
|
217
217
|
|
|
218
218
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -264,7 +264,7 @@ ${value}
|
|
|
264
264
|
}
|
|
265
265
|
|
|
266
266
|
// node/plugins/extendConfig.ts
|
|
267
|
-
|
|
267
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -272,37 +272,37 @@ var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglo
|
|
|
272
272
|
|
|
273
273
|
// ../client/package.json
|
|
274
274
|
var dependencies = {
|
|
275
|
-
"@antfu/utils": "^0.
|
|
275
|
+
"@antfu/utils": "^0.7.2",
|
|
276
276
|
"@slidev/parser": "workspace:*",
|
|
277
277
|
"@slidev/types": "workspace:*",
|
|
278
|
-
"@unocss/reset": "^0.
|
|
279
|
-
"@vueuse/core": "^9.
|
|
280
|
-
"@vueuse/head": "^0.
|
|
281
|
-
"@vueuse/math": "^9.
|
|
282
|
-
"@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",
|
|
283
283
|
codemirror: "^5.65.5",
|
|
284
|
-
defu: "^6.1.
|
|
284
|
+
defu: "^6.1.1",
|
|
285
285
|
drauu: "^0.3.2",
|
|
286
286
|
"file-saver": "^2.0.5",
|
|
287
|
-
"js-base64": "^3.7.
|
|
287
|
+
"js-base64": "^3.7.3",
|
|
288
288
|
"js-yaml": "^4.1.0",
|
|
289
|
-
katex: "^0.16.
|
|
290
|
-
mermaid: "^9.2.
|
|
289
|
+
katex: "^0.16.4",
|
|
290
|
+
mermaid: "^9.2.2",
|
|
291
291
|
"monaco-editor": "^0.33.0",
|
|
292
292
|
nanoid: "^4.0.0",
|
|
293
|
-
prettier: "^2.
|
|
293
|
+
prettier: "^2.8.1",
|
|
294
294
|
recordrtc: "^5.6.2",
|
|
295
295
|
resolve: "^1.22.1",
|
|
296
|
-
unocss: "^0.
|
|
297
|
-
"vite-plugin-windicss": "^1.8.
|
|
298
|
-
vue: "^3.2.
|
|
296
|
+
unocss: "^0.47.6",
|
|
297
|
+
"vite-plugin-windicss": "^1.8.9",
|
|
298
|
+
vue: "^3.2.45",
|
|
299
299
|
"vue-router": "^4.1.6",
|
|
300
300
|
"vue-starport": "^0.3.0",
|
|
301
301
|
windicss: "^3.5.6"
|
|
302
302
|
};
|
|
303
303
|
|
|
304
304
|
// node/vite/searchRoot.ts
|
|
305
|
-
|
|
305
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
306
306
|
|
|
307
307
|
|
|
308
308
|
var ROOT_FILES = [
|
|
@@ -357,7 +357,8 @@ var EXCLUDE = [
|
|
|
357
357
|
"unocss",
|
|
358
358
|
"mermaid",
|
|
359
359
|
"vite-plugin-windicss",
|
|
360
|
-
"vue-demi"
|
|
360
|
+
"vue-demi",
|
|
361
|
+
"vue"
|
|
361
362
|
];
|
|
362
363
|
function createConfigPlugin(options) {
|
|
363
364
|
return {
|
|
@@ -367,8 +368,9 @@ function createConfigPlugin(options) {
|
|
|
367
368
|
define: getDefine(options),
|
|
368
369
|
resolve: {
|
|
369
370
|
alias: {
|
|
370
|
-
"@slidev/client/": `${
|
|
371
|
-
}
|
|
371
|
+
"@slidev/client/": `${_chunkOVFYMGU6js.toAtFS.call(void 0, options.clientRoot)}/`
|
|
372
|
+
},
|
|
373
|
+
dedupe: ["vue"]
|
|
372
374
|
},
|
|
373
375
|
optimizeDeps: {
|
|
374
376
|
include: [
|
|
@@ -391,7 +393,7 @@ function createConfigPlugin(options) {
|
|
|
391
393
|
css: options.data.config.css === "unocss" ? {
|
|
392
394
|
postcss: {
|
|
393
395
|
plugins: [
|
|
394
|
-
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())
|
|
395
397
|
]
|
|
396
398
|
}
|
|
397
399
|
} : {},
|
|
@@ -401,7 +403,7 @@ function createConfigPlugin(options) {
|
|
|
401
403
|
allow: _utils.uniq.call(void 0, [
|
|
402
404
|
searchForWorkspaceRoot(options.userRoot),
|
|
403
405
|
searchForWorkspaceRoot(options.cliRoot),
|
|
404
|
-
..._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"))] : []
|
|
405
407
|
])
|
|
406
408
|
}
|
|
407
409
|
}
|
|
@@ -410,7 +412,7 @@ function createConfigPlugin(options) {
|
|
|
410
412
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
411
413
|
injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
|
|
412
414
|
injection.root = options.cliRoot;
|
|
413
|
-
injection.resolve.alias.vue = `${
|
|
415
|
+
injection.resolve.alias.vue = `${_chunkOVFYMGU6js.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
414
416
|
}
|
|
415
417
|
return _vite.mergeConfig.call(void 0, config, injection);
|
|
416
418
|
},
|
|
@@ -431,7 +433,7 @@ function createConfigPlugin(options) {
|
|
|
431
433
|
}
|
|
432
434
|
function getDefine(options) {
|
|
433
435
|
return {
|
|
434
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
436
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkOVFYMGU6js.toAtFS.call(void 0, options.clientRoot)),
|
|
435
437
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
436
438
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
437
439
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -441,8 +443,8 @@ function getDefine(options) {
|
|
|
441
443
|
}
|
|
442
444
|
|
|
443
445
|
// node/plugins/loaders.ts
|
|
444
|
-
|
|
445
|
-
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());
|
|
446
448
|
|
|
447
449
|
|
|
448
450
|
|
|
@@ -706,7 +708,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, addonRoots, u
|
|
|
706
708
|
delete frontmatter.title;
|
|
707
709
|
const imports = [
|
|
708
710
|
'import { inject as vueInject } from "vue"',
|
|
709
|
-
`import InjectedLayout from "${
|
|
711
|
+
`import InjectedLayout from "${_chunkOVFYMGU6js.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
710
712
|
'import { injectionSlidevContext } from "@slidev/client/constants"',
|
|
711
713
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
712
714
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -811,9 +813,9 @@ defineProps<{ no: number | string }>()`);
|
|
|
811
813
|
}
|
|
812
814
|
async function generateUserStyles() {
|
|
813
815
|
const imports = [
|
|
814
|
-
`import "${
|
|
815
|
-
`import "${
|
|
816
|
-
`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"))}"`
|
|
817
819
|
];
|
|
818
820
|
const roots2 = _utils.uniq.call(void 0, [
|
|
819
821
|
...themeRoots,
|
|
@@ -830,13 +832,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
830
832
|
];
|
|
831
833
|
for (const style of styles) {
|
|
832
834
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
833
|
-
imports.push(`import "${
|
|
835
|
+
imports.push(`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, style)}"`);
|
|
834
836
|
continue;
|
|
835
837
|
}
|
|
836
838
|
}
|
|
837
839
|
}
|
|
838
840
|
if (data.features.katex)
|
|
839
|
-
imports.push(`import "${
|
|
841
|
+
imports.push(`import "${_chunkOVFYMGU6js.toAtFS.call(void 0, _chunkOVFYMGU6js.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
840
842
|
if (data.config.css === "unocss") {
|
|
841
843
|
imports.unshift(
|
|
842
844
|
'import "@unocss/reset/tailwind.css"',
|
|
@@ -865,7 +867,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
865
867
|
const layouts = _utils.objectMap.call(void 0,
|
|
866
868
|
await getLayouts(),
|
|
867
869
|
(k, v) => {
|
|
868
|
-
imports.push(`import __layout_${k} from "${
|
|
870
|
+
imports.push(`import __layout_${k} from "${_chunkOVFYMGU6js.toAtFS.call(void 0, v)}"`);
|
|
869
871
|
return [k, `__layout_${k}`];
|
|
870
872
|
}
|
|
871
873
|
);
|
|
@@ -914,7 +916,7 @@ ${routes.join(",\n")}
|
|
|
914
916
|
const config = { ...data.config, remote };
|
|
915
917
|
if (_utils.isString.call(void 0, config.title)) {
|
|
916
918
|
const tokens = md.parseInline(config.title, {});
|
|
917
|
-
config.title =
|
|
919
|
+
config.title = _chunkOVFYMGU6js.stringifyMarkdownTokens.call(void 0, tokens);
|
|
918
920
|
}
|
|
919
921
|
if (_utils.isString.call(void 0, config.info))
|
|
920
922
|
config.info = md.render(config.info);
|
|
@@ -935,7 +937,7 @@ ${routes.join(",\n")}
|
|
|
935
937
|
];
|
|
936
938
|
}
|
|
937
939
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
938
|
-
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");
|
|
939
941
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
940
942
|
return `
|
|
941
943
|
${imports}
|
|
@@ -954,7 +956,7 @@ export default {
|
|
|
954
956
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
955
957
|
];
|
|
956
958
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
957
|
-
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");
|
|
958
960
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
959
961
|
return `
|
|
960
962
|
${imports}
|
|
@@ -969,7 +971,7 @@ export default {
|
|
|
969
971
|
}
|
|
970
972
|
|
|
971
973
|
// node/plugins/monacoTransform.ts
|
|
972
|
-
|
|
974
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
973
975
|
|
|
974
976
|
|
|
975
977
|
|
|
@@ -1003,7 +1005,7 @@ function createMonacoTypesLoader() {
|
|
|
1003
1005
|
}
|
|
1004
1006
|
|
|
1005
1007
|
// node/plugins/setupClient.ts
|
|
1006
|
-
|
|
1008
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1007
1009
|
|
|
1008
1010
|
|
|
1009
1011
|
|
|
@@ -1029,7 +1031,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
1029
1031
|
setups.forEach((path, idx) => {
|
|
1030
1032
|
if (!_fs.existsSync.call(void 0, path))
|
|
1031
1033
|
return;
|
|
1032
|
-
imports.push(`import __n${idx} from '${
|
|
1034
|
+
imports.push(`import __n${idx} from '${_chunkOVFYMGU6js.toAtFS.call(void 0, path)}'`);
|
|
1033
1035
|
let fn = `:AWAIT:__n${idx}`;
|
|
1034
1036
|
if (/\binjection_return\b/g.test(code))
|
|
1035
1037
|
fn = `injection_return = ${fn}`;
|
|
@@ -1060,7 +1062,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
1060
1062
|
}
|
|
1061
1063
|
|
|
1062
1064
|
// node/plugins/markdown.ts
|
|
1063
|
-
|
|
1065
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1064
1066
|
var _vitepluginvuemarkdown = require('vite-plugin-vue-markdown'); var _vitepluginvuemarkdown2 = _interopRequireDefault(_vitepluginvuemarkdown);
|
|
1065
1067
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
1066
1068
|
|
|
@@ -1071,7 +1073,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
1071
1073
|
var _plantumlencoder = require('plantuml-encoder');
|
|
1072
1074
|
|
|
1073
1075
|
// node/plugins/markdown-it-katex.ts
|
|
1074
|
-
|
|
1076
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1075
1077
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
1076
1078
|
function isValidDelim(state, pos) {
|
|
1077
1079
|
const max = state.posMax;
|
|
@@ -1218,7 +1220,7 @@ function math_plugin(md2, options) {
|
|
|
1218
1220
|
}
|
|
1219
1221
|
|
|
1220
1222
|
// node/plugins/markdown-it-prism.ts
|
|
1221
|
-
|
|
1223
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1222
1224
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1223
1225
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1224
1226
|
var DEFAULTS = {
|
|
@@ -1241,7 +1243,7 @@ function loadPrismLang(lang) {
|
|
|
1241
1243
|
}
|
|
1242
1244
|
function loadPrismPlugin(name) {
|
|
1243
1245
|
try {
|
|
1244
|
-
|
|
1246
|
+
_chunkOVFYMGU6js.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1245
1247
|
} catch (e) {
|
|
1246
1248
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1247
1249
|
}
|
|
@@ -1281,7 +1283,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1281
1283
|
}
|
|
1282
1284
|
|
|
1283
1285
|
// node/plugins/markdown-it-shiki.ts
|
|
1284
|
-
|
|
1286
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1285
1287
|
function getThemeName(theme) {
|
|
1286
1288
|
if (typeof theme === "string")
|
|
1287
1289
|
return theme;
|
|
@@ -1344,7 +1346,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1344
1346
|
const setups = [];
|
|
1345
1347
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1346
1348
|
if (config.highlighter === "shiki") {
|
|
1347
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1349
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkOVFYMGU6js.__toESM.call(void 0, _chunkOVFYMGU6js.__require.call(void 0, "shiki")));
|
|
1348
1350
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1349
1351
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1350
1352
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1498,7 +1500,7 @@ function escapeVueInCode(md2) {
|
|
|
1498
1500
|
}
|
|
1499
1501
|
|
|
1500
1502
|
// node/plugins/patchTransform.ts
|
|
1501
|
-
|
|
1503
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1502
1504
|
|
|
1503
1505
|
function createFixPlugins(options) {
|
|
1504
1506
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1521,14 +1523,14 @@ function createFixPlugins(options) {
|
|
|
1521
1523
|
}
|
|
1522
1524
|
|
|
1523
1525
|
// node/plugins/unocss.ts
|
|
1524
|
-
|
|
1526
|
+
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1525
1527
|
|
|
1526
1528
|
|
|
1527
1529
|
|
|
1528
1530
|
|
|
1529
1531
|
async function createUnocssPlugin({ themeRoots, addonRoots, clientRoot, roots, data }, { unocss: unoOptions }) {
|
|
1530
1532
|
var _a, _b, _c, _d;
|
|
1531
|
-
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);
|
|
1532
1534
|
const configFiles = _utils.uniq.call(void 0, [
|
|
1533
1535
|
...themeRoots.map((i) => `${i}/uno.config.ts`),
|
|
1534
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);
|