@slidev/cli 0.42.10 → 0.43.0-beta.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-4XPJ27UV.mjs → build-C2GYF6EU.mjs} +7 -7
- package/dist/{build-E5AQPKXP.js → build-J2XECXHU.js} +8 -8
- package/dist/{chunk-B54ZYWFO.mjs → chunk-E3UONPQL.mjs} +37 -45
- package/dist/chunk-HA2YGJJG.mjs +4837 -0
- package/dist/{chunk-VPD6PH2L.mjs → chunk-HO75FTDI.mjs} +7 -7
- package/dist/{chunk-RSZHGGR3.js → chunk-J7PXWEZ7.js} +7 -7
- package/dist/{chunk-6XVZLT3I.mjs → chunk-JDHANZ37.mjs} +1 -1
- package/dist/{chunk-34SGGZ4P.js → chunk-JQHGZJGJ.js} +7 -10
- package/dist/{chunk-BFOSXE34.js → chunk-O7JFTQZ2.js} +86 -94
- package/dist/{chunk-KB3DQ2OE.mjs → chunk-QHOBBTS4.mjs} +1 -31
- package/dist/chunk-ROTHRPSW.js +4837 -0
- package/dist/{chunk-QDKRARRU.js → chunk-YUG22S6W.js} +1 -31
- package/dist/{chunk-MZBIET7Y.mjs → chunk-ZEKM4EGL.mjs} +3 -6
- package/dist/cli.js +36 -35
- package/dist/cli.mjs +17 -16
- package/dist/{export-6G7WYT32.mjs → export-I7B4PU6A.mjs} +17 -22
- package/dist/{export-BGMCS4F2.js → export-MCALG7XD.js} +18 -23
- package/dist/index.js +6 -6
- package/dist/index.mjs +6 -6
- package/dist/{unocss-2T2KTWQ5.js → unocss-2DU67QXG.js} +6 -7
- package/dist/{unocss-ALFHEPHE.mjs → unocss-2UOAV4VT.mjs} +9 -10
- package/dist/windicss-FNELZNWD.js +9 -0
- package/dist/windicss-UVXCUIV4.mjs +9 -0
- package/package.json +8 -7
- package/template.md +1 -1
- package/dist/chunk-C6JRFTBY.js +0 -1651
- package/dist/chunk-XNFJHVPK.mjs +0 -1651
- package/dist/windicss-3HGYWXUJ.js +0 -9
- package/dist/windicss-TWSVDM4O.mjs +0 -9
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadSetups
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JDHANZ37.mjs";
|
|
4
4
|
import {
|
|
5
5
|
resolveImportPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZEKM4EGL.mjs";
|
|
7
7
|
|
|
8
8
|
// node/plugins/windicss.ts
|
|
9
|
-
import { dirname, resolve } from "path";
|
|
10
|
-
import { existsSync } from "fs";
|
|
9
|
+
import { dirname, resolve } from "node:path";
|
|
10
|
+
import { existsSync } from "node:fs";
|
|
11
11
|
import { slash, uniq } from "@antfu/utils";
|
|
12
12
|
import jiti from "jiti";
|
|
13
13
|
async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRoot, roots, data }, { windicss: windiOptions }) {
|
|
@@ -36,9 +36,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
36
36
|
if (!config2.theme.extend.fontFamily)
|
|
37
37
|
config2.theme.extend.fontFamily = {};
|
|
38
38
|
const fontFamily = config2.theme.extend.fontFamily;
|
|
39
|
-
fontFamily.sans
|
|
40
|
-
fontFamily.mono
|
|
41
|
-
fontFamily.serif
|
|
39
|
+
fontFamily.sans ||= data.config.fonts.sans.join(",");
|
|
40
|
+
fontFamily.mono ||= data.config.fonts.mono.join(",");
|
|
41
|
+
fontFamily.serif ||= data.config.fonts.serif.join(",");
|
|
42
42
|
return config2;
|
|
43
43
|
},
|
|
44
44
|
onOptionsResolved(config2) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkKKGXM3XLjs = require('./chunk-KKGXM3XL.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkJQHGZJGJjs = require('./chunk-JQHGZJGJ.js');
|
|
7
7
|
|
|
8
8
|
// node/plugins/windicss.ts
|
|
9
9
|
var _path = require('path');
|
|
@@ -36,9 +36,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
36
36
|
if (!config2.theme.extend.fontFamily)
|
|
37
37
|
config2.theme.extend.fontFamily = {};
|
|
38
38
|
const fontFamily = config2.theme.extend.fontFamily;
|
|
39
|
-
fontFamily.sans
|
|
40
|
-
fontFamily.mono
|
|
41
|
-
fontFamily.serif
|
|
39
|
+
fontFamily.sans ||= data.config.fonts.sans.join(",");
|
|
40
|
+
fontFamily.mono ||= data.config.fonts.mono.join(",");
|
|
41
|
+
fontFamily.serif ||= data.config.fonts.serif.join(",");
|
|
42
42
|
return config2;
|
|
43
43
|
},
|
|
44
44
|
onOptionsResolved(config2) {
|
|
@@ -51,9 +51,9 @@ async function createWindiCSSPlugin({ themeRoots, addonRoots, clientRoot, userRo
|
|
|
51
51
|
config2.scanOptions.include.push(`${i}/layouts/**/*.{vue,ts}`);
|
|
52
52
|
});
|
|
53
53
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
54
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
55
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
56
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
54
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkJQHGZJGJjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
55
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkJQHGZJGJjs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
56
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkJQHGZJGJjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
57
57
|
},
|
|
58
58
|
...windiOptions
|
|
59
59
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkYUG22S6Wjs = require('./chunk-YUG22S6W.js');
|
|
4
4
|
|
|
5
5
|
// node/utils.ts
|
|
6
6
|
var _path = require('path');
|
|
@@ -20,11 +20,11 @@ function resolveImportPath(importName, ensure = false) {
|
|
|
20
20
|
}
|
|
21
21
|
if (_isinstalledglobally2.default) {
|
|
22
22
|
try {
|
|
23
|
-
return
|
|
23
|
+
return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
|
|
24
24
|
} catch (e2) {
|
|
25
25
|
}
|
|
26
26
|
try {
|
|
27
|
-
return
|
|
27
|
+
return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
|
|
28
28
|
} catch (e3) {
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -38,21 +38,18 @@ function resolveGlobalImportPath(importName) {
|
|
|
38
38
|
} catch (e4) {
|
|
39
39
|
}
|
|
40
40
|
try {
|
|
41
|
-
return
|
|
41
|
+
return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
|
|
42
42
|
} catch (e5) {
|
|
43
43
|
}
|
|
44
44
|
try {
|
|
45
|
-
return
|
|
45
|
+
return _chunkYUG22S6Wjs.__require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
|
|
46
46
|
} catch (e6) {
|
|
47
47
|
}
|
|
48
48
|
throw new Error(`Failed to resolve global package "${importName}"`);
|
|
49
49
|
}
|
|
50
50
|
function stringifyMarkdownTokens(tokens) {
|
|
51
51
|
return tokens.map(
|
|
52
|
-
(token) =>
|
|
53
|
-
var _a;
|
|
54
|
-
return (_a = token.children) == null ? void 0 : _a.filter((t) => ["text", "code_inline"].includes(t.type) && !t.content.match(/^\s*$/)).map((t) => t.content.trim()).join(" ");
|
|
55
|
-
}
|
|
52
|
+
(token) => _optionalChain([token, 'access', _ => _.children, 'optionalAccess', _2 => _2.filter, 'call', _3 => _3((t) => ["text", "code_inline"].includes(t.type) && !t.content.match(/^\s*$/)), 'access', _4 => _4.map, 'call', _5 => _5((t) => t.content.trim()), 'access', _6 => _6.join, 'call', _7 => _7(" ")])
|
|
56
53
|
).filter(Boolean).join(" ");
|
|
57
54
|
}
|
|
58
55
|
function generateGoogleFontsUrl(options) {
|