@slidev/cli 0.30.3 → 0.31.1
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-6SGXHSD5.mjs → build-6XVXRYOT.mjs} +3 -3
- package/dist/{build-RLDXLLAM.js → build-WXX7THGM.js} +11 -11
- package/dist/chunk-6URMXVHV.mjs +12685 -0
- package/dist/{chunk-XMETW2MS.mjs → chunk-D6ZT4BYV.mjs} +47 -2
- package/dist/{chunk-CIB2BRE3.js → chunk-DQJN3MWP.js} +4 -4
- package/dist/chunk-IIMPX7JQ.js +12693 -0
- package/dist/{chunk-IXNT7VMK.js → chunk-OVW2G2MH.js} +47 -6
- package/dist/{chunk-4YPIBI4G.mjs → chunk-SJH4ZSSX.mjs} +9 -9
- package/dist/{chunk-LCOJZNZW.mjs → chunk-T33EPP2B.mjs} +2 -2
- package/dist/{chunk-RBYAPROQ.js → chunk-W64GQHIH.js} +64 -64
- package/dist/cli.js +25 -25
- package/dist/cli.mjs +6 -6
- package/dist/{export-DGMIRITW.mjs → export-7O4RPYTW.mjs} +22 -14
- package/dist/{export-PXKH5FVD.js → export-HDUCFTTI.js} +25 -17
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/package.json +19 -20
- package/dist/chunk-42RALHAU.mjs +0 -13309
- package/dist/chunk-PL62CCCK.js +0 -13309
|
@@ -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;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveImportPath,
|
|
12
12
|
stringifyMarkdownTokens,
|
|
13
13
|
toAtFS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D6ZT4BYV.mjs";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
17
17
|
var require_fast_deep_equal = __commonJS({
|
|
@@ -243,26 +243,26 @@ var dependencies = {
|
|
|
243
243
|
"@antfu/utils": "^0.5.1",
|
|
244
244
|
"@slidev/parser": "workspace:*",
|
|
245
245
|
"@slidev/types": "workspace:*",
|
|
246
|
-
"@vueuse/core": "^8.
|
|
247
|
-
"@vueuse/head": "^0.7.
|
|
246
|
+
"@vueuse/core": "^8.4.1",
|
|
247
|
+
"@vueuse/head": "^0.7.6",
|
|
248
248
|
"@vueuse/motion": "^2.0.0-beta.18",
|
|
249
|
-
codemirror: "^5.65.
|
|
249
|
+
codemirror: "^5.65.3",
|
|
250
250
|
defu: "^6.0.0",
|
|
251
251
|
drauu: "^0.3.0",
|
|
252
252
|
"file-saver": "^2.0.5",
|
|
253
253
|
"js-base64": "^3.7.2",
|
|
254
254
|
"js-yaml": "^4.1.0",
|
|
255
255
|
katex: "^0.15.3",
|
|
256
|
-
mermaid: "^9.0.
|
|
256
|
+
mermaid: "^9.0.1",
|
|
257
257
|
"monaco-editor": "^0.33.0",
|
|
258
|
-
nanoid: "^3.3.
|
|
258
|
+
nanoid: "^3.3.4",
|
|
259
259
|
prettier: "^2.6.2",
|
|
260
260
|
recordrtc: "^5.6.2",
|
|
261
261
|
resolve: "^1.22.0",
|
|
262
262
|
"vite-plugin-windicss": "^1.8.4",
|
|
263
|
-
vue: "^3.2.
|
|
264
|
-
"vue-router": "^4.0.
|
|
265
|
-
"vue-starport": "^0.2.
|
|
263
|
+
vue: "^3.2.33",
|
|
264
|
+
"vue-router": "^4.0.15",
|
|
265
|
+
"vue-starport": "^0.2.10",
|
|
266
266
|
windicss: "^3.5.1"
|
|
267
267
|
};
|
|
268
268
|
|
|
@@ -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.
|
|
246
|
-
"@vueuse/head": "^0.7.
|
|
245
|
+
"@vueuse/core": "^8.4.1",
|
|
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,7 +383,7 @@ 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),
|
|
@@ -393,8 +393,8 @@ function getDefine(options) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
// node/plugins/loaders.ts
|
|
396
|
-
|
|
397
|
-
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());
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
|
|
@@ -426,7 +426,7 @@ md.use(_markdownitlinkattributes2.default, {
|
|
|
426
426
|
}
|
|
427
427
|
});
|
|
428
428
|
function prepareSlideInfo(data) {
|
|
429
|
-
return
|
|
429
|
+
return _chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, data), {
|
|
430
430
|
notesHTML: md.render((data == null ? void 0 : data.note) || "")
|
|
431
431
|
});
|
|
432
432
|
}
|
|
@@ -517,7 +517,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
517
517
|
const file = `${slidePrefix}${i + 1}.md`;
|
|
518
518
|
try {
|
|
519
519
|
const md2 = await transformMarkdown(await MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
|
|
520
|
-
return await VuePlugin.handleHotUpdate(
|
|
520
|
+
return await VuePlugin.handleHotUpdate(_chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, ctx), {
|
|
521
521
|
modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
|
|
522
522
|
file,
|
|
523
523
|
read() {
|
|
@@ -634,14 +634,14 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
634
634
|
async function transformMarkdown(code, pageNo, data2) {
|
|
635
635
|
var _a, _b;
|
|
636
636
|
const layouts = await getLayouts();
|
|
637
|
-
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) || {});
|
|
638
638
|
const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
|
|
639
639
|
if (!layouts[layoutName])
|
|
640
640
|
throw new Error(`Unknown layout "${layoutName}"`);
|
|
641
641
|
delete frontmatter.title;
|
|
642
642
|
const imports = [
|
|
643
643
|
'import { inject as vueInject } from "vue"',
|
|
644
|
-
`import InjectedLayout from "${
|
|
644
|
+
`import InjectedLayout from "${_chunkOVW2G2MHjs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
645
645
|
'import { injectionSlidevContext } from "@slidev/client/constants"',
|
|
646
646
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
647
647
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -746,9 +746,9 @@ defineProps<{ no: number | string }>()`);
|
|
|
746
746
|
}
|
|
747
747
|
async function generateUserStyles() {
|
|
748
748
|
const imports = [
|
|
749
|
-
`import "${
|
|
750
|
-
`import "${
|
|
751
|
-
`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"))}"`
|
|
752
752
|
];
|
|
753
753
|
const roots2 = _utils.uniq.call(void 0, [
|
|
754
754
|
...themeRoots,
|
|
@@ -764,13 +764,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
764
764
|
];
|
|
765
765
|
for (const style of styles) {
|
|
766
766
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
767
|
-
imports.push(`import "${
|
|
767
|
+
imports.push(`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, style)}"`);
|
|
768
768
|
continue;
|
|
769
769
|
}
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
if (data.features.katex)
|
|
773
|
-
imports.push(`import "${
|
|
773
|
+
imports.push(`import "${_chunkOVW2G2MHjs.toAtFS.call(void 0, _chunkOVW2G2MHjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
774
774
|
return imports.join("\n");
|
|
775
775
|
}
|
|
776
776
|
async function generateMonacoTypes() {
|
|
@@ -779,7 +779,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
779
779
|
async function generateLayouts() {
|
|
780
780
|
const imports = [];
|
|
781
781
|
const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
|
|
782
|
-
imports.push(`import __layout_${k} from "${
|
|
782
|
+
imports.push(`import __layout_${k} from "${_chunkOVW2G2MHjs.toAtFS.call(void 0, v)}"`);
|
|
783
783
|
return [k, `__layout_${k}`];
|
|
784
784
|
});
|
|
785
785
|
return [
|
|
@@ -828,10 +828,10 @@ ${routes.join(",\n")}
|
|
|
828
828
|
return [...imports, routesStr].join("\n");
|
|
829
829
|
}
|
|
830
830
|
function generateConfigs() {
|
|
831
|
-
const config =
|
|
831
|
+
const config = _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, data.config);
|
|
832
832
|
if (_utils.isString.call(void 0, config.title)) {
|
|
833
833
|
const tokens = md.parseInline(config.title, {});
|
|
834
|
-
config.title =
|
|
834
|
+
config.title = _chunkOVW2G2MHjs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
835
835
|
}
|
|
836
836
|
if (_utils.isString.call(void 0, config.info))
|
|
837
837
|
config.info = md.render(config.info);
|
|
@@ -852,7 +852,7 @@ ${routes.join(",\n")}
|
|
|
852
852
|
];
|
|
853
853
|
}
|
|
854
854
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
855
|
-
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");
|
|
856
856
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
857
857
|
return `
|
|
858
858
|
${imports}
|
|
@@ -871,7 +871,7 @@ export default {
|
|
|
871
871
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
872
872
|
];
|
|
873
873
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
874
|
-
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");
|
|
875
875
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
876
876
|
return `
|
|
877
877
|
${imports}
|
|
@@ -886,7 +886,7 @@ export default {
|
|
|
886
886
|
}
|
|
887
887
|
|
|
888
888
|
// node/plugins/monacoTransform.ts
|
|
889
|
-
|
|
889
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
890
890
|
|
|
891
891
|
|
|
892
892
|
|
|
@@ -920,7 +920,7 @@ function createMonacoTypesLoader() {
|
|
|
920
920
|
}
|
|
921
921
|
|
|
922
922
|
// node/plugins/setupClient.ts
|
|
923
|
-
|
|
923
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
924
924
|
|
|
925
925
|
|
|
926
926
|
|
|
@@ -942,7 +942,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
942
942
|
setups.forEach((path, idx) => {
|
|
943
943
|
if (!_fs.existsSync.call(void 0, path))
|
|
944
944
|
return;
|
|
945
|
-
imports.push(`import __n${idx} from '${
|
|
945
|
+
imports.push(`import __n${idx} from '${_chunkOVW2G2MHjs.toAtFS.call(void 0, path)}'`);
|
|
946
946
|
let fn = `__n${idx}`;
|
|
947
947
|
let awaitFn = `await __n${idx}`;
|
|
948
948
|
if (/\binjection_return\b/g.test(code)) {
|
|
@@ -970,7 +970,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
970
970
|
}
|
|
971
971
|
|
|
972
972
|
// node/plugins/markdown.ts
|
|
973
|
-
|
|
973
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
974
974
|
var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
|
|
975
975
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
976
976
|
|
|
@@ -980,7 +980,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
980
980
|
var _plantumlencoder = require('plantuml-encoder');
|
|
981
981
|
|
|
982
982
|
// node/plugins/markdown-it-katex.ts
|
|
983
|
-
|
|
983
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
984
984
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
985
985
|
function isValidDelim(state, pos) {
|
|
986
986
|
const max = state.posMax;
|
|
@@ -1127,7 +1127,7 @@ function math_plugin(md2, options) {
|
|
|
1127
1127
|
}
|
|
1128
1128
|
|
|
1129
1129
|
// node/plugins/markdown-it-prism.ts
|
|
1130
|
-
|
|
1130
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
1131
1131
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1132
1132
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1133
1133
|
var DEFAULTS = {
|
|
@@ -1150,7 +1150,7 @@ function loadPrismLang(lang) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
function loadPrismPlugin(name) {
|
|
1152
1152
|
try {
|
|
1153
|
-
|
|
1153
|
+
_chunkOVW2G2MHjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1154
1154
|
} catch (e) {
|
|
1155
1155
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1156
1156
|
}
|
|
@@ -1190,7 +1190,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
|
|
1192
1192
|
// node/plugins/markdown-it-shiki.ts
|
|
1193
|
-
|
|
1193
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
1194
1194
|
function getThemeName(theme) {
|
|
1195
1195
|
if (typeof theme === "string")
|
|
1196
1196
|
return theme;
|
|
@@ -1212,7 +1212,7 @@ function resolveShikiOptions(options) {
|
|
|
1212
1212
|
themes.push(options.theme);
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
|
-
return
|
|
1215
|
+
return _chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {}, options), {
|
|
1216
1216
|
themes,
|
|
1217
1217
|
darkModeThemes: darkModeThemes ? {
|
|
1218
1218
|
dark: getThemeName(darkModeThemes.dark),
|
|
@@ -1250,7 +1250,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1250
1250
|
const setups = [];
|
|
1251
1251
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1252
1252
|
if (config.highlighter === "shiki") {
|
|
1253
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1253
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkOVW2G2MHjs.__toESM.call(void 0, _chunkOVW2G2MHjs.__require.call(void 0, "shiki")));
|
|
1254
1254
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1255
1255
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1256
1256
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1259,11 +1259,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1259
1259
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
1260
1260
|
}
|
|
1261
1261
|
const KatexOptions = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1262
|
-
return _vitepluginmd2.default.call(void 0,
|
|
1262
|
+
return _vitepluginmd2.default.call(void 0, _chunkOVW2G2MHjs.__spreadProps.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1263
1263
|
wrapperClasses: "",
|
|
1264
1264
|
headEnabled: false,
|
|
1265
1265
|
frontmatter: false,
|
|
1266
|
-
markdownItOptions:
|
|
1266
|
+
markdownItOptions: _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1267
1267
|
quotes: `""''`,
|
|
1268
1268
|
html: true,
|
|
1269
1269
|
xhtmlOut: true,
|
|
@@ -1399,7 +1399,7 @@ function escapeVueInCode(md2) {
|
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
1401
|
// node/plugins/patchTransform.ts
|
|
1402
|
-
|
|
1402
|
+
_chunkOVW2G2MHjs.init_cjs_shims.call(void 0, );
|
|
1403
1403
|
|
|
1404
1404
|
function createFixPlugins(options) {
|
|
1405
1405
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1463,10 +1463,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1463
1463
|
clientRoot,
|
|
1464
1464
|
data: { config }
|
|
1465
1465
|
} = options;
|
|
1466
|
-
const VuePlugin = _pluginvue2.default.call(void 0,
|
|
1466
|
+
const VuePlugin = _pluginvue2.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1467
1467
|
include: [/\.vue$/, /\.md$/],
|
|
1468
1468
|
exclude: [],
|
|
1469
|
-
template:
|
|
1469
|
+
template: _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1470
1470
|
compilerOptions: {
|
|
1471
1471
|
isCustomElement(tag) {
|
|
1472
1472
|
return customElements.has(tag);
|
|
@@ -1481,7 +1481,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1481
1481
|
MarkdownPlugin,
|
|
1482
1482
|
VuePlugin,
|
|
1483
1483
|
createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
|
|
1484
|
-
_vite4.default.call(void 0,
|
|
1484
|
+
_vite4.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1485
1485
|
extensions: ["vue", "md", "ts"],
|
|
1486
1486
|
dirs: [
|
|
1487
1487
|
`${clientRoot}/builtin`,
|
|
@@ -1499,11 +1499,11 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1499
1499
|
})
|
|
1500
1500
|
]
|
|
1501
1501
|
}, componentsOptions)),
|
|
1502
|
-
_vite2.default.call(void 0,
|
|
1502
|
+
_vite2.default.call(void 0, _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1503
1503
|
defaultClass: "slidev-icon",
|
|
1504
1504
|
autoInstall: true
|
|
1505
1505
|
}, iconsOptions)),
|
|
1506
|
-
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, {
|
|
1507
1507
|
rules: [
|
|
1508
1508
|
..._vitepluginremoteassets.DefaultRules,
|
|
1509
1509
|
{
|
|
@@ -1516,7 +1516,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1516
1516
|
}, remoteAssetsOptions)) : null,
|
|
1517
1517
|
_vitepluginvueserverref2.default.call(void 0, {
|
|
1518
1518
|
debug: process.env.NODE_ENV === "development",
|
|
1519
|
-
state:
|
|
1519
|
+
state: _chunkOVW2G2MHjs.__spreadValues.call(void 0, {
|
|
1520
1520
|
sync: false,
|
|
1521
1521
|
nav: {
|
|
1522
1522
|
page: 0,
|