@slidev/cli 0.30.3 → 0.31.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{build-6SGXHSD5.mjs → build-OBPH6VDP.mjs} +3 -3
- package/dist/{build-RLDXLLAM.js → build-TARUTLV7.js} +11 -11
- package/dist/chunk-2MKHYABM.js +12693 -0
- package/dist/{chunk-RBYAPROQ.js → chunk-BGLVULPK.js} +82 -84
- package/dist/{chunk-CIB2BRE3.js → chunk-C4GAL67V.js} +4 -4
- package/dist/{chunk-XMETW2MS.mjs → chunk-D6ZT4BYV.mjs} +47 -2
- package/dist/{chunk-LCOJZNZW.mjs → chunk-EIZSCDHU.mjs} +2 -2
- package/dist/{chunk-4YPIBI4G.mjs → chunk-MCHS7HQA.mjs} +27 -29
- package/dist/{chunk-IXNT7VMK.js → chunk-OVW2G2MH.js} +47 -6
- package/dist/chunk-ZSZGLQND.mjs +12685 -0
- package/dist/cli.js +25 -25
- package/dist/cli.mjs +6 -6
- package/dist/{export-DGMIRITW.mjs → export-F63P4ZXM.mjs} +22 -14
- package/dist/{export-PXKH5FVD.js → export-I6OGAJWC.js} +25 -17
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/package.json +19 -20
- package/dist/chunk-42RALHAU.mjs +0 -13309
- package/dist/chunk-PL62CCCK.js +0 -13309
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveImportPath,
|
|
12
12
|
stringifyMarkdownTokens,
|
|
13
13
|
toAtFS
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-D6ZT4BYV.mjs";
|
|
15
15
|
|
|
16
16
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
17
17
|
var require_fast_deep_equal = __commonJS({
|
|
@@ -243,26 +243,26 @@ var dependencies = {
|
|
|
243
243
|
"@antfu/utils": "^0.5.1",
|
|
244
244
|
"@slidev/parser": "workspace:*",
|
|
245
245
|
"@slidev/types": "workspace:*",
|
|
246
|
-
"@vueuse/core": "^8.2
|
|
247
|
-
"@vueuse/head": "^0.7.
|
|
246
|
+
"@vueuse/core": "^8.4.2",
|
|
247
|
+
"@vueuse/head": "^0.7.6",
|
|
248
248
|
"@vueuse/motion": "^2.0.0-beta.18",
|
|
249
|
-
codemirror: "^5.65.
|
|
249
|
+
codemirror: "^5.65.3",
|
|
250
250
|
defu: "^6.0.0",
|
|
251
251
|
drauu: "^0.3.0",
|
|
252
252
|
"file-saver": "^2.0.5",
|
|
253
253
|
"js-base64": "^3.7.2",
|
|
254
254
|
"js-yaml": "^4.1.0",
|
|
255
255
|
katex: "^0.15.3",
|
|
256
|
-
mermaid: "^9.0.
|
|
256
|
+
mermaid: "^9.0.1",
|
|
257
257
|
"monaco-editor": "^0.33.0",
|
|
258
|
-
nanoid: "^3.3.
|
|
258
|
+
nanoid: "^3.3.4",
|
|
259
259
|
prettier: "^2.6.2",
|
|
260
260
|
recordrtc: "^5.6.2",
|
|
261
261
|
resolve: "^1.22.0",
|
|
262
262
|
"vite-plugin-windicss": "^1.8.4",
|
|
263
|
-
vue: "^3.2.
|
|
264
|
-
"vue-router": "^4.0.
|
|
265
|
-
"vue-starport": "^0.2.
|
|
263
|
+
vue: "^3.2.33",
|
|
264
|
+
"vue-router": "^4.0.15",
|
|
265
|
+
"vue-starport": "^0.2.10",
|
|
266
266
|
windicss: "^3.5.1"
|
|
267
267
|
};
|
|
268
268
|
|
|
@@ -681,33 +681,31 @@ ${imports.join("\n")}
|
|
|
681
681
|
const exportIndex = (matchExport.index || 0) + matchExport[0].length;
|
|
682
682
|
let component = code.slice(exportIndex);
|
|
683
683
|
component = component.slice(0, component.indexOf("<\/script>"));
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
return `${code.slice(0, injectIndex - 1)}{
|
|
684
|
+
const scriptIndex = (matchScript.index || 0) + matchScript[0].length;
|
|
685
|
+
const provideImport = '\nimport { injectionSlidevContext } from "@slidev/client/constants"\n';
|
|
686
|
+
code = `${code.slice(0, scriptIndex)}${provideImport}${code.slice(scriptIndex)}`;
|
|
687
|
+
let injectIndex = exportIndex + provideImport.length;
|
|
688
|
+
let injectObject = "$slidev: { from: injectionSlidevContext },";
|
|
689
|
+
const matchInject = component.match(/.*inject\s*:\s*([\[{])/);
|
|
690
|
+
if (matchInject) {
|
|
691
|
+
injectIndex += (matchInject.index || 0) + matchInject[0].length;
|
|
692
|
+
if (matchInject[1] === "[") {
|
|
693
|
+
let injects = component.slice((matchInject.index || 0) + matchInject[0].length);
|
|
694
|
+
const injectEndIndex = injects.indexOf("]");
|
|
695
|
+
injects = injects.slice(0, injectEndIndex);
|
|
696
|
+
injectObject += injects.split(",").map((inject) => `${inject}: {from: ${inject}}`).join(",");
|
|
697
|
+
return `${code.slice(0, injectIndex - 1)}{
|
|
699
698
|
${injectObject}
|
|
700
699
|
}${code.slice(injectIndex + injectEndIndex + 1)}`;
|
|
701
|
-
|
|
702
|
-
|
|
700
|
+
} else {
|
|
701
|
+
return `${code.slice(0, injectIndex)}
|
|
703
702
|
${injectObject}
|
|
704
703
|
${code.slice(injectIndex)}`;
|
|
705
|
-
}
|
|
706
704
|
}
|
|
707
|
-
|
|
705
|
+
}
|
|
706
|
+
return `${code.slice(0, injectIndex)}
|
|
708
707
|
inject: { ${injectObject} },
|
|
709
708
|
${code.slice(injectIndex)}`;
|
|
710
|
-
}
|
|
711
709
|
}
|
|
712
710
|
}
|
|
713
711
|
return `<script setup>
|
|
@@ -28,6 +28,18 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
28
28
|
return require.apply(this, arguments);
|
|
29
29
|
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
30
30
|
});
|
|
31
|
+
var __objRest = (source, exclude) => {
|
|
32
|
+
var target = {};
|
|
33
|
+
for (var prop in source)
|
|
34
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
if (source != null && __getOwnPropSymbols)
|
|
37
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
38
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
39
|
+
target[prop] = source[prop];
|
|
40
|
+
}
|
|
41
|
+
return target;
|
|
42
|
+
};
|
|
31
43
|
var __esm = (fn, res) => function __init() {
|
|
32
44
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
33
45
|
};
|
|
@@ -47,13 +59,38 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
47
59
|
return to;
|
|
48
60
|
};
|
|
49
61
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
|
62
|
+
var __accessCheck = (obj, member, msg) => {
|
|
63
|
+
if (!member.has(obj))
|
|
64
|
+
throw TypeError("Cannot " + msg);
|
|
65
|
+
};
|
|
66
|
+
var __privateGet = (obj, member, getter) => {
|
|
67
|
+
__accessCheck(obj, member, "read from private field");
|
|
68
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
69
|
+
};
|
|
70
|
+
var __privateAdd = (obj, member, value) => {
|
|
71
|
+
if (member.has(obj))
|
|
72
|
+
throw TypeError("Cannot add the same private member more than once");
|
|
73
|
+
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
74
|
+
};
|
|
75
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
76
|
+
__accessCheck(obj, member, "write to private field");
|
|
77
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
78
|
+
return value;
|
|
79
|
+
};
|
|
80
|
+
var __privateWrapper = (obj, member, setter, getter) => {
|
|
81
|
+
return {
|
|
82
|
+
set _(value) {
|
|
83
|
+
__privateSet(obj, member, value, setter);
|
|
84
|
+
},
|
|
85
|
+
get _() {
|
|
86
|
+
return __privateGet(obj, member, getter);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
};
|
|
50
90
|
|
|
51
|
-
// ../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.
|
|
52
|
-
var getImportMetaUrl, importMetaUrl;
|
|
91
|
+
// ../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.4/node_modules/tsup/assets/cjs_shims.js
|
|
53
92
|
var init_cjs_shims = __esm({
|
|
54
|
-
"../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.
|
|
55
|
-
getImportMetaUrl = () => typeof document === "undefined" ? new URL("file:" + __filename).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
56
|
-
importMetaUrl = exports.importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
93
|
+
"../../node_modules/.pnpm/tsup@5.12.5_typescript@4.6.4/node_modules/tsup/assets/cjs_shims.js"() {
|
|
57
94
|
}
|
|
58
95
|
});
|
|
59
96
|
|
|
@@ -129,4 +166,8 @@ function generateGoogleFontsUrl(options) {
|
|
|
129
166
|
|
|
130
167
|
|
|
131
168
|
|
|
132
|
-
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
exports.__spreadValues = __spreadValues; exports.__spreadProps = __spreadProps; exports.__require = __require; exports.__objRest = __objRest; exports.__commonJS = __commonJS; exports.__export = __export; exports.__toESM = __toESM; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateWrapper = __privateWrapper; exports.init_cjs_shims = init_cjs_shims; exports.toAtFS = toAtFS; exports.resolveImportPath = resolveImportPath; exports.resolveGlobalImportPath = resolveGlobalImportPath; exports.stringifyMarkdownTokens = stringifyMarkdownTokens; exports.generateGoogleFontsUrl = generateGoogleFontsUrl;
|