@slidev/cli 0.42.5 → 0.42.7
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 -0
- package/dist/{build-D4QSB7HD.js → build-FGRU7R5C.js} +8 -8
- package/dist/{build-7A4AKFCP.mjs → build-MQ5SJ6HF.mjs} +4 -4
- package/dist/{chunk-6ZL4B4HQ.js → chunk-34SGGZ4P.js} +5 -5
- package/dist/{chunk-YZMOU6XV.mjs → chunk-ACFLBCHI.mjs} +177 -154
- package/dist/{chunk-GPOP6RE3.js → chunk-ELRZS7XI.js} +49 -48
- package/dist/{chunk-L5QH2WZE.mjs → chunk-KB3DQ2OE.mjs} +1 -1
- package/dist/{chunk-Q3TKTGHS.mjs → chunk-LN5DOTNJ.mjs} +27 -26
- package/dist/{chunk-CIUEQ4TI.mjs → chunk-MZBIET7Y.mjs} +1 -1
- package/dist/{chunk-MJQETB73.js → chunk-QDKRARRU.js} +1 -1
- package/dist/{chunk-YI4ZV27K.js → chunk-RSZHGGR3.js} +4 -4
- package/dist/{chunk-X7P5WRYP.mjs → chunk-VPD6PH2L.mjs} +1 -1
- package/dist/{chunk-35XQHQN5.js → chunk-XWJGVGSP.js} +255 -232
- package/dist/cli.d.mts +2 -0
- package/dist/cli.js +63 -51
- package/dist/cli.mjs +23 -11
- package/dist/{export-KRS4L4HC.mjs → export-6G7WYT32.mjs} +11 -3
- package/dist/{export-PN4EOI4Z.js → export-BGMCS4F2.js} +13 -5
- package/dist/index.d.mts +100 -0
- package/dist/index.js +6 -6
- package/dist/index.mjs +5 -5
- package/dist/{unocss-2CJUFE63.js → unocss-2T2KTWQ5.js} +1 -1
- package/dist/{unocss-ZLGTDCD7.mjs → unocss-ALFHEPHE.mjs} +1 -1
- package/dist/windicss-3HGYWXUJ.js +9 -0
- package/dist/{windicss-OSTDR2Z6.mjs → windicss-TWSVDM4O.mjs} +3 -3
- package/package.json +23 -22
- package/dist/windicss-YNIIPANV.js +0 -9
|
@@ -7,15 +7,15 @@ var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk34SGGZ4Pjs = require('./chunk-34SGGZ4P.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkQDKRARRUjs = require('./chunk-QDKRARRU.js');
|
|
16
16
|
|
|
17
17
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
18
|
-
var require_fast_deep_equal =
|
|
18
|
+
var require_fast_deep_equal = _chunkQDKRARRUjs.__commonJS.call(void 0, {
|
|
19
19
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
20
20
|
"use strict";
|
|
21
21
|
module.exports = function equal2(a, b) {
|
|
@@ -89,8 +89,8 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
89
89
|
body += '\n<script async src="https://platform.twitter.com/widgets.js"></script>';
|
|
90
90
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
91
91
|
head += `
|
|
92
|
-
<link rel="stylesheet" href="${
|
|
93
|
-
main = main.replace("__ENTRY__",
|
|
92
|
+
<link rel="stylesheet" href="${_chunk34SGGZ4Pjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
93
|
+
main = main.replace("__ENTRY__", _chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
|
|
94
94
|
return main;
|
|
95
95
|
}
|
|
96
96
|
async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config, command) {
|
|
@@ -116,6 +116,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
|
|
|
116
116
|
// node/plugins/preset.ts
|
|
117
117
|
|
|
118
118
|
|
|
119
|
+
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
119
120
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
120
121
|
var _pluginvuejsx = require('@vitejs/plugin-vue-jsx'); var _pluginvuejsx2 = _interopRequireDefault(_pluginvuejsx);
|
|
121
122
|
var _vite3 = require('unplugin-icons/vite'); var _vite4 = _interopRequireDefault(_vite3);
|
|
@@ -183,32 +184,32 @@ var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglo
|
|
|
183
184
|
|
|
184
185
|
// ../client/package.json
|
|
185
186
|
var dependencies = {
|
|
186
|
-
"@antfu/utils": "^0.7.
|
|
187
|
+
"@antfu/utils": "^0.7.5",
|
|
187
188
|
"@slidev/parser": "workspace:*",
|
|
188
189
|
"@slidev/types": "workspace:*",
|
|
189
|
-
"@unocss/reset": "^0.
|
|
190
|
-
"@vueuse/core": "^10.
|
|
190
|
+
"@unocss/reset": "^0.54.1",
|
|
191
|
+
"@vueuse/core": "^10.3.0",
|
|
191
192
|
"@vueuse/head": "^1.1.26",
|
|
192
|
-
"@vueuse/math": "^10.
|
|
193
|
+
"@vueuse/math": "^10.3.0",
|
|
193
194
|
"@vueuse/motion": "^2.0.0",
|
|
194
195
|
codemirror: "^5.65.5",
|
|
195
196
|
defu: "^6.1.2",
|
|
196
|
-
drauu: "^0.3.
|
|
197
|
+
drauu: "^0.3.3",
|
|
197
198
|
"file-saver": "^2.0.5",
|
|
198
199
|
"fuse.js": "^6.6.2",
|
|
199
200
|
"js-base64": "^3.7.5",
|
|
200
201
|
"js-yaml": "^4.1.0",
|
|
201
|
-
katex: "^0.16.
|
|
202
|
-
mermaid: "^10.
|
|
202
|
+
katex: "^0.16.8",
|
|
203
|
+
mermaid: "^10.3.0",
|
|
203
204
|
"monaco-editor": "^0.37.1",
|
|
204
205
|
nanoid: "^4.0.2",
|
|
205
|
-
prettier: "^
|
|
206
|
+
prettier: "^3.0.1",
|
|
206
207
|
recordrtc: "^5.6.2",
|
|
207
|
-
resolve: "^1.22.
|
|
208
|
-
unocss: "^0.
|
|
208
|
+
resolve: "^1.22.4",
|
|
209
|
+
unocss: "^0.54.1",
|
|
209
210
|
"vite-plugin-windicss": "^1.9.0",
|
|
210
211
|
vue: "^3.3.4",
|
|
211
|
-
"vue-router": "^4.2.
|
|
212
|
+
"vue-router": "^4.2.4",
|
|
212
213
|
"vue-starport": "^0.3.0",
|
|
213
214
|
windicss: "^3.5.6"
|
|
214
215
|
};
|
|
@@ -286,7 +287,7 @@ function createConfigPlugin(options) {
|
|
|
286
287
|
define: getDefine(options),
|
|
287
288
|
resolve: {
|
|
288
289
|
alias: {
|
|
289
|
-
"@slidev/client/": `${
|
|
290
|
+
"@slidev/client/": `${_chunk34SGGZ4Pjs.toAtFS.call(void 0, options.clientRoot)}/`
|
|
290
291
|
},
|
|
291
292
|
dedupe: ["vue"]
|
|
292
293
|
},
|
|
@@ -299,9 +300,9 @@ function createConfigPlugin(options) {
|
|
|
299
300
|
"codemirror/mode/xml/xml",
|
|
300
301
|
"codemirror/mode/htmlmixed/htmlmixed",
|
|
301
302
|
"codemirror/addon/display/placeholder",
|
|
302
|
-
"prettier/
|
|
303
|
-
"prettier/
|
|
304
|
-
"prettier/
|
|
303
|
+
"prettier/plugins/babel",
|
|
304
|
+
"prettier/plugins/html",
|
|
305
|
+
"prettier/plugins/typescript",
|
|
305
306
|
"mermaid/dist/mermaid.esm.min.mjs",
|
|
306
307
|
"mermaid/dist/mermaid.esm.mjs",
|
|
307
308
|
"vite-plugin-vue-server-ref/client"
|
|
@@ -321,7 +322,7 @@ function createConfigPlugin(options) {
|
|
|
321
322
|
allow: _utils.uniq.call(void 0, [
|
|
322
323
|
searchForWorkspaceRoot(options.userRoot),
|
|
323
324
|
searchForWorkspaceRoot(options.cliRoot),
|
|
324
|
-
..._isinstalledglobally2.default ? [_path.dirname.call(void 0,
|
|
325
|
+
..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
|
|
325
326
|
])
|
|
326
327
|
}
|
|
327
328
|
},
|
|
@@ -330,7 +331,7 @@ function createConfigPlugin(options) {
|
|
|
330
331
|
if (_isinstalledglobally2.default) {
|
|
331
332
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
332
333
|
injection.root = options.cliRoot;
|
|
333
|
-
injection.resolve.alias.vue = `${
|
|
334
|
+
injection.resolve.alias.vue = `${_chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
334
335
|
}
|
|
335
336
|
return _vite.mergeConfig.call(void 0, injection, config);
|
|
336
337
|
},
|
|
@@ -352,7 +353,7 @@ function createConfigPlugin(options) {
|
|
|
352
353
|
function getDefine(options) {
|
|
353
354
|
return {
|
|
354
355
|
__DEV__: options.mode === "dev" ? "true" : "false",
|
|
355
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
356
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunk34SGGZ4Pjs.toAtFS.call(void 0, options.clientRoot)),
|
|
356
357
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
357
358
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
358
359
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -363,7 +364,8 @@ function getDefine(options) {
|
|
|
363
364
|
}
|
|
364
365
|
|
|
365
366
|
// node/plugins/loaders.ts
|
|
366
|
-
var import_fast_deep_equal =
|
|
367
|
+
var import_fast_deep_equal = _chunkQDKRARRUjs.__toESM.call(void 0, require_fast_deep_equal());
|
|
368
|
+
|
|
367
369
|
|
|
368
370
|
|
|
369
371
|
|
|
@@ -632,7 +634,7 @@ ${title}
|
|
|
632
634
|
delete frontmatter.title;
|
|
633
635
|
const imports = [
|
|
634
636
|
'import { inject as vueInject } from "vue"',
|
|
635
|
-
`import InjectedLayout from "${
|
|
637
|
+
`import InjectedLayout from "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
636
638
|
'import { injectionSlidevContext } from "@slidev/client/constants.ts"',
|
|
637
639
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
638
640
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -737,10 +739,10 @@ defineProps<{ no: number | string }>()`);
|
|
|
737
739
|
}
|
|
738
740
|
async function generateUserStyles() {
|
|
739
741
|
const imports = [
|
|
740
|
-
`import "${
|
|
741
|
-
`import "${
|
|
742
|
-
`import "${
|
|
743
|
-
`import "${
|
|
742
|
+
`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
743
|
+
`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
744
|
+
`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`,
|
|
745
|
+
`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/transitions.css"))}"`
|
|
744
746
|
];
|
|
745
747
|
const roots2 = _utils.uniq.call(void 0, [
|
|
746
748
|
...themeRoots,
|
|
@@ -757,13 +759,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
757
759
|
];
|
|
758
760
|
for (const style of styles) {
|
|
759
761
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
760
|
-
imports.push(`import "${
|
|
762
|
+
imports.push(`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, style)}"`);
|
|
761
763
|
continue;
|
|
762
764
|
}
|
|
763
765
|
}
|
|
764
766
|
}
|
|
765
767
|
if (data.features.katex)
|
|
766
|
-
imports.push(`import "${
|
|
768
|
+
imports.push(`import "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
767
769
|
if (data.config.css === "unocss") {
|
|
768
770
|
imports.unshift(
|
|
769
771
|
'import "@unocss/reset/tailwind.css"',
|
|
@@ -778,7 +780,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
778
780
|
'import "virtual:windi-base.css"'
|
|
779
781
|
);
|
|
780
782
|
imports.push('import "virtual:windi-utilities.css"');
|
|
781
|
-
if (
|
|
783
|
+
if (_process2.default.env.NODE_ENV !== "production")
|
|
782
784
|
imports.push('import "virtual:windi-devtools"');
|
|
783
785
|
}
|
|
784
786
|
return imports.join("\n");
|
|
@@ -791,7 +793,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
791
793
|
const layouts = _utils.objectMap.call(void 0,
|
|
792
794
|
await getLayouts(),
|
|
793
795
|
(k, v) => {
|
|
794
|
-
imports.push(`import __layout_${k} from "${
|
|
796
|
+
imports.push(`import __layout_${k} from "${_chunk34SGGZ4Pjs.toAtFS.call(void 0, v)}"`);
|
|
795
797
|
return [k, `__layout_${k}`];
|
|
796
798
|
}
|
|
797
799
|
);
|
|
@@ -808,15 +810,13 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
808
810
|
const layouts = await getLayouts();
|
|
809
811
|
imports.push(`import __layout__end from '${layouts.end}'`);
|
|
810
812
|
let no = 1;
|
|
811
|
-
const routes = data.slides.map((i, idx) => {
|
|
812
|
-
var _a, _b, _c
|
|
813
|
-
if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
|
|
814
|
-
return void 0;
|
|
813
|
+
const routes = data.slides.filter(({ frontmatter }) => !(frontmatter == null ? void 0 : frontmatter.disabled)).map((i, idx) => {
|
|
814
|
+
var _a, _b, _c;
|
|
815
815
|
imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
|
|
816
816
|
const additions = {
|
|
817
817
|
slide: {
|
|
818
818
|
...prepareSlideInfo(i),
|
|
819
|
-
filepath: ((
|
|
819
|
+
filepath: ((_a = i.source) == null ? void 0 : _a.filepath) || entry,
|
|
820
820
|
id: idx,
|
|
821
821
|
no
|
|
822
822
|
},
|
|
@@ -825,8 +825,8 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
825
825
|
};
|
|
826
826
|
const meta = Object.assign({}, i.frontmatter, additions);
|
|
827
827
|
const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
|
|
828
|
-
if ((
|
|
829
|
-
redirects.push(`{ path: '${(
|
|
828
|
+
if ((_b = i.frontmatter) == null ? void 0 : _b.routeAlias)
|
|
829
|
+
redirects.push(`{ path: '${(_c = i.frontmatter) == null ? void 0 : _c.routeAlias}', redirect: { path: '${no}' } }`);
|
|
830
830
|
no += 1;
|
|
831
831
|
return route;
|
|
832
832
|
});
|
|
@@ -842,7 +842,7 @@ ${redirects.join(",\n")}
|
|
|
842
842
|
const config = { ...data.config, remote };
|
|
843
843
|
if (_utils.isString.call(void 0, config.title)) {
|
|
844
844
|
const tokens = md.parseInline(config.title, {});
|
|
845
|
-
config.title =
|
|
845
|
+
config.title = _chunk34SGGZ4Pjs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
846
846
|
}
|
|
847
847
|
if (_utils.isString.call(void 0, config.info))
|
|
848
848
|
config.info = md.render(config.info);
|
|
@@ -863,7 +863,7 @@ ${redirects.join(",\n")}
|
|
|
863
863
|
];
|
|
864
864
|
}
|
|
865
865
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
866
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
866
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunk34SGGZ4Pjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
867
867
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
868
868
|
return `
|
|
869
869
|
${imports}
|
|
@@ -882,7 +882,7 @@ export default {
|
|
|
882
882
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
883
883
|
];
|
|
884
884
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
885
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
885
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunk34SGGZ4Pjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
886
886
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
887
887
|
return `
|
|
888
888
|
${imports}
|
|
@@ -899,9 +899,10 @@ export default {
|
|
|
899
899
|
// node/plugins/monacoTransform.ts
|
|
900
900
|
|
|
901
901
|
|
|
902
|
+
|
|
902
903
|
async function getPackageData(pkg) {
|
|
903
904
|
const { resolvePackageData } = await eval('import("vite")');
|
|
904
|
-
const info = resolvePackageData(pkg,
|
|
905
|
+
const info = resolvePackageData(pkg, _process2.default.cwd());
|
|
905
906
|
if (!info)
|
|
906
907
|
return;
|
|
907
908
|
const typePath = info.data.types || info.data.typings;
|
|
@@ -962,7 +963,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
962
963
|
setups.forEach((path, idx) => {
|
|
963
964
|
if (!_fs.existsSync.call(void 0, path))
|
|
964
965
|
return;
|
|
965
|
-
imports.push(`import __n${idx} from '${
|
|
966
|
+
imports.push(`import __n${idx} from '${_chunk34SGGZ4Pjs.toAtFS.call(void 0, path)}'`);
|
|
966
967
|
let fn = `:AWAIT:__n${idx}`;
|
|
967
968
|
if (/\binjection_return\b/g.test(code))
|
|
968
969
|
fn = `injection_return = ${fn}`;
|
|
@@ -1185,7 +1186,7 @@ function loadPrismLang(lang) {
|
|
|
1185
1186
|
}
|
|
1186
1187
|
function loadPrismPlugin(name) {
|
|
1187
1188
|
try {
|
|
1188
|
-
|
|
1189
|
+
_chunkQDKRARRUjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1189
1190
|
} catch (e) {
|
|
1190
1191
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1191
1192
|
}
|
|
@@ -1602,7 +1603,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1602
1603
|
...remoteAssetsOptions
|
|
1603
1604
|
})) : null,
|
|
1604
1605
|
_vitepluginvueserverref2.default.call(void 0, {
|
|
1605
|
-
debug:
|
|
1606
|
+
debug: _process2.default.env.NODE_ENV === "development",
|
|
1606
1607
|
state: {
|
|
1607
1608
|
sync: false,
|
|
1608
1609
|
nav: {
|
|
@@ -1635,7 +1636,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1635
1636
|
dev: true,
|
|
1636
1637
|
build: true
|
|
1637
1638
|
})) : null,
|
|
1638
|
-
config.css === "none" ? null : config.css === "windicss" ? Promise.resolve().then(() => require("./windicss-
|
|
1639
|
+
config.css === "none" ? null : config.css === "windicss" ? Promise.resolve().then(() => require("./windicss-3HGYWXUJ.js")).then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : Promise.resolve().then(() => require("./unocss-2T2KTWQ5.js")).then((r) => r.createUnocssPlugin(options, pluginOptions))
|
|
1639
1640
|
];
|
|
1640
1641
|
return (await Promise.all(plugins)).flat().filter(_utils.notNullish);
|
|
1641
1642
|
}
|
|
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
}) : x)(function(x) {
|
|
10
10
|
if (typeof require !== "undefined")
|
|
11
11
|
return require.apply(this, arguments);
|
|
12
|
-
throw
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
15
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
resolveImportPath,
|
|
8
8
|
stringifyMarkdownTokens,
|
|
9
9
|
toAtFS
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-MZBIET7Y.mjs";
|
|
11
11
|
import {
|
|
12
12
|
__commonJS,
|
|
13
13
|
__require,
|
|
14
14
|
__toESM
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KB3DQ2OE.mjs";
|
|
16
16
|
|
|
17
17
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
18
18
|
var require_fast_deep_equal = __commonJS({
|
|
@@ -116,6 +116,7 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
|
|
|
116
116
|
// node/plugins/preset.ts
|
|
117
117
|
import { join as join8 } from "path";
|
|
118
118
|
import { existsSync as existsSync4 } from "fs";
|
|
119
|
+
import process3 from "process";
|
|
119
120
|
import Vue from "@vitejs/plugin-vue";
|
|
120
121
|
import VueJsx from "@vitejs/plugin-vue-jsx";
|
|
121
122
|
import Icons from "unplugin-icons/vite";
|
|
@@ -183,32 +184,32 @@ import { uniq as uniq2 } from "@antfu/utils";
|
|
|
183
184
|
|
|
184
185
|
// ../client/package.json
|
|
185
186
|
var dependencies = {
|
|
186
|
-
"@antfu/utils": "^0.7.
|
|
187
|
+
"@antfu/utils": "^0.7.5",
|
|
187
188
|
"@slidev/parser": "workspace:*",
|
|
188
189
|
"@slidev/types": "workspace:*",
|
|
189
|
-
"@unocss/reset": "^0.
|
|
190
|
-
"@vueuse/core": "^10.
|
|
190
|
+
"@unocss/reset": "^0.54.1",
|
|
191
|
+
"@vueuse/core": "^10.3.0",
|
|
191
192
|
"@vueuse/head": "^1.1.26",
|
|
192
|
-
"@vueuse/math": "^10.
|
|
193
|
+
"@vueuse/math": "^10.3.0",
|
|
193
194
|
"@vueuse/motion": "^2.0.0",
|
|
194
195
|
codemirror: "^5.65.5",
|
|
195
196
|
defu: "^6.1.2",
|
|
196
|
-
drauu: "^0.3.
|
|
197
|
+
drauu: "^0.3.3",
|
|
197
198
|
"file-saver": "^2.0.5",
|
|
198
199
|
"fuse.js": "^6.6.2",
|
|
199
200
|
"js-base64": "^3.7.5",
|
|
200
201
|
"js-yaml": "^4.1.0",
|
|
201
|
-
katex: "^0.16.
|
|
202
|
-
mermaid: "^10.
|
|
202
|
+
katex: "^0.16.8",
|
|
203
|
+
mermaid: "^10.3.0",
|
|
203
204
|
"monaco-editor": "^0.37.1",
|
|
204
205
|
nanoid: "^4.0.2",
|
|
205
|
-
prettier: "^
|
|
206
|
+
prettier: "^3.0.1",
|
|
206
207
|
recordrtc: "^5.6.2",
|
|
207
|
-
resolve: "^1.22.
|
|
208
|
-
unocss: "^0.
|
|
208
|
+
resolve: "^1.22.4",
|
|
209
|
+
unocss: "^0.54.1",
|
|
209
210
|
"vite-plugin-windicss": "^1.9.0",
|
|
210
211
|
vue: "^3.3.4",
|
|
211
|
-
"vue-router": "^4.2.
|
|
212
|
+
"vue-router": "^4.2.4",
|
|
212
213
|
"vue-starport": "^0.3.0",
|
|
213
214
|
windicss: "^3.5.6"
|
|
214
215
|
};
|
|
@@ -299,9 +300,9 @@ function createConfigPlugin(options) {
|
|
|
299
300
|
"codemirror/mode/xml/xml",
|
|
300
301
|
"codemirror/mode/htmlmixed/htmlmixed",
|
|
301
302
|
"codemirror/addon/display/placeholder",
|
|
302
|
-
"prettier/
|
|
303
|
-
"prettier/
|
|
304
|
-
"prettier/
|
|
303
|
+
"prettier/plugins/babel",
|
|
304
|
+
"prettier/plugins/html",
|
|
305
|
+
"prettier/plugins/typescript",
|
|
305
306
|
"mermaid/dist/mermaid.esm.min.mjs",
|
|
306
307
|
"mermaid/dist/mermaid.esm.mjs",
|
|
307
308
|
"vite-plugin-vue-server-ref/client"
|
|
@@ -365,6 +366,7 @@ function getDefine(options) {
|
|
|
365
366
|
// node/plugins/loaders.ts
|
|
366
367
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal());
|
|
367
368
|
import { basename as basename2, join as join5 } from "path";
|
|
369
|
+
import process from "process";
|
|
368
370
|
import { isString, notNullish, objectMap, range, slash, uniq as uniq3 } from "@antfu/utils";
|
|
369
371
|
import fg2 from "fast-glob";
|
|
370
372
|
import fs4, { existsSync as existsSync2 } from "fs-extra";
|
|
@@ -808,15 +810,13 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
808
810
|
const layouts = await getLayouts();
|
|
809
811
|
imports.push(`import __layout__end from '${layouts.end}'`);
|
|
810
812
|
let no = 1;
|
|
811
|
-
const routes = data.slides.map((i, idx) => {
|
|
812
|
-
var _a, _b, _c
|
|
813
|
-
if ((_a = i.frontmatter) == null ? void 0 : _a.disabled)
|
|
814
|
-
return void 0;
|
|
813
|
+
const routes = data.slides.filter(({ frontmatter }) => !(frontmatter == null ? void 0 : frontmatter.disabled)).map((i, idx) => {
|
|
814
|
+
var _a, _b, _c;
|
|
815
815
|
imports.push(`import n${no} from '${slidePrefix}${idx + 1}.md'`);
|
|
816
816
|
const additions = {
|
|
817
817
|
slide: {
|
|
818
818
|
...prepareSlideInfo(i),
|
|
819
|
-
filepath: ((
|
|
819
|
+
filepath: ((_a = i.source) == null ? void 0 : _a.filepath) || entry,
|
|
820
820
|
id: idx,
|
|
821
821
|
no
|
|
822
822
|
},
|
|
@@ -825,8 +825,8 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
825
825
|
};
|
|
826
826
|
const meta = Object.assign({}, i.frontmatter, additions);
|
|
827
827
|
const route = `{ path: '${no}', name: 'page-${no}', component: n${no}, meta: ${JSON.stringify(meta)} }`;
|
|
828
|
-
if ((
|
|
829
|
-
redirects.push(`{ path: '${(
|
|
828
|
+
if ((_b = i.frontmatter) == null ? void 0 : _b.routeAlias)
|
|
829
|
+
redirects.push(`{ path: '${(_c = i.frontmatter) == null ? void 0 : _c.routeAlias}', redirect: { path: '${no}' } }`);
|
|
830
830
|
no += 1;
|
|
831
831
|
return route;
|
|
832
832
|
});
|
|
@@ -898,10 +898,11 @@ export default {
|
|
|
898
898
|
|
|
899
899
|
// node/plugins/monacoTransform.ts
|
|
900
900
|
import { join as join6 } from "path";
|
|
901
|
+
import process2 from "process";
|
|
901
902
|
import { slash as slash2 } from "@antfu/utils";
|
|
902
903
|
async function getPackageData(pkg) {
|
|
903
904
|
const { resolvePackageData } = await eval('import("vite")');
|
|
904
|
-
const info = resolvePackageData(pkg,
|
|
905
|
+
const info = resolvePackageData(pkg, process2.cwd());
|
|
905
906
|
if (!info)
|
|
906
907
|
return;
|
|
907
908
|
const typePath = info.data.types || info.data.typings;
|
|
@@ -1602,7 +1603,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1602
1603
|
...remoteAssetsOptions
|
|
1603
1604
|
})) : null,
|
|
1604
1605
|
ServerRef({
|
|
1605
|
-
debug:
|
|
1606
|
+
debug: process3.env.NODE_ENV === "development",
|
|
1606
1607
|
state: {
|
|
1607
1608
|
sync: false,
|
|
1608
1609
|
nav: {
|
|
@@ -1635,7 +1636,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1635
1636
|
dev: true,
|
|
1636
1637
|
build: true
|
|
1637
1638
|
})) : null,
|
|
1638
|
-
config.css === "none" ? null : config.css === "windicss" ? import("./windicss-
|
|
1639
|
+
config.css === "none" ? null : config.css === "windicss" ? import("./windicss-TWSVDM4O.mjs").then((r) => r.createWindiCSSPlugin(options, pluginOptions)) : import("./unocss-ALFHEPHE.mjs").then((r) => r.createUnocssPlugin(options, pluginOptions))
|
|
1639
1640
|
];
|
|
1640
1641
|
return (await Promise.all(plugins)).flat().filter(notNullish2);
|
|
1641
1642
|
}
|
|
@@ -9,7 +9,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
9
9
|
}) : x)(function(x) {
|
|
10
10
|
if (typeof require !== "undefined")
|
|
11
11
|
return require.apply(this, arguments);
|
|
12
|
-
throw
|
|
12
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
13
13
|
});
|
|
14
14
|
var __commonJS = (cb, mod) => function __require2() {
|
|
15
15
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk34SGGZ4Pjs = require('./chunk-34SGGZ4P.js');
|
|
7
7
|
|
|
8
8
|
// node/plugins/windicss.ts
|
|
9
9
|
var _path = require('path');
|
|
@@ -51,9 +51,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
51
51
|
config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
|
|
52
52
|
});
|
|
53
53
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
54
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
55
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
56
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
54
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
55
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
56
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunk34SGGZ4Pjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
57
57
|
},
|
|
58
58
|
...windiOptions
|
|
59
59
|
}
|