@slidev/cli 0.32.3 → 0.32.4
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/bin/slidev.js +1 -1
- package/dist/{build-YVXTTUTD.mjs → build-O7J6JH7N.mjs} +3 -3
- package/dist/{build-M2QTEV63.js → build-SKQZLTIO.js} +11 -11
- package/dist/{chunk-WZ6OPJJF.mjs → chunk-CNNMHD67.mjs} +5 -5
- package/dist/{chunk-N7XL66RP.js → chunk-ERHEJGU7.js} +161 -156
- package/dist/{chunk-JWGORJY6.js → chunk-FFZLS6QK.js} +2 -2
- package/dist/{chunk-IW3TSLZF.js → chunk-KFVTOCED.js} +60 -60
- package/dist/{chunk-M2TT7ZMD.mjs → chunk-STSGOSM4.mjs} +12 -7
- package/dist/{chunk-NOFZO6W4.mjs → chunk-ZWCVPYOA.mjs} +2 -2
- package/dist/cli.js +24 -24
- package/dist/cli.mjs +5 -5
- package/dist/{export-GIPHUNUX.mjs → export-5R6FV775.mjs} +1 -1
- package/dist/{export-M6HJUIFY.js → export-LOKLMK66.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/package.json +23 -23
|
@@ -84,9 +84,9 @@ var __privateWrapper = (obj, member, setter, getter) => {
|
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
// ../../node_modules/.pnpm/tsup@5.12.
|
|
87
|
+
// ../../node_modules/.pnpm/tsup@5.12.9_typescript@4.7.2/node_modules/tsup/assets/cjs_shims.js
|
|
88
88
|
var init_cjs_shims = __esm({
|
|
89
|
-
"../../node_modules/.pnpm/tsup@5.12.
|
|
89
|
+
"../../node_modules/.pnpm/tsup@5.12.9_typescript@4.7.2/node_modules/tsup/assets/cjs_shims.js"() {
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkFFZLS6QKjs = require('./chunk-FFZLS6QK.js');
|
|
14
14
|
|
|
15
15
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
16
|
-
var require_fast_deep_equal =
|
|
16
|
+
var require_fast_deep_equal = _chunkFFZLS6QKjs.__commonJS.call(void 0, {
|
|
17
17
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
18
18
|
"use strict";
|
|
19
|
-
|
|
19
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
20
20
|
module.exports = function equal2(a, b) {
|
|
21
21
|
if (a === b)
|
|
22
22
|
return true;
|
|
@@ -59,7 +59,7 @@ var require_fast_deep_equal = _chunkJWGORJY6js.__commonJS.call(void 0, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// node/common.ts
|
|
62
|
-
|
|
62
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
63
63
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
64
64
|
var _path = require('path');
|
|
65
65
|
var _utils = require('@antfu/utils');
|
|
@@ -87,13 +87,13 @@ ${(((_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="${_chunkFFZLS6QKjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
91
|
+
main = main.replace("__ENTRY__", _chunkFFZLS6QKjs.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
|
|
|
95
95
|
// node/plugins/windicss.ts
|
|
96
|
-
|
|
96
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
97
97
|
|
|
98
98
|
|
|
99
99
|
|
|
@@ -101,13 +101,13 @@ var _vitepluginwindicss = require('vite-plugin-windicss'); var _vitepluginwindic
|
|
|
101
101
|
var _jiti = require('jiti'); var _jiti2 = _interopRequireDefault(_jiti);
|
|
102
102
|
|
|
103
103
|
// node/plugins/setupNode.ts
|
|
104
|
-
|
|
104
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
105
105
|
|
|
106
106
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
107
107
|
|
|
108
108
|
|
|
109
109
|
function deepMerge(a, b, rootPath = "") {
|
|
110
|
-
a =
|
|
110
|
+
a = _chunkFFZLS6QKjs.__spreadValues.call(void 0, {}, a);
|
|
111
111
|
Object.keys(b).forEach((key) => {
|
|
112
112
|
if (_utils.isObject.call(void 0, a[key]))
|
|
113
113
|
a[key] = deepMerge(a[key], b[key], rootPath ? `${rootPath}.${key}` : key);
|
|
@@ -146,7 +146,7 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
146
146
|
if (config.default)
|
|
147
147
|
config = config.default;
|
|
148
148
|
config = await loadSetups(roots, "windicss.ts", {}, config, true);
|
|
149
|
-
return _vitepluginwindicss2.default.call(void 0,
|
|
149
|
+
return _vitepluginwindicss2.default.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
150
150
|
configFiles: [configFile],
|
|
151
151
|
config,
|
|
152
152
|
onConfigResolved(config2) {
|
|
@@ -172,15 +172,15 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
172
172
|
config2.scanOptions.include.push(`${i}/layouts/*.{vue,ts}`);
|
|
173
173
|
});
|
|
174
174
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
175
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
176
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
177
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
175
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkFFZLS6QKjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
176
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkFFZLS6QKjs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
177
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkFFZLS6QKjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
178
178
|
}
|
|
179
179
|
}, windiOptions));
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
// node/plugins/preset.ts
|
|
183
|
-
|
|
183
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
184
184
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
185
185
|
var _vite = require('unplugin-icons/vite'); var _vite2 = _interopRequireDefault(_vite);
|
|
186
186
|
var _resolver = require('unplugin-icons/resolver'); var _resolver2 = _interopRequireDefault(_resolver);
|
|
@@ -190,7 +190,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
// node/drawings.ts
|
|
193
|
-
|
|
193
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
194
194
|
|
|
195
195
|
|
|
196
196
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -236,7 +236,7 @@ ${value}
|
|
|
236
236
|
}
|
|
237
237
|
|
|
238
238
|
// node/plugins/extendConfig.ts
|
|
239
|
-
|
|
239
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
240
240
|
|
|
241
241
|
var _vite5 = require('vite');
|
|
242
242
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -247,10 +247,10 @@ var dependencies = {
|
|
|
247
247
|
"@antfu/utils": "^0.5.2",
|
|
248
248
|
"@slidev/parser": "workspace:*",
|
|
249
249
|
"@slidev/types": "workspace:*",
|
|
250
|
-
"@vueuse/core": "^8.
|
|
250
|
+
"@vueuse/core": "^8.6.0",
|
|
251
251
|
"@vueuse/head": "^0.7.6",
|
|
252
252
|
"@vueuse/motion": "^2.0.0-beta.18",
|
|
253
|
-
codemirror: "^5.65.
|
|
253
|
+
codemirror: "^5.65.5",
|
|
254
254
|
defu: "^6.0.0",
|
|
255
255
|
drauu: "^0.3.0",
|
|
256
256
|
"file-saver": "^2.0.5",
|
|
@@ -264,14 +264,14 @@ var dependencies = {
|
|
|
264
264
|
recordrtc: "^5.6.2",
|
|
265
265
|
resolve: "^1.22.0",
|
|
266
266
|
"vite-plugin-windicss": "^1.8.4",
|
|
267
|
-
vue: "^3.2.
|
|
267
|
+
vue: "^3.2.36",
|
|
268
268
|
"vue-router": "^4.0.15",
|
|
269
|
-
"vue-starport": "^0.2.
|
|
269
|
+
"vue-starport": "^0.2.11",
|
|
270
270
|
windicss: "^3.5.4"
|
|
271
271
|
};
|
|
272
272
|
|
|
273
273
|
// node/vite/searchRoot.ts
|
|
274
|
-
|
|
274
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
275
275
|
|
|
276
276
|
|
|
277
277
|
var ROOT_FILES = [
|
|
@@ -331,7 +331,7 @@ function createConfigPlugin(options) {
|
|
|
331
331
|
define: getDefine(options),
|
|
332
332
|
resolve: {
|
|
333
333
|
alias: {
|
|
334
|
-
"@slidev/client/": `${
|
|
334
|
+
"@slidev/client/": `${_chunkFFZLS6QKjs.toAtFS.call(void 0, options.clientRoot)}/`
|
|
335
335
|
}
|
|
336
336
|
},
|
|
337
337
|
optimizeDeps: {
|
|
@@ -358,7 +358,7 @@ function createConfigPlugin(options) {
|
|
|
358
358
|
allow: _utils.uniq.call(void 0, [
|
|
359
359
|
searchForWorkspaceRoot(options.userRoot),
|
|
360
360
|
searchForWorkspaceRoot(options.cliRoot),
|
|
361
|
-
..._isinstalledglobally2.default ? [_path.dirname.call(void 0,
|
|
361
|
+
..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunkFFZLS6QKjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunkFFZLS6QKjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
|
|
362
362
|
])
|
|
363
363
|
}
|
|
364
364
|
}
|
|
@@ -367,7 +367,7 @@ function createConfigPlugin(options) {
|
|
|
367
367
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
368
368
|
injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
|
|
369
369
|
injection.root = options.cliRoot;
|
|
370
|
-
injection.resolve.alias.vue = `${
|
|
370
|
+
injection.resolve.alias.vue = `${_chunkFFZLS6QKjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
371
371
|
}
|
|
372
372
|
return _vite5.mergeConfig.call(void 0, config, injection);
|
|
373
373
|
},
|
|
@@ -388,7 +388,7 @@ function createConfigPlugin(options) {
|
|
|
388
388
|
}
|
|
389
389
|
function getDefine(options) {
|
|
390
390
|
return {
|
|
391
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
391
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkFFZLS6QKjs.toAtFS.call(void 0, options.clientRoot)),
|
|
392
392
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
393
393
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
394
394
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -398,8 +398,8 @@ function getDefine(options) {
|
|
|
398
398
|
}
|
|
399
399
|
|
|
400
400
|
// node/plugins/loaders.ts
|
|
401
|
-
|
|
402
|
-
var import_fast_deep_equal =
|
|
401
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
402
|
+
var import_fast_deep_equal = _chunkFFZLS6QKjs.__toESM.call(void 0, require_fast_deep_equal());
|
|
403
403
|
|
|
404
404
|
|
|
405
405
|
|
|
@@ -431,7 +431,7 @@ md.use(_markdownitlinkattributes2.default, {
|
|
|
431
431
|
}
|
|
432
432
|
});
|
|
433
433
|
function prepareSlideInfo(data) {
|
|
434
|
-
return
|
|
434
|
+
return _chunkFFZLS6QKjs.__spreadProps.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {}, data), {
|
|
435
435
|
notesHTML: md.render((data == null ? void 0 : data.note) || "")
|
|
436
436
|
});
|
|
437
437
|
}
|
|
@@ -522,7 +522,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, addonRoots, u
|
|
|
522
522
|
const file = `${slidePrefix}${i + 1}.md`;
|
|
523
523
|
try {
|
|
524
524
|
const md2 = await transformMarkdown(await MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
|
|
525
|
-
return await VuePlugin.handleHotUpdate(
|
|
525
|
+
return await VuePlugin.handleHotUpdate(_chunkFFZLS6QKjs.__spreadProps.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {}, ctx), {
|
|
526
526
|
modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
|
|
527
527
|
file,
|
|
528
528
|
read() {
|
|
@@ -639,14 +639,14 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, addonRoots, u
|
|
|
639
639
|
async function transformMarkdown(code, pageNo, data2) {
|
|
640
640
|
var _a, _b;
|
|
641
641
|
const layouts = await getLayouts();
|
|
642
|
-
const frontmatter =
|
|
642
|
+
const frontmatter = _chunkFFZLS6QKjs.__spreadValues.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
|
|
643
643
|
const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
|
|
644
644
|
if (!layouts[layoutName])
|
|
645
645
|
throw new Error(`Unknown layout "${layoutName}"`);
|
|
646
646
|
delete frontmatter.title;
|
|
647
647
|
const imports = [
|
|
648
648
|
'import { inject as vueInject } from "vue"',
|
|
649
|
-
`import InjectedLayout from "${
|
|
649
|
+
`import InjectedLayout from "${_chunkFFZLS6QKjs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
650
650
|
'import { injectionSlidevContext } from "@slidev/client/constants"',
|
|
651
651
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
652
652
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -750,9 +750,9 @@ defineProps<{ no: number | string }>()`);
|
|
|
750
750
|
}
|
|
751
751
|
async function generateUserStyles() {
|
|
752
752
|
const imports = [
|
|
753
|
-
`import "${
|
|
754
|
-
`import "${
|
|
755
|
-
`import "${
|
|
753
|
+
`import "${_chunkFFZLS6QKjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
754
|
+
`import "${_chunkFFZLS6QKjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
755
|
+
`import "${_chunkFFZLS6QKjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
|
|
756
756
|
];
|
|
757
757
|
const roots2 = _utils.uniq.call(void 0, [
|
|
758
758
|
...themeRoots,
|
|
@@ -769,13 +769,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
769
769
|
];
|
|
770
770
|
for (const style of styles) {
|
|
771
771
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
772
|
-
imports.push(`import "${
|
|
772
|
+
imports.push(`import "${_chunkFFZLS6QKjs.toAtFS.call(void 0, style)}"`);
|
|
773
773
|
continue;
|
|
774
774
|
}
|
|
775
775
|
}
|
|
776
776
|
}
|
|
777
777
|
if (data.features.katex)
|
|
778
|
-
imports.push(`import "${
|
|
778
|
+
imports.push(`import "${_chunkFFZLS6QKjs.toAtFS.call(void 0, _chunkFFZLS6QKjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
779
779
|
return imports.join("\n");
|
|
780
780
|
}
|
|
781
781
|
async function generateMonacoTypes() {
|
|
@@ -784,7 +784,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
784
784
|
async function generateLayouts() {
|
|
785
785
|
const imports = [];
|
|
786
786
|
const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
|
|
787
|
-
imports.push(`import __layout_${k} from "${
|
|
787
|
+
imports.push(`import __layout_${k} from "${_chunkFFZLS6QKjs.toAtFS.call(void 0, v)}"`);
|
|
788
788
|
return [k, `__layout_${k}`];
|
|
789
789
|
});
|
|
790
790
|
return [
|
|
@@ -833,10 +833,10 @@ ${routes.join(",\n")}
|
|
|
833
833
|
return [...imports, routesStr].join("\n");
|
|
834
834
|
}
|
|
835
835
|
function generateConfigs() {
|
|
836
|
-
const config =
|
|
836
|
+
const config = _chunkFFZLS6QKjs.__spreadProps.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {}, data.config), { remote });
|
|
837
837
|
if (_utils.isString.call(void 0, config.title)) {
|
|
838
838
|
const tokens = md.parseInline(config.title, {});
|
|
839
|
-
config.title =
|
|
839
|
+
config.title = _chunkFFZLS6QKjs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
840
840
|
}
|
|
841
841
|
if (_utils.isString.call(void 0, config.info))
|
|
842
842
|
config.info = md.render(config.info);
|
|
@@ -857,7 +857,7 @@ ${routes.join(",\n")}
|
|
|
857
857
|
];
|
|
858
858
|
}
|
|
859
859
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
860
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
860
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkFFZLS6QKjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
861
861
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
862
862
|
return `
|
|
863
863
|
${imports}
|
|
@@ -876,7 +876,7 @@ export default {
|
|
|
876
876
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
877
877
|
];
|
|
878
878
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
879
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
879
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkFFZLS6QKjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
880
880
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
881
881
|
return `
|
|
882
882
|
${imports}
|
|
@@ -891,7 +891,7 @@ export default {
|
|
|
891
891
|
}
|
|
892
892
|
|
|
893
893
|
// node/plugins/monacoTransform.ts
|
|
894
|
-
|
|
894
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
895
895
|
|
|
896
896
|
|
|
897
897
|
|
|
@@ -925,7 +925,7 @@ function createMonacoTypesLoader() {
|
|
|
925
925
|
}
|
|
926
926
|
|
|
927
927
|
// node/plugins/setupClient.ts
|
|
928
|
-
|
|
928
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
929
929
|
|
|
930
930
|
|
|
931
931
|
|
|
@@ -948,7 +948,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
948
948
|
setups.forEach((path, idx) => {
|
|
949
949
|
if (!_fs.existsSync.call(void 0, path))
|
|
950
950
|
return;
|
|
951
|
-
imports.push(`import __n${idx} from '${
|
|
951
|
+
imports.push(`import __n${idx} from '${_chunkFFZLS6QKjs.toAtFS.call(void 0, path)}'`);
|
|
952
952
|
let fn = `__n${idx}`;
|
|
953
953
|
let awaitFn = `await __n${idx}`;
|
|
954
954
|
if (/\binjection_return\b/g.test(code)) {
|
|
@@ -976,7 +976,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
976
976
|
}
|
|
977
977
|
|
|
978
978
|
// node/plugins/markdown.ts
|
|
979
|
-
|
|
979
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
980
980
|
var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
|
|
981
981
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
982
982
|
|
|
@@ -986,7 +986,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
986
986
|
var _plantumlencoder = require('plantuml-encoder');
|
|
987
987
|
|
|
988
988
|
// node/plugins/markdown-it-katex.ts
|
|
989
|
-
|
|
989
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
990
990
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
991
991
|
function isValidDelim(state, pos) {
|
|
992
992
|
const max = state.posMax;
|
|
@@ -1133,7 +1133,7 @@ function math_plugin(md2, options) {
|
|
|
1133
1133
|
}
|
|
1134
1134
|
|
|
1135
1135
|
// node/plugins/markdown-it-prism.ts
|
|
1136
|
-
|
|
1136
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
1137
1137
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1138
1138
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1139
1139
|
var DEFAULTS = {
|
|
@@ -1156,7 +1156,7 @@ function loadPrismLang(lang) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
function loadPrismPlugin(name) {
|
|
1158
1158
|
try {
|
|
1159
|
-
|
|
1159
|
+
_chunkFFZLS6QKjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1160
1160
|
} catch (e) {
|
|
1161
1161
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1162
1162
|
}
|
|
@@ -1196,7 +1196,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1196
1196
|
}
|
|
1197
1197
|
|
|
1198
1198
|
// node/plugins/markdown-it-shiki.ts
|
|
1199
|
-
|
|
1199
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
1200
1200
|
function getThemeName(theme) {
|
|
1201
1201
|
if (typeof theme === "string")
|
|
1202
1202
|
return theme;
|
|
@@ -1218,7 +1218,7 @@ function resolveShikiOptions(options) {
|
|
|
1218
1218
|
themes.push(options.theme);
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
|
-
return
|
|
1221
|
+
return _chunkFFZLS6QKjs.__spreadProps.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {}, options), {
|
|
1222
1222
|
themes,
|
|
1223
1223
|
darkModeThemes: darkModeThemes ? {
|
|
1224
1224
|
dark: getThemeName(darkModeThemes.dark),
|
|
@@ -1256,7 +1256,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1256
1256
|
const setups = [];
|
|
1257
1257
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1258
1258
|
if (config.highlighter === "shiki") {
|
|
1259
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1259
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkFFZLS6QKjs.__toESM.call(void 0, _chunkFFZLS6QKjs.__require.call(void 0, "shiki")));
|
|
1260
1260
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1261
1261
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1262
1262
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1265,11 +1265,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1265
1265
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
1266
1266
|
}
|
|
1267
1267
|
const KatexOptions = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1268
|
-
return _vitepluginmd2.default.call(void 0,
|
|
1268
|
+
return _vitepluginmd2.default.call(void 0, _chunkFFZLS6QKjs.__spreadProps.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1269
1269
|
wrapperClasses: "",
|
|
1270
1270
|
headEnabled: false,
|
|
1271
1271
|
frontmatter: false,
|
|
1272
|
-
markdownItOptions:
|
|
1272
|
+
markdownItOptions: _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1273
1273
|
quotes: `""''`,
|
|
1274
1274
|
html: true,
|
|
1275
1275
|
xhtmlOut: true,
|
|
@@ -1405,7 +1405,7 @@ function escapeVueInCode(md2) {
|
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
1407
|
// node/plugins/patchTransform.ts
|
|
1408
|
-
|
|
1408
|
+
_chunkFFZLS6QKjs.init_cjs_shims.call(void 0, );
|
|
1409
1409
|
|
|
1410
1410
|
function createFixPlugins(options) {
|
|
1411
1411
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1470,10 +1470,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1470
1470
|
clientRoot,
|
|
1471
1471
|
data: { config }
|
|
1472
1472
|
} = options;
|
|
1473
|
-
const VuePlugin = _pluginvue2.default.call(void 0,
|
|
1473
|
+
const VuePlugin = _pluginvue2.default.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1474
1474
|
include: [/\.vue$/, /\.md$/],
|
|
1475
1475
|
exclude: [],
|
|
1476
|
-
template:
|
|
1476
|
+
template: _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1477
1477
|
compilerOptions: {
|
|
1478
1478
|
isCustomElement(tag) {
|
|
1479
1479
|
return customElements.has(tag);
|
|
@@ -1488,7 +1488,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1488
1488
|
MarkdownPlugin,
|
|
1489
1489
|
VuePlugin,
|
|
1490
1490
|
createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
|
|
1491
|
-
_vite4.default.call(void 0,
|
|
1491
|
+
_vite4.default.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1492
1492
|
extensions: ["vue", "md", "ts"],
|
|
1493
1493
|
dirs: [
|
|
1494
1494
|
`${clientRoot}/builtin`,
|
|
@@ -1507,11 +1507,11 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1507
1507
|
})
|
|
1508
1508
|
]
|
|
1509
1509
|
}, componentsOptions)),
|
|
1510
|
-
_vite2.default.call(void 0,
|
|
1510
|
+
_vite2.default.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1511
1511
|
defaultClass: "slidev-icon",
|
|
1512
1512
|
autoInstall: true
|
|
1513
1513
|
}, iconsOptions)),
|
|
1514
|
-
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0,
|
|
1514
|
+
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1515
1515
|
rules: [
|
|
1516
1516
|
..._vitepluginremoteassets.DefaultRules,
|
|
1517
1517
|
{
|
|
@@ -1524,7 +1524,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1524
1524
|
}, remoteAssetsOptions)) : null,
|
|
1525
1525
|
_vitepluginvueserverref2.default.call(void 0, {
|
|
1526
1526
|
debug: process.env.NODE_ENV === "development",
|
|
1527
|
-
state:
|
|
1527
|
+
state: _chunkFFZLS6QKjs.__spreadValues.call(void 0, {
|
|
1528
1528
|
sync: false,
|
|
1529
1529
|
nav: {
|
|
1530
1530
|
page: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CNNMHD67.mjs";
|
|
4
4
|
import {
|
|
5
5
|
__commonJS,
|
|
6
6
|
__dirname,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
init_esm_shims,
|
|
16
16
|
packageExists,
|
|
17
17
|
resolveImportPath
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-ZWCVPYOA.mjs";
|
|
19
19
|
|
|
20
20
|
// ../../node_modules/.pnpm/semver@7.3.7/node_modules/semver/internal/constants.js
|
|
21
21
|
var require_constants = __commonJS({
|
|
@@ -2401,7 +2401,7 @@ init_esm_shims();
|
|
|
2401
2401
|
import * as parser from "@slidev/parser/fs";
|
|
2402
2402
|
|
|
2403
2403
|
// package.json
|
|
2404
|
-
var version = "0.32.
|
|
2404
|
+
var version = "0.32.4";
|
|
2405
2405
|
|
|
2406
2406
|
// node/themes.ts
|
|
2407
2407
|
init_esm_shims();
|
|
@@ -9504,19 +9504,22 @@ init_esm_shims();
|
|
|
9504
9504
|
var import_semver = __toESM(require_semver2());
|
|
9505
9505
|
import fs2 from "fs-extra";
|
|
9506
9506
|
function getPackageJson(root) {
|
|
9507
|
-
|
|
9507
|
+
const file = resolveImportPath(`${root}/package.json`, true);
|
|
9508
|
+
if (file && fs2.existsSync(file))
|
|
9509
|
+
return fs2.readJSON(file);
|
|
9510
|
+
return {};
|
|
9508
9511
|
}
|
|
9509
9512
|
async function getAddons(userRoot, config2) {
|
|
9510
9513
|
const { slidev = {} } = await getPackageJson(userRoot);
|
|
9511
|
-
const configAddons = config2.addons
|
|
9512
|
-
const addons = configAddons.concat(slidev
|
|
9514
|
+
const configAddons = Array.isArray(config2.addons) ? config2.addons : [];
|
|
9515
|
+
const addons = configAddons.concat(Array.isArray(slidev == null ? void 0 : slidev.addons) ? slidev.addons : []);
|
|
9513
9516
|
return getRecursivePlugins(addons.map(resolvePluginName));
|
|
9514
9517
|
}
|
|
9515
9518
|
async function getRecursivePlugins(addons) {
|
|
9516
9519
|
const addonsArray = await Promise.all(addons.map(async (addon) => {
|
|
9517
9520
|
const { slidev = {}, engines = {} } = await getPackageJson(addon);
|
|
9518
9521
|
checkEngine(addon, engines);
|
|
9519
|
-
let addons2 = slidev
|
|
9522
|
+
let addons2 = Array.isArray(slidev == null ? void 0 : slidev.addons) ? slidev.addons : [];
|
|
9520
9523
|
if (addons2.length > 0)
|
|
9521
9524
|
addons2 = await getRecursivePlugins(addons2.map(resolvePluginName));
|
|
9522
9525
|
addons2.push(addon);
|
|
@@ -9661,6 +9664,8 @@ function resolveThemeName(name) {
|
|
|
9661
9664
|
return name;
|
|
9662
9665
|
if (officialThemes[name] != null)
|
|
9663
9666
|
return officialThemes[name];
|
|
9667
|
+
if (name.indexOf("@") === 0 && name.includes("/"))
|
|
9668
|
+
return name;
|
|
9664
9669
|
return `slidev-theme-${name}`;
|
|
9665
9670
|
}
|
|
9666
9671
|
async function promptForThemeInstallation(name) {
|
|
@@ -84,12 +84,12 @@ var __privateWrapper = (obj, member, setter, getter) => {
|
|
|
84
84
|
};
|
|
85
85
|
};
|
|
86
86
|
|
|
87
|
-
// ../../node_modules/.pnpm/tsup@5.12.
|
|
87
|
+
// ../../node_modules/.pnpm/tsup@5.12.9_typescript@4.7.2/node_modules/tsup/assets/esm_shims.js
|
|
88
88
|
import { fileURLToPath } from "url";
|
|
89
89
|
import path from "path";
|
|
90
90
|
var getFilename, getDirname, __dirname, __filename;
|
|
91
91
|
var init_esm_shims = __esm({
|
|
92
|
-
"../../node_modules/.pnpm/tsup@5.12.
|
|
92
|
+
"../../node_modules/.pnpm/tsup@5.12.9_typescript@4.7.2/node_modules/tsup/assets/esm_shims.js"() {
|
|
93
93
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
94
94
|
getDirname = () => path.dirname(getFilename());
|
|
95
95
|
__dirname = /* @__PURE__ */ getDirname();
|