@slidev/cli 0.28.4 → 0.28.5
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-JIUCLUJP.mjs → build-5HTITVE5.mjs} +3 -3
- package/dist/{build-FF4KC6M7.js → build-PQKCZ65G.js} +11 -11
- package/dist/{chunk-3OEL7CJT.mjs → chunk-4OPORETI.mjs} +2 -2
- package/dist/{chunk-ZSPINAL7.mjs → chunk-7KBWHTX5.mjs} +2 -2
- package/dist/{chunk-Z6GM5SYV.mjs → chunk-GWFBEY26.mjs} +1 -1
- package/dist/{chunk-QSS57L2U.js → chunk-HF2PX43I.js} +4 -4
- package/dist/{chunk-R3WEVJQA.js → chunk-MFCJMLB5.js} +54 -54
- package/dist/{chunk-HHILGY4V.mjs → chunk-MSSOXTVZ.mjs} +2 -2
- package/dist/{chunk-DRIVUXDA.js → chunk-QRDUZGYD.js} +119 -119
- package/dist/{chunk-TDRZKG4W.js → chunk-QT3EQ43A.js} +2 -2
- package/dist/cli.js +25 -25
- package/dist/cli.mjs +6 -6
- package/dist/{export-SEKHSOBB.mjs → export-2WDF6LJW.mjs} +2 -2
- package/dist/{export-SYUTEGYU.js → export-XYTYZSD3.js} +5 -5
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/package.json +4 -4
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GWFBEY26.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__require,
|
|
7
7
|
__spreadValues,
|
|
8
8
|
__toModule,
|
|
9
9
|
init_esm_shims
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4OPORETI.mjs";
|
|
11
11
|
|
|
12
12
|
// node/build.ts
|
|
13
13
|
init_esm_shims();
|
|
@@ -710,7 +710,7 @@ async function build(options, viteConfig = {}) {
|
|
|
710
710
|
await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
711
711
|
`, "utf-8");
|
|
712
712
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
713
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
713
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-2WDF6LJW.mjs")));
|
|
714
714
|
const port = 12445;
|
|
715
715
|
const app = connect();
|
|
716
716
|
const server = http.createServer(app);
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkMFCJMLB5js = require('./chunk-MFCJMLB5.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
|
|
11
11
|
|
|
12
12
|
// node/build.ts
|
|
13
|
-
|
|
13
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
14
14
|
var _path = require('path');
|
|
15
15
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
16
16
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -18,12 +18,12 @@ var _vite = require('vite');
|
|
|
18
18
|
var _connect = require('connect'); var _connect2 = _interopRequireDefault(_connect);
|
|
19
19
|
|
|
20
20
|
// ../../node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.mjs
|
|
21
|
-
|
|
21
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
22
22
|
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
// ../../node_modules/.pnpm/totalist@3.0.0/node_modules/totalist/sync/index.mjs
|
|
26
|
-
|
|
26
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
function totalist(dir, callback, pre = "") {
|
|
@@ -38,7 +38,7 @@ function totalist(dir, callback, pre = "") {
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.mjs
|
|
41
|
-
|
|
41
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
42
42
|
var _querystring = require('querystring'); var qs = _interopRequireWildcard(_querystring);
|
|
43
43
|
function parse2(req) {
|
|
44
44
|
let raw = req.url;
|
|
@@ -62,7 +62,7 @@ function parse2(req) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// ../../node_modules/.pnpm/mrmime@1.0.0/node_modules/mrmime/index.mjs
|
|
65
|
-
|
|
65
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
66
66
|
var mimes = {
|
|
67
67
|
"ez": "application/andrew-inset",
|
|
68
68
|
"aw": "application/applixware",
|
|
@@ -527,7 +527,7 @@ function is404(req, res) {
|
|
|
527
527
|
}
|
|
528
528
|
function send(req, res, file, stats, headers) {
|
|
529
529
|
let code = 200, tmp, opts = {};
|
|
530
|
-
headers =
|
|
530
|
+
headers = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, headers);
|
|
531
531
|
for (let key in headers) {
|
|
532
532
|
tmp = res.getHeader(key);
|
|
533
533
|
if (tmp)
|
|
@@ -655,12 +655,12 @@ async function build(options, viteConfig = {}) {
|
|
|
655
655
|
let originalIndexHTML;
|
|
656
656
|
if (_fsextra2.default.existsSync(indexPath))
|
|
657
657
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
658
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
658
|
+
await _fsextra2.default.writeFile(indexPath, await _chunkMFCJMLB5js.getIndexHtml.call(void 0, options), "utf-8");
|
|
659
659
|
let config = void 0;
|
|
660
660
|
try {
|
|
661
661
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
662
662
|
plugins: [
|
|
663
|
-
await
|
|
663
|
+
await _chunkMFCJMLB5js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
664
664
|
{
|
|
665
665
|
name: "resolve-config",
|
|
666
666
|
configResolved(_config) {
|
|
@@ -710,7 +710,7 @@ async function build(options, viteConfig = {}) {
|
|
|
710
710
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
711
711
|
`, "utf-8");
|
|
712
712
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
713
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
713
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./export-XYTYZSD3.js")));
|
|
714
714
|
const port = 12445;
|
|
715
715
|
const app = _connect2.default.call(void 0, );
|
|
716
716
|
const server = _http2.default.createServer(app);
|
|
@@ -52,12 +52,12 @@ var __toModule = (module) => {
|
|
|
52
52
|
return __reExport(__markAsModule(__defProp(module != null ? __create(__getProtoOf(module)) : {}, "default", module && module.__esModule && "default" in module ? { get: () => module.default, enumerable: true } : { value: module, enumerable: true })), module);
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
-
// ../../node_modules/.pnpm/tsup@5.11.
|
|
55
|
+
// ../../node_modules/.pnpm/tsup@5.11.13_typescript@4.5.5/node_modules/tsup/assets/esm_shims.js
|
|
56
56
|
import { fileURLToPath } from "url";
|
|
57
57
|
import path from "path";
|
|
58
58
|
var getFilename, getDirname, __dirname, __filename;
|
|
59
59
|
var init_esm_shims = __esm({
|
|
60
|
-
"../../node_modules/.pnpm/tsup@5.11.
|
|
60
|
+
"../../node_modules/.pnpm/tsup@5.11.13_typescript@4.5.5/node_modules/tsup/assets/esm_shims.js"() {
|
|
61
61
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
62
62
|
getDirname = () => path.dirname(getFilename());
|
|
63
63
|
__dirname = /* @__PURE__ */ getDirname();
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
__toModule,
|
|
9
9
|
init_esm_shims,
|
|
10
10
|
resolveImportPath
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-4OPORETI.mjs";
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/semver@7.3.5/node_modules/semver/internal/constants.js
|
|
14
14
|
var require_constants = __commonJS({
|
|
@@ -5372,7 +5372,7 @@ async function saveExternalSlide(slide) {
|
|
|
5372
5372
|
init_esm_shims();
|
|
5373
5373
|
|
|
5374
5374
|
// package.json
|
|
5375
|
-
var version = "0.28.
|
|
5375
|
+
var version = "0.28.5";
|
|
5376
5376
|
|
|
5377
5377
|
// node/themes.ts
|
|
5378
5378
|
init_esm_shims();
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveImportPath,
|
|
12
12
|
stringifyMarkdownTokens,
|
|
13
13
|
toAtFS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4OPORETI.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({
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMFCJMLB5js = require('./chunk-MFCJMLB5.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
|
|
7
7
|
|
|
8
8
|
// node/server.ts
|
|
9
|
-
|
|
9
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
10
10
|
var _path = require('path');
|
|
11
11
|
var _vite = require('vite');
|
|
12
12
|
async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
@@ -20,7 +20,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
20
20
|
]
|
|
21
21
|
},
|
|
22
22
|
plugins: [
|
|
23
|
-
await
|
|
23
|
+
await _chunkMFCJMLB5js.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
24
24
|
]
|
|
25
25
|
}));
|
|
26
26
|
return server;
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.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 = _chunkQT3EQ43Ajs.__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
|
+
_chunkQT3EQ43Ajs.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 = _chunkTDRZKG4Wjs.__commonJS.call(void 0, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// node/common.ts
|
|
62
|
-
|
|
62
|
+
_chunkQT3EQ43Ajs.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="${_chunkQT3EQ43Ajs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
91
|
+
main = main.replace("__ENTRY__", _chunkQT3EQ43Ajs.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
|
+
_chunkQT3EQ43Ajs.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
|
+
_chunkQT3EQ43Ajs.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 = _chunkQT3EQ43Ajs.__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, _chunkQT3EQ43Ajs.__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, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
171
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
172
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQT3EQ43Ajs.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
|
+
_chunkQT3EQ43Ajs.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
|
+
_chunkQT3EQ43Ajs.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
|
+
_chunkQT3EQ43Ajs.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);
|
|
@@ -264,7 +264,7 @@ var dependencies = {
|
|
|
264
264
|
};
|
|
265
265
|
|
|
266
266
|
// node/vite/searchRoot.ts
|
|
267
|
-
|
|
267
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
268
268
|
|
|
269
269
|
|
|
270
270
|
var ROOT_FILES = [
|
|
@@ -324,7 +324,7 @@ function createConfigPlugin(options) {
|
|
|
324
324
|
define: getDefine(options),
|
|
325
325
|
resolve: {
|
|
326
326
|
alias: {
|
|
327
|
-
"@slidev/client/": `${
|
|
327
|
+
"@slidev/client/": `${_chunkQT3EQ43Ajs.toAtFS.call(void 0, options.clientRoot)}/`
|
|
328
328
|
}
|
|
329
329
|
},
|
|
330
330
|
optimizeDeps: {
|
|
@@ -350,7 +350,7 @@ function createConfigPlugin(options) {
|
|
|
350
350
|
allow: _utils.uniq.call(void 0, [
|
|
351
351
|
searchForWorkspaceRoot(options.userRoot),
|
|
352
352
|
searchForWorkspaceRoot(options.cliRoot),
|
|
353
|
-
..._isinstalledglobally2.default ? [_path.dirname.call(void 0,
|
|
353
|
+
..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunkQT3EQ43Ajs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
|
|
354
354
|
])
|
|
355
355
|
}
|
|
356
356
|
}
|
|
@@ -359,7 +359,7 @@ function createConfigPlugin(options) {
|
|
|
359
359
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
360
360
|
injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
|
|
361
361
|
injection.root = options.cliRoot;
|
|
362
|
-
injection.resolve.alias.vue = `${
|
|
362
|
+
injection.resolve.alias.vue = `${_chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
363
363
|
}
|
|
364
364
|
return _vite5.mergeConfig.call(void 0, config, injection);
|
|
365
365
|
},
|
|
@@ -380,7 +380,7 @@ function createConfigPlugin(options) {
|
|
|
380
380
|
}
|
|
381
381
|
function getDefine(options) {
|
|
382
382
|
return {
|
|
383
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
383
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkQT3EQ43Ajs.toAtFS.call(void 0, options.clientRoot)),
|
|
384
384
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
385
385
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
386
386
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -389,8 +389,8 @@ function getDefine(options) {
|
|
|
389
389
|
}
|
|
390
390
|
|
|
391
391
|
// node/plugins/loaders.ts
|
|
392
|
-
|
|
393
|
-
var import_fast_deep_equal =
|
|
392
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
393
|
+
var import_fast_deep_equal = _chunkQT3EQ43Ajs.__toModule.call(void 0, require_fast_deep_equal());
|
|
394
394
|
|
|
395
395
|
|
|
396
396
|
|
|
@@ -422,7 +422,7 @@ md.use(_markdownitlinkattributes2.default, {
|
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
424
|
function prepareSlideInfo(data) {
|
|
425
|
-
return
|
|
425
|
+
return _chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, data), {
|
|
426
426
|
notesHTML: md.render((data == null ? void 0 : data.note) || "")
|
|
427
427
|
});
|
|
428
428
|
}
|
|
@@ -511,7 +511,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
511
511
|
const file = `${slidePrefix}${i + 1}.md`;
|
|
512
512
|
try {
|
|
513
513
|
const md2 = await transformMarkdown(MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
|
|
514
|
-
return await VuePlugin.handleHotUpdate(
|
|
514
|
+
return await VuePlugin.handleHotUpdate(_chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, ctx), {
|
|
515
515
|
modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
|
|
516
516
|
file,
|
|
517
517
|
read() {
|
|
@@ -593,13 +593,13 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
593
593
|
async function transformMarkdown(code, pageNo, data2) {
|
|
594
594
|
var _a, _b;
|
|
595
595
|
const layouts = await getLayouts();
|
|
596
|
-
const frontmatter =
|
|
596
|
+
const frontmatter = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
|
|
597
597
|
const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
|
|
598
598
|
if (!layouts[layoutName])
|
|
599
599
|
throw new Error(`Unknown layout "${layoutName}"`);
|
|
600
600
|
delete frontmatter.title;
|
|
601
601
|
const imports = [
|
|
602
|
-
`import InjectedLayout from "${
|
|
602
|
+
`import InjectedLayout from "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
603
603
|
`const frontmatter = ${JSON.stringify(frontmatter)}`
|
|
604
604
|
];
|
|
605
605
|
code = code.replace(/(<script setup.*>)/g, `$1
|
|
@@ -645,9 +645,9 @@ ${code.slice(injectB)}`;
|
|
|
645
645
|
}
|
|
646
646
|
async function generateUserStyles() {
|
|
647
647
|
const imports = [
|
|
648
|
-
`import "${
|
|
649
|
-
`import "${
|
|
650
|
-
`import "${
|
|
648
|
+
`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
649
|
+
`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
650
|
+
`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
|
|
651
651
|
];
|
|
652
652
|
const roots2 = _utils.uniq.call(void 0, [
|
|
653
653
|
...themeRoots,
|
|
@@ -663,13 +663,13 @@ ${code.slice(injectB)}`;
|
|
|
663
663
|
];
|
|
664
664
|
for (const style of styles) {
|
|
665
665
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
666
|
-
imports.push(`import "${
|
|
666
|
+
imports.push(`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, style)}"`);
|
|
667
667
|
continue;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
if (data.features.katex)
|
|
672
|
-
imports.push(`import "${
|
|
672
|
+
imports.push(`import "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, _chunkQT3EQ43Ajs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
673
673
|
return imports.join("\n");
|
|
674
674
|
}
|
|
675
675
|
async function generateMonacoTypes() {
|
|
@@ -678,7 +678,7 @@ ${code.slice(injectB)}`;
|
|
|
678
678
|
async function generateLayouts() {
|
|
679
679
|
const imports = [];
|
|
680
680
|
const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
|
|
681
|
-
imports.push(`import __layout_${k} from "${
|
|
681
|
+
imports.push(`import __layout_${k} from "${_chunkQT3EQ43Ajs.toAtFS.call(void 0, v)}"`);
|
|
682
682
|
return [k, `__layout_${k}`];
|
|
683
683
|
});
|
|
684
684
|
return [
|
|
@@ -726,10 +726,10 @@ ${routes.join(",\n")}
|
|
|
726
726
|
return [...imports, routesStr].join("\n");
|
|
727
727
|
}
|
|
728
728
|
function generateConfigs() {
|
|
729
|
-
const config =
|
|
729
|
+
const config = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, data.config);
|
|
730
730
|
if (_utils.isString.call(void 0, config.title)) {
|
|
731
731
|
const tokens = md.parseInline(config.title, {});
|
|
732
|
-
config.title =
|
|
732
|
+
config.title = _chunkQT3EQ43Ajs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
733
733
|
}
|
|
734
734
|
if (_utils.isString.call(void 0, config.info))
|
|
735
735
|
config.info = md.render(config.info);
|
|
@@ -750,7 +750,7 @@ ${routes.join(",\n")}
|
|
|
750
750
|
];
|
|
751
751
|
}
|
|
752
752
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
753
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
753
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkQT3EQ43Ajs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
754
754
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
755
755
|
return `
|
|
756
756
|
${imports}
|
|
@@ -765,7 +765,7 @@ export default {
|
|
|
765
765
|
}
|
|
766
766
|
|
|
767
767
|
// node/plugins/monacoTransform.ts
|
|
768
|
-
|
|
768
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
769
769
|
|
|
770
770
|
|
|
771
771
|
|
|
@@ -799,7 +799,7 @@ function createMonacoTypesLoader() {
|
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
// node/plugins/setupClient.ts
|
|
802
|
-
|
|
802
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
803
803
|
|
|
804
804
|
|
|
805
805
|
|
|
@@ -821,7 +821,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
821
821
|
setups.forEach((path, idx) => {
|
|
822
822
|
if (!_fs.existsSync.call(void 0, path))
|
|
823
823
|
return;
|
|
824
|
-
imports.push(`import __n${idx} from '${
|
|
824
|
+
imports.push(`import __n${idx} from '${_chunkQT3EQ43Ajs.toAtFS.call(void 0, path)}'`);
|
|
825
825
|
let fn = `__n${idx}`;
|
|
826
826
|
let awaitFn = `await __n${idx}`;
|
|
827
827
|
if (/\binjection_return\b/g.test(code)) {
|
|
@@ -849,7 +849,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
849
849
|
}
|
|
850
850
|
|
|
851
851
|
// node/plugins/markdown.ts
|
|
852
|
-
|
|
852
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
853
853
|
var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
|
|
854
854
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
855
855
|
|
|
@@ -859,7 +859,7 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
859
859
|
var _plantumlencoder = require('plantuml-encoder');
|
|
860
860
|
|
|
861
861
|
// node/plugins/markdown-it-katex.ts
|
|
862
|
-
|
|
862
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
863
863
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
864
864
|
function isValidDelim(state, pos) {
|
|
865
865
|
const max = state.posMax;
|
|
@@ -1006,7 +1006,7 @@ function math_plugin(md2, options) {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
|
|
1008
1008
|
// node/plugins/markdown-it-prism.ts
|
|
1009
|
-
|
|
1009
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
1010
1010
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1011
1011
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1012
1012
|
var DEFAULTS = {
|
|
@@ -1029,7 +1029,7 @@ function loadPrismLang(lang) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
function loadPrismPlugin(name) {
|
|
1031
1031
|
try {
|
|
1032
|
-
|
|
1032
|
+
_chunkQT3EQ43Ajs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1033
1033
|
} catch (e) {
|
|
1034
1034
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1035
1035
|
}
|
|
@@ -1069,7 +1069,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
1071
1071
|
// node/plugins/markdown-it-shiki.ts
|
|
1072
|
-
|
|
1072
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
1073
1073
|
function getThemeName(theme) {
|
|
1074
1074
|
if (typeof theme === "string")
|
|
1075
1075
|
return theme;
|
|
@@ -1091,7 +1091,7 @@ function resolveShikiOptions(options) {
|
|
|
1091
1091
|
themes.push(options.theme);
|
|
1092
1092
|
}
|
|
1093
1093
|
}
|
|
1094
|
-
return
|
|
1094
|
+
return _chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, options), {
|
|
1095
1095
|
themes,
|
|
1096
1096
|
darkModeThemes: darkModeThemes ? {
|
|
1097
1097
|
dark: getThemeName(darkModeThemes.dark),
|
|
@@ -1129,7 +1129,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1129
1129
|
const setups = [];
|
|
1130
1130
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1131
1131
|
if (config.highlighter === "shiki") {
|
|
1132
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1132
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "shiki")));
|
|
1133
1133
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1134
1134
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1135
1135
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1138,11 +1138,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1138
1138
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
1139
1139
|
}
|
|
1140
1140
|
const KatexOptions = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1141
|
-
return _vitepluginmd2.default.call(void 0,
|
|
1141
|
+
return _vitepluginmd2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadProps.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1142
1142
|
wrapperClasses: "",
|
|
1143
1143
|
headEnabled: false,
|
|
1144
1144
|
frontmatter: false,
|
|
1145
|
-
markdownItOptions:
|
|
1145
|
+
markdownItOptions: _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1146
1146
|
quotes: `""''`,
|
|
1147
1147
|
html: true,
|
|
1148
1148
|
xhtmlOut: true,
|
|
@@ -1279,7 +1279,7 @@ function escapeVueInCode(md2) {
|
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
1281
1281
|
// node/plugins/patchTransform.ts
|
|
1282
|
-
|
|
1282
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
1283
1283
|
|
|
1284
1284
|
function createFixPlugins(options) {
|
|
1285
1285
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1333,10 +1333,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1333
1333
|
clientRoot,
|
|
1334
1334
|
data: { config }
|
|
1335
1335
|
} = options;
|
|
1336
|
-
const VuePlugin = _pluginvue2.default.call(void 0,
|
|
1336
|
+
const VuePlugin = _pluginvue2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1337
1337
|
include: [/\.vue$/, /\.md$/],
|
|
1338
1338
|
exclude: [],
|
|
1339
|
-
template:
|
|
1339
|
+
template: _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1340
1340
|
compilerOptions: {
|
|
1341
1341
|
isCustomElement(tag) {
|
|
1342
1342
|
return customElements.has(tag);
|
|
@@ -1351,7 +1351,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1351
1351
|
MarkdownPlugin,
|
|
1352
1352
|
VuePlugin,
|
|
1353
1353
|
createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
|
|
1354
|
-
_vite4.default.call(void 0,
|
|
1354
|
+
_vite4.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1355
1355
|
extensions: ["vue", "md", "ts"],
|
|
1356
1356
|
dirs: [
|
|
1357
1357
|
`${clientRoot}/builtin`,
|
|
@@ -1369,11 +1369,11 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1369
1369
|
})
|
|
1370
1370
|
]
|
|
1371
1371
|
}, componentsOptions)),
|
|
1372
|
-
_vite2.default.call(void 0,
|
|
1372
|
+
_vite2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1373
1373
|
defaultClass: "slidev-icon",
|
|
1374
1374
|
autoInstall: true
|
|
1375
1375
|
}, iconsOptions)),
|
|
1376
|
-
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0,
|
|
1376
|
+
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {
|
|
1377
1377
|
rules: [
|
|
1378
1378
|
..._vitepluginremoteassets.DefaultRules,
|
|
1379
1379
|
{
|