@slidev/cli 0.38.7 → 0.39.0
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-2WSKFKOA.mjs → build-LQUKCJTB.mjs} +3 -12
- package/dist/{build-S6XIJ3EO.js → build-XQGKVESO.js} +7 -16
- package/dist/{chunk-NOJBQ6MT.mjs → chunk-36C7XM4S.mjs} +20 -33
- package/dist/{chunk-5HOW7RNS.mjs → chunk-CRCTWL4B.mjs} +4 -63
- package/dist/{chunk-HHR7Q56Z.js → chunk-DTAZRAWW.js} +43 -55
- package/dist/{chunk-35GWFKPP.js → chunk-IM22HCOO.js} +82 -140
- package/dist/{chunk-OVFYMGU6.js → chunk-UJ5GHVII.js} +7 -20
- package/dist/{chunk-T5WFA52O.mjs → chunk-VLEV37KF.mjs} +8 -30
- package/dist/cli.js +38 -55
- package/dist/cli.mjs +13 -31
- package/dist/{export-LL3DLTJH.mjs → export-BAZ4BSV6.mjs} +93 -25
- package/dist/{export-BWNX2QVG.js → export-BRPXINGP.js} +96 -28
- package/dist/index.js +4 -12
- package/dist/index.mjs +3 -11
- package/package.json +12 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -7,14 +7,12 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
var _chunkOVFYMGU6js = require('./chunk-OVFYMGU6.js');
|
|
10
|
+
var _chunkUJ5GHVIIjs = require('./chunk-UJ5GHVII.js');
|
|
12
11
|
|
|
13
12
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
14
|
-
var require_fast_deep_equal =
|
|
13
|
+
var require_fast_deep_equal = _chunkUJ5GHVIIjs.__commonJS.call(void 0, {
|
|
15
14
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
16
15
|
"use strict";
|
|
17
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
18
16
|
module.exports = function equal2(a, b) {
|
|
19
17
|
if (a === b)
|
|
20
18
|
return true;
|
|
@@ -57,7 +55,6 @@ var require_fast_deep_equal = _chunkOVFYMGU6js.__commonJS.call(void 0, {
|
|
|
57
55
|
});
|
|
58
56
|
|
|
59
57
|
// node/common.ts
|
|
60
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
61
58
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
62
59
|
var _path = require('path');
|
|
63
60
|
var _utils = require('@antfu/utils');
|
|
@@ -87,8 +84,8 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
87
84
|
body += '\n<script async src="https://platform.twitter.com/widgets.js"><\/script>';
|
|
88
85
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
89
86
|
head += `
|
|
90
|
-
<link rel="stylesheet" href="${
|
|
91
|
-
main = main.replace("__ENTRY__",
|
|
87
|
+
<link rel="stylesheet" href="${_chunkUJ5GHVIIjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
88
|
+
main = main.replace("__ENTRY__", _chunkUJ5GHVIIjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
|
|
92
89
|
return main;
|
|
93
90
|
}
|
|
94
91
|
async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config, command) {
|
|
@@ -112,7 +109,6 @@ async function mergeViteConfigs({ addonRoots, themeRoots }, viteConfig, config,
|
|
|
112
109
|
}
|
|
113
110
|
|
|
114
111
|
// node/plugins/setupNode.ts
|
|
115
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
116
112
|
|
|
117
113
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
118
114
|
|
|
@@ -145,14 +141,13 @@ async function loadSetups(roots, name, arg, initial, merge = true, accumulate) {
|
|
|
145
141
|
}
|
|
146
142
|
|
|
147
143
|
// node/plugins/windicss.ts
|
|
148
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
149
144
|
|
|
150
145
|
|
|
151
146
|
|
|
152
147
|
|
|
153
148
|
async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
|
|
154
|
-
const { default: WindiCSS } = await Promise.resolve().then(() =>
|
|
155
|
-
const { defaultConfigureFiles } = await Promise.resolve().then(() =>
|
|
149
|
+
const { default: WindiCSS } = await Promise.resolve().then(() => require("vite-plugin-windicss"));
|
|
150
|
+
const { defaultConfigureFiles } = await Promise.resolve().then(() => require("@windicss/config"));
|
|
156
151
|
const configFiles = _utils.uniq.call(void 0, [
|
|
157
152
|
...defaultConfigureFiles.map((i) => _path.resolve.call(void 0, userRoot, i)),
|
|
158
153
|
...themeRoots.map((i) => `${i}/windi.config.ts`),
|
|
@@ -191,9 +186,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
191
186
|
config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
|
|
192
187
|
});
|
|
193
188
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
194
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
195
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
196
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
189
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkUJ5GHVIIjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
190
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkUJ5GHVIIjs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
191
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkUJ5GHVIIjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
197
192
|
},
|
|
198
193
|
...windiOptions
|
|
199
194
|
}
|
|
@@ -201,7 +196,6 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
201
196
|
}
|
|
202
197
|
|
|
203
198
|
// node/plugins/preset.ts
|
|
204
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
205
199
|
|
|
206
200
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
207
201
|
var _pluginvuejsx = require('@vitejs/plugin-vue-jsx'); var _pluginvuejsx2 = _interopRequireDefault(_pluginvuejsx);
|
|
@@ -214,7 +208,6 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
214
208
|
var _viteplugininspect = require('vite-plugin-inspect'); var _viteplugininspect2 = _interopRequireDefault(_viteplugininspect);
|
|
215
209
|
|
|
216
210
|
// node/drawings.ts
|
|
217
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
218
211
|
|
|
219
212
|
|
|
220
213
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -266,7 +259,6 @@ ${value}
|
|
|
266
259
|
}
|
|
267
260
|
|
|
268
261
|
// node/plugins/extendConfig.ts
|
|
269
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
270
262
|
|
|
271
263
|
|
|
272
264
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -277,11 +269,11 @@ var dependencies = {
|
|
|
277
269
|
"@antfu/utils": "^0.7.2",
|
|
278
270
|
"@slidev/parser": "workspace:*",
|
|
279
271
|
"@slidev/types": "workspace:*",
|
|
280
|
-
"@unocss/reset": "^0.
|
|
272
|
+
"@unocss/reset": "^0.49.1",
|
|
281
273
|
"@vueuse/core": "^9.11.1",
|
|
282
274
|
"@vueuse/head": "^1.0.23",
|
|
283
275
|
"@vueuse/math": "^9.11.1",
|
|
284
|
-
"@vueuse/motion": "^2.0.0-beta.
|
|
276
|
+
"@vueuse/motion": "^2.0.0-beta.27",
|
|
285
277
|
codemirror: "^5.65.5",
|
|
286
278
|
defu: "^6.1.2",
|
|
287
279
|
drauu: "^0.3.2",
|
|
@@ -295,7 +287,7 @@ var dependencies = {
|
|
|
295
287
|
prettier: "^2.8.3",
|
|
296
288
|
recordrtc: "^5.6.2",
|
|
297
289
|
resolve: "^1.22.1",
|
|
298
|
-
unocss: "^0.
|
|
290
|
+
unocss: "^0.49.1",
|
|
299
291
|
"vite-plugin-windicss": "^1.8.10",
|
|
300
292
|
vue: "^3.2.45",
|
|
301
293
|
"vue-router": "^4.1.6",
|
|
@@ -304,7 +296,6 @@ var dependencies = {
|
|
|
304
296
|
};
|
|
305
297
|
|
|
306
298
|
// node/vite/searchRoot.ts
|
|
307
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
308
299
|
|
|
309
300
|
|
|
310
301
|
var ROOT_FILES = [
|
|
@@ -370,7 +361,7 @@ function createConfigPlugin(options) {
|
|
|
370
361
|
define: getDefine(options),
|
|
371
362
|
resolve: {
|
|
372
363
|
alias: {
|
|
373
|
-
"@slidev/client/": `${
|
|
364
|
+
"@slidev/client/": `${_chunkUJ5GHVIIjs.toAtFS.call(void 0, options.clientRoot)}/`
|
|
374
365
|
},
|
|
375
366
|
dedupe: ["vue"]
|
|
376
367
|
},
|
|
@@ -395,7 +386,7 @@ function createConfigPlugin(options) {
|
|
|
395
386
|
css: options.data.config.css === "unocss" ? {
|
|
396
387
|
postcss: {
|
|
397
388
|
plugins: [
|
|
398
|
-
await Promise.resolve().then(() =>
|
|
389
|
+
await Promise.resolve().then(() => require("postcss-nested")).then((r) => (r.default || r)())
|
|
399
390
|
]
|
|
400
391
|
}
|
|
401
392
|
} : {},
|
|
@@ -405,7 +396,7 @@ function createConfigPlugin(options) {
|
|
|
405
396
|
allow: _utils.uniq.call(void 0, [
|
|
406
397
|
searchForWorkspaceRoot(options.userRoot),
|
|
407
398
|
searchForWorkspaceRoot(options.cliRoot),
|
|
408
|
-
..._isinstalledglobally2.default ? [_path.dirname.call(void 0,
|
|
399
|
+
..._isinstalledglobally2.default ? [_path.dirname.call(void 0, _chunkUJ5GHVIIjs.resolveGlobalImportPath.call(void 0, "@slidev/client/package.json")), _path.dirname.call(void 0, _chunkUJ5GHVIIjs.resolveGlobalImportPath.call(void 0, "katex/package.json"))] : []
|
|
409
400
|
])
|
|
410
401
|
}
|
|
411
402
|
}
|
|
@@ -414,7 +405,7 @@ function createConfigPlugin(options) {
|
|
|
414
405
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
415
406
|
injection.publicDir = _path.join.call(void 0, options.userRoot, "public");
|
|
416
407
|
injection.root = options.cliRoot;
|
|
417
|
-
injection.resolve.alias.vue = `${
|
|
408
|
+
injection.resolve.alias.vue = `${_chunkUJ5GHVIIjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
418
409
|
}
|
|
419
410
|
return _vite.mergeConfig.call(void 0, config, injection);
|
|
420
411
|
},
|
|
@@ -436,7 +427,7 @@ function createConfigPlugin(options) {
|
|
|
436
427
|
function getDefine(options) {
|
|
437
428
|
return {
|
|
438
429
|
__DEV__: options.mode === "dev" ? "true" : "false",
|
|
439
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
430
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkUJ5GHVIIjs.toAtFS.call(void 0, options.clientRoot)),
|
|
440
431
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
441
432
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
442
433
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -447,8 +438,7 @@ function getDefine(options) {
|
|
|
447
438
|
}
|
|
448
439
|
|
|
449
440
|
// node/plugins/loaders.ts
|
|
450
|
-
|
|
451
|
-
var import_fast_deep_equal = _chunkOVFYMGU6js.__toESM.call(void 0, require_fast_deep_equal());
|
|
441
|
+
var import_fast_deep_equal = _chunkUJ5GHVIIjs.__toESM.call(void 0, require_fast_deep_equal());
|
|
452
442
|
|
|
453
443
|
|
|
454
444
|
|
|
@@ -716,7 +706,7 @@ ${title}
|
|
|
716
706
|
delete frontmatter.title;
|
|
717
707
|
const imports = [
|
|
718
708
|
'import { inject as vueInject } from "vue"',
|
|
719
|
-
`import InjectedLayout from "${
|
|
709
|
+
`import InjectedLayout from "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
720
710
|
'import { injectionSlidevContext } from "@slidev/client/constants"',
|
|
721
711
|
`const frontmatter = ${JSON.stringify(frontmatter)}`,
|
|
722
712
|
"const $slidev = vueInject(injectionSlidevContext)"
|
|
@@ -821,9 +811,10 @@ defineProps<{ no: number | string }>()`);
|
|
|
821
811
|
}
|
|
822
812
|
async function generateUserStyles() {
|
|
823
813
|
const imports = [
|
|
824
|
-
`import "${
|
|
825
|
-
`import "${
|
|
826
|
-
`import "${
|
|
814
|
+
`import "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
815
|
+
`import "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
816
|
+
`import "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`,
|
|
817
|
+
`import "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/transitions.css"))}"`
|
|
827
818
|
];
|
|
828
819
|
const roots2 = _utils.uniq.call(void 0, [
|
|
829
820
|
...themeRoots,
|
|
@@ -840,13 +831,13 @@ defineProps<{ no: number | string }>()`);
|
|
|
840
831
|
];
|
|
841
832
|
for (const style of styles) {
|
|
842
833
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
843
|
-
imports.push(`import "${
|
|
834
|
+
imports.push(`import "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, style)}"`);
|
|
844
835
|
continue;
|
|
845
836
|
}
|
|
846
837
|
}
|
|
847
838
|
}
|
|
848
839
|
if (data.features.katex)
|
|
849
|
-
imports.push(`import "${
|
|
840
|
+
imports.push(`import "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, _chunkUJ5GHVIIjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
850
841
|
if (data.config.css === "unocss") {
|
|
851
842
|
imports.unshift(
|
|
852
843
|
'import "@unocss/reset/tailwind.css"',
|
|
@@ -875,7 +866,7 @@ defineProps<{ no: number | string }>()`);
|
|
|
875
866
|
const layouts = _utils.objectMap.call(void 0,
|
|
876
867
|
await getLayouts(),
|
|
877
868
|
(k, v) => {
|
|
878
|
-
imports.push(`import __layout_${k} from "${
|
|
869
|
+
imports.push(`import __layout_${k} from "${_chunkUJ5GHVIIjs.toAtFS.call(void 0, v)}"`);
|
|
879
870
|
return [k, `__layout_${k}`];
|
|
880
871
|
}
|
|
881
872
|
);
|
|
@@ -924,7 +915,7 @@ ${routes.join(",\n")}
|
|
|
924
915
|
const config = { ...data.config, remote };
|
|
925
916
|
if (_utils.isString.call(void 0, config.title)) {
|
|
926
917
|
const tokens = md.parseInline(config.title, {});
|
|
927
|
-
config.title =
|
|
918
|
+
config.title = _chunkUJ5GHVIIjs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
928
919
|
}
|
|
929
920
|
if (_utils.isString.call(void 0, config.info))
|
|
930
921
|
config.info = md.render(config.info);
|
|
@@ -945,7 +936,7 @@ ${routes.join(",\n")}
|
|
|
945
936
|
];
|
|
946
937
|
}
|
|
947
938
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
948
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
939
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkUJ5GHVIIjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
949
940
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
950
941
|
return `
|
|
951
942
|
${imports}
|
|
@@ -964,7 +955,7 @@ export default {
|
|
|
964
955
|
_path.join.call(void 0, root, "CustomNavControls.vue")
|
|
965
956
|
];
|
|
966
957
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
967
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
958
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkUJ5GHVIIjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
968
959
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
969
960
|
return `
|
|
970
961
|
${imports}
|
|
@@ -979,7 +970,6 @@ export default {
|
|
|
979
970
|
}
|
|
980
971
|
|
|
981
972
|
// node/plugins/monacoTransform.ts
|
|
982
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
983
973
|
|
|
984
974
|
|
|
985
975
|
function createMonacoTypesLoader() {
|
|
@@ -994,7 +984,7 @@ function createMonacoTypesLoader() {
|
|
|
994
984
|
const match = id.match(/^\/\@slidev-monaco-types\/(.*)$/);
|
|
995
985
|
if (match) {
|
|
996
986
|
const pkg = match[1];
|
|
997
|
-
const { resolvePackageData } = await Promise.resolve().then(() =>
|
|
987
|
+
const { resolvePackageData } = await Promise.resolve().then(() => require("vite"));
|
|
998
988
|
const info = resolvePackageData(pkg, process.cwd());
|
|
999
989
|
if (!info)
|
|
1000
990
|
return;
|
|
@@ -1013,7 +1003,6 @@ function createMonacoTypesLoader() {
|
|
|
1013
1003
|
}
|
|
1014
1004
|
|
|
1015
1005
|
// node/plugins/setupClient.ts
|
|
1016
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1017
1006
|
|
|
1018
1007
|
|
|
1019
1008
|
|
|
@@ -1039,7 +1028,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
1039
1028
|
setups.forEach((path, idx) => {
|
|
1040
1029
|
if (!_fs.existsSync.call(void 0, path))
|
|
1041
1030
|
return;
|
|
1042
|
-
imports.push(`import __n${idx} from '${
|
|
1031
|
+
imports.push(`import __n${idx} from '${_chunkUJ5GHVIIjs.toAtFS.call(void 0, path)}'`);
|
|
1043
1032
|
let fn = `:AWAIT:__n${idx}`;
|
|
1044
1033
|
if (/\binjection_return\b/g.test(code))
|
|
1045
1034
|
fn = `injection_return = ${fn}`;
|
|
@@ -1070,7 +1059,6 @@ function createClientSetupPlugin({ clientRoot, themeRoots, addonRoots, userRoot
|
|
|
1070
1059
|
}
|
|
1071
1060
|
|
|
1072
1061
|
// node/plugins/markdown.ts
|
|
1073
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1074
1062
|
var _vitepluginvuemarkdown = require('vite-plugin-vue-markdown'); var _vitepluginvuemarkdown2 = _interopRequireDefault(_vitepluginvuemarkdown);
|
|
1075
1063
|
var _jsbase64 = require('js-base64'); var base64 = _interopRequireWildcard(_jsbase64);
|
|
1076
1064
|
|
|
@@ -1081,7 +1069,6 @@ var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
|
1081
1069
|
var _plantumlencoder = require('plantuml-encoder');
|
|
1082
1070
|
|
|
1083
1071
|
// node/plugins/markdown-it-katex.ts
|
|
1084
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1085
1072
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
1086
1073
|
function isValidDelim(state, pos) {
|
|
1087
1074
|
const max = state.posMax;
|
|
@@ -1228,7 +1215,6 @@ function math_plugin(md2, options) {
|
|
|
1228
1215
|
}
|
|
1229
1216
|
|
|
1230
1217
|
// node/plugins/markdown-it-prism.ts
|
|
1231
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1232
1218
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1233
1219
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1234
1220
|
var DEFAULTS = {
|
|
@@ -1251,7 +1237,7 @@ function loadPrismLang(lang) {
|
|
|
1251
1237
|
}
|
|
1252
1238
|
function loadPrismPlugin(name) {
|
|
1253
1239
|
try {
|
|
1254
|
-
|
|
1240
|
+
_chunkUJ5GHVIIjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1255
1241
|
} catch (e) {
|
|
1256
1242
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1257
1243
|
}
|
|
@@ -1291,7 +1277,6 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1291
1277
|
}
|
|
1292
1278
|
|
|
1293
1279
|
// node/plugins/markdown-it-shiki.ts
|
|
1294
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1295
1280
|
function getThemeName(theme) {
|
|
1296
1281
|
if (typeof theme === "string")
|
|
1297
1282
|
return theme;
|
|
@@ -1357,7 +1342,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1357
1342
|
const setups = [];
|
|
1358
1343
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1359
1344
|
if (config.highlighter === "shiki") {
|
|
1360
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1345
|
+
const { getHighlighter } = await Promise.resolve().then(() => require("shiki"));
|
|
1361
1346
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1362
1347
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1363
1348
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1511,7 +1496,6 @@ function escapeVueInCode(md2) {
|
|
|
1511
1496
|
}
|
|
1512
1497
|
|
|
1513
1498
|
// node/plugins/patchTransform.ts
|
|
1514
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1515
1499
|
|
|
1516
1500
|
function createFixPlugins(options) {
|
|
1517
1501
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1534,18 +1518,22 @@ function createFixPlugins(options) {
|
|
|
1534
1518
|
}
|
|
1535
1519
|
|
|
1536
1520
|
// node/plugins/unocss.ts
|
|
1537
|
-
_chunkOVFYMGU6js.init_cjs_shims.call(void 0, );
|
|
1538
1521
|
|
|
1539
1522
|
|
|
1540
1523
|
|
|
1541
1524
|
|
|
1542
|
-
async function createUnocssPlugin({ themeRoots, addonRoots, clientRoot, roots, data }, { unocss: unoOptions }) {
|
|
1525
|
+
async function createUnocssPlugin({ themeRoots, addonRoots, clientRoot, roots, userRoot, data }, { unocss: unoOptions }) {
|
|
1543
1526
|
var _a, _b, _c, _d;
|
|
1544
|
-
const UnoCSS = await Promise.resolve().then(() =>
|
|
1527
|
+
const UnoCSS = await Promise.resolve().then(() => require("unocss/vite")).then((r) => r.default);
|
|
1545
1528
|
const configFiles = _utils.uniq.call(void 0, [
|
|
1529
|
+
_path.resolve.call(void 0, userRoot, "uno.config.ts"),
|
|
1530
|
+
_path.resolve.call(void 0, userRoot, "unocss.config.ts"),
|
|
1546
1531
|
...themeRoots.map((i) => `${i}/uno.config.ts`),
|
|
1532
|
+
...themeRoots.map((i) => `${i}/unocss.config.ts`),
|
|
1547
1533
|
...addonRoots.map((i) => `${i}/uno.config.ts`),
|
|
1548
|
-
|
|
1534
|
+
...addonRoots.map((i) => `${i}/unocss.config.ts`),
|
|
1535
|
+
_path.resolve.call(void 0, clientRoot, "uno.config.ts"),
|
|
1536
|
+
_path.resolve.call(void 0, clientRoot, "unocss.config.ts")
|
|
1549
1537
|
]);
|
|
1550
1538
|
const configFile = configFiles.find((i) => _fs.existsSync.call(void 0, i));
|
|
1551
1539
|
let config = _jiti2.default.call(void 0, __filename)(configFile);
|
|
@@ -1684,7 +1672,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1684
1672
|
if (!options.data.config.drawings.persist)
|
|
1685
1673
|
return;
|
|
1686
1674
|
if (key === "drawings")
|
|
1687
|
-
writeDrawings(options, patch
|
|
1675
|
+
writeDrawings(options, _nullishCoalesce(patch, () => ( data)));
|
|
1688
1676
|
}
|
|
1689
1677
|
}),
|
|
1690
1678
|
createConfigPlugin(options),
|