@slidev/cli 0.49.0-beta.3 → 0.49.0-beta.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/README.md +1 -1
- package/dist/{build-IFALC6GJ.mjs → build-Q2ZQYXZS.mjs} +3 -3
- package/dist/{chunk-KUKH6IFA.mjs → chunk-DUS7IVGJ.mjs} +3 -3
- package/dist/{chunk-Y6VNORK4.mjs → chunk-NOHNQKED.mjs} +529 -449
- package/dist/{chunk-AQQIBD5X.mjs → chunk-W3YEGN62.mjs} +13 -10
- package/dist/cli.mjs +8 -8
- package/dist/{export-OGDZIGG2.mjs → export-SAGFIALP.mjs} +1 -1
- package/dist/index.mjs +3 -3
- package/package.json +24 -24
|
@@ -2,18 +2,19 @@ import {
|
|
|
2
2
|
loadSetups
|
|
3
3
|
} from "./chunk-LOUKLO2C.mjs";
|
|
4
4
|
import {
|
|
5
|
+
isInstalledGlobally,
|
|
5
6
|
resolveImportPath,
|
|
6
7
|
resolveImportUrl,
|
|
7
8
|
toAtFS
|
|
8
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-W3YEGN62.mjs";
|
|
9
10
|
import {
|
|
10
11
|
__commonJS,
|
|
11
12
|
__toESM
|
|
12
13
|
} from "./chunk-BXO7ZPPU.mjs";
|
|
13
14
|
|
|
14
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
15
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/identity.js
|
|
15
16
|
var require_identity = __commonJS({
|
|
16
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
17
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/identity.js"(exports) {
|
|
17
18
|
"use strict";
|
|
18
19
|
var ALIAS = Symbol.for("yaml.alias");
|
|
19
20
|
var DOC = Symbol.for("yaml.document");
|
|
@@ -68,9 +69,9 @@ var require_identity = __commonJS({
|
|
|
68
69
|
}
|
|
69
70
|
});
|
|
70
71
|
|
|
71
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
72
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/visit.js
|
|
72
73
|
var require_visit = __commonJS({
|
|
73
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
74
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/visit.js"(exports) {
|
|
74
75
|
"use strict";
|
|
75
76
|
var identity = require_identity();
|
|
76
77
|
var BREAK = Symbol("break visit");
|
|
@@ -226,9 +227,9 @@ var require_visit = __commonJS({
|
|
|
226
227
|
}
|
|
227
228
|
});
|
|
228
229
|
|
|
229
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
230
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/directives.js
|
|
230
231
|
var require_directives = __commonJS({
|
|
231
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
232
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/directives.js"(exports) {
|
|
232
233
|
"use strict";
|
|
233
234
|
var identity = require_identity();
|
|
234
235
|
var visit = require_visit();
|
|
@@ -397,9 +398,9 @@ var require_directives = __commonJS({
|
|
|
397
398
|
}
|
|
398
399
|
});
|
|
399
400
|
|
|
400
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
401
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/anchors.js
|
|
401
402
|
var require_anchors = __commonJS({
|
|
402
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
403
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/anchors.js"(exports) {
|
|
403
404
|
"use strict";
|
|
404
405
|
var identity = require_identity();
|
|
405
406
|
var visit = require_visit();
|
|
@@ -468,9 +469,9 @@ var require_anchors = __commonJS({
|
|
|
468
469
|
}
|
|
469
470
|
});
|
|
470
471
|
|
|
471
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
472
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/applyReviver.js
|
|
472
473
|
var require_applyReviver = __commonJS({
|
|
473
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
474
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/applyReviver.js"(exports) {
|
|
474
475
|
"use strict";
|
|
475
476
|
function applyReviver(reviver, obj, key, val) {
|
|
476
477
|
if (val && typeof val === "object") {
|
|
@@ -518,9 +519,9 @@ var require_applyReviver = __commonJS({
|
|
|
518
519
|
}
|
|
519
520
|
});
|
|
520
521
|
|
|
521
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
522
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/toJS.js
|
|
522
523
|
var require_toJS = __commonJS({
|
|
523
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
524
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/toJS.js"(exports) {
|
|
524
525
|
"use strict";
|
|
525
526
|
var identity = require_identity();
|
|
526
527
|
function toJS(value, arg, ctx) {
|
|
@@ -548,9 +549,9 @@ var require_toJS = __commonJS({
|
|
|
548
549
|
}
|
|
549
550
|
});
|
|
550
551
|
|
|
551
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
552
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Node.js
|
|
552
553
|
var require_Node = __commonJS({
|
|
553
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
554
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Node.js"(exports) {
|
|
554
555
|
"use strict";
|
|
555
556
|
var applyReviver = require_applyReviver();
|
|
556
557
|
var identity = require_identity();
|
|
@@ -589,9 +590,9 @@ var require_Node = __commonJS({
|
|
|
589
590
|
}
|
|
590
591
|
});
|
|
591
592
|
|
|
592
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
593
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Alias.js
|
|
593
594
|
var require_Alias = __commonJS({
|
|
594
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
595
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Alias.js"(exports) {
|
|
595
596
|
"use strict";
|
|
596
597
|
var anchors = require_anchors();
|
|
597
598
|
var visit = require_visit();
|
|
@@ -691,9 +692,9 @@ var require_Alias = __commonJS({
|
|
|
691
692
|
}
|
|
692
693
|
});
|
|
693
694
|
|
|
694
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
695
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Scalar.js
|
|
695
696
|
var require_Scalar = __commonJS({
|
|
696
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
697
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Scalar.js"(exports) {
|
|
697
698
|
"use strict";
|
|
698
699
|
var identity = require_identity();
|
|
699
700
|
var Node = require_Node();
|
|
@@ -721,9 +722,9 @@ var require_Scalar = __commonJS({
|
|
|
721
722
|
}
|
|
722
723
|
});
|
|
723
724
|
|
|
724
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
725
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/createNode.js
|
|
725
726
|
var require_createNode = __commonJS({
|
|
726
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
727
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/createNode.js"(exports) {
|
|
727
728
|
"use strict";
|
|
728
729
|
var Alias = require_Alias();
|
|
729
730
|
var identity = require_identity();
|
|
@@ -797,9 +798,9 @@ var require_createNode = __commonJS({
|
|
|
797
798
|
}
|
|
798
799
|
});
|
|
799
800
|
|
|
800
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
801
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Collection.js
|
|
801
802
|
var require_Collection = __commonJS({
|
|
802
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
803
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Collection.js"(exports) {
|
|
803
804
|
"use strict";
|
|
804
805
|
var createNode = require_createNode();
|
|
805
806
|
var identity = require_identity();
|
|
@@ -941,9 +942,9 @@ var require_Collection = __commonJS({
|
|
|
941
942
|
}
|
|
942
943
|
});
|
|
943
944
|
|
|
944
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
945
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyComment.js
|
|
945
946
|
var require_stringifyComment = __commonJS({
|
|
946
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
947
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyComment.js"(exports) {
|
|
947
948
|
"use strict";
|
|
948
949
|
var stringifyComment = (str) => str.replace(/^(?!$)(?: $)?/gm, "#");
|
|
949
950
|
function indentComment(comment, indent) {
|
|
@@ -958,9 +959,9 @@ var require_stringifyComment = __commonJS({
|
|
|
958
959
|
}
|
|
959
960
|
});
|
|
960
961
|
|
|
961
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
962
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/foldFlowLines.js
|
|
962
963
|
var require_foldFlowLines = __commonJS({
|
|
963
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
964
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/foldFlowLines.js"(exports) {
|
|
964
965
|
"use strict";
|
|
965
966
|
var FOLD_FLOW = "flow";
|
|
966
967
|
var FOLD_BLOCK = "block";
|
|
@@ -1092,9 +1093,9 @@ ${indent}${text.slice(fold + 1, end2)}`;
|
|
|
1092
1093
|
}
|
|
1093
1094
|
});
|
|
1094
1095
|
|
|
1095
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1096
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyString.js
|
|
1096
1097
|
var require_stringifyString = __commonJS({
|
|
1097
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1098
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyString.js"(exports) {
|
|
1098
1099
|
"use strict";
|
|
1099
1100
|
var Scalar = require_Scalar();
|
|
1100
1101
|
var foldFlowLines = require_foldFlowLines();
|
|
@@ -1367,9 +1368,9 @@ ${indent}`);
|
|
|
1367
1368
|
}
|
|
1368
1369
|
});
|
|
1369
1370
|
|
|
1370
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1371
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringify.js
|
|
1371
1372
|
var require_stringify = __commonJS({
|
|
1372
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1373
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringify.js"(exports) {
|
|
1373
1374
|
"use strict";
|
|
1374
1375
|
var anchors = require_anchors();
|
|
1375
1376
|
var identity = require_identity();
|
|
@@ -1486,9 +1487,9 @@ ${ctx.indent}${str}`;
|
|
|
1486
1487
|
}
|
|
1487
1488
|
});
|
|
1488
1489
|
|
|
1489
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1490
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyPair.js
|
|
1490
1491
|
var require_stringifyPair = __commonJS({
|
|
1491
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1492
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyPair.js"(exports) {
|
|
1492
1493
|
"use strict";
|
|
1493
1494
|
var identity = require_identity();
|
|
1494
1495
|
var Scalar = require_Scalar();
|
|
@@ -1619,9 +1620,9 @@ ${ctx.indent}`;
|
|
|
1619
1620
|
}
|
|
1620
1621
|
});
|
|
1621
1622
|
|
|
1622
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1623
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/log.js
|
|
1623
1624
|
var require_log = __commonJS({
|
|
1624
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1625
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/log.js"(exports) {
|
|
1625
1626
|
"use strict";
|
|
1626
1627
|
function debug(logLevel, ...messages) {
|
|
1627
1628
|
if (logLevel === "debug")
|
|
@@ -1640,9 +1641,9 @@ var require_log = __commonJS({
|
|
|
1640
1641
|
}
|
|
1641
1642
|
});
|
|
1642
1643
|
|
|
1643
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1644
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/addPairToJSMap.js
|
|
1644
1645
|
var require_addPairToJSMap = __commonJS({
|
|
1645
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1646
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/addPairToJSMap.js"(exports) {
|
|
1646
1647
|
"use strict";
|
|
1647
1648
|
var log = require_log();
|
|
1648
1649
|
var stringify = require_stringify();
|
|
@@ -1734,9 +1735,9 @@ var require_addPairToJSMap = __commonJS({
|
|
|
1734
1735
|
}
|
|
1735
1736
|
});
|
|
1736
1737
|
|
|
1737
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1738
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Pair.js
|
|
1738
1739
|
var require_Pair = __commonJS({
|
|
1739
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1740
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/Pair.js"(exports) {
|
|
1740
1741
|
"use strict";
|
|
1741
1742
|
var createNode = require_createNode();
|
|
1742
1743
|
var stringifyPair = require_stringifyPair();
|
|
@@ -1774,9 +1775,9 @@ var require_Pair = __commonJS({
|
|
|
1774
1775
|
}
|
|
1775
1776
|
});
|
|
1776
1777
|
|
|
1777
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1778
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyCollection.js
|
|
1778
1779
|
var require_stringifyCollection = __commonJS({
|
|
1779
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1780
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyCollection.js"(exports) {
|
|
1780
1781
|
"use strict";
|
|
1781
1782
|
var identity = require_identity();
|
|
1782
1783
|
var stringify = require_stringify();
|
|
@@ -1918,9 +1919,9 @@ ${indent}${end}`;
|
|
|
1918
1919
|
}
|
|
1919
1920
|
});
|
|
1920
1921
|
|
|
1921
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
1922
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/YAMLMap.js
|
|
1922
1923
|
var require_YAMLMap = __commonJS({
|
|
1923
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
1924
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/YAMLMap.js"(exports) {
|
|
1924
1925
|
"use strict";
|
|
1925
1926
|
var stringifyCollection = require_stringifyCollection();
|
|
1926
1927
|
var addPairToJSMap = require_addPairToJSMap();
|
|
@@ -2062,9 +2063,9 @@ var require_YAMLMap = __commonJS({
|
|
|
2062
2063
|
}
|
|
2063
2064
|
});
|
|
2064
2065
|
|
|
2065
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2066
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/map.js
|
|
2066
2067
|
var require_map = __commonJS({
|
|
2067
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2068
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/map.js"(exports) {
|
|
2068
2069
|
"use strict";
|
|
2069
2070
|
var identity = require_identity();
|
|
2070
2071
|
var YAMLMap = require_YAMLMap();
|
|
@@ -2084,9 +2085,9 @@ var require_map = __commonJS({
|
|
|
2084
2085
|
}
|
|
2085
2086
|
});
|
|
2086
2087
|
|
|
2087
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2088
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/YAMLSeq.js
|
|
2088
2089
|
var require_YAMLSeq = __commonJS({
|
|
2089
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2090
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/nodes/YAMLSeq.js"(exports) {
|
|
2090
2091
|
"use strict";
|
|
2091
2092
|
var createNode = require_createNode();
|
|
2092
2093
|
var stringifyCollection = require_stringifyCollection();
|
|
@@ -2200,9 +2201,9 @@ var require_YAMLSeq = __commonJS({
|
|
|
2200
2201
|
}
|
|
2201
2202
|
});
|
|
2202
2203
|
|
|
2203
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2204
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/seq.js
|
|
2204
2205
|
var require_seq = __commonJS({
|
|
2205
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2206
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/seq.js"(exports) {
|
|
2206
2207
|
"use strict";
|
|
2207
2208
|
var identity = require_identity();
|
|
2208
2209
|
var YAMLSeq = require_YAMLSeq();
|
|
@@ -2222,9 +2223,9 @@ var require_seq = __commonJS({
|
|
|
2222
2223
|
}
|
|
2223
2224
|
});
|
|
2224
2225
|
|
|
2225
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2226
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/string.js
|
|
2226
2227
|
var require_string = __commonJS({
|
|
2227
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2228
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/string.js"(exports) {
|
|
2228
2229
|
"use strict";
|
|
2229
2230
|
var stringifyString = require_stringifyString();
|
|
2230
2231
|
var string = {
|
|
@@ -2241,9 +2242,9 @@ var require_string = __commonJS({
|
|
|
2241
2242
|
}
|
|
2242
2243
|
});
|
|
2243
2244
|
|
|
2244
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2245
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/null.js
|
|
2245
2246
|
var require_null = __commonJS({
|
|
2246
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2247
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/common/null.js"(exports) {
|
|
2247
2248
|
"use strict";
|
|
2248
2249
|
var Scalar = require_Scalar();
|
|
2249
2250
|
var nullTag = {
|
|
@@ -2259,9 +2260,9 @@ var require_null = __commonJS({
|
|
|
2259
2260
|
}
|
|
2260
2261
|
});
|
|
2261
2262
|
|
|
2262
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2263
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/bool.js
|
|
2263
2264
|
var require_bool = __commonJS({
|
|
2264
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2265
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/bool.js"(exports) {
|
|
2265
2266
|
"use strict";
|
|
2266
2267
|
var Scalar = require_Scalar();
|
|
2267
2268
|
var boolTag = {
|
|
@@ -2283,9 +2284,9 @@ var require_bool = __commonJS({
|
|
|
2283
2284
|
}
|
|
2284
2285
|
});
|
|
2285
2286
|
|
|
2286
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2287
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyNumber.js
|
|
2287
2288
|
var require_stringifyNumber = __commonJS({
|
|
2288
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2289
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyNumber.js"(exports) {
|
|
2289
2290
|
"use strict";
|
|
2290
2291
|
function stringifyNumber({ format, minFractionDigits, tag, value }) {
|
|
2291
2292
|
if (typeof value === "bigint")
|
|
@@ -2310,9 +2311,9 @@ var require_stringifyNumber = __commonJS({
|
|
|
2310
2311
|
}
|
|
2311
2312
|
});
|
|
2312
2313
|
|
|
2313
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2314
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/float.js
|
|
2314
2315
|
var require_float = __commonJS({
|
|
2315
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2316
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/float.js"(exports) {
|
|
2316
2317
|
"use strict";
|
|
2317
2318
|
var Scalar = require_Scalar();
|
|
2318
2319
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2356,9 +2357,9 @@ var require_float = __commonJS({
|
|
|
2356
2357
|
}
|
|
2357
2358
|
});
|
|
2358
2359
|
|
|
2359
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2360
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/int.js
|
|
2360
2361
|
var require_int = __commonJS({
|
|
2361
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2362
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/int.js"(exports) {
|
|
2362
2363
|
"use strict";
|
|
2363
2364
|
var stringifyNumber = require_stringifyNumber();
|
|
2364
2365
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2401,9 +2402,9 @@ var require_int = __commonJS({
|
|
|
2401
2402
|
}
|
|
2402
2403
|
});
|
|
2403
2404
|
|
|
2404
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2405
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/schema.js
|
|
2405
2406
|
var require_schema = __commonJS({
|
|
2406
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2407
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/core/schema.js"(exports) {
|
|
2407
2408
|
"use strict";
|
|
2408
2409
|
var map = require_map();
|
|
2409
2410
|
var _null = require_null();
|
|
@@ -2429,9 +2430,9 @@ var require_schema = __commonJS({
|
|
|
2429
2430
|
}
|
|
2430
2431
|
});
|
|
2431
2432
|
|
|
2432
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2433
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/json/schema.js
|
|
2433
2434
|
var require_schema2 = __commonJS({
|
|
2434
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2435
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/json/schema.js"(exports) {
|
|
2435
2436
|
"use strict";
|
|
2436
2437
|
var Scalar = require_Scalar();
|
|
2437
2438
|
var map = require_map();
|
|
@@ -2496,9 +2497,9 @@ var require_schema2 = __commonJS({
|
|
|
2496
2497
|
}
|
|
2497
2498
|
});
|
|
2498
2499
|
|
|
2499
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2500
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/binary.js
|
|
2500
2501
|
var require_binary = __commonJS({
|
|
2501
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2502
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/binary.js"(exports) {
|
|
2502
2503
|
"use strict";
|
|
2503
2504
|
var Scalar = require_Scalar();
|
|
2504
2505
|
var stringifyString = require_stringifyString();
|
|
@@ -2560,9 +2561,9 @@ var require_binary = __commonJS({
|
|
|
2560
2561
|
}
|
|
2561
2562
|
});
|
|
2562
2563
|
|
|
2563
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2564
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.js
|
|
2564
2565
|
var require_pairs = __commonJS({
|
|
2565
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2566
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/pairs.js"(exports) {
|
|
2566
2567
|
"use strict";
|
|
2567
2568
|
var identity = require_identity();
|
|
2568
2569
|
var Pair = require_Pair();
|
|
@@ -2638,9 +2639,9 @@ ${cn.comment}` : item.comment;
|
|
|
2638
2639
|
}
|
|
2639
2640
|
});
|
|
2640
2641
|
|
|
2641
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2642
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/omap.js
|
|
2642
2643
|
var require_omap = __commonJS({
|
|
2643
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2644
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/omap.js"(exports) {
|
|
2644
2645
|
"use strict";
|
|
2645
2646
|
var identity = require_identity();
|
|
2646
2647
|
var toJS = require_toJS();
|
|
@@ -2716,9 +2717,9 @@ var require_omap = __commonJS({
|
|
|
2716
2717
|
}
|
|
2717
2718
|
});
|
|
2718
2719
|
|
|
2719
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2720
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/bool.js
|
|
2720
2721
|
var require_bool2 = __commonJS({
|
|
2721
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2722
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/bool.js"(exports) {
|
|
2722
2723
|
"use strict";
|
|
2723
2724
|
var Scalar = require_Scalar();
|
|
2724
2725
|
function boolStringify({ value, source }, ctx) {
|
|
@@ -2739,7 +2740,7 @@ var require_bool2 = __commonJS({
|
|
|
2739
2740
|
identify: (value) => value === false,
|
|
2740
2741
|
default: true,
|
|
2741
2742
|
tag: "tag:yaml.org,2002:bool",
|
|
2742
|
-
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)
|
|
2743
|
+
test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,
|
|
2743
2744
|
resolve: () => new Scalar.Scalar(false),
|
|
2744
2745
|
stringify: boolStringify
|
|
2745
2746
|
};
|
|
@@ -2748,9 +2749,9 @@ var require_bool2 = __commonJS({
|
|
|
2748
2749
|
}
|
|
2749
2750
|
});
|
|
2750
2751
|
|
|
2751
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2752
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/float.js
|
|
2752
2753
|
var require_float2 = __commonJS({
|
|
2753
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2754
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/float.js"(exports) {
|
|
2754
2755
|
"use strict";
|
|
2755
2756
|
var Scalar = require_Scalar();
|
|
2756
2757
|
var stringifyNumber = require_stringifyNumber();
|
|
@@ -2797,9 +2798,9 @@ var require_float2 = __commonJS({
|
|
|
2797
2798
|
}
|
|
2798
2799
|
});
|
|
2799
2800
|
|
|
2800
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2801
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/int.js
|
|
2801
2802
|
var require_int2 = __commonJS({
|
|
2802
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2803
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/int.js"(exports) {
|
|
2803
2804
|
"use strict";
|
|
2804
2805
|
var stringifyNumber = require_stringifyNumber();
|
|
2805
2806
|
var intIdentify = (value) => typeof value === "bigint" || Number.isInteger(value);
|
|
@@ -2876,9 +2877,9 @@ var require_int2 = __commonJS({
|
|
|
2876
2877
|
}
|
|
2877
2878
|
});
|
|
2878
2879
|
|
|
2879
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2880
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/set.js
|
|
2880
2881
|
var require_set = __commonJS({
|
|
2881
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2882
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/set.js"(exports) {
|
|
2882
2883
|
"use strict";
|
|
2883
2884
|
var identity = require_identity();
|
|
2884
2885
|
var Pair = require_Pair();
|
|
@@ -2965,9 +2966,9 @@ var require_set = __commonJS({
|
|
|
2965
2966
|
}
|
|
2966
2967
|
});
|
|
2967
2968
|
|
|
2968
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
2969
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js
|
|
2969
2970
|
var require_timestamp = __commonJS({
|
|
2970
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
2971
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/timestamp.js"(exports) {
|
|
2971
2972
|
"use strict";
|
|
2972
2973
|
var stringifyNumber = require_stringifyNumber();
|
|
2973
2974
|
function parseSexagesimal(str, asBigInt) {
|
|
@@ -3053,9 +3054,9 @@ var require_timestamp = __commonJS({
|
|
|
3053
3054
|
}
|
|
3054
3055
|
});
|
|
3055
3056
|
|
|
3056
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3057
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/schema.js
|
|
3057
3058
|
var require_schema3 = __commonJS({
|
|
3058
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3059
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/yaml-1.1/schema.js"(exports) {
|
|
3059
3060
|
"use strict";
|
|
3060
3061
|
var map = require_map();
|
|
3061
3062
|
var _null = require_null();
|
|
@@ -3095,9 +3096,9 @@ var require_schema3 = __commonJS({
|
|
|
3095
3096
|
}
|
|
3096
3097
|
});
|
|
3097
3098
|
|
|
3098
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3099
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/tags.js
|
|
3099
3100
|
var require_tags = __commonJS({
|
|
3100
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3101
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/tags.js"(exports) {
|
|
3101
3102
|
"use strict";
|
|
3102
3103
|
var map = require_map();
|
|
3103
3104
|
var _null = require_null();
|
|
@@ -3178,9 +3179,9 @@ var require_tags = __commonJS({
|
|
|
3178
3179
|
}
|
|
3179
3180
|
});
|
|
3180
3181
|
|
|
3181
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3182
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/Schema.js
|
|
3182
3183
|
var require_Schema = __commonJS({
|
|
3183
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3184
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/schema/Schema.js"(exports) {
|
|
3184
3185
|
"use strict";
|
|
3185
3186
|
var identity = require_identity();
|
|
3186
3187
|
var map = require_map();
|
|
@@ -3211,9 +3212,9 @@ var require_Schema = __commonJS({
|
|
|
3211
3212
|
}
|
|
3212
3213
|
});
|
|
3213
3214
|
|
|
3214
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3215
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyDocument.js
|
|
3215
3216
|
var require_stringifyDocument = __commonJS({
|
|
3216
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3217
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/stringify/stringifyDocument.js"(exports) {
|
|
3217
3218
|
"use strict";
|
|
3218
3219
|
var identity = require_identity();
|
|
3219
3220
|
var stringify = require_stringify();
|
|
@@ -3291,9 +3292,9 @@ var require_stringifyDocument = __commonJS({
|
|
|
3291
3292
|
}
|
|
3292
3293
|
});
|
|
3293
3294
|
|
|
3294
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3295
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/Document.js
|
|
3295
3296
|
var require_Document = __commonJS({
|
|
3296
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3297
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/doc/Document.js"(exports) {
|
|
3297
3298
|
"use strict";
|
|
3298
3299
|
var Alias = require_Alias();
|
|
3299
3300
|
var Collection = require_Collection();
|
|
@@ -3599,9 +3600,9 @@ var require_Document = __commonJS({
|
|
|
3599
3600
|
}
|
|
3600
3601
|
});
|
|
3601
3602
|
|
|
3602
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3603
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/errors.js
|
|
3603
3604
|
var require_errors = __commonJS({
|
|
3604
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3605
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/errors.js"(exports) {
|
|
3605
3606
|
"use strict";
|
|
3606
3607
|
var YAMLError = class extends Error {
|
|
3607
3608
|
constructor(name, pos, code, message) {
|
|
@@ -3664,9 +3665,9 @@ ${pointer}
|
|
|
3664
3665
|
}
|
|
3665
3666
|
});
|
|
3666
3667
|
|
|
3667
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3668
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-props.js
|
|
3668
3669
|
var require_resolve_props = __commonJS({
|
|
3669
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3670
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-props.js"(exports) {
|
|
3670
3671
|
"use strict";
|
|
3671
3672
|
function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnNewline }) {
|
|
3672
3673
|
let spaceBefore = false;
|
|
@@ -3788,9 +3789,9 @@ var require_resolve_props = __commonJS({
|
|
|
3788
3789
|
}
|
|
3789
3790
|
});
|
|
3790
3791
|
|
|
3791
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3792
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-contains-newline.js
|
|
3792
3793
|
var require_util_contains_newline = __commonJS({
|
|
3793
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3794
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-contains-newline.js"(exports) {
|
|
3794
3795
|
"use strict";
|
|
3795
3796
|
function containsNewline(key) {
|
|
3796
3797
|
if (!key)
|
|
@@ -3830,9 +3831,9 @@ var require_util_contains_newline = __commonJS({
|
|
|
3830
3831
|
}
|
|
3831
3832
|
});
|
|
3832
3833
|
|
|
3833
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3834
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-flow-indent-check.js
|
|
3834
3835
|
var require_util_flow_indent_check = __commonJS({
|
|
3835
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3836
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-flow-indent-check.js"(exports) {
|
|
3836
3837
|
"use strict";
|
|
3837
3838
|
var utilContainsNewline = require_util_contains_newline();
|
|
3838
3839
|
function flowIndentCheck(indent, fc, onError) {
|
|
@@ -3848,9 +3849,9 @@ var require_util_flow_indent_check = __commonJS({
|
|
|
3848
3849
|
}
|
|
3849
3850
|
});
|
|
3850
3851
|
|
|
3851
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3852
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-map-includes.js
|
|
3852
3853
|
var require_util_map_includes = __commonJS({
|
|
3853
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3854
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-map-includes.js"(exports) {
|
|
3854
3855
|
"use strict";
|
|
3855
3856
|
var identity = require_identity();
|
|
3856
3857
|
function mapIncludes(ctx, items, search) {
|
|
@@ -3864,9 +3865,9 @@ var require_util_map_includes = __commonJS({
|
|
|
3864
3865
|
}
|
|
3865
3866
|
});
|
|
3866
3867
|
|
|
3867
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3868
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-block-map.js
|
|
3868
3869
|
var require_resolve_block_map = __commonJS({
|
|
3869
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3870
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-block-map.js"(exports) {
|
|
3870
3871
|
"use strict";
|
|
3871
3872
|
var Pair = require_Pair();
|
|
3872
3873
|
var YAMLMap = require_YAMLMap();
|
|
@@ -3968,9 +3969,9 @@ var require_resolve_block_map = __commonJS({
|
|
|
3968
3969
|
}
|
|
3969
3970
|
});
|
|
3970
3971
|
|
|
3971
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
3972
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-block-seq.js
|
|
3972
3973
|
var require_resolve_block_seq = __commonJS({
|
|
3973
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
3974
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-block-seq.js"(exports) {
|
|
3974
3975
|
"use strict";
|
|
3975
3976
|
var YAMLSeq = require_YAMLSeq();
|
|
3976
3977
|
var resolveProps = require_resolve_props();
|
|
@@ -4016,9 +4017,9 @@ var require_resolve_block_seq = __commonJS({
|
|
|
4016
4017
|
}
|
|
4017
4018
|
});
|
|
4018
4019
|
|
|
4019
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4020
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-end.js
|
|
4020
4021
|
var require_resolve_end = __commonJS({
|
|
4021
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4022
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-end.js"(exports) {
|
|
4022
4023
|
"use strict";
|
|
4023
4024
|
function resolveEnd(end, offset, reqSpace, onError) {
|
|
4024
4025
|
let comment = "";
|
|
@@ -4059,9 +4060,9 @@ var require_resolve_end = __commonJS({
|
|
|
4059
4060
|
}
|
|
4060
4061
|
});
|
|
4061
4062
|
|
|
4062
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4063
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-flow-collection.js
|
|
4063
4064
|
var require_resolve_flow_collection = __commonJS({
|
|
4064
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4065
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-flow-collection.js"(exports) {
|
|
4065
4066
|
"use strict";
|
|
4066
4067
|
var identity = require_identity();
|
|
4067
4068
|
var Pair = require_Pair();
|
|
@@ -4246,9 +4247,9 @@ var require_resolve_flow_collection = __commonJS({
|
|
|
4246
4247
|
}
|
|
4247
4248
|
});
|
|
4248
4249
|
|
|
4249
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4250
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-collection.js
|
|
4250
4251
|
var require_compose_collection = __commonJS({
|
|
4251
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4252
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-collection.js"(exports) {
|
|
4252
4253
|
"use strict";
|
|
4253
4254
|
var identity = require_identity();
|
|
4254
4255
|
var Scalar = require_Scalar();
|
|
@@ -4302,9 +4303,9 @@ var require_compose_collection = __commonJS({
|
|
|
4302
4303
|
}
|
|
4303
4304
|
});
|
|
4304
4305
|
|
|
4305
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4306
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-block-scalar.js
|
|
4306
4307
|
var require_resolve_block_scalar = __commonJS({
|
|
4307
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4308
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-block-scalar.js"(exports) {
|
|
4308
4309
|
"use strict";
|
|
4309
4310
|
var Scalar = require_Scalar();
|
|
4310
4311
|
function resolveBlockScalar(scalar, strict, onError) {
|
|
@@ -4479,9 +4480,9 @@ var require_resolve_block_scalar = __commonJS({
|
|
|
4479
4480
|
}
|
|
4480
4481
|
});
|
|
4481
4482
|
|
|
4482
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4483
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-flow-scalar.js
|
|
4483
4484
|
var require_resolve_flow_scalar = __commonJS({
|
|
4484
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4485
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/resolve-flow-scalar.js"(exports) {
|
|
4485
4486
|
"use strict";
|
|
4486
4487
|
var Scalar = require_Scalar();
|
|
4487
4488
|
var resolveEnd = require_resolve_end();
|
|
@@ -4696,9 +4697,9 @@ var require_resolve_flow_scalar = __commonJS({
|
|
|
4696
4697
|
}
|
|
4697
4698
|
});
|
|
4698
4699
|
|
|
4699
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4700
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-scalar.js
|
|
4700
4701
|
var require_compose_scalar = __commonJS({
|
|
4701
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4702
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-scalar.js"(exports) {
|
|
4702
4703
|
"use strict";
|
|
4703
4704
|
var identity = require_identity();
|
|
4704
4705
|
var Scalar = require_Scalar();
|
|
@@ -4769,9 +4770,9 @@ var require_compose_scalar = __commonJS({
|
|
|
4769
4770
|
}
|
|
4770
4771
|
});
|
|
4771
4772
|
|
|
4772
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4773
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-empty-scalar-position.js
|
|
4773
4774
|
var require_util_empty_scalar_position = __commonJS({
|
|
4774
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4775
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/util-empty-scalar-position.js"(exports) {
|
|
4775
4776
|
"use strict";
|
|
4776
4777
|
function emptyScalarPosition(offset, before, pos) {
|
|
4777
4778
|
if (before) {
|
|
@@ -4800,9 +4801,9 @@ var require_util_empty_scalar_position = __commonJS({
|
|
|
4800
4801
|
}
|
|
4801
4802
|
});
|
|
4802
4803
|
|
|
4803
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4804
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-node.js
|
|
4804
4805
|
var require_compose_node = __commonJS({
|
|
4805
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4806
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-node.js"(exports) {
|
|
4806
4807
|
"use strict";
|
|
4807
4808
|
var Alias = require_Alias();
|
|
4808
4809
|
var composeCollection = require_compose_collection();
|
|
@@ -4895,9 +4896,9 @@ var require_compose_node = __commonJS({
|
|
|
4895
4896
|
}
|
|
4896
4897
|
});
|
|
4897
4898
|
|
|
4898
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4899
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-doc.js
|
|
4899
4900
|
var require_compose_doc = __commonJS({
|
|
4900
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4901
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/compose-doc.js"(exports) {
|
|
4901
4902
|
"use strict";
|
|
4902
4903
|
var Document = require_Document();
|
|
4903
4904
|
var composeNode = require_compose_node();
|
|
@@ -4936,9 +4937,9 @@ var require_compose_doc = __commonJS({
|
|
|
4936
4937
|
}
|
|
4937
4938
|
});
|
|
4938
4939
|
|
|
4939
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
4940
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/composer.js
|
|
4940
4941
|
var require_composer = __commonJS({
|
|
4941
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
4942
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/compose/composer.js"(exports) {
|
|
4942
4943
|
"use strict";
|
|
4943
4944
|
var directives = require_directives();
|
|
4944
4945
|
var Document = require_Document();
|
|
@@ -5141,9 +5142,9 @@ ${end.comment}` : end.comment;
|
|
|
5141
5142
|
}
|
|
5142
5143
|
});
|
|
5143
5144
|
|
|
5144
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
5145
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst-scalar.js
|
|
5145
5146
|
var require_cst_scalar = __commonJS({
|
|
5146
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
5147
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst-scalar.js"(exports) {
|
|
5147
5148
|
"use strict";
|
|
5148
5149
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
5149
5150
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
@@ -5326,9 +5327,9 @@ var require_cst_scalar = __commonJS({
|
|
|
5326
5327
|
}
|
|
5327
5328
|
});
|
|
5328
5329
|
|
|
5329
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
5330
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst-stringify.js
|
|
5330
5331
|
var require_cst_stringify = __commonJS({
|
|
5331
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
5332
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst-stringify.js"(exports) {
|
|
5332
5333
|
"use strict";
|
|
5333
5334
|
var stringify = (cst) => "type" in cst ? stringifyToken(cst) : stringifyItem(cst);
|
|
5334
5335
|
function stringifyToken(token) {
|
|
@@ -5387,9 +5388,9 @@ var require_cst_stringify = __commonJS({
|
|
|
5387
5388
|
}
|
|
5388
5389
|
});
|
|
5389
5390
|
|
|
5390
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
5391
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst-visit.js
|
|
5391
5392
|
var require_cst_visit = __commonJS({
|
|
5392
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
5393
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst-visit.js"(exports) {
|
|
5393
5394
|
"use strict";
|
|
5394
5395
|
var BREAK = Symbol("break visit");
|
|
5395
5396
|
var SKIP = Symbol("skip children");
|
|
@@ -5449,9 +5450,9 @@ var require_cst_visit = __commonJS({
|
|
|
5449
5450
|
}
|
|
5450
5451
|
});
|
|
5451
5452
|
|
|
5452
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
5453
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst.js
|
|
5453
5454
|
var require_cst = __commonJS({
|
|
5454
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
5455
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/cst.js"(exports) {
|
|
5455
5456
|
"use strict";
|
|
5456
5457
|
var cstScalar = require_cst_scalar();
|
|
5457
5458
|
var cstStringify = require_cst_stringify();
|
|
@@ -5551,9 +5552,9 @@ var require_cst = __commonJS({
|
|
|
5551
5552
|
}
|
|
5552
5553
|
});
|
|
5553
5554
|
|
|
5554
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
5555
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/lexer.js
|
|
5555
5556
|
var require_lexer = __commonJS({
|
|
5556
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
5557
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/lexer.js"(exports) {
|
|
5557
5558
|
"use strict";
|
|
5558
5559
|
var cst = require_cst();
|
|
5559
5560
|
function isEmpty(ch) {
|
|
@@ -6114,9 +6115,9 @@ var require_lexer = __commonJS({
|
|
|
6114
6115
|
}
|
|
6115
6116
|
});
|
|
6116
6117
|
|
|
6117
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
6118
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/line-counter.js
|
|
6118
6119
|
var require_line_counter = __commonJS({
|
|
6119
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
6120
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/line-counter.js"(exports) {
|
|
6120
6121
|
"use strict";
|
|
6121
6122
|
var LineCounter = class {
|
|
6122
6123
|
constructor() {
|
|
@@ -6145,9 +6146,9 @@ var require_line_counter = __commonJS({
|
|
|
6145
6146
|
}
|
|
6146
6147
|
});
|
|
6147
6148
|
|
|
6148
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
6149
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/parser.js
|
|
6149
6150
|
var require_parser = __commonJS({
|
|
6150
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
6151
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/parse/parser.js"(exports) {
|
|
6151
6152
|
"use strict";
|
|
6152
6153
|
var cst = require_cst();
|
|
6153
6154
|
var lexer = require_lexer();
|
|
@@ -6706,14 +6707,14 @@ var require_parser = __commonJS({
|
|
|
6706
6707
|
case "scalar":
|
|
6707
6708
|
case "single-quoted-scalar":
|
|
6708
6709
|
case "double-quoted-scalar": {
|
|
6709
|
-
const
|
|
6710
|
+
const fs6 = this.flowScalar(this.type);
|
|
6710
6711
|
if (atNextItem || it.value) {
|
|
6711
|
-
map.items.push({ start, key:
|
|
6712
|
+
map.items.push({ start, key: fs6, sep: [] });
|
|
6712
6713
|
this.onKeyLine = true;
|
|
6713
6714
|
} else if (it.sep) {
|
|
6714
|
-
this.stack.push(
|
|
6715
|
+
this.stack.push(fs6);
|
|
6715
6716
|
} else {
|
|
6716
|
-
Object.assign(it, { key:
|
|
6717
|
+
Object.assign(it, { key: fs6, sep: [] });
|
|
6717
6718
|
this.onKeyLine = true;
|
|
6718
6719
|
}
|
|
6719
6720
|
return;
|
|
@@ -6831,13 +6832,13 @@ var require_parser = __commonJS({
|
|
|
6831
6832
|
case "scalar":
|
|
6832
6833
|
case "single-quoted-scalar":
|
|
6833
6834
|
case "double-quoted-scalar": {
|
|
6834
|
-
const
|
|
6835
|
+
const fs6 = this.flowScalar(this.type);
|
|
6835
6836
|
if (!it || it.value)
|
|
6836
|
-
fc.items.push({ start: [], key:
|
|
6837
|
+
fc.items.push({ start: [], key: fs6, sep: [] });
|
|
6837
6838
|
else if (it.sep)
|
|
6838
|
-
this.stack.push(
|
|
6839
|
+
this.stack.push(fs6);
|
|
6839
6840
|
else
|
|
6840
|
-
Object.assign(it, { key:
|
|
6841
|
+
Object.assign(it, { key: fs6, sep: [] });
|
|
6841
6842
|
return;
|
|
6842
6843
|
}
|
|
6843
6844
|
case "flow-map-end":
|
|
@@ -6995,9 +6996,9 @@ var require_parser = __commonJS({
|
|
|
6995
6996
|
}
|
|
6996
6997
|
});
|
|
6997
6998
|
|
|
6998
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
6999
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/public-api.js
|
|
6999
7000
|
var require_public_api = __commonJS({
|
|
7000
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
7001
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/public-api.js"(exports) {
|
|
7001
7002
|
"use strict";
|
|
7002
7003
|
var composer = require_composer();
|
|
7003
7004
|
var Document = require_Document();
|
|
@@ -7089,9 +7090,9 @@ var require_public_api = __commonJS({
|
|
|
7089
7090
|
}
|
|
7090
7091
|
});
|
|
7091
7092
|
|
|
7092
|
-
// ../../node_modules/.pnpm/yaml@2.4.
|
|
7093
|
+
// ../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/index.js
|
|
7093
7094
|
var require_dist = __commonJS({
|
|
7094
|
-
"../../node_modules/.pnpm/yaml@2.4.
|
|
7095
|
+
"../../node_modules/.pnpm/yaml@2.4.2/node_modules/yaml/dist/index.js"(exports) {
|
|
7095
7096
|
"use strict";
|
|
7096
7097
|
var composer = require_composer();
|
|
7097
7098
|
var Document = require_Document();
|
|
@@ -7238,7 +7239,7 @@ async function mergeViteConfigs({ roots, entry }, viteConfig, config, command) {
|
|
|
7238
7239
|
import { join as join8 } from "node:path";
|
|
7239
7240
|
import { existsSync as existsSync5 } from "node:fs";
|
|
7240
7241
|
import process2 from "node:process";
|
|
7241
|
-
import { fileURLToPath } from "node:url";
|
|
7242
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
7242
7243
|
import Icons from "unplugin-icons/vite";
|
|
7243
7244
|
import IconsResolver from "unplugin-icons/resolver";
|
|
7244
7245
|
import Components from "unplugin-vue-components/vite";
|
|
@@ -7298,80 +7299,74 @@ ${value}
|
|
|
7298
7299
|
|
|
7299
7300
|
// node/vite/extendConfig.ts
|
|
7300
7301
|
import { join as join3 } from "node:path";
|
|
7302
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7301
7303
|
import { mergeConfig as mergeConfig2 } from "vite";
|
|
7302
|
-
import
|
|
7303
|
-
import {
|
|
7304
|
-
|
|
7305
|
-
|
|
7306
|
-
|
|
7307
|
-
"@
|
|
7308
|
-
"@
|
|
7309
|
-
"@
|
|
7310
|
-
"
|
|
7311
|
-
"
|
|
7312
|
-
"
|
|
7313
|
-
"
|
|
7314
|
-
"
|
|
7315
|
-
"
|
|
7316
|
-
"
|
|
7317
|
-
"
|
|
7318
|
-
"
|
|
7319
|
-
"
|
|
7320
|
-
"
|
|
7321
|
-
|
|
7322
|
-
|
|
7323
|
-
|
|
7324
|
-
"
|
|
7325
|
-
"floating-vue": "^5.2.2",
|
|
7326
|
-
"fuse.js": "^7.0.0",
|
|
7327
|
-
katex: "^0.16.10",
|
|
7328
|
-
"lz-string": "^1.5.0",
|
|
7329
|
-
mermaid: "^10.9.0",
|
|
7330
|
-
"monaco-editor": "^0.47.0",
|
|
7331
|
-
prettier: "^3.2.5",
|
|
7332
|
-
recordrtc: "^5.6.2",
|
|
7333
|
-
shiki: "^1.3.0",
|
|
7334
|
-
"shiki-magic-move": "^0.3.5",
|
|
7335
|
-
typescript: "^5.4.5",
|
|
7336
|
-
unocss: "^0.59.2",
|
|
7337
|
-
vue: "^3.4.21",
|
|
7338
|
-
"vue-demi": "^0.14.7",
|
|
7339
|
-
"vue-router": "^4.3.0",
|
|
7340
|
-
yaml: "^2.4.1"
|
|
7341
|
-
};
|
|
7342
|
-
|
|
7343
|
-
// node/vite/extendConfig.ts
|
|
7344
|
-
var INCLUDE = [
|
|
7345
|
-
...Object.keys(dependencies),
|
|
7346
|
-
// CodeMirror
|
|
7304
|
+
import { slash, uniq } from "@antfu/utils";
|
|
7305
|
+
import { createResolve } from "mlly";
|
|
7306
|
+
var INCLUDE_GLOBAL = [
|
|
7307
|
+
"@shikijs/monaco",
|
|
7308
|
+
"@shikijs/vitepress-twoslash/client",
|
|
7309
|
+
"@slidev/rough-notation",
|
|
7310
|
+
"@typescript/ata",
|
|
7311
|
+
"@unhead/vue",
|
|
7312
|
+
"drauu",
|
|
7313
|
+
"file-saver",
|
|
7314
|
+
"floating-vue",
|
|
7315
|
+
"fuse.js",
|
|
7316
|
+
"lz-string",
|
|
7317
|
+
"prettier",
|
|
7318
|
+
"recordrtc",
|
|
7319
|
+
"typescript",
|
|
7320
|
+
"vue-router",
|
|
7321
|
+
"yaml",
|
|
7322
|
+
"shiki-magic-move/vue"
|
|
7323
|
+
];
|
|
7324
|
+
var INCLUDE_LOCAL = [
|
|
7325
|
+
...INCLUDE_GLOBAL,
|
|
7326
|
+
"codemirror",
|
|
7347
7327
|
"codemirror/mode/javascript/javascript",
|
|
7348
7328
|
"codemirror/mode/css/css",
|
|
7349
7329
|
"codemirror/mode/markdown/markdown",
|
|
7350
7330
|
"codemirror/mode/xml/xml",
|
|
7351
7331
|
"codemirror/mode/htmlmixed/htmlmixed",
|
|
7352
7332
|
"codemirror/addon/display/placeholder",
|
|
7353
|
-
|
|
7354
|
-
"monaco-editor/esm/vs/editor/standalone/browser/standaloneServices",
|
|
7333
|
+
"monaco-editor",
|
|
7355
7334
|
"monaco-editor/esm/vs/platform/contextview/browser/contextViewService",
|
|
7356
7335
|
"monaco-editor/esm/vs/platform/instantiation/common/descriptors",
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
var EXCLUDE = [
|
|
7361
|
-
"@slidev/shared",
|
|
7336
|
+
"monaco-editor/esm/vs/editor/standalone/browser/standaloneServices"
|
|
7337
|
+
].map((i) => `@slidev/cli > @slidev/client > ${i}`);
|
|
7338
|
+
var EXCLUDE_GLOBAL = [
|
|
7362
7339
|
"@slidev/types",
|
|
7363
7340
|
"@slidev/client",
|
|
7364
7341
|
"@slidev/client/constants",
|
|
7365
7342
|
"@slidev/client/logic/dark",
|
|
7343
|
+
"@antfu/utils",
|
|
7366
7344
|
"@vueuse/core",
|
|
7367
7345
|
"@vueuse/math",
|
|
7368
7346
|
"@vueuse/shared",
|
|
7347
|
+
"@vueuse/motion",
|
|
7369
7348
|
"@unocss/reset",
|
|
7370
|
-
"unocss",
|
|
7371
7349
|
"mermaid",
|
|
7372
7350
|
"vue-demi",
|
|
7373
|
-
"vue"
|
|
7374
|
-
|
|
7351
|
+
"vue"
|
|
7352
|
+
];
|
|
7353
|
+
var EXCLUDE_LOCAL = [
|
|
7354
|
+
...EXCLUDE_GLOBAL,
|
|
7355
|
+
...[
|
|
7356
|
+
"@slidev/client",
|
|
7357
|
+
"@slidev/client/constants",
|
|
7358
|
+
"@slidev/client/logic/dark",
|
|
7359
|
+
"@slidev/client > @antfu/utils",
|
|
7360
|
+
"@slidev/client > @slidev/types",
|
|
7361
|
+
"@slidev/client > @vueuse/core",
|
|
7362
|
+
"@slidev/client > @vueuse/math",
|
|
7363
|
+
"@slidev/client > @vueuse/shared",
|
|
7364
|
+
"@slidev/client > @vueuse/motion",
|
|
7365
|
+
"@slidev/client > @unocss/reset",
|
|
7366
|
+
"@slidev/client > mermaid",
|
|
7367
|
+
"@slidev/client > vue-demi",
|
|
7368
|
+
"@slidev/client > vue"
|
|
7369
|
+
].map((i) => `@slidev/cli > ${i}`)
|
|
7375
7370
|
];
|
|
7376
7371
|
var ASYNC_MODULES = [
|
|
7377
7372
|
"file-saver",
|
|
@@ -7379,6 +7374,11 @@ var ASYNC_MODULES = [
|
|
|
7379
7374
|
"@vue"
|
|
7380
7375
|
];
|
|
7381
7376
|
function createConfigPlugin(options) {
|
|
7377
|
+
const resolveClientDep = createResolve({
|
|
7378
|
+
// Same as Vite's default resolve conditions
|
|
7379
|
+
conditions: ["import", "module", "browser", "default", options.mode === "build" ? "production" : "development"],
|
|
7380
|
+
url: pathToFileURL(options.clientRoot)
|
|
7381
|
+
});
|
|
7382
7382
|
return {
|
|
7383
7383
|
name: "slidev:config",
|
|
7384
7384
|
async config(config) {
|
|
@@ -7401,13 +7401,21 @@ function createConfigPlugin(options) {
|
|
|
7401
7401
|
{
|
|
7402
7402
|
find: "vue",
|
|
7403
7403
|
replacement: await resolveImportPath("vue/dist/vue.esm-bundler.js", true)
|
|
7404
|
-
}
|
|
7404
|
+
},
|
|
7405
|
+
...isInstalledGlobally.value ? await Promise.all(INCLUDE_GLOBAL.map(async (dep) => ({
|
|
7406
|
+
find: dep,
|
|
7407
|
+
replacement: fileURLToPath(await resolveClientDep(dep))
|
|
7408
|
+
}))) : []
|
|
7405
7409
|
],
|
|
7406
7410
|
dedupe: ["vue"]
|
|
7407
7411
|
},
|
|
7408
|
-
optimizeDeps: {
|
|
7409
|
-
exclude:
|
|
7410
|
-
include:
|
|
7412
|
+
optimizeDeps: isInstalledGlobally.value ? {
|
|
7413
|
+
exclude: EXCLUDE_GLOBAL,
|
|
7414
|
+
include: INCLUDE_GLOBAL
|
|
7415
|
+
} : {
|
|
7416
|
+
// We need to specify the full deps path for non-hoisted modules
|
|
7417
|
+
exclude: EXCLUDE_LOCAL,
|
|
7418
|
+
include: INCLUDE_LOCAL
|
|
7411
7419
|
},
|
|
7412
7420
|
css: options.data.config.css === "unocss" ? {
|
|
7413
7421
|
postcss: {
|
|
@@ -7421,8 +7429,9 @@ function createConfigPlugin(options) {
|
|
|
7421
7429
|
strict: true,
|
|
7422
7430
|
allow: uniq([
|
|
7423
7431
|
options.userWorkspaceRoot,
|
|
7424
|
-
options.cliRoot,
|
|
7425
7432
|
options.clientRoot,
|
|
7433
|
+
// Special case for PNPM global installation
|
|
7434
|
+
isInstalledGlobally.value ? slash(options.cliRoot).replace(/\/\.pnpm\/.*$/ig, "") : options.cliRoot,
|
|
7426
7435
|
...options.roots
|
|
7427
7436
|
])
|
|
7428
7437
|
}
|
|
@@ -7459,7 +7468,7 @@ function createConfigPlugin(options) {
|
|
|
7459
7468
|
function isSlidevClient(id) {
|
|
7460
7469
|
return id.includes("/@slidev/") || id.includes("/slidev/packages/client/") || id.includes("/@vueuse/");
|
|
7461
7470
|
}
|
|
7462
|
-
if (isInstalledGlobally) {
|
|
7471
|
+
if (isInstalledGlobally.value) {
|
|
7463
7472
|
injection.cacheDir = join3(options.cliRoot, "node_modules/.vite");
|
|
7464
7473
|
injection.root = options.cliRoot;
|
|
7465
7474
|
}
|
|
@@ -7496,12 +7505,10 @@ function getDefine(options) {
|
|
|
7496
7505
|
|
|
7497
7506
|
// node/vite/loaders.ts
|
|
7498
7507
|
import path from "node:path";
|
|
7499
|
-
import { isString as isString2, isTruthy
|
|
7508
|
+
import { isString as isString2, isTruthy, notNullish, range } from "@antfu/utils";
|
|
7500
7509
|
import fg3 from "fast-glob";
|
|
7501
|
-
import fs4 from "fs-extra";
|
|
7502
7510
|
import Markdown from "markdown-it";
|
|
7503
7511
|
import { bold, gray, red, yellow } from "kolorist";
|
|
7504
|
-
import mila from "markdown-it-link-attributes";
|
|
7505
7512
|
import * as parser from "@slidev/parser/fs";
|
|
7506
7513
|
import equal from "fast-deep-equal";
|
|
7507
7514
|
|
|
@@ -7635,83 +7642,55 @@ ${Object.entries(layouts).map(([k, v]) => `"${k}": ${v}`).join(",\n")}
|
|
|
7635
7642
|
}
|
|
7636
7643
|
};
|
|
7637
7644
|
|
|
7638
|
-
// node/virtual/monaco-
|
|
7639
|
-
import {
|
|
7640
|
-
import { join as join5, resolve as resolve2 } from "node:path";
|
|
7641
|
-
import fg2 from "fast-glob";
|
|
7645
|
+
// node/virtual/monaco-deps.ts
|
|
7646
|
+
import { resolve as resolve2 } from "node:path";
|
|
7642
7647
|
import { uniq as uniq2 } from "@antfu/utils";
|
|
7643
|
-
|
|
7644
|
-
|
|
7645
|
-
|
|
7646
|
-
|
|
7647
|
-
function transformMonaco(ctx, enabled = true) {
|
|
7648
|
-
if (!enabled) {
|
|
7649
|
-
ctx.s.replace(/{monaco([\w:,-]*)}/g, "");
|
|
7650
|
-
return;
|
|
7651
|
-
}
|
|
7652
|
-
ctx.s.replace(
|
|
7653
|
-
/^```(\w+?)\s*{monaco-diff}\s*?({.*?})?\s*?\n([\s\S]+?)^~~~\s*?\n([\s\S]+?)^```/mg,
|
|
7654
|
-
(full, lang = "ts", options = "{}", code, diff, index) => {
|
|
7655
|
-
lang = lang.trim();
|
|
7656
|
-
options = options.trim() || "{}";
|
|
7657
|
-
const encoded = lz.compressToBase64(code);
|
|
7658
|
-
const encodedDiff = lz.compressToBase64(diff);
|
|
7659
|
-
ctx.ignores.push([index, index + full.length]);
|
|
7660
|
-
return `<Monaco code-lz="${encoded}" diff-lz="${encodedDiff}" lang="${lang}" v-bind="${options}" />`;
|
|
7661
|
-
}
|
|
7662
|
-
);
|
|
7663
|
-
ctx.s.replace(
|
|
7664
|
-
/^```(\w+?)\s*{monaco}\s*?({.*?})?\s*?\n([\s\S]+?)^```/mg,
|
|
7665
|
-
(full, lang = "ts", options = "{}", code, index) => {
|
|
7666
|
-
lang = lang.trim();
|
|
7667
|
-
options = options.trim() || "{}";
|
|
7668
|
-
const encoded = lz.compressToBase64(code);
|
|
7669
|
-
ctx.ignores.push([index, index + full.length]);
|
|
7670
|
-
return `<Monaco code-lz="${encoded}" lang="${lang}" v-bind="${options}" />`;
|
|
7671
|
-
}
|
|
7672
|
-
);
|
|
7673
|
-
ctx.s.replace(
|
|
7674
|
-
/^```(\w+?)\s*{monaco-run}\s*?({.*?})?\s*?\n([\s\S]+?)^```/mg,
|
|
7675
|
-
(full, lang = "ts", options = "{}", code, index) => {
|
|
7676
|
-
lang = lang.trim();
|
|
7677
|
-
options = options.trim() || "{}";
|
|
7678
|
-
const encoded = lz.compressToBase64(code);
|
|
7679
|
-
ctx.ignores.push([index, index + full.length]);
|
|
7680
|
-
return `<Monaco runnable code-lz="${encoded}" lang="${lang}" v-bind="${options}" />`;
|
|
7681
|
-
}
|
|
7682
|
-
);
|
|
7683
|
-
}
|
|
7684
|
-
function scanMonacoModules(md2) {
|
|
7685
|
-
const typeModules = /* @__PURE__ */ new Set();
|
|
7686
|
-
md2.replace(
|
|
7687
|
-
/^```(\w+?)\s*{monaco([\w:,-]*)}[\s\n]*([\s\S]+?)^```/mg,
|
|
7688
|
-
(full, lang = "ts", options, code) => {
|
|
7689
|
-
options = options || "";
|
|
7690
|
-
lang = lang.trim();
|
|
7691
|
-
if (lang === "ts" || lang === "typescript") {
|
|
7692
|
-
Array.from(code.matchAll(/\s+from\s+(["'])([\/\w@-]+)\1/g)).map((i) => i[2]).filter(isTruthy).map((i) => typeModules.add(i));
|
|
7693
|
-
}
|
|
7648
|
+
var templateMonacoRunDeps = {
|
|
7649
|
+
id: "/@slidev/monaco-run-deps",
|
|
7650
|
+
getContent: async ({ userRoot, data }, _ctx, pluginCtx) => {
|
|
7651
|
+
if (!data.features.monaco)
|
|
7694
7652
|
return "";
|
|
7653
|
+
const deps = uniq2(data.features.monaco.deps.concat(data.config.monacoTypesAdditionalPackages));
|
|
7654
|
+
const importerPath = resolve2(userRoot, "./snippets/__importer__.ts");
|
|
7655
|
+
let result = "";
|
|
7656
|
+
for (let i = 0; i < deps.length; i++) {
|
|
7657
|
+
const specifier = deps[i];
|
|
7658
|
+
const resolved = await pluginCtx.resolve(specifier, importerPath);
|
|
7659
|
+
if (!resolved)
|
|
7660
|
+
continue;
|
|
7661
|
+
result += `import * as vendored${i} from ${JSON.stringify(resolved.id)}
|
|
7662
|
+
`;
|
|
7695
7663
|
}
|
|
7696
|
-
|
|
7697
|
-
|
|
7698
|
-
}
|
|
7664
|
+
result += "export default {\n";
|
|
7665
|
+
for (let i = 0; i < deps.length; i++)
|
|
7666
|
+
result += `${JSON.stringify(deps[i])}: vendored${i},
|
|
7667
|
+
`;
|
|
7668
|
+
result += "}\n";
|
|
7669
|
+
return result;
|
|
7670
|
+
}
|
|
7671
|
+
};
|
|
7699
7672
|
|
|
7700
7673
|
// node/virtual/monaco-types.ts
|
|
7674
|
+
import { builtinModules } from "node:module";
|
|
7675
|
+
import { join as join5, resolve as resolve3 } from "node:path";
|
|
7676
|
+
import fg2 from "fast-glob";
|
|
7677
|
+
import { uniq as uniq3 } from "@antfu/utils";
|
|
7701
7678
|
var templateMonacoTypes = {
|
|
7702
7679
|
id: "/@slidev/monaco-types",
|
|
7703
7680
|
getContent: async ({ userRoot, data }) => {
|
|
7681
|
+
if (!data.features.monaco)
|
|
7682
|
+
return "";
|
|
7704
7683
|
const typesRoot = join5(userRoot, "snippets");
|
|
7705
7684
|
const files = await fg2(["**/*.ts", "**/*.mts", "**/*.cts"], { cwd: typesRoot });
|
|
7706
7685
|
let result = 'import { addFile } from "@slidev/client/setup/monaco.ts"\n';
|
|
7707
7686
|
for (const file of files) {
|
|
7708
|
-
const url = `${toAtFS(
|
|
7687
|
+
const url = `${toAtFS(resolve3(typesRoot, file))}?monaco-types&raw`;
|
|
7709
7688
|
result += `addFile(import(${JSON.stringify(url)}), ${JSON.stringify(file)})
|
|
7710
7689
|
`;
|
|
7711
7690
|
}
|
|
7712
7691
|
const deps = [...data.config.monacoTypesAdditionalPackages];
|
|
7713
7692
|
if (data.config.monacoTypesSource === "local")
|
|
7714
|
-
deps.push(...
|
|
7693
|
+
deps.push(...data.features.monaco.types);
|
|
7715
7694
|
function mapModuleNameToModule(moduleSpecifier) {
|
|
7716
7695
|
if (moduleSpecifier.startsWith("node:"))
|
|
7717
7696
|
return "node";
|
|
@@ -7724,7 +7703,7 @@ var templateMonacoTypes = {
|
|
|
7724
7703
|
const moduleName = a.startsWith("@") ? `${a}/${b}` : a;
|
|
7725
7704
|
return moduleName;
|
|
7726
7705
|
}
|
|
7727
|
-
for (const specifier of
|
|
7706
|
+
for (const specifier of uniq3(deps)) {
|
|
7728
7707
|
if (specifier[0] === ".")
|
|
7729
7708
|
continue;
|
|
7730
7709
|
const moduleName = mapModuleNameToModule(specifier);
|
|
@@ -7965,6 +7944,7 @@ var templateTitleRenderer = {
|
|
|
7965
7944
|
var templates = [
|
|
7966
7945
|
templateShiki,
|
|
7967
7946
|
templateMonacoTypes,
|
|
7947
|
+
templateMonacoRunDeps,
|
|
7968
7948
|
templateConfigs,
|
|
7969
7949
|
templateStyle,
|
|
7970
7950
|
templateGlobalBottom,
|
|
@@ -7980,6 +7960,30 @@ var templates = [
|
|
|
7980
7960
|
templateLegacyTitles
|
|
7981
7961
|
];
|
|
7982
7962
|
|
|
7963
|
+
// node/syntax/markdown-it/markdown-it-link.ts
|
|
7964
|
+
function markdownItLink(md2) {
|
|
7965
|
+
const defaultRender = md2.renderer.rules.link_open ?? ((tokens, idx, options, _env, self) => self.renderToken(tokens, idx, options));
|
|
7966
|
+
md2.renderer.rules.link_open = function(tokens, idx, options, env, self) {
|
|
7967
|
+
const token = tokens[idx];
|
|
7968
|
+
const hrefIndex = token.attrIndex("href");
|
|
7969
|
+
const attr = token.attrs?.[hrefIndex];
|
|
7970
|
+
const href = attr?.[1] ?? "";
|
|
7971
|
+
if ("./#".includes(href[0]) || /^\d+$/.test(href)) {
|
|
7972
|
+
token.tag = "Link";
|
|
7973
|
+
attr[0] = "to";
|
|
7974
|
+
for (let i = idx + 1; i < tokens.length; i++) {
|
|
7975
|
+
if (tokens[i].type === "link_close") {
|
|
7976
|
+
tokens[i].tag = "Link";
|
|
7977
|
+
break;
|
|
7978
|
+
}
|
|
7979
|
+
}
|
|
7980
|
+
} else if (token.attrGet("target") == null) {
|
|
7981
|
+
token.attrPush(["target", "_blank"]);
|
|
7982
|
+
}
|
|
7983
|
+
return defaultRender(tokens, idx, options, env, self);
|
|
7984
|
+
};
|
|
7985
|
+
}
|
|
7986
|
+
|
|
7983
7987
|
// node/vite/loaders.ts
|
|
7984
7988
|
var regexId = /^\/\@slidev\/slide\/(\d+)\.(md|json)(?:\?import)?$/;
|
|
7985
7989
|
var regexIdQuery = /(\d+?)\.(md|json|frontmatter)$/;
|
|
@@ -7991,13 +7995,13 @@ var templateImportContextUtils = `import {
|
|
|
7991
7995
|
} from "@slidev/client/context.ts"`.replace(/\n\s*/g, " ");
|
|
7992
7996
|
var templateInitContext = `const { $slidev, $nav, $clicksContext, $clicks, $page, $renderContext, $frontmatter } = useSlideContext()`;
|
|
7993
7997
|
function getBodyJson(req) {
|
|
7994
|
-
return new Promise((
|
|
7998
|
+
return new Promise((resolve5, reject) => {
|
|
7995
7999
|
let body = "";
|
|
7996
8000
|
req.on("data", (chunk) => body += chunk);
|
|
7997
8001
|
req.on("error", reject);
|
|
7998
8002
|
req.on("end", () => {
|
|
7999
8003
|
try {
|
|
8000
|
-
|
|
8004
|
+
resolve5(JSON.parse(body) || {});
|
|
8001
8005
|
} catch (e) {
|
|
8002
8006
|
reject(e);
|
|
8003
8007
|
}
|
|
@@ -8005,12 +8009,7 @@ function getBodyJson(req) {
|
|
|
8005
8009
|
});
|
|
8006
8010
|
}
|
|
8007
8011
|
var md = Markdown({ html: true });
|
|
8008
|
-
md.use(
|
|
8009
|
-
attrs: {
|
|
8010
|
-
target: "_blank",
|
|
8011
|
-
rel: "noopener"
|
|
8012
|
-
}
|
|
8013
|
-
});
|
|
8012
|
+
md.use(markdownItLink);
|
|
8014
8013
|
function renderNote(text = "") {
|
|
8015
8014
|
let clickCount = 0;
|
|
8016
8015
|
const html = md.render(
|
|
@@ -8033,7 +8032,7 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8033
8032
|
let _layouts_cache_time = 0;
|
|
8034
8033
|
let _layouts_cache = {};
|
|
8035
8034
|
let skipHmr = null;
|
|
8036
|
-
const { data, clientRoot,
|
|
8035
|
+
const { data, clientRoot, roots, mode } = options;
|
|
8037
8036
|
const templateCtx = {
|
|
8038
8037
|
md,
|
|
8039
8038
|
async getLayouts() {
|
|
@@ -8108,17 +8107,6 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8108
8107
|
}
|
|
8109
8108
|
next();
|
|
8110
8109
|
});
|
|
8111
|
-
const snippetsPath = path.resolve(userRoot, "snippets/__importer__.ts");
|
|
8112
|
-
server.middlewares.use(async (req, res, next) => {
|
|
8113
|
-
const match = req.url?.match(/^\/\@slidev\/resolve-id\?specifier=(.*)$/);
|
|
8114
|
-
if (!match)
|
|
8115
|
-
return next();
|
|
8116
|
-
const [, specifier] = match;
|
|
8117
|
-
const resolved = await server.pluginContainer.resolveId(specifier, snippetsPath);
|
|
8118
|
-
res.statusCode = 200;
|
|
8119
|
-
res.write(resolved?.id ?? "");
|
|
8120
|
-
return res.end();
|
|
8121
|
-
});
|
|
8122
8110
|
},
|
|
8123
8111
|
async handleHotUpdate(ctx) {
|
|
8124
8112
|
if (!data.watchFiles.includes(ctx.file))
|
|
@@ -8151,14 +8139,7 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8151
8139
|
for (let i = 0; i < length; i++) {
|
|
8152
8140
|
const a = data.slides[i];
|
|
8153
8141
|
const b = newData.slides[i];
|
|
8154
|
-
if (!hmrPages.has(i) && a.content.trim() === b.content.trim() && a.title?.trim() === b.title?.trim() && equal(a.frontmatter, b.frontmatter)
|
|
8155
|
-
try {
|
|
8156
|
-
const newContent = fs4.readFileSync(file, "utf-8");
|
|
8157
|
-
return oldContent === newContent;
|
|
8158
|
-
} catch {
|
|
8159
|
-
return false;
|
|
8160
|
-
}
|
|
8161
|
-
})) {
|
|
8142
|
+
if (!hmrPages.has(i) && a.content.trim() === b.content.trim() && a.title?.trim() === b.title?.trim() && equal(a.frontmatter, b.frontmatter)) {
|
|
8162
8143
|
if (a.note !== b.note) {
|
|
8163
8144
|
ctx.server.hot.send(
|
|
8164
8145
|
"slidev:update-note",
|
|
@@ -8183,12 +8164,20 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8183
8164
|
Object.assign(data, newData);
|
|
8184
8165
|
if (hmrPages.size > 0)
|
|
8185
8166
|
moduleIds.add(templateTitleRendererMd.id);
|
|
8186
|
-
const vueModules = Array.from(hmrPages).flatMap((i) =>
|
|
8187
|
-
|
|
8188
|
-
ctx.server.moduleGraph.getModuleById(`${
|
|
8189
|
-
|
|
8167
|
+
const vueModules = Array.from(hmrPages).flatMap((i) => {
|
|
8168
|
+
const id = `${VIRTUAL_SLIDE_PREFIX}${i + 1}`;
|
|
8169
|
+
const frontmatter = ctx.server.moduleGraph.getModuleById(`${id}.frontmatter`);
|
|
8170
|
+
const main = ctx.server.moduleGraph.getModuleById(`${id}.md`);
|
|
8171
|
+
const styles = main ? [...main.clientImportedModules].find((m) => m.id?.startsWith(`${id}.md?vue&type=style`)) : void 0;
|
|
8172
|
+
return [
|
|
8173
|
+
frontmatter,
|
|
8174
|
+
main,
|
|
8175
|
+
styles
|
|
8176
|
+
];
|
|
8177
|
+
});
|
|
8190
8178
|
hmrPages.clear();
|
|
8191
8179
|
const moduleEntries = [
|
|
8180
|
+
...ctx.modules.filter((i) => i.id === templateMonacoRunDeps.id || i.id === templateMonacoTypes.id),
|
|
8192
8181
|
...vueModules,
|
|
8193
8182
|
...Array.from(moduleIds).map((id) => ctx.server.moduleGraph.getModuleById(id))
|
|
8194
8183
|
].filter(notNullish).filter((i) => !i.id?.startsWith("/@id/@vite-icons"));
|
|
@@ -8196,7 +8185,7 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8196
8185
|
return moduleEntries;
|
|
8197
8186
|
},
|
|
8198
8187
|
resolveId(id) {
|
|
8199
|
-
if (id.startsWith(
|
|
8188
|
+
if (id.startsWith("/@slidev/"))
|
|
8200
8189
|
return id;
|
|
8201
8190
|
return null;
|
|
8202
8191
|
},
|
|
@@ -8204,7 +8193,7 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8204
8193
|
const template = templates.find((i) => i.id === id);
|
|
8205
8194
|
if (template) {
|
|
8206
8195
|
return {
|
|
8207
|
-
code: await template.getContent(options, templateCtx),
|
|
8196
|
+
code: await template.getContent(options, templateCtx, this),
|
|
8208
8197
|
map: { mappings: "" }
|
|
8209
8198
|
};
|
|
8210
8199
|
}
|
|
@@ -8344,7 +8333,7 @@ function createSlidesLoader(options, pluginOptions, serverOptions) {
|
|
|
8344
8333
|
content: Array.isArray(keywords) ? keywords.join(", ") : keywords
|
|
8345
8334
|
}
|
|
8346
8335
|
}
|
|
8347
|
-
].filter(
|
|
8336
|
+
].filter(isTruthy);
|
|
8348
8337
|
}
|
|
8349
8338
|
}
|
|
8350
8339
|
];
|
|
@@ -8455,7 +8444,7 @@ ${code}`;
|
|
|
8455
8444
|
|
|
8456
8445
|
// node/vite/markdown.ts
|
|
8457
8446
|
import Markdown2 from "unplugin-vue-markdown/vite";
|
|
8458
|
-
import { isTruthy as
|
|
8447
|
+
import { isTruthy as isTruthy2, slash as slash3 } from "@antfu/utils";
|
|
8459
8448
|
|
|
8460
8449
|
// ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=tuyuxytl56b2vxulpkzt2wf4o4_markdown-it@14.1.0/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/image-size/specialCharacters.js
|
|
8461
8450
|
var SpecialCharacters;
|
|
@@ -8584,9 +8573,7 @@ function startsWithTodoMarkdown(token) {
|
|
|
8584
8573
|
|
|
8585
8574
|
// node/vite/markdown.ts
|
|
8586
8575
|
import MarkdownItMdc from "markdown-it-mdc";
|
|
8587
|
-
import
|
|
8588
|
-
import MagicString from "magic-string";
|
|
8589
|
-
import MarkdownItAttrs from "markdown-it-link-attributes";
|
|
8576
|
+
import MagicString from "magic-string-stack";
|
|
8590
8577
|
import MarkdownItFootnote from "markdown-it-footnote";
|
|
8591
8578
|
|
|
8592
8579
|
// node/syntax/markdown-it/markdown-it-katex.ts
|
|
@@ -8746,6 +8733,24 @@ import * as htmlparser2 from "htmlparser2";
|
|
|
8746
8733
|
function normalizeRangeStr(rangeStr = "") {
|
|
8747
8734
|
return !rangeStr.trim() ? [] : rangeStr.trim().split(/\|/g).map((i) => i.trim());
|
|
8748
8735
|
}
|
|
8736
|
+
function getCodeBlocks(md2) {
|
|
8737
|
+
const codeblocks = Array.from(md2.matchAll(/^```[\s\S]*?^```/mg)).map((m) => {
|
|
8738
|
+
const start = m.index;
|
|
8739
|
+
const end = m.index + m[0].length;
|
|
8740
|
+
const startLine = md2.slice(0, start).match(/\n/g)?.length || 0;
|
|
8741
|
+
const endLine = md2.slice(0, end).match(/\n/g)?.length || 0;
|
|
8742
|
+
return [start, end, startLine, endLine];
|
|
8743
|
+
});
|
|
8744
|
+
return {
|
|
8745
|
+
codeblocks,
|
|
8746
|
+
isInsideCodeblocks(idx) {
|
|
8747
|
+
return codeblocks.some(([s, e]) => s <= idx && idx <= e);
|
|
8748
|
+
},
|
|
8749
|
+
isLineInsideCodeblocks(line) {
|
|
8750
|
+
return codeblocks.some(([, , s, e]) => s <= line && line <= e);
|
|
8751
|
+
}
|
|
8752
|
+
};
|
|
8753
|
+
}
|
|
8749
8754
|
function escapeVueInCode(md2) {
|
|
8750
8755
|
return md2.replace(/{{/g, "{{");
|
|
8751
8756
|
}
|
|
@@ -8848,11 +8853,28 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
8848
8853
|
}
|
|
8849
8854
|
|
|
8850
8855
|
// node/syntax/markdown-it/markdown-it-v-drag.ts
|
|
8851
|
-
|
|
8856
|
+
import { SourceMapConsumer } from "source-map-js";
|
|
8857
|
+
function markdownItVDrag(md2, markdownTransformMap) {
|
|
8852
8858
|
const visited = /* @__PURE__ */ new WeakSet();
|
|
8859
|
+
const sourceMapConsumers = /* @__PURE__ */ new WeakMap();
|
|
8860
|
+
function getSourceMapConsumer(id) {
|
|
8861
|
+
const s = markdownTransformMap.get(id);
|
|
8862
|
+
if (!s)
|
|
8863
|
+
return void 0;
|
|
8864
|
+
let smc = sourceMapConsumers.get(s);
|
|
8865
|
+
if (smc)
|
|
8866
|
+
return smc;
|
|
8867
|
+
const sourceMap = s.generateMap();
|
|
8868
|
+
smc = new SourceMapConsumer({
|
|
8869
|
+
...sourceMap,
|
|
8870
|
+
version: sourceMap.version.toString()
|
|
8871
|
+
});
|
|
8872
|
+
sourceMapConsumers.set(s, smc);
|
|
8873
|
+
return smc;
|
|
8874
|
+
}
|
|
8853
8875
|
const _parse = md2.parse;
|
|
8854
8876
|
md2.parse = function(src, env) {
|
|
8855
|
-
const smc =
|
|
8877
|
+
const smc = getSourceMapConsumer(env.id);
|
|
8856
8878
|
const toOriginalPos = smc ? (line) => smc.originalPositionFor({ line, column: 0 }).line : (line) => line;
|
|
8857
8879
|
function toMarkdownSource(map, idx) {
|
|
8858
8880
|
const [start, end] = map;
|
|
@@ -8875,17 +8897,14 @@ function markdownItVDrag(md2, sourceMapConsumers) {
|
|
|
8875
8897
|
}
|
|
8876
8898
|
|
|
8877
8899
|
// node/syntax/transform/code-wrapper.ts
|
|
8878
|
-
var reCodeBlock = /^```([\w'-]+?)(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?(.*?))?\n([\s\S]+?)^```$/mg;
|
|
8900
|
+
var reCodeBlock = /^```([\w'-]+?)(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?(.*?))?\r?\n([\s\S]+?)^```$/mg;
|
|
8879
8901
|
function transformCodeWrapper(ctx) {
|
|
8880
8902
|
ctx.s.replace(
|
|
8881
8903
|
reCodeBlock,
|
|
8882
|
-
(full, lang = "", rangeStr = "", options = "", attrs = "", code
|
|
8883
|
-
if (ctx.isIgnored(index))
|
|
8884
|
-
return full;
|
|
8904
|
+
(full, lang = "", rangeStr = "", options = "", attrs = "", code) => {
|
|
8885
8905
|
const ranges = normalizeRangeStr(rangeStr);
|
|
8886
8906
|
code = code.trimEnd();
|
|
8887
8907
|
options = options.trim() || "{}";
|
|
8888
|
-
ctx.ignores.push([index, index + full.length]);
|
|
8889
8908
|
return `
|
|
8890
8909
|
<CodeBlockWrapper v-bind="${options}" :ranges='${JSON.stringify(ranges)}'>
|
|
8891
8910
|
|
|
@@ -8900,57 +8919,58 @@ ${code}
|
|
|
8900
8919
|
|
|
8901
8920
|
// node/syntax/transform/magic-move.ts
|
|
8902
8921
|
import { codeToKeyedTokens } from "shiki-magic-move/core";
|
|
8903
|
-
import
|
|
8922
|
+
import lz from "lz-string";
|
|
8904
8923
|
var reMagicMoveBlock = /^````(?:md|markdown) magic-move(?:[ ]*(\{.*?\})?([^\n]*?))?\n([\s\S]+?)^````$/mg;
|
|
8905
|
-
function transformMagicMove(
|
|
8906
|
-
ctx
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8924
|
+
function transformMagicMove(shiki, shikiOptions) {
|
|
8925
|
+
return (ctx) => {
|
|
8926
|
+
ctx.s.replace(
|
|
8927
|
+
reMagicMoveBlock,
|
|
8928
|
+
(full, options = "{}", _attrs = "", body) => {
|
|
8929
|
+
if (!shiki || !shikiOptions)
|
|
8930
|
+
throw new Error("Shiki is required for Magic Move. You may need to set `highlighter: shiki` in your Slidev config.");
|
|
8931
|
+
const matches = Array.from(body.matchAll(reCodeBlock));
|
|
8932
|
+
if (!matches.length)
|
|
8933
|
+
throw new Error("Magic Move block must contain at least one code block");
|
|
8934
|
+
const ranges = matches.map((i) => normalizeRangeStr(i[2]));
|
|
8935
|
+
const steps = matches.map(
|
|
8936
|
+
(i) => codeToKeyedTokens(shiki, i[5].trimEnd(), {
|
|
8937
|
+
...shikiOptions,
|
|
8938
|
+
lang: i[1]
|
|
8939
|
+
})
|
|
8940
|
+
);
|
|
8941
|
+
const compressed = lz.compressToBase64(JSON.stringify(steps));
|
|
8942
|
+
return `<ShikiMagicMove v-bind="${options}" steps-lz="${compressed}" :step-ranges='${JSON.stringify(ranges)}' />`;
|
|
8943
|
+
}
|
|
8944
|
+
);
|
|
8945
|
+
};
|
|
8926
8946
|
}
|
|
8927
8947
|
|
|
8928
8948
|
// node/syntax/transform/mermaid.ts
|
|
8929
|
-
import
|
|
8949
|
+
import lz2 from "lz-string";
|
|
8930
8950
|
function transformMermaid(ctx) {
|
|
8931
|
-
ctx.s.replace(/^```mermaid\s*?({.*?})?\n([\s\S]+?)\n```/mg, (full, options = "", code = ""
|
|
8951
|
+
ctx.s.replace(/^```mermaid\s*?({.*?})?\n([\s\S]+?)\n```/mg, (full, options = "", code = "") => {
|
|
8932
8952
|
code = code.trim();
|
|
8933
8953
|
options = options.trim() || "{}";
|
|
8934
|
-
const encoded =
|
|
8935
|
-
ctx.ignores.push([index, index + full.length]);
|
|
8954
|
+
const encoded = lz2.compressToBase64(code);
|
|
8936
8955
|
return `<Mermaid code-lz="${encoded}" v-bind="${options}" />`;
|
|
8937
8956
|
});
|
|
8938
8957
|
}
|
|
8939
8958
|
|
|
8940
8959
|
// node/syntax/transform/plant-uml.ts
|
|
8941
8960
|
import { encode as encodePlantUml } from "plantuml-encoder";
|
|
8942
|
-
function transformPlantUml(ctx
|
|
8943
|
-
|
|
8961
|
+
function transformPlantUml(ctx) {
|
|
8962
|
+
const server = ctx.options.data.config.plantUmlServer;
|
|
8963
|
+
ctx.s.replace(/^```plantuml\s*?({.*?})?\n([\s\S]+?)\n```/mg, (full, options = "", content = "") => {
|
|
8944
8964
|
const code = encodePlantUml(content.trim());
|
|
8945
8965
|
options = options.trim() || "{}";
|
|
8946
|
-
ctx.ignores.push([index, index + full.length]);
|
|
8947
8966
|
return `<PlantUml :code="'${code}'" :server="'${server}'" v-bind="${options}" />`;
|
|
8948
8967
|
});
|
|
8949
8968
|
}
|
|
8950
8969
|
|
|
8951
8970
|
// node/syntax/transform/snippet.ts
|
|
8952
8971
|
import path2 from "node:path";
|
|
8953
|
-
import
|
|
8972
|
+
import fs4 from "fs-extra";
|
|
8973
|
+
import { slash as slash2 } from "@antfu/utils";
|
|
8954
8974
|
function dedent(text) {
|
|
8955
8975
|
const lines = text.split("\n");
|
|
8956
8976
|
const minIndentLength = lines.reduce((acc, line) => {
|
|
@@ -9002,8 +9022,9 @@ function findRegion(lines, regionName) {
|
|
|
9002
9022
|
}
|
|
9003
9023
|
return null;
|
|
9004
9024
|
}
|
|
9005
|
-
function transformSnippet(ctx
|
|
9006
|
-
const
|
|
9025
|
+
function transformSnippet(ctx) {
|
|
9026
|
+
const options = ctx.options;
|
|
9027
|
+
const slideId = ctx.id.match(/(\d+)\.md$/)?.[1];
|
|
9007
9028
|
if (!slideId)
|
|
9008
9029
|
return;
|
|
9009
9030
|
const data = options.data;
|
|
@@ -9013,13 +9034,15 @@ function transformSnippet(ctx, options, id) {
|
|
|
9013
9034
|
/^<<< *(.+?)(#[\w-]+)? *(?: (\S+?))? *(\{.*)?$/mg,
|
|
9014
9035
|
(full, filepath = "", regionName = "", lang = "", meta = "") => {
|
|
9015
9036
|
const firstLine = `\`\`\`${lang || path2.extname(filepath).slice(1)} ${meta}`;
|
|
9016
|
-
const src =
|
|
9037
|
+
const src = slash2(
|
|
9038
|
+
/^\@[\/]/.test(filepath) ? path2.resolve(options.userRoot, filepath.slice(2)) : path2.resolve(dir, filepath)
|
|
9039
|
+
);
|
|
9017
9040
|
data.watchFiles.push(src);
|
|
9018
|
-
const isAFile =
|
|
9019
|
-
if (!
|
|
9041
|
+
const isAFile = fs4.statSync(src).isFile();
|
|
9042
|
+
if (!fs4.existsSync(src) || !isAFile) {
|
|
9020
9043
|
throw new Error(isAFile ? `Code snippet path not found: ${src}` : `Invalid code snippet option`);
|
|
9021
9044
|
}
|
|
9022
|
-
let content =
|
|
9045
|
+
let content = fs4.readFileSync(src, "utf8");
|
|
9023
9046
|
slideInfo.snippetsUsed ??= {};
|
|
9024
9047
|
slideInfo.snippetsUsed[src] = content;
|
|
9025
9048
|
if (regionName) {
|
|
@@ -9041,6 +9064,7 @@ ${content}
|
|
|
9041
9064
|
// node/syntax/transform/slot-sugar.ts
|
|
9042
9065
|
function transformSlotSugar(ctx) {
|
|
9043
9066
|
const linesWithNewline = ctx.s.original.split(/(\r?\n)/g);
|
|
9067
|
+
const codeBlocks = getCodeBlocks(ctx.s.original);
|
|
9044
9068
|
const lines = [];
|
|
9045
9069
|
for (let i = 0; i < linesWithNewline.length; i += 2) {
|
|
9046
9070
|
const line = linesWithNewline[i];
|
|
@@ -9052,7 +9076,7 @@ function transformSlotSugar(ctx) {
|
|
|
9052
9076
|
lines.forEach((line) => {
|
|
9053
9077
|
const start = offset;
|
|
9054
9078
|
offset += line.length;
|
|
9055
|
-
if (
|
|
9079
|
+
if (codeBlocks.isInsideCodeblocks(offset))
|
|
9056
9080
|
return;
|
|
9057
9081
|
const match = line.match(/^::\s*([\w\.\-\:]+)\s*::(\s*)?$/);
|
|
9058
9082
|
if (match) {
|
|
@@ -9066,14 +9090,15 @@ function transformSlotSugar(ctx) {
|
|
|
9066
9090
|
}
|
|
9067
9091
|
|
|
9068
9092
|
// node/syntax/transform/in-page-css.ts
|
|
9069
|
-
function transformPageCSS(ctx
|
|
9070
|
-
const page = id.match(/(\d+)\.md$/)?.[1];
|
|
9093
|
+
function transformPageCSS(ctx) {
|
|
9094
|
+
const page = ctx.id.match(/(\d+)\.md$/)?.[1];
|
|
9071
9095
|
if (!page)
|
|
9072
9096
|
return;
|
|
9097
|
+
const codeBlocks = getCodeBlocks(ctx.s.original);
|
|
9073
9098
|
ctx.s.replace(
|
|
9074
9099
|
/(\n<style[^>]*?>)([\s\S]+?)(<\/style>)/g,
|
|
9075
9100
|
(full, start, css, end, index) => {
|
|
9076
|
-
if (
|
|
9101
|
+
if (codeBlocks.isInsideCodeblocks(index))
|
|
9077
9102
|
return full;
|
|
9078
9103
|
if (!start.includes("scoped"))
|
|
9079
9104
|
start = start.replace("<style", "<style scoped");
|
|
@@ -9083,15 +9108,52 @@ ${css}${end}`;
|
|
|
9083
9108
|
);
|
|
9084
9109
|
}
|
|
9085
9110
|
|
|
9111
|
+
// node/syntax/transform/monaco.ts
|
|
9112
|
+
import lz3 from "lz-string";
|
|
9113
|
+
function transformMonaco(ctx) {
|
|
9114
|
+
const enabled = ctx.options.data.config.monaco === true || ctx.options.data.config.monaco === ctx.options.mode;
|
|
9115
|
+
if (!enabled) {
|
|
9116
|
+
ctx.s.replace(/{monaco([\w:,-]*)}/g, "");
|
|
9117
|
+
return;
|
|
9118
|
+
}
|
|
9119
|
+
ctx.s.replace(
|
|
9120
|
+
/^```(\w+?)\s*{monaco-diff}\s*?({.*?})?\s*?\n([\s\S]+?)^~~~\s*?\n([\s\S]+?)^```/mg,
|
|
9121
|
+
(full, lang = "ts", options = "{}", code, diff) => {
|
|
9122
|
+
lang = lang.trim();
|
|
9123
|
+
options = options.trim() || "{}";
|
|
9124
|
+
const encoded = lz3.compressToBase64(code);
|
|
9125
|
+
const encodedDiff = lz3.compressToBase64(diff);
|
|
9126
|
+
return `<Monaco code-lz="${encoded}" diff-lz="${encodedDiff}" lang="${lang}" v-bind="${options}" />`;
|
|
9127
|
+
}
|
|
9128
|
+
);
|
|
9129
|
+
ctx.s.replace(
|
|
9130
|
+
/^```(\w+?)\s*{monaco}\s*?({.*?})?\s*?\n([\s\S]+?)^```/mg,
|
|
9131
|
+
(full, lang = "ts", options = "{}", code) => {
|
|
9132
|
+
lang = lang.trim();
|
|
9133
|
+
options = options.trim() || "{}";
|
|
9134
|
+
const encoded = lz3.compressToBase64(code);
|
|
9135
|
+
return `<Monaco code-lz="${encoded}" lang="${lang}" v-bind="${options}" />`;
|
|
9136
|
+
}
|
|
9137
|
+
);
|
|
9138
|
+
ctx.s.replace(
|
|
9139
|
+
/^```(\w+?)\s*{monaco-run}\s*?({.*?})?\s*?\n([\s\S]+?)^```/mg,
|
|
9140
|
+
(full, lang = "ts", options = "{}", code) => {
|
|
9141
|
+
lang = lang.trim();
|
|
9142
|
+
options = options.trim() || "{}";
|
|
9143
|
+
const encoded = lz3.compressToBase64(code);
|
|
9144
|
+
return `<Monaco runnable code-lz="${encoded}" lang="${lang}" v-bind="${options}" />`;
|
|
9145
|
+
}
|
|
9146
|
+
);
|
|
9147
|
+
}
|
|
9148
|
+
|
|
9086
9149
|
// node/syntax/transform/katex-wrapper.ts
|
|
9087
9150
|
function transformKaTexWrapper(ctx) {
|
|
9088
9151
|
ctx.s.replace(
|
|
9089
9152
|
/^\$\$(?:\s*{([\d\w*,\|-]+)}\s*?({.*?})?\s*?)?\n([\s\S]+?)^\$\$/mg,
|
|
9090
|
-
(full, rangeStr = "", options = "", code
|
|
9153
|
+
(full, rangeStr = "", options = "", code) => {
|
|
9091
9154
|
const ranges = !rangeStr.trim() ? [] : rangeStr.trim().split(/\|/g).map((i) => i.trim());
|
|
9092
9155
|
code = code.trimEnd();
|
|
9093
9156
|
options = options.trim() || "{}";
|
|
9094
|
-
ctx.ignores.push([index, index + full.length]);
|
|
9095
9157
|
return `<KaTexBlockWrapper v-bind="${options}" :ranges='${JSON.stringify(ranges)}'>
|
|
9096
9158
|
|
|
9097
9159
|
$$
|
|
@@ -9104,63 +9166,25 @@ $$
|
|
|
9104
9166
|
}
|
|
9105
9167
|
|
|
9106
9168
|
// node/vite/markdown.ts
|
|
9107
|
-
var shiki;
|
|
9108
|
-
var shikiOptions;
|
|
9109
9169
|
async function createMarkdownPlugin(options, { markdown: mdOptions }) {
|
|
9110
9170
|
const { data: { config }, roots, mode, entry, clientRoot } = options;
|
|
9111
9171
|
const setups = [];
|
|
9112
|
-
const entryPath =
|
|
9172
|
+
const entryPath = slash3(entry);
|
|
9173
|
+
let shiki;
|
|
9174
|
+
let shikiOptions;
|
|
9113
9175
|
if (config.highlighter === "shiki") {
|
|
9114
|
-
const
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
transformerTwoslash
|
|
9119
|
-
] = await Promise.all([
|
|
9120
|
-
loadShikiSetups(clientRoot, roots),
|
|
9121
|
-
import("shiki").then(({ getHighlighter: getHighlighter2, bundledLanguages: bundledLanguages2 }) => ({ bundledLanguages: bundledLanguages2, getHighlighter: getHighlighter2 })),
|
|
9122
|
-
import("@shikijs/markdown-it/core").then(({ fromHighlighter }) => fromHighlighter),
|
|
9123
|
-
import("@shikijs/vitepress-twoslash").then(({ transformerTwoslash: transformerTwoslash2 }) => transformerTwoslash2)
|
|
9124
|
-
]);
|
|
9125
|
-
shikiOptions = options2;
|
|
9126
|
-
shiki = await getHighlighter({
|
|
9127
|
-
...options2,
|
|
9128
|
-
langs: options2.langs ?? Object.keys(bundledLanguages),
|
|
9129
|
-
themes: "themes" in options2 ? Object.values(options2.themes) : [options2.theme]
|
|
9130
|
-
});
|
|
9131
|
-
const twoslashEnabled = config.twoslash === true || config.twoslash === mode;
|
|
9132
|
-
const transformers = [
|
|
9133
|
-
...options2.transformers || [],
|
|
9134
|
-
twoslashEnabled && transformerTwoslash({
|
|
9135
|
-
explicitTrigger: true,
|
|
9136
|
-
twoslashOptions: {
|
|
9137
|
-
handbookOptions: {
|
|
9138
|
-
noErrorValidation: true
|
|
9139
|
-
}
|
|
9140
|
-
}
|
|
9141
|
-
}),
|
|
9142
|
-
{
|
|
9143
|
-
pre(pre) {
|
|
9144
|
-
this.addClassToHast(pre, "slidev-code");
|
|
9145
|
-
delete pre.properties.tabindex;
|
|
9146
|
-
},
|
|
9147
|
-
postprocess(code) {
|
|
9148
|
-
return escapeVueInCode(code);
|
|
9149
|
-
}
|
|
9150
|
-
}
|
|
9151
|
-
].filter(isTruthy3);
|
|
9152
|
-
const plugin = markdownItShiki(shiki, {
|
|
9153
|
-
...options2,
|
|
9154
|
-
transformers
|
|
9155
|
-
});
|
|
9156
|
-
setups.push((md2) => md2.use(plugin));
|
|
9176
|
+
const result = await createMarkdownItShiki(clientRoot, roots, config, mode);
|
|
9177
|
+
shiki = result.shiki;
|
|
9178
|
+
shikiOptions = result.shikiOptions;
|
|
9179
|
+
setups.push((md2) => md2.use(result.plugin));
|
|
9157
9180
|
} else {
|
|
9181
|
+
console.warn("[Slidev] Highlighter: Prism highlighter is deprecated, and will be removed in v0.50. Refer to https://github.com/slidevjs/slidev/issues/1390");
|
|
9158
9182
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
9159
9183
|
}
|
|
9160
9184
|
if (config.mdc)
|
|
9161
9185
|
setups.push((md2) => md2.use(MarkdownItMdc));
|
|
9162
9186
|
const KatexOptions = await loadSetups(options.clientRoot, roots, "katex.ts", {}, { strict: false }, false);
|
|
9163
|
-
const
|
|
9187
|
+
const markdownTransformMap = /* @__PURE__ */ new Map();
|
|
9164
9188
|
return Markdown2({
|
|
9165
9189
|
include: [/\.md$/],
|
|
9166
9190
|
wrapperClasses: "",
|
|
@@ -9176,16 +9200,12 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
|
|
|
9176
9200
|
},
|
|
9177
9201
|
...mdOptions,
|
|
9178
9202
|
markdownItSetup(md2) {
|
|
9179
|
-
md2.use(
|
|
9180
|
-
|
|
9181
|
-
target: "_blank",
|
|
9182
|
-
rel: "noopener"
|
|
9183
|
-
}
|
|
9184
|
-
});
|
|
9203
|
+
md2.use(markdownItLink);
|
|
9204
|
+
md2.use(MarkdownItEscapeInlineCode);
|
|
9185
9205
|
md2.use(MarkdownItFootnote);
|
|
9186
9206
|
md2.use(taskLists, { enabled: true, lineNumber: true, label: true });
|
|
9187
9207
|
md2.use(math_plugin, KatexOptions);
|
|
9188
|
-
md2.use(markdownItVDrag,
|
|
9208
|
+
md2.use(markdownItVDrag, markdownTransformMap);
|
|
9189
9209
|
setups.forEach((i) => i(md2));
|
|
9190
9210
|
mdOptions?.markdownItSetup?.(md2);
|
|
9191
9211
|
},
|
|
@@ -9193,34 +9213,94 @@ async function createMarkdownPlugin(options, { markdown: mdOptions }) {
|
|
|
9193
9213
|
before(code, id) {
|
|
9194
9214
|
if (id === entryPath)
|
|
9195
9215
|
return "";
|
|
9196
|
-
const monacoEnabled = config.monaco === true || config.monaco === mode;
|
|
9197
9216
|
const ctx = {
|
|
9198
9217
|
s: new MagicString(code),
|
|
9199
|
-
|
|
9200
|
-
|
|
9201
|
-
return index < 0 || ctx.ignores.some(([start, end]) => start <= index && index < end);
|
|
9202
|
-
}
|
|
9218
|
+
id,
|
|
9219
|
+
options
|
|
9203
9220
|
};
|
|
9204
|
-
|
|
9205
|
-
|
|
9206
|
-
transformMagicMove(ctx, shiki, shikiOptions);
|
|
9207
|
-
transformMermaid(ctx);
|
|
9208
|
-
transformPlantUml(ctx, config.plantUmlServer);
|
|
9209
|
-
transformMonaco(ctx, monacoEnabled);
|
|
9210
|
-
transformCodeWrapper(ctx);
|
|
9211
|
-
transformKaTexWrapper(ctx);
|
|
9212
|
-
transformPageCSS(ctx, id);
|
|
9213
|
-
transformSlotSugar(ctx);
|
|
9214
|
-
const sourceMap = ctx.s.generateMap();
|
|
9215
|
-
sourceMapConsumers[id] = new SourceMapConsumer({
|
|
9216
|
-
...sourceMap,
|
|
9217
|
-
version: sourceMap.version.toString()
|
|
9218
|
-
});
|
|
9221
|
+
applyMarkdownTransform(ctx, shiki, shikiOptions);
|
|
9222
|
+
markdownTransformMap.set(id, ctx.s);
|
|
9219
9223
|
return ctx.s.toString();
|
|
9220
9224
|
}
|
|
9221
9225
|
}
|
|
9222
9226
|
});
|
|
9223
9227
|
}
|
|
9228
|
+
async function createMarkdownItShiki(clientRoot, roots, config, mode) {
|
|
9229
|
+
const [
|
|
9230
|
+
shikiOptions,
|
|
9231
|
+
{ getHighlighter, bundledLanguages },
|
|
9232
|
+
markdownItShiki,
|
|
9233
|
+
transformerTwoslash
|
|
9234
|
+
] = await Promise.all([
|
|
9235
|
+
loadShikiSetups(clientRoot, roots),
|
|
9236
|
+
import("shiki").then(({ getHighlighter: getHighlighter2, bundledLanguages: bundledLanguages2 }) => ({ bundledLanguages: bundledLanguages2, getHighlighter: getHighlighter2 })),
|
|
9237
|
+
import("@shikijs/markdown-it/core").then(({ fromHighlighter }) => fromHighlighter),
|
|
9238
|
+
import("@shikijs/vitepress-twoslash").then(({ transformerTwoslash: transformerTwoslash2 }) => transformerTwoslash2)
|
|
9239
|
+
]);
|
|
9240
|
+
const shiki = await getHighlighter({
|
|
9241
|
+
...shikiOptions,
|
|
9242
|
+
langs: shikiOptions.langs ?? Object.keys(bundledLanguages),
|
|
9243
|
+
themes: "themes" in shikiOptions ? Object.values(shikiOptions.themes) : [shikiOptions.theme]
|
|
9244
|
+
});
|
|
9245
|
+
const twoslashEnabled = config.twoslash === true || config.twoslash === mode;
|
|
9246
|
+
const transformers = [
|
|
9247
|
+
...shikiOptions.transformers || [],
|
|
9248
|
+
twoslashEnabled && transformerTwoslash({
|
|
9249
|
+
explicitTrigger: true,
|
|
9250
|
+
twoslashOptions: {
|
|
9251
|
+
handbookOptions: {
|
|
9252
|
+
noErrorValidation: true
|
|
9253
|
+
}
|
|
9254
|
+
}
|
|
9255
|
+
}),
|
|
9256
|
+
{
|
|
9257
|
+
pre(pre) {
|
|
9258
|
+
this.addClassToHast(pre, "slidev-code");
|
|
9259
|
+
delete pre.properties.tabindex;
|
|
9260
|
+
},
|
|
9261
|
+
postprocess(code) {
|
|
9262
|
+
return escapeVueInCode(code);
|
|
9263
|
+
}
|
|
9264
|
+
}
|
|
9265
|
+
].filter(isTruthy2);
|
|
9266
|
+
const plugin = markdownItShiki(shiki, {
|
|
9267
|
+
...shikiOptions,
|
|
9268
|
+
transformers
|
|
9269
|
+
});
|
|
9270
|
+
return {
|
|
9271
|
+
shiki,
|
|
9272
|
+
shikiOptions,
|
|
9273
|
+
plugin
|
|
9274
|
+
};
|
|
9275
|
+
}
|
|
9276
|
+
function MarkdownItEscapeInlineCode(md2) {
|
|
9277
|
+
const codeInline = md2.renderer.rules.code_inline;
|
|
9278
|
+
md2.renderer.rules.code_inline = (tokens, idx, options, env, self) => {
|
|
9279
|
+
const result = codeInline(tokens, idx, options, env, self);
|
|
9280
|
+
return result.replace(/^<code/, "<code v-pre");
|
|
9281
|
+
};
|
|
9282
|
+
}
|
|
9283
|
+
function applyMarkdownTransform(ctx, shiki, shikiOptions) {
|
|
9284
|
+
const transformers = [
|
|
9285
|
+
transformSnippet,
|
|
9286
|
+
ctx.options.data.config.highlighter ? transformMagicMove(shiki, shikiOptions) : void 0,
|
|
9287
|
+
transformMermaid,
|
|
9288
|
+
transformPlantUml,
|
|
9289
|
+
transformMonaco,
|
|
9290
|
+
transformCodeWrapper,
|
|
9291
|
+
transformKaTexWrapper,
|
|
9292
|
+
transformPageCSS,
|
|
9293
|
+
transformSlotSugar
|
|
9294
|
+
];
|
|
9295
|
+
for (const transformer of transformers) {
|
|
9296
|
+
if (!transformer)
|
|
9297
|
+
continue;
|
|
9298
|
+
transformer(ctx);
|
|
9299
|
+
if (!ctx.s.isEmpty())
|
|
9300
|
+
ctx.s.commit();
|
|
9301
|
+
}
|
|
9302
|
+
return ctx;
|
|
9303
|
+
}
|
|
9224
9304
|
|
|
9225
9305
|
// node/vite/compilerFlagsVue.ts
|
|
9226
9306
|
import { objectEntries } from "@antfu/utils";
|
|
@@ -9245,9 +9325,9 @@ function createVueCompilerFlagsPlugin(options) {
|
|
|
9245
9325
|
}
|
|
9246
9326
|
|
|
9247
9327
|
// node/vite/monacoTypes.ts
|
|
9248
|
-
import
|
|
9249
|
-
import { dirname as dirname2, resolve as
|
|
9250
|
-
import { slash as
|
|
9328
|
+
import fs5 from "node:fs/promises";
|
|
9329
|
+
import { dirname as dirname2, resolve as resolve4 } from "node:path";
|
|
9330
|
+
import { slash as slash4 } from "@antfu/utils";
|
|
9251
9331
|
import fg4 from "fast-glob";
|
|
9252
9332
|
import { findDepPkgJsonPath } from "vitefu";
|
|
9253
9333
|
function createMonacoTypesLoader({ userRoot }) {
|
|
@@ -9271,11 +9351,11 @@ function createMonacoTypesLoader({ userRoot }) {
|
|
|
9271
9351
|
if (!pkgJsonPath)
|
|
9272
9352
|
throw new Error(`Package "${pkg}" not found in "${importer}"`);
|
|
9273
9353
|
const root = dirname2(pkgJsonPath);
|
|
9274
|
-
const pkgJson = JSON.parse(await
|
|
9354
|
+
const pkgJson = JSON.parse(await fs5.readFile(pkgJsonPath, "utf-8"));
|
|
9275
9355
|
const deps = pkgJson.dependencies ?? {};
|
|
9276
9356
|
return [
|
|
9277
|
-
`import "/@slidev-monaco-types/load?root=${
|
|
9278
|
-
...Object.keys(deps).map((dep) => `import "/@slidev-monaco-types/resolve?pkg=${dep}&importer=${
|
|
9357
|
+
`import "/@slidev-monaco-types/load?root=${slash4(root)}&name=${pkgJson.name}"`,
|
|
9358
|
+
...Object.keys(deps).map((dep) => `import "/@slidev-monaco-types/resolve?pkg=${dep}&importer=${slash4(root)}"`)
|
|
9279
9359
|
].join("\n");
|
|
9280
9360
|
}
|
|
9281
9361
|
const matchLoad = id.match(/^\/\@slidev-monaco-types\/load\?root=(.*?)&name=(.*)$/);
|
|
@@ -9298,7 +9378,7 @@ function createMonacoTypesLoader({ userRoot }) {
|
|
|
9298
9378
|
return "";
|
|
9299
9379
|
return [
|
|
9300
9380
|
'import { addFile } from "@slidev/client/setup/monaco.ts"',
|
|
9301
|
-
...files.map((file) => `addFile(import(${JSON.stringify(`${toAtFS(
|
|
9381
|
+
...files.map((file) => `addFile(import(${JSON.stringify(`${toAtFS(resolve4(root, file))}?monaco-types&raw`)}), ${JSON.stringify(`node_modules/${name}/${file}`)})`)
|
|
9302
9382
|
].join("\n");
|
|
9303
9383
|
}
|
|
9304
9384
|
}
|
|
@@ -9344,7 +9424,7 @@ async function createVuePlugin(options, pluginOptions) {
|
|
|
9344
9424
|
vuejsx: vuejsxOptions = {}
|
|
9345
9425
|
} = pluginOptions;
|
|
9346
9426
|
const VuePlugin = Vue({
|
|
9347
|
-
include: [/\.vue$/, /\.md
|
|
9427
|
+
include: [/\.vue$/, /\.vue\?vue/, /\.vue\?v=/, /\.md$/, /\.md\?vue/],
|
|
9348
9428
|
exclude: [],
|
|
9349
9429
|
template: {
|
|
9350
9430
|
compilerOptions: {
|
|
@@ -9406,7 +9486,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
9406
9486
|
}),
|
|
9407
9487
|
Icons({
|
|
9408
9488
|
defaultClass: "slidev-icon",
|
|
9409
|
-
collectionsNodeResolvePath:
|
|
9489
|
+
collectionsNodeResolvePath: fileURLToPath2(import.meta.url),
|
|
9410
9490
|
...iconsOptions
|
|
9411
9491
|
}),
|
|
9412
9492
|
config.remoteAssets === true || config.remoteAssets === mode ? import("vite-plugin-remote-assets").then((r) => r.VitePluginRemoteAssets({
|