@slidev/cli 0.30.2 → 0.31.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-23SNLQAJ.js → build-DHS7EAI7.js} +11 -11
- package/dist/{build-YFDGZUAK.mjs → build-HKOWIJTJ.mjs} +3 -3
- package/dist/{chunk-MBZTOLHN.mjs → chunk-55JD2XFU.mjs} +14 -12
- package/dist/{chunk-XMETW2MS.mjs → chunk-D6ZT4BYV.mjs} +47 -2
- package/dist/{chunk-O57F34AM.mjs → chunk-MRYU4L7C.mjs} +2 -2
- package/dist/{chunk-RSHUQSN4.js → chunk-N6ENRMDM.js} +69 -67
- package/dist/{chunk-IXNT7VMK.js → chunk-OVW2G2MH.js} +47 -6
- package/dist/chunk-U4YYUHKV.mjs +12685 -0
- package/dist/{chunk-E4IOOAKN.js → chunk-UGIPPIZX.js} +4 -4
- package/dist/chunk-ZN6VJBWP.js +12693 -0
- package/dist/cli.js +25 -25
- package/dist/cli.mjs +6 -6
- package/dist/{export-RFCVIBYE.mjs → export-HA4VXV3M.mjs} +22 -14
- package/dist/{export-AKEY52VC.js → export-JHHUB6BA.js} +25 -17
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/package.json +19 -20
- package/dist/chunk-2LNCAUCD.js +0 -13308
- package/dist/chunk-OII7IQD2.mjs +0 -13308
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkOVW2G2MHjs = require('./chunk-OVW2G2MH.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 = _chunkOVW2G2MHjs.__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
|
+
_chunkOVW2G2MHjs.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 = _chunkIXNT7VMKjs.__commonJS.call(void 0, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// node/common.ts
|
|
62
|
-
|
|
62
|
+
_chunkOVW2G2MHjs.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="${_chunkOVW2G2MHjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
91
|
+
main = main.replace("__ENTRY__", _chunkOVW2G2MHjs.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
|
+
_chunkOVW2G2MHjs.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
|
+
_chunkOVW2G2MHjs.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 = _chunkOVW2G2MHjs.__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);
|
|
@@ -145,7 +145,7 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
|
|
|
145
145
|
if (config.default)
|
|
146
146
|
config = config.default;
|
|
147
147
|
config = await loadSetups(roots, "windicss.ts", {}, config, true);
|
|
148
|
-
return _vitepluginwindicss2.default.call(void 0,
|
|
148
|
+
return _vitepluginwindicss2.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
149
149
|
configFiles: [configFile],
|
|
150
150
|
config,
|
|
151
151
|
onConfigResolved(config2) {
|
|
@@ -167,15 +167,15 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
|
|
|
167
167
|
config2.scanOptions.include.push(`${i}/layouts/*.{vue,ts}`);
|
|
168
168
|
});
|
|
169
169
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
170
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
171
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
172
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
170
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkOVW2G2MHjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
171
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkOVW2G2MHjs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
172
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkOVW2G2MHjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
173
173
|
}
|
|
174
174
|
}, windiOptions));
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
// node/plugins/preset.ts
|
|
178
|
-
|
|
178
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
179
179
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
180
180
|
var _vite = require('unplugin-icons/vite'); var _vite2 = _interopRequireDefault(_vite);
|
|
181
181
|
var _resolver = require('unplugin-icons/resolver'); var _resolver2 = _interopRequireDefault(_resolver);
|
|
@@ -185,7 +185,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
185
185
|
|
|
186
186
|
|
|
187
187
|
// node/drawings.ts
|
|
188
|
-
|
|
188
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -231,7 +231,7 @@ ${value}
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
// node/plugins/extendConfig.ts
|
|
234
|
-
|
|
234
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
235
235
|
|
|
236
236
|
var _vite5 = require('vite');
|
|
237
237
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -242,31 +242,31 @@ var dependencies = {
|
|
|
242
242
|
"@antfu/utils": "^0.5.1",
|
|
243
243
|
"@slidev/parser": "workspace:*",
|
|
244
244
|
"@slidev/types": "workspace:*",
|
|
245
|
-
"@vueuse/core": "^8.2
|
|
246
|
-
"@vueuse/head": "^0.7.
|
|
245
|
+
"@vueuse/core": "^8.4.2",
|
|
246
|
+
"@vueuse/head": "^0.7.6",
|
|
247
247
|
"@vueuse/motion": "^2.0.0-beta.18",
|
|
248
|
-
codemirror: "^5.65.
|
|
248
|
+
codemirror: "^5.65.3",
|
|
249
249
|
defu: "^6.0.0",
|
|
250
250
|
drauu: "^0.3.0",
|
|
251
251
|
"file-saver": "^2.0.5",
|
|
252
252
|
"js-base64": "^3.7.2",
|
|
253
253
|
"js-yaml": "^4.1.0",
|
|
254
254
|
katex: "^0.15.3",
|
|
255
|
-
mermaid: "^9.0.
|
|
255
|
+
mermaid: "^9.0.1",
|
|
256
256
|
"monaco-editor": "^0.33.0",
|
|
257
|
-
nanoid: "^3.3.
|
|
257
|
+
nanoid: "^3.3.4",
|
|
258
258
|
prettier: "^2.6.2",
|
|
259
259
|
recordrtc: "^5.6.2",
|
|
260
260
|
resolve: "^1.22.0",
|
|
261
261
|
"vite-plugin-windicss": "^1.8.4",
|
|
262
|
-
vue: "^3.2.
|
|
263
|
-
"vue-router": "^4.0.
|
|
264
|
-
"vue-starport": "^0.2.
|
|
262
|
+
vue: "^3.2.33",
|
|
263
|
+
"vue-router": "^4.0.15",
|
|
264
|
+
"vue-starport": "^0.2.10",
|
|
265
265
|
windicss: "^3.5.1"
|
|
266
266
|
};
|
|
267
267
|
|
|
268
268
|
// node/vite/searchRoot.ts
|
|
269
|
-
|
|
269
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
270
270
|
|
|
271
271
|
|
|
272
272
|
var ROOT_FILES = [
|
|
@@ -326,7 +326,7 @@ function createConfigPlugin(options) {
|
|
|
326
326
|
define: getDefine(options),
|
|
327
327
|
resolve: {
|
|
328
328
|
alias: {
|
|
329
|
-
"@slidev/client/": `${
|
|
329
|
+
"@slidev/client/": `${_chunkOVW2G2MHjs.toAtFS.call(void 0, options.clientRoot)}/`
|
|
330
330
|
}
|
|
331
331
|
},
|
|
332
332
|
optimizeDeps: {
|
|
@@ -353,7 +353,7 @@ function createConfigPlugin(options) {
|
|
|
353
353
|
allow: _utils.uniq.call(void 0, [
|
|
354
354
|
searchForWorkspaceRoot(options.userRoot),
|
|
355
355
|
searchForWorkspaceRoot(options.cliRoot),
|
|
356
|
-
..._isinstalledglobally2.default ? [_path.dirname.call(void 0,
|
|
356
|
+
..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunkOVW2G2MHjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunkOVW2G2MHjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
|
|
357
357
|
])
|
|
358
358
|
}
|
|
359
359
|
}
|
|
@@ -362,7 +362,7 @@ function createConfigPlugin(options) {
|
|
|
362
362
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
363
363
|
injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
|
|
364
364
|
injection.root = options.cliRoot;
|
|
365
|
-
injection.resolve.alias.vue = `${
|
|
365
|
+
injection.resolve.alias.vue = `${_chunkOVW2G2MHjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
366
366
|
}
|
|
367
367
|
return _vite5.mergeConfig.call(void 0, config, injection);
|
|
368
368
|
},
|
|
@@ -383,17 +383,18 @@ function createConfigPlugin(options) {
|
|
|
383
383
|
}
|
|
384
384
|
function getDefine(options) {
|
|
385
385
|
return {
|
|
386
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
386
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkOVW2G2MHjs.toAtFS.call(void 0, options.clientRoot)),
|
|
387
387
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
388
388
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
389
389
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
390
|
+
__SLIDEV_FEATURE_RECORD__: JSON.stringify(options.data.config.record === true || options.data.config.record === options.mode),
|
|
390
391
|
__DEV__: options.mode === "dev" ? "true" : "false"
|
|
391
392
|
};
|
|
392
393
|
}
|
|
393
394
|
|
|
394
395
|
// node/plugins/loaders.ts
|
|
395
|
-
|
|
396
|
-
var import_fast_deep_equal =
|
|
396
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
397
|
+
var import_fast_deep_equal = _chunkOVW2G2MHjs.__toESM.call(void 0, require_fast_deep_equal());
|
|
397
398
|
|
|
398
399
|
|
|
399
400
|
|
|
@@ -425,7 +426,7 @@ md.use(_markdownitlinkattributes2.default, {
|
|
|
425
426
|
}
|
|
426
427
|
});
|
|
427
428
|
function prepareSlideInfo(data) {
|
|
428
|
-
return
|
|
429
|
+
return _chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, data), {
|
|
429
430
|
notesHTML: md.render((data == null ? void 0 : data.note) || "")
|
|
430
431
|
});
|
|
431
432
|
}
|
|
@@ -516,7 +517,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
516
517
|
const file = `${slidePrefix}${i + 1}.md`;
|
|
517
518
|
try {
|
|
518
519
|
const md2 = await transformMarkdown(await MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
|
|
519
|
-
return await VuePlugin.handleHotUpdate(
|
|
520
|
+
return await VuePlugin.handleHotUpdate(_chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, ctx), {
|
|
520
521
|
modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
|
|
521
522
|
file,
|
|
522
523
|
read() {
|
|
@@ -633,14 +634,14 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
633
634
|
async function transformMarkdown(code, pageNo, data2) {
|
|
634
635
|
var _a, _b;
|
|
635
636
|
const layouts = await getLayouts();
|
|
636
|
-
const frontmatter =
|
|
637
|
+
const frontmatter = _chunkOVW2G2MHjs.__spreadValues.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
|
|
637
638
|
const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
|
|
638
639
|
if (!layouts[layoutName])
|
|
639
640
|
throw new Error(`Unknown layout "${layoutName}"`);
|
|
640
641
|
delete frontmatter.title;
|
|
641
642
|
const imports = [
|
|
642
643
|
'import { inject as vueInject } from "vue"',
|
|
643
|
-
`import InjectedLayout from "${
|
|
644
|
+
`import InjectedLayout from "${_chunkOVW2G2MHjs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
644
645
|
'import { injectionSlidevContext } from "@slidev/client/constants"',
|
|
645
646
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
646
647
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -745,9 +746,9 @@ defineProps<{ no: number | string }>()`);
|
|
|
745
746
|
}
|
|
746
747
|
async function generateUserStyles() {
|
|
747
748
|
const imports = [
|
|
748
|
-
`import "${
|
|
749
|
-
`import "${
|
|
750
|
-
`import "${
|
|
749
|
+
`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
750
|
+
`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
751
|
+
`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
|
|
751
752
|
];
|
|
752
753
|
const roots2 = _utils.uniq.call(void 0, [
|
|
753
754
|
...themeRoots,
|
|
@@ -763,13 +764,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
763
764
|
];
|
|
764
765
|
for (const style of styles) {
|
|
765
766
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
766
|
-
imports.push(`import "${
|
|
767
|
+
imports.push(`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, style)}"`);
|
|
767
768
|
continue;
|
|
768
769
|
}
|
|
769
770
|
}
|
|
770
771
|
}
|
|
771
772
|
if (data.features.katex)
|
|
772
|
-
imports.push(`import "${
|
|
773
|
+
imports.push(`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, _chunkOVW2G2MHjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
773
774
|
return imports.join("\n");
|
|
774
775
|
}
|
|
775
776
|
async function generateMonacoTypes() {
|
|
@@ -778,7 +779,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
778
779
|
async function generateLayouts() {
|
|
779
780
|
const imports = [];
|
|
780
781
|
const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
|
|
781
|
-
imports.push(`import __layout_${k} from "${
|
|
782
|
+
imports.push(`import __layout_${k} from "${_chunkOVW2G2MHjs.toAtFS.call(void 0, v)}"`);
|
|
782
783
|
return [k, `__layout_${k}`];
|
|
783
784
|
});
|
|
784
785
|
return [
|
|
@@ -795,7 +796,7 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
795
796
|
let no = 1;
|
|
796
797
|
const routes = [
|
|
797
798
|
...data.slides.map((i, idx) => {
|
|
798
|
-
var _a, _b;
|
|
799
|
+
var _a, _b, _c, _d;
|
|
799
800
|
if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
|
|
800
801
|
return void 0;
|
|
801
802
|
imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
|
|
@@ -815,9 +816,10 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
815
816
|
};
|
|
816
817
|
const meta = Object.assign({}, i.frontmatter, additions);
|
|
817
818
|
const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
|
|
819
|
+
const redirect = ((_c = i.frontmatter) == null ? void 0 : _c.routeAlias) ? `{ path: '${(_d = i.frontmatter) == null ? void 0 : _d.routeAlias}', redirect: { path: '${no}' } }` : null;
|
|
818
820
|
no += 1;
|
|
819
|
-
return route;
|
|
820
|
-
}).filter(_utils.notNullish),
|
|
821
|
+
return [route, redirect];
|
|
822
|
+
}).flat().filter(_utils.notNullish),
|
|
821
823
|
`{ path: "${no}", component: __layout__end, meta: { layout: "end" } }`
|
|
822
824
|
];
|
|
823
825
|
const routesStr = `export default [
|
|
@@ -826,10 +828,10 @@ ${routes.join(",\n")}
|
|
|
826
828
|
return [...imports, routesStr].join("\n");
|
|
827
829
|
}
|
|
828
830
|
function generateConfigs() {
|
|
829
|
-
const config =
|
|
831
|
+
const config = _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, data.config);
|
|
830
832
|
if (_utils.isString.call(void 0, config.title)) {
|
|
831
833
|
const tokens = md.parseInline(config.title, {});
|
|
832
|
-
config.title =
|
|
834
|
+
config.title = _chunkOVW2G2MHjs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
833
835
|
}
|
|
834
836
|
if (_utils.isString.call(void 0, config.info))
|
|
835
837
|
config.info = md.render(config.info);
|
|
@@ -850,7 +852,7 @@ ${routes.join(",\n")}
|
|
|
850
852
|
];
|
|
851
853
|
}
|
|
852
854
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
853
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
855
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkOVW2G2MHjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
854
856
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
855
857
|
return `
|
|
856
858
|
${imports}
|
|
@@ -869,7 +871,7 @@ export default {
|
|
|
869
871
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
870
872
|
];
|
|
871
873
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
872
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
874
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkOVW2G2MHjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
873
875
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
874
876
|
return `
|
|
875
877
|
${imports}
|
|
@@ -884,7 +886,7 @@ export default {
|
|
|
884
886
|
}
|
|
885
887
|
|
|
886
888
|
// node/plugins/monacoTransform.ts
|
|
887
|
-
|
|
889
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
888
890
|
|
|
889
891
|
|
|
890
892
|
|
|
@@ -918,7 +920,7 @@ function createMonacoTypesLoader() {
|
|
|
918
920
|
}
|
|
919
921
|
|
|
920
922
|
// node/plugins/setupClient.ts
|
|
921
|
-
|
|
923
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
922
924
|
|
|
923
925
|
|
|
924
926
|
|
|
@@ -940,7 +942,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
940
942
|
setups.forEach((path, idx) => {
|
|
941
943
|
if (!_fs.existsSync.call(void 0, path))
|
|
942
944
|
return;
|
|
943
|
-
imports.push(`import __n${idx} from '${
|
|
945
|
+
imports.push(`import __n${idx} from '${_chunkOVW2G2MHjs.toAtFS.call(void 0, path)}'`);
|
|
944
946
|
let fn = `__n${idx}`;
|
|
945
947
|
let awaitFn = `await __n${idx}`;
|
|
946
948
|
if (/\binjection_return\b/g.test(code)) {
|
|
@@ -968,7 +970,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
968
970
|
}
|
|
969
971
|
|
|
970
972
|
// node/plugins/markdown.ts
|
|
971
|
-
|
|
973
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
972
974
|
var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
|
|
973
975
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
974
976
|
|
|
@@ -978,7 +980,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
978
980
|
var _plantumlencoder = require('plantuml-encoder');
|
|
979
981
|
|
|
980
982
|
// node/plugins/markdown-it-katex.ts
|
|
981
|
-
|
|
983
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
982
984
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
983
985
|
function isValidDelim(state, pos) {
|
|
984
986
|
const max = state.posMax;
|
|
@@ -1125,7 +1127,7 @@ function math_plugin(md2, options) {
|
|
|
1125
1127
|
}
|
|
1126
1128
|
|
|
1127
1129
|
// node/plugins/markdown-it-prism.ts
|
|
1128
|
-
|
|
1130
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
1129
1131
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1130
1132
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1131
1133
|
var DEFAULTS = {
|
|
@@ -1148,7 +1150,7 @@ function loadPrismLang(lang) {
|
|
|
1148
1150
|
}
|
|
1149
1151
|
function loadPrismPlugin(name) {
|
|
1150
1152
|
try {
|
|
1151
|
-
|
|
1153
|
+
_chunkOVW2G2MHjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1152
1154
|
} catch (e) {
|
|
1153
1155
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1154
1156
|
}
|
|
@@ -1188,7 +1190,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1188
1190
|
}
|
|
1189
1191
|
|
|
1190
1192
|
// node/plugins/markdown-it-shiki.ts
|
|
1191
|
-
|
|
1193
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
1192
1194
|
function getThemeName(theme) {
|
|
1193
1195
|
if (typeof theme === "string")
|
|
1194
1196
|
return theme;
|
|
@@ -1210,7 +1212,7 @@ function resolveShikiOptions(options) {
|
|
|
1210
1212
|
themes.push(options.theme);
|
|
1211
1213
|
}
|
|
1212
1214
|
}
|
|
1213
|
-
return
|
|
1215
|
+
return _chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, options), {
|
|
1214
1216
|
themes,
|
|
1215
1217
|
darkModeThemes: darkModeThemes ? {
|
|
1216
1218
|
dark: getThemeName(darkModeThemes.dark),
|
|
@@ -1248,7 +1250,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1248
1250
|
const setups = [];
|
|
1249
1251
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1250
1252
|
if (config.highlighter === "shiki") {
|
|
1251
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1253
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkOVW2G2MHjs.__toESM.call(void 0, _chunkOVW2G2MHjs.__require.call(void 0, "shiki")));
|
|
1252
1254
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1253
1255
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1254
1256
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1257,11 +1259,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1257
1259
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
1258
1260
|
}
|
|
1259
1261
|
const KatexOptions = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1260
|
-
return _vitepluginmd2.default.call(void 0,
|
|
1262
|
+
return _vitepluginmd2.default.call(void 0, _chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1261
1263
|
wrapperClasses: "",
|
|
1262
1264
|
headEnabled: false,
|
|
1263
1265
|
frontmatter: false,
|
|
1264
|
-
markdownItOptions:
|
|
1266
|
+
markdownItOptions: _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1265
1267
|
quotes: `""''`,
|
|
1266
1268
|
html: true,
|
|
1267
1269
|
xhtmlOut: true,
|
|
@@ -1397,7 +1399,7 @@ function escapeVueInCode(md2) {
|
|
|
1397
1399
|
}
|
|
1398
1400
|
|
|
1399
1401
|
// node/plugins/patchTransform.ts
|
|
1400
|
-
|
|
1402
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
1401
1403
|
|
|
1402
1404
|
function createFixPlugins(options) {
|
|
1403
1405
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1461,10 +1463,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1461
1463
|
clientRoot,
|
|
1462
1464
|
data: { config }
|
|
1463
1465
|
} = options;
|
|
1464
|
-
const VuePlugin = _pluginvue2.default.call(void 0,
|
|
1466
|
+
const VuePlugin = _pluginvue2.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1465
1467
|
include: [/\.vue$/, /\.md$/],
|
|
1466
1468
|
exclude: [],
|
|
1467
|
-
template:
|
|
1469
|
+
template: _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1468
1470
|
compilerOptions: {
|
|
1469
1471
|
isCustomElement(tag) {
|
|
1470
1472
|
return customElements.has(tag);
|
|
@@ -1479,7 +1481,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1479
1481
|
MarkdownPlugin,
|
|
1480
1482
|
VuePlugin,
|
|
1481
1483
|
createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
|
|
1482
|
-
_vite4.default.call(void 0,
|
|
1484
|
+
_vite4.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1483
1485
|
extensions: ["vue", "md", "ts"],
|
|
1484
1486
|
dirs: [
|
|
1485
1487
|
`${clientRoot}/builtin`,
|
|
@@ -1497,11 +1499,11 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1497
1499
|
})
|
|
1498
1500
|
]
|
|
1499
1501
|
}, componentsOptions)),
|
|
1500
|
-
_vite2.default.call(void 0,
|
|
1502
|
+
_vite2.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1501
1503
|
defaultClass: "slidev-icon",
|
|
1502
1504
|
autoInstall: true
|
|
1503
1505
|
}, iconsOptions)),
|
|
1504
|
-
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0,
|
|
1506
|
+
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1505
1507
|
rules: [
|
|
1506
1508
|
..._vitepluginremoteassets.DefaultRules,
|
|
1507
1509
|
{
|
|
@@ -1514,7 +1516,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1514
1516
|
}, remoteAssetsOptions)) : null,
|
|
1515
1517
|
_vitepluginvueserverref2.default.call(void 0, {
|
|
1516
1518
|
debug: process.env.NODE_ENV === "development",
|
|
1517
|
-
state:
|
|
1519
|
+
state: _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1518
1520
|
sync: false,
|
|
1519
1521
|
nav: {
|
|
1520
1522
|
page: 0,
|
|
@@ -28,6 +28,18 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
28
28
|
return require.apply(this, arguments);
|
|
29
29
|
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
30
30
|
});
|
|
31
|
+
var __objRest = (source, exclude) => {
|
|
32
|
+
var target = {};
|
|
33
|
+
for (var prop in source)
|
|
34
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
if (source != null && __getOwnPropSymbols)
|
|
37
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
38
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
39
|
+
target[prop] = source[prop];
|
|
40
|
+
}
|
|
41
|
+
return target;
|
|
42
|
+
};
|
|
31
43
|
var __esm = (fn, res) => function __init() {
|
|
32
44
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
33
45
|
};
|
|
@@ -47,13 +59,38 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
47
59
|
return to;
|
|
48
60
|
};
|
|
49
61
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
62
|
+
var __accessCheck = (obj, member, msg) => {
|
|
63
|
+
if (!member.has(obj))
|
|
64
|
+
throw TypeError("Cannot " + msg);
|
|
65
|
+
};
|
|
66
|
+
var __privateGet = (obj, member, getter) => {
|
|
67
|
+
__accessCheck(obj, member, "read from private field");
|
|
68
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
69
|
+
};
|
|
70
|
+
var __privateAdd = (obj, member, value) => {
|
|
71
|
+
if (member.has(obj))
|
|
72
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
73
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
74
|
+
};
|
|
75
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
76
|
+
__accessCheck(obj, member, "write to private field");
|
|
77
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
78
|
+
return value;
|
|
79
|
+
};
|
|
80
|
+
var __privateWrapper = (obj, member, setter, getter) => {
|
|
81
|
+
return {
|
|
82
|
+
set _(value) {
|
|
83
|
+
__privateSet(obj, member, value, setter);
|
|
84
|
+
},
|
|
85
|
+
get _() {
|
|
86
|
+
return __privateGet(obj, member, getter);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
};
|
|
50
90
|
|
|
51
|
-
// ../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.
|
|
52
|
-
var getImportMetaUrl, importMetaUrl;
|
|
91
|
+
// ../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.4/node_modules/tsup/assets/cjs_shims.js
|
|
53
92
|
var init_cjs_shims = __esm({
|
|
54
|
-
"../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.
|
|
55
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
56
|
-
importMetaUrl = exports.importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
93
|
+
"../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.4/node_modules/tsup/assets/cjs_shims.js"() {
|
|
57
94
|
}
|
|
58
95
|
});
|
|
59
96
|
|
|
@@ -129,4 +166,8 @@ function generateGoogleFontsUrl(options) {
|
|
|
129
166
|
|
|
130
167
|
|
|
131
168
|
|
|
132
|
-
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__require = __require; exports.__objRest = __objRest; exports.__commonJS = __commonJS; exports.__export = __export; exports.__toESM = __toESM; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateWrapper = __privateWrapper; exports.init_cjs_shims = init_cjs_shims; exports.toAtFS = toAtFS; exports.resolveImportPath = resolveImportPath; exports.resolveGlobalImportPath = resolveGlobalImportPath; exports.stringifyMarkdownTokens = stringifyMarkdownTokens; exports.generateGoogleFontsUrl = generateGoogleFontsUrl;
|