@slidev/cli 0.27.20 → 0.28.3
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-LK5RLV7L.js → build-QOWIXXQM.js} +28 -36
- package/dist/{build-OT76Q4KA.mjs → build-RXLELNJK.mjs} +32 -40
- package/dist/{chunk-3LH2GTGU.mjs → chunk-4OPORETI.mjs} +8 -2
- package/dist/{chunk-FN2B33RM.mjs → chunk-GWFBEY26.mjs} +23 -21
- package/dist/{chunk-VN5XPBZO.js → chunk-HF2PX43I.js} +4 -4
- package/dist/{chunk-3ND6GSCF.js → chunk-MFCJMLB5.js} +73 -71
- package/dist/{chunk-2TTM3NLX.mjs → chunk-MSSOXTVZ.mjs} +2 -2
- package/dist/{chunk-RUL3XRPS.js → chunk-QT3EQ43A.js} +9 -3
- package/dist/{chunk-JGWGLMRC.mjs → chunk-S4SUAR5N.mjs} +3241 -193
- package/dist/{chunk-XEDZVJCH.js → chunk-TJBBZIND.js} +3472 -424
- package/dist/cli.js +26 -26
- package/dist/cli.mjs +13 -13
- package/dist/{export-FUMCNU5W.js → export-KTPRCIUI.js} +5 -5
- package/dist/{export-IU4RLVW7.mjs → export-MHGYZJHW.mjs} +2 -2
- package/dist/index.d.ts +68 -4
- package/dist/index.js +9 -11
- package/dist/index.mjs +6 -8
- package/package.json +33 -32
|
@@ -1,49 +1,44 @@
|
|
|
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
|
-
|
|
11
|
-
var _chunkRUL3XRPSjs = require('./chunk-RUL3XRPS.js');
|
|
12
|
-
|
|
13
|
-
// ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
|
|
14
|
-
var require_sync = _chunkRUL3XRPSjs.__commonJS.call(void 0, {
|
|
15
|
-
"../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
|
|
16
|
-
_chunkRUL3XRPSjs.init_cjs_shims.call(void 0, );
|
|
17
|
-
var { join: join3, resolve: resolve3 } = _chunkRUL3XRPSjs.__require.call(void 0, "path");
|
|
18
|
-
var { readdirSync, statSync: statSync2 } = _chunkRUL3XRPSjs.__require.call(void 0, "fs");
|
|
19
|
-
module.exports = function list2(dir, callback, pre = "") {
|
|
20
|
-
dir = resolve3(".", dir);
|
|
21
|
-
let arr = readdirSync(dir);
|
|
22
|
-
let i = 0, abs, stats;
|
|
23
|
-
for (; i < arr.length; i++) {
|
|
24
|
-
abs = join3(dir, arr[i]);
|
|
25
|
-
stats = statSync2(abs);
|
|
26
|
-
stats.isDirectory() ? list2(abs, callback, join3(pre, arr[i])) : callback(join3(pre, arr[i]), abs, stats);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
10
|
+
var _chunkQT3EQ43Ajs = require('./chunk-QT3EQ43A.js');
|
|
31
11
|
|
|
32
12
|
// node/build.ts
|
|
33
|
-
|
|
13
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
34
14
|
var _path = require('path');
|
|
35
15
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
36
16
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
37
17
|
var _vite = require('vite');
|
|
38
18
|
var _connect = require('connect'); var _connect2 = _interopRequireDefault(_connect);
|
|
39
19
|
|
|
40
|
-
// ../../node_modules/.pnpm/sirv@
|
|
41
|
-
|
|
20
|
+
// ../../node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.mjs
|
|
21
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
42
22
|
var _fs = require('fs'); var fs = _interopRequireWildcard(_fs);
|
|
43
23
|
|
|
44
24
|
|
|
25
|
+
// ../../node_modules/.pnpm/totalist@3.0.0/node_modules/totalist/sync/index.mjs
|
|
26
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
function totalist(dir, callback, pre = "") {
|
|
30
|
+
dir = _path.resolve.call(void 0, ".", dir);
|
|
31
|
+
let arr = _fs.readdirSync.call(void 0, dir);
|
|
32
|
+
let i = 0, abs, stats;
|
|
33
|
+
for (; i < arr.length; i++) {
|
|
34
|
+
abs = _path.join.call(void 0, dir, arr[i]);
|
|
35
|
+
stats = _fs.statSync.call(void 0, abs);
|
|
36
|
+
stats.isDirectory() ? totalist(abs, callback, _path.join.call(void 0, pre, arr[i])) : callback(_path.join.call(void 0, pre, arr[i]), abs, stats);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
45
40
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.mjs
|
|
46
|
-
|
|
41
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
47
42
|
var _querystring = require('querystring'); var qs = _interopRequireWildcard(_querystring);
|
|
48
43
|
function parse2(req) {
|
|
49
44
|
let raw = req.url;
|
|
@@ -66,11 +61,8 @@ function parse2(req) {
|
|
|
66
61
|
return req._parsedUrl = { pathname, search, query, raw };
|
|
67
62
|
}
|
|
68
63
|
|
|
69
|
-
// ../../node_modules/.pnpm/sirv@1.0.19/node_modules/sirv/build.mjs
|
|
70
|
-
var import_sync = _chunkRUL3XRPSjs.__toModule.call(void 0, require_sync());
|
|
71
|
-
|
|
72
64
|
// ../../node_modules/.pnpm/mrmime@1.0.0/node_modules/mrmime/index.mjs
|
|
73
|
-
|
|
65
|
+
_chunkQT3EQ43Ajs.init_cjs_shims.call(void 0, );
|
|
74
66
|
var mimes = {
|
|
75
67
|
"ez": "application/andrew-inset",
|
|
76
68
|
"aw": "application/applixware",
|
|
@@ -485,7 +477,7 @@ function lookup(extn) {
|
|
|
485
477
|
return mimes[!~idx ? tmp : tmp.substring(++idx)];
|
|
486
478
|
}
|
|
487
479
|
|
|
488
|
-
// ../../node_modules/.pnpm/sirv@
|
|
480
|
+
// ../../node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.mjs
|
|
489
481
|
var noop = () => {
|
|
490
482
|
};
|
|
491
483
|
function isMatch(uri, arr) {
|
|
@@ -535,7 +527,7 @@ function is404(req, res) {
|
|
|
535
527
|
}
|
|
536
528
|
function send(req, res, file, stats, headers) {
|
|
537
529
|
let code = 200, tmp, opts = {};
|
|
538
|
-
headers =
|
|
530
|
+
headers = _chunkQT3EQ43Ajs.__spreadValues.call(void 0, {}, headers);
|
|
539
531
|
for (let key in headers) {
|
|
540
532
|
tmp = res.getHeader(key);
|
|
541
533
|
if (tmp)
|
|
@@ -613,7 +605,7 @@ function build_default(dir, opts = {}) {
|
|
|
613
605
|
else if (cc && opts.maxAge === 0)
|
|
614
606
|
cc += ",must-revalidate";
|
|
615
607
|
if (!opts.dev) {
|
|
616
|
-
(
|
|
608
|
+
totalist(dir, (name, abs, stats) => {
|
|
617
609
|
if (/\.well-known[\\+\/]/.test(name)) {
|
|
618
610
|
} else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name))
|
|
619
611
|
return;
|
|
@@ -663,12 +655,12 @@ async function build(options, viteConfig = {}) {
|
|
|
663
655
|
let originalIndexHTML;
|
|
664
656
|
if (_fsextra2.default.existsSync(indexPath))
|
|
665
657
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
666
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
658
|
+
await _fsextra2.default.writeFile(indexPath, await _chunkMFCJMLB5js.getIndexHtml.call(void 0, options), "utf-8");
|
|
667
659
|
let config = void 0;
|
|
668
660
|
try {
|
|
669
661
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
670
662
|
plugins: [
|
|
671
|
-
await
|
|
663
|
+
await _chunkMFCJMLB5js.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
672
664
|
{
|
|
673
665
|
name: "resolve-config",
|
|
674
666
|
configResolved(_config) {
|
|
@@ -718,7 +710,7 @@ async function build(options, viteConfig = {}) {
|
|
|
718
710
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
719
711
|
`, "utf-8");
|
|
720
712
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
721
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
713
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkQT3EQ43Ajs.__toModule.call(void 0, _chunkQT3EQ43Ajs.__require.call(void 0, "./export-KTPRCIUI.js")));
|
|
722
714
|
const port = 12445;
|
|
723
715
|
const app = _connect2.default.call(void 0, );
|
|
724
716
|
const server = _http2.default.createServer(app);
|
|
@@ -1,46 +1,41 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-GWFBEY26.mjs";
|
|
5
5
|
import {
|
|
6
|
-
__commonJS,
|
|
7
6
|
__require,
|
|
8
7
|
__spreadValues,
|
|
9
8
|
__toModule,
|
|
10
9
|
init_esm_shims
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
|
|
13
|
-
// ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
|
|
14
|
-
var require_sync = __commonJS({
|
|
15
|
-
"../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
|
|
16
|
-
init_esm_shims();
|
|
17
|
-
var { join: join3, resolve: resolve3 } = __require("path");
|
|
18
|
-
var { readdirSync, statSync: statSync2 } = __require("fs");
|
|
19
|
-
module.exports = function list2(dir, callback, pre = "") {
|
|
20
|
-
dir = resolve3(".", dir);
|
|
21
|
-
let arr = readdirSync(dir);
|
|
22
|
-
let i = 0, abs, stats;
|
|
23
|
-
for (; i < arr.length; i++) {
|
|
24
|
-
abs = join3(dir, arr[i]);
|
|
25
|
-
stats = statSync2(abs);
|
|
26
|
-
stats.isDirectory() ? list2(abs, callback, join3(pre, arr[i])) : callback(join3(pre, arr[i]), abs, stats);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
});
|
|
10
|
+
} from "./chunk-4OPORETI.mjs";
|
|
31
11
|
|
|
32
12
|
// node/build.ts
|
|
33
13
|
init_esm_shims();
|
|
34
|
-
import {
|
|
14
|
+
import { join as join3, resolve as resolve3 } from "path";
|
|
35
15
|
import http from "http";
|
|
36
16
|
import fs2 from "fs-extra";
|
|
37
|
-
import { build as viteBuild
|
|
17
|
+
import { mergeConfig, resolveConfig, build as viteBuild } from "vite";
|
|
38
18
|
import connect from "connect";
|
|
39
19
|
|
|
40
|
-
// ../../node_modules/.pnpm/sirv@
|
|
20
|
+
// ../../node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.mjs
|
|
41
21
|
init_esm_shims();
|
|
42
22
|
import * as fs from "fs";
|
|
43
|
-
import { join, normalize, resolve } from "path";
|
|
23
|
+
import { join as join2, normalize, resolve as resolve2 } from "path";
|
|
24
|
+
|
|
25
|
+
// ../../node_modules/.pnpm/totalist@3.0.0/node_modules/totalist/sync/index.mjs
|
|
26
|
+
init_esm_shims();
|
|
27
|
+
import { join, resolve } from "path";
|
|
28
|
+
import { readdirSync, statSync } from "fs";
|
|
29
|
+
function totalist(dir, callback, pre = "") {
|
|
30
|
+
dir = resolve(".", dir);
|
|
31
|
+
let arr = readdirSync(dir);
|
|
32
|
+
let i = 0, abs, stats;
|
|
33
|
+
for (; i < arr.length; i++) {
|
|
34
|
+
abs = join(dir, arr[i]);
|
|
35
|
+
stats = statSync(abs);
|
|
36
|
+
stats.isDirectory() ? totalist(abs, callback, join(pre, arr[i])) : callback(join(pre, arr[i]), abs, stats);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
44
39
|
|
|
45
40
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.mjs
|
|
46
41
|
init_esm_shims();
|
|
@@ -66,9 +61,6 @@ function parse2(req) {
|
|
|
66
61
|
return req._parsedUrl = { pathname, search, query, raw };
|
|
67
62
|
}
|
|
68
63
|
|
|
69
|
-
// ../../node_modules/.pnpm/sirv@1.0.19/node_modules/sirv/build.mjs
|
|
70
|
-
var import_sync = __toModule(require_sync());
|
|
71
|
-
|
|
72
64
|
// ../../node_modules/.pnpm/mrmime@1.0.0/node_modules/mrmime/index.mjs
|
|
73
65
|
init_esm_shims();
|
|
74
66
|
var mimes = {
|
|
@@ -485,7 +477,7 @@ function lookup(extn) {
|
|
|
485
477
|
return mimes[!~idx ? tmp : tmp.substring(++idx)];
|
|
486
478
|
}
|
|
487
479
|
|
|
488
|
-
// ../../node_modules/.pnpm/sirv@
|
|
480
|
+
// ../../node_modules/.pnpm/sirv@2.0.2/node_modules/sirv/build.mjs
|
|
489
481
|
var noop = () => {
|
|
490
482
|
};
|
|
491
483
|
function isMatch(uri, arr) {
|
|
@@ -519,7 +511,7 @@ function viaLocal(dir, isEtag, uri, extns) {
|
|
|
519
511
|
let i = 0, arr = toAssume(uri, extns);
|
|
520
512
|
let abs, stats, name, headers;
|
|
521
513
|
for (; i < arr.length; i++) {
|
|
522
|
-
abs = normalize(
|
|
514
|
+
abs = normalize(join2(dir, name = arr[i]));
|
|
523
515
|
if (abs.startsWith(dir) && fs.existsSync(abs)) {
|
|
524
516
|
stats = fs.statSync(abs);
|
|
525
517
|
if (stats.isDirectory())
|
|
@@ -582,7 +574,7 @@ function toHeaders(name, stats, isEtag) {
|
|
|
582
574
|
return headers;
|
|
583
575
|
}
|
|
584
576
|
function build_default(dir, opts = {}) {
|
|
585
|
-
dir =
|
|
577
|
+
dir = resolve2(dir || ".");
|
|
586
578
|
let isNotFound = opts.onNoMatch || is404;
|
|
587
579
|
let setHeaders = opts.setHeaders || noop;
|
|
588
580
|
let extensions = opts.extensions || ["html", "htm"];
|
|
@@ -613,7 +605,7 @@ function build_default(dir, opts = {}) {
|
|
|
613
605
|
else if (cc && opts.maxAge === 0)
|
|
614
606
|
cc += ",must-revalidate";
|
|
615
607
|
if (!opts.dev) {
|
|
616
|
-
(
|
|
608
|
+
totalist(dir, (name, abs, stats) => {
|
|
617
609
|
if (/\.well-known[\\+\/]/.test(name)) {
|
|
618
610
|
} else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name))
|
|
619
611
|
return;
|
|
@@ -657,7 +649,7 @@ function build_default(dir, opts = {}) {
|
|
|
657
649
|
// node/build.ts
|
|
658
650
|
import { blue, yellow } from "kolorist";
|
|
659
651
|
async function build(options, viteConfig = {}) {
|
|
660
|
-
const indexPath =
|
|
652
|
+
const indexPath = resolve3(options.userRoot, "index.html");
|
|
661
653
|
const rawConfig = await resolveConfig({}, "build");
|
|
662
654
|
const pluginOptions = rawConfig.slidev || {};
|
|
663
655
|
let originalIndexHTML;
|
|
@@ -687,10 +679,10 @@ async function build(options, viteConfig = {}) {
|
|
|
687
679
|
} else {
|
|
688
680
|
console.log(blue(" building for Monaco...\n"));
|
|
689
681
|
await viteBuild(mergeConfig(inlineConfig, {
|
|
690
|
-
root:
|
|
682
|
+
root: join3(options.clientRoot, "iframes/monaco"),
|
|
691
683
|
base: `${config.base}iframes/monaco/`,
|
|
692
684
|
build: {
|
|
693
|
-
outDir:
|
|
685
|
+
outDir: resolve3(config.build.outDir, "iframes/monaco"),
|
|
694
686
|
rollupOptions: {
|
|
695
687
|
output: {
|
|
696
688
|
manualChunks: {
|
|
@@ -712,13 +704,13 @@ async function build(options, viteConfig = {}) {
|
|
|
712
704
|
else
|
|
713
705
|
await fs2.unlink(indexPath);
|
|
714
706
|
}
|
|
715
|
-
await fs2.copyFile(
|
|
716
|
-
const redirectsPath =
|
|
707
|
+
await fs2.copyFile(resolve3(config.build.outDir, "index.html"), resolve3(config.build.outDir, "404.html"));
|
|
708
|
+
const redirectsPath = resolve3(config.build.outDir, "_redirects");
|
|
717
709
|
if (!fs2.existsSync(redirectsPath))
|
|
718
710
|
await fs2.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
719
711
|
`, "utf-8");
|
|
720
712
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
721
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
713
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-MHGYZJHW.mjs")));
|
|
722
714
|
const port = 12445;
|
|
723
715
|
const app = connect();
|
|
724
716
|
const server = http.createServer(app);
|
|
@@ -732,7 +724,7 @@ async function build(options, viteConfig = {}) {
|
|
|
732
724
|
port,
|
|
733
725
|
total: options.data.slides.length,
|
|
734
726
|
format: "pdf",
|
|
735
|
-
output:
|
|
727
|
+
output: join3(config.build.outDir, "slidev-exported.pdf"),
|
|
736
728
|
base: config.base,
|
|
737
729
|
dark: options.data.config.colorSchema === "dark",
|
|
738
730
|
width: 1920,
|
|
@@ -35,6 +35,11 @@ var __esm = (fn, res) => function __init() {
|
|
|
35
35
|
var __commonJS = (cb, mod) => function __require2() {
|
|
36
36
|
return mod || (0, cb[Object.keys(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
37
37
|
};
|
|
38
|
+
var __export = (target, all) => {
|
|
39
|
+
__markAsModule(target);
|
|
40
|
+
for (var name in all)
|
|
41
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
42
|
+
};
|
|
38
43
|
var __reExport = (target, module, desc) => {
|
|
39
44
|
if (module && typeof module === "object" || typeof module === "function") {
|
|
40
45
|
for (let key of __getOwnPropNames(module))
|
|
@@ -47,12 +52,12 @@ var __toModule = (module) => {
|
|
|
47
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);
|
|
48
53
|
};
|
|
49
54
|
|
|
50
|
-
// ../../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
|
|
51
56
|
import { fileURLToPath } from "url";
|
|
52
57
|
import path from "path";
|
|
53
58
|
var getFilename, getDirname, __dirname, __filename;
|
|
54
59
|
var init_esm_shims = __esm({
|
|
55
|
-
"../../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"() {
|
|
56
61
|
getFilename = () => fileURLToPath(import.meta.url);
|
|
57
62
|
getDirname = () => path.dirname(getFilename());
|
|
58
63
|
__dirname = /* @__PURE__ */ getDirname();
|
|
@@ -123,6 +128,7 @@ export {
|
|
|
123
128
|
__spreadProps,
|
|
124
129
|
__require,
|
|
125
130
|
__commonJS,
|
|
131
|
+
__export,
|
|
126
132
|
__toModule,
|
|
127
133
|
__dirname,
|
|
128
134
|
__filename,
|
|
@@ -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({
|
|
@@ -61,7 +61,7 @@ var require_fast_deep_equal = __commonJS({
|
|
|
61
61
|
|
|
62
62
|
// node/common.ts
|
|
63
63
|
init_esm_shims();
|
|
64
|
-
import { promises as fs
|
|
64
|
+
import { existsSync, promises as fs } from "fs";
|
|
65
65
|
import { join } from "path";
|
|
66
66
|
import { uniq } from "@antfu/utils";
|
|
67
67
|
async function getIndexHtml({ clientRoot, themeRoots, data, userRoot }) {
|
|
@@ -95,7 +95,7 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
95
95
|
|
|
96
96
|
// node/plugins/windicss.ts
|
|
97
97
|
init_esm_shims();
|
|
98
|
-
import { resolve as resolve2
|
|
98
|
+
import { dirname, resolve as resolve2 } from "path";
|
|
99
99
|
import { existsSync as existsSync3 } from "fs";
|
|
100
100
|
import { slash, uniq as uniq2 } from "@antfu/utils";
|
|
101
101
|
import WindiCSS, { defaultConfigureFiles } from "vite-plugin-windicss";
|
|
@@ -187,7 +187,7 @@ import { notNullish as notNullish2 } from "@antfu/utils";
|
|
|
187
187
|
|
|
188
188
|
// node/drawings.ts
|
|
189
189
|
init_esm_shims();
|
|
190
|
-
import { dirname as dirname2,
|
|
190
|
+
import { basename, dirname as dirname2, join as join2, resolve as resolve3 } from "path";
|
|
191
191
|
import fs2 from "fs-extra";
|
|
192
192
|
import fg from "fast-glob";
|
|
193
193
|
function resolveDrawingsDir(options) {
|
|
@@ -240,28 +240,28 @@ import { uniq as uniq3 } from "@antfu/utils";
|
|
|
240
240
|
|
|
241
241
|
// ../client/package.json
|
|
242
242
|
var dependencies = {
|
|
243
|
-
"@antfu/utils": "^0.
|
|
243
|
+
"@antfu/utils": "^0.5.0",
|
|
244
244
|
"@slidev/parser": "workspace:*",
|
|
245
245
|
"@slidev/types": "workspace:*",
|
|
246
|
-
"@vueuse/core": "^7.
|
|
247
|
-
"@vueuse/head": "^0.7.
|
|
248
|
-
"@vueuse/motion": "^2.0.0-beta.
|
|
249
|
-
codemirror: "^5.
|
|
246
|
+
"@vueuse/core": "^7.6.0",
|
|
247
|
+
"@vueuse/head": "^0.7.5",
|
|
248
|
+
"@vueuse/motion": "^2.0.0-beta.9",
|
|
249
|
+
codemirror: "^5.65.1",
|
|
250
250
|
drauu: "^0.2.1",
|
|
251
251
|
"file-saver": "^2.0.5",
|
|
252
252
|
"js-base64": "^3.7.2",
|
|
253
253
|
"js-yaml": "^4.1.0",
|
|
254
|
-
katex: "^0.15.
|
|
254
|
+
katex: "^0.15.2",
|
|
255
255
|
mermaid: "8.13.0",
|
|
256
|
-
"monaco-editor": "^0.
|
|
257
|
-
nanoid: "^3.
|
|
256
|
+
"monaco-editor": "^0.32.1",
|
|
257
|
+
nanoid: "^3.2.0",
|
|
258
258
|
prettier: "^2.5.1",
|
|
259
259
|
recordrtc: "^5.6.2",
|
|
260
|
-
resolve: "^1.
|
|
261
|
-
"vite-plugin-windicss": "^1.
|
|
262
|
-
vue: "^3.2.
|
|
260
|
+
resolve: "^1.22.0",
|
|
261
|
+
"vite-plugin-windicss": "^1.7.0",
|
|
262
|
+
vue: "^3.2.30",
|
|
263
263
|
"vue-router": "^4.0.12",
|
|
264
|
-
windicss: "^3.3
|
|
264
|
+
windicss: "^3.4.3"
|
|
265
265
|
};
|
|
266
266
|
|
|
267
267
|
// node/vite/searchRoot.ts
|
|
@@ -707,7 +707,9 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
707
707
|
note: i.note,
|
|
708
708
|
filepath: ((_b = i.source) == null ? void 0 : _b.filepath) || entry,
|
|
709
709
|
id: idx,
|
|
710
|
-
no
|
|
710
|
+
no,
|
|
711
|
+
title: i.title,
|
|
712
|
+
level: i.level
|
|
711
713
|
},
|
|
712
714
|
__clicksElements: [],
|
|
713
715
|
__preloaded: false
|
|
@@ -850,12 +852,12 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
850
852
|
// node/plugins/markdown.ts
|
|
851
853
|
init_esm_shims();
|
|
852
854
|
import Markdown2 from "vite-plugin-md";
|
|
853
|
-
import base64 from "js-base64";
|
|
855
|
+
import * as base64 from "js-base64";
|
|
854
856
|
import { slash as slash5 } from "@antfu/utils";
|
|
855
857
|
import mila2 from "markdown-it-link-attributes";
|
|
856
858
|
import mif from "markdown-it-footnote";
|
|
857
859
|
import * as Shiki from "shiki";
|
|
858
|
-
import { encode } from "plantuml-encoder";
|
|
860
|
+
import { encode as encode2 } from "plantuml-encoder";
|
|
859
861
|
|
|
860
862
|
// node/plugins/markdown-it-katex.ts
|
|
861
863
|
init_esm_shims();
|
|
@@ -1196,7 +1198,7 @@ function transformSlotSugar(md2) {
|
|
|
1196
1198
|
lines.forEach((line, idx) => {
|
|
1197
1199
|
if (isLineInsideCodeblocks(idx))
|
|
1198
1200
|
return;
|
|
1199
|
-
const match = line.
|
|
1201
|
+
const match = line.trimEnd().match(/^::\s*(\w+)\s*::$/);
|
|
1200
1202
|
if (match) {
|
|
1201
1203
|
lines[idx] = `${prevSlot ? "\n\n</template>\n" : "\n"}<template v-slot:${match[1]}="slotProps">
|
|
1202
1204
|
`;
|
|
@@ -1268,7 +1270,7 @@ function transformMermaid(md2) {
|
|
|
1268
1270
|
}
|
|
1269
1271
|
function transformPlantUml(md2, server) {
|
|
1270
1272
|
return md2.replace(/^```plantuml\s*?({.*?})?\n([\s\S]+?)\n```/mg, (full, options = "", content = "") => {
|
|
1271
|
-
const code =
|
|
1273
|
+
const code = encode2(content.trim());
|
|
1272
1274
|
options = options.trim() || "{}";
|
|
1273
1275
|
return `<PlantUml :code="'${code}'" :server="'${server}'" v-bind="${options}" />`;
|
|
1274
1276
|
});
|
|
@@ -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;
|