@slidev/cli 0.41.1 → 0.42.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-KUT3K5TN.mjs → build-2HNZGPOJ.mjs} +5 -3
- package/dist/{build-3GLTTQXV.js → build-FWNZEWR3.js} +9 -7
- package/dist/chunk-6XVZLT3I.mjs +35 -0
- package/dist/chunk-6ZL4B4HQ.js +76 -0
- package/dist/{chunk-5QG2FB7Y.mjs → chunk-7S3GFZIX.mjs} +8 -6
- package/dist/{chunk-AV6T2PNJ.mjs → chunk-C5RFODBO.mjs} +63 -184
- package/dist/chunk-CIUEQ4TI.mjs +76 -0
- package/dist/{chunk-OM6HSZVY.js → chunk-DZKW5SLI.js} +82 -80
- package/dist/{chunk-UJUM4LW4.js → chunk-F4LLVFU7.js} +56 -177
- package/dist/chunk-KKGXM3XL.js +35 -0
- package/dist/{chunk-CTG3GV2W.mjs → chunk-L5QH2WZE.mjs} +1 -71
- package/dist/chunk-MJQETB73.js +68 -0
- package/dist/chunk-X7P5WRYP.mjs +65 -0
- package/dist/chunk-YI4ZV27K.js +65 -0
- package/dist/cli.js +38 -36
- package/dist/cli.mjs +14 -12
- package/dist/{export-KPPDUO6Z.mjs → export-KRS4L4HC.mjs} +2 -1
- package/dist/{export-GTPZJWVE.js → export-PN4EOI4Z.js} +4 -3
- package/dist/index.js +8 -4
- package/dist/index.mjs +8 -4
- package/dist/unocss-2CJUFE63.js +46 -0
- package/dist/unocss-ZLGTDCD7.mjs +46 -0
- package/dist/windicss-OSTDR2Z6.mjs +9 -0
- package/dist/windicss-YNIIPANV.js +9 -0
- package/package.json +8 -8
- package/dist/chunk-GE7W2DBE.js +0 -138
package/dist/chunk-GE7W2DBE.js
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined")
|
|
11
|
-
return require.apply(this, arguments);
|
|
12
|
-
throw new Error('Dynamic require of "' + x + '" is not supported');
|
|
13
|
-
});
|
|
14
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
15
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
16
|
-
};
|
|
17
|
-
var __copyProps = (to, from, except, desc) => {
|
|
18
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19
|
-
for (let key of __getOwnPropNames(from))
|
|
20
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
21
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
22
|
-
}
|
|
23
|
-
return to;
|
|
24
|
-
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
31
|
-
mod
|
|
32
|
-
));
|
|
33
|
-
var __accessCheck = (obj, member, msg) => {
|
|
34
|
-
if (!member.has(obj))
|
|
35
|
-
throw TypeError("Cannot " + msg);
|
|
36
|
-
};
|
|
37
|
-
var __privateGet = (obj, member, getter) => {
|
|
38
|
-
__accessCheck(obj, member, "read from private field");
|
|
39
|
-
return getter ? getter.call(obj) : member.get(obj);
|
|
40
|
-
};
|
|
41
|
-
var __privateAdd = (obj, member, value) => {
|
|
42
|
-
if (member.has(obj))
|
|
43
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
44
|
-
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
45
|
-
};
|
|
46
|
-
var __privateSet = (obj, member, value, setter) => {
|
|
47
|
-
__accessCheck(obj, member, "write to private field");
|
|
48
|
-
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
49
|
-
return value;
|
|
50
|
-
};
|
|
51
|
-
var __privateWrapper = (obj, member, setter, getter) => ({
|
|
52
|
-
set _(value) {
|
|
53
|
-
__privateSet(obj, member, value, setter);
|
|
54
|
-
},
|
|
55
|
-
get _() {
|
|
56
|
-
return __privateGet(obj, member, getter);
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// node/utils.ts
|
|
61
|
-
var _path = require('path');
|
|
62
|
-
var _utils = require('@antfu/utils');
|
|
63
|
-
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
64
|
-
var _resolve = require('resolve');
|
|
65
|
-
var _globaldirs = require('global-dirs'); var _globaldirs2 = _interopRequireDefault(_globaldirs);
|
|
66
|
-
function toAtFS(path) {
|
|
67
|
-
return `/@fs${_utils.ensurePrefix.call(void 0, "/", _utils.slash.call(void 0, path))}`;
|
|
68
|
-
}
|
|
69
|
-
function resolveImportPath(importName, ensure = false) {
|
|
70
|
-
try {
|
|
71
|
-
return _resolve.sync.call(void 0, importName, {
|
|
72
|
-
preserveSymlinks: false
|
|
73
|
-
});
|
|
74
|
-
} catch (e) {
|
|
75
|
-
}
|
|
76
|
-
if (_isinstalledglobally2.default) {
|
|
77
|
-
try {
|
|
78
|
-
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
|
|
79
|
-
} catch (e2) {
|
|
80
|
-
}
|
|
81
|
-
try {
|
|
82
|
-
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
|
|
83
|
-
} catch (e3) {
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
if (ensure)
|
|
87
|
-
throw new Error(`Failed to resolve package "${importName}"`);
|
|
88
|
-
return void 0;
|
|
89
|
-
}
|
|
90
|
-
function resolveGlobalImportPath(importName) {
|
|
91
|
-
try {
|
|
92
|
-
return _resolve.sync.call(void 0, importName, { preserveSymlinks: false, basedir: __dirname });
|
|
93
|
-
} catch (e4) {
|
|
94
|
-
}
|
|
95
|
-
try {
|
|
96
|
-
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.yarn.packages, importName));
|
|
97
|
-
} catch (e5) {
|
|
98
|
-
}
|
|
99
|
-
try {
|
|
100
|
-
return __require.resolve(_path.join.call(void 0, _globaldirs2.default.npm.packages, importName));
|
|
101
|
-
} catch (e6) {
|
|
102
|
-
}
|
|
103
|
-
throw new Error(`Failed to resolve global package "${importName}"`);
|
|
104
|
-
}
|
|
105
|
-
function stringifyMarkdownTokens(tokens) {
|
|
106
|
-
return tokens.map(
|
|
107
|
-
(token) => {
|
|
108
|
-
var _a;
|
|
109
|
-
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(" ");
|
|
110
|
-
}
|
|
111
|
-
).filter(Boolean).join(" ");
|
|
112
|
-
}
|
|
113
|
-
function generateGoogleFontsUrl(options) {
|
|
114
|
-
const weights = options.weights.flatMap((i) => options.italic ? [`0,${i}`, `1,${i}`] : [`${i}`]).sort().join(";");
|
|
115
|
-
const fonts = options.webfonts.map((i) => `family=${i.replace(/^(['"])(.*)\1$/, "$1").replace(/\s+/g, "+")}:${options.italic ? "ital," : ""}wght@${weights}`).join("&");
|
|
116
|
-
return `https://fonts.googleapis.com/css2?${fonts}&display=swap`;
|
|
117
|
-
}
|
|
118
|
-
function packageExists(name) {
|
|
119
|
-
if (resolveImportPath(`${name}/package.json`))
|
|
120
|
-
return true;
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
exports.__require = __require; exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateWrapper = __privateWrapper; exports.toAtFS = toAtFS; exports.resolveImportPath = resolveImportPath; exports.resolveGlobalImportPath = resolveGlobalImportPath; exports.stringifyMarkdownTokens = stringifyMarkdownTokens; exports.generateGoogleFontsUrl = generateGoogleFontsUrl; exports.packageExists = packageExists;
|