@slidev/cli 0.23.2 → 0.25.2
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 +8 -0
- package/dist/{build-IEU5WUDM.mjs → build-I3BGLWRY.mjs} +3 -3
- package/dist/{build-QDRV2UJ5.js → build-T3JISGJJ.js} +26 -18
- package/dist/{chunk-M25N7CYC.js → chunk-2C5QEPFE.js} +64 -44
- package/dist/{chunk-UJKYYHMF.js → chunk-AIJ26HP4.js} +6 -2
- package/dist/{chunk-6LUF2SCB.mjs → chunk-BCAVCX4N.mjs} +2 -2
- package/dist/{chunk-G3DZBNYL.mjs → chunk-DFNSCAEG.mjs} +1 -3
- package/dist/{chunk-VWK3TRVU.mjs → chunk-JFAR7TWB.mjs} +1 -1
- package/dist/{chunk-S6F4YP7Z.js → chunk-QZN3O36F.js} +114 -62
- package/dist/{chunk-NHK2R4LN.mjs → chunk-YULAXBCT.mjs} +12 -9
- package/dist/{chunk-KRCSYS75.js → chunk-ZKLT77C5.js} +15 -4
- package/dist/cli.js +20 -18
- package/dist/cli.mjs +6 -6
- package/dist/{export-SNR56WLB.mjs → export-IQ5M5YN3.mjs} +2 -2
- package/dist/{export-ZTTMEOKV.js → export-VLRAN6SC.js} +6 -4
- package/dist/index.js +13 -5
- package/dist/index.mjs +4 -4
- package/package.json +18 -18
package/README.md
CHANGED
|
@@ -54,6 +54,14 @@ Status: <b>Public Beta 🎉</b><br>
|
|
|
54
54
|
|
|
55
55
|
## Getting Started
|
|
56
56
|
|
|
57
|
+
### Try it Online ⚡️
|
|
58
|
+
|
|
59
|
+
[sli.dev/new](https://sli.dev/new)
|
|
60
|
+
|
|
61
|
+
[](https://sli.dev/new)
|
|
62
|
+
|
|
63
|
+
### Init Project Locally
|
|
64
|
+
|
|
57
65
|
Install [Node.js >=14](https://nodejs.org/) and run the following command:
|
|
58
66
|
|
|
59
67
|
```bash
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YULAXBCT.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require,
|
|
8
8
|
__spreadValues,
|
|
9
9
|
__toModule
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-DFNSCAEG.mjs";
|
|
11
11
|
|
|
12
12
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
13
13
|
var require_build = __commonJS({
|
|
@@ -369,7 +369,7 @@ async function build(options, viteConfig = {}) {
|
|
|
369
369
|
await fs.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
370
370
|
`, "utf-8");
|
|
371
371
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
372
|
-
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-
|
|
372
|
+
const { exportSlides } = await Promise.resolve().then(() => __toModule(__require("./export-IQ5M5YN3.mjs")));
|
|
373
373
|
const port = 12445;
|
|
374
374
|
const app = connect();
|
|
375
375
|
const server = http.createServer(app);
|
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunk2C5QEPFEjs = require('./chunk-2C5QEPFE.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
var _chunkZKLT77C5js = require('./chunk-ZKLT77C5.js');
|
|
11
12
|
|
|
12
13
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
13
|
-
var require_build =
|
|
14
|
+
var require_build = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
14
15
|
"../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js"(exports) {
|
|
15
|
-
|
|
16
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
17
|
+
var qs = _chunkZKLT77C5js.__require.call(void 0, "querystring");
|
|
16
18
|
function parse(req) {
|
|
17
19
|
let raw = req.url;
|
|
18
20
|
if (raw == null)
|
|
@@ -38,10 +40,11 @@ var require_build = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
38
40
|
});
|
|
39
41
|
|
|
40
42
|
// ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
|
|
41
|
-
var require_sync =
|
|
43
|
+
var require_sync = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
42
44
|
"../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
|
|
43
|
-
|
|
44
|
-
var {
|
|
45
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
46
|
+
var { join: join2, resolve: resolve2 } = _chunkZKLT77C5js.__require.call(void 0, "path");
|
|
47
|
+
var { readdirSync, statSync } = _chunkZKLT77C5js.__require.call(void 0, "fs");
|
|
45
48
|
module.exports = function list(dir, callback, pre = "") {
|
|
46
49
|
dir = resolve2(".", dir);
|
|
47
50
|
let arr = readdirSync(dir);
|
|
@@ -56,8 +59,9 @@ var require_sync = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
56
59
|
});
|
|
57
60
|
|
|
58
61
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js
|
|
59
|
-
var require_Mime =
|
|
62
|
+
var require_Mime = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
60
63
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js"(exports, module) {
|
|
64
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
61
65
|
"use strict";
|
|
62
66
|
function Mime() {
|
|
63
67
|
this._types = Object.create(null);
|
|
@@ -108,15 +112,17 @@ var require_Mime = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
108
112
|
});
|
|
109
113
|
|
|
110
114
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js
|
|
111
|
-
var require_standard =
|
|
115
|
+
var require_standard = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
112
116
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js"(exports, module) {
|
|
117
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
113
118
|
module.exports = { "application/andrew-inset": ["ez"], "application/applixware": ["aw"], "application/atom+xml": ["atom"], "application/atomcat+xml": ["atomcat"], "application/atomdeleted+xml": ["atomdeleted"], "application/atomsvc+xml": ["atomsvc"], "application/atsc-dwd+xml": ["dwd"], "application/atsc-held+xml": ["held"], "application/atsc-rsat+xml": ["rsat"], "application/bdoc": ["bdoc"], "application/calendar+xml": ["xcs"], "application/ccxml+xml": ["ccxml"], "application/cdfx+xml": ["cdfx"], "application/cdmi-capability": ["cdmia"], "application/cdmi-container": ["cdmic"], "application/cdmi-domain": ["cdmid"], "application/cdmi-object": ["cdmio"], "application/cdmi-queue": ["cdmiq"], "application/cu-seeme": ["cu"], "application/dash+xml": ["mpd"], "application/davmount+xml": ["davmount"], "application/docbook+xml": ["dbk"], "application/dssc+der": ["dssc"], "application/dssc+xml": ["xdssc"], "application/ecmascript": ["ecma", "es"], "application/emma+xml": ["emma"], "application/emotionml+xml": ["emotionml"], "application/epub+zip": ["epub"], "application/exi": ["exi"], "application/fdt+xml": ["fdt"], "application/font-tdpfr": ["pfr"], "application/geo+json": ["geojson"], "application/gml+xml": ["gml"], "application/gpx+xml": ["gpx"], "application/gxf": ["gxf"], "application/gzip": ["gz"], "application/hjson": ["hjson"], "application/hyperstudio": ["stk"], "application/inkml+xml": ["ink", "inkml"], "application/ipfix": ["ipfix"], "application/its+xml": ["its"], "application/java-archive": ["jar", "war", "ear"], "application/java-serialized-object": ["ser"], "application/java-vm": ["class"], "application/javascript": ["js", "mjs"], "application/json": ["json", "map"], "application/json5": ["json5"], "application/jsonml+json": ["jsonml"], "application/ld+json": ["jsonld"], "application/lgr+xml": ["lgr"], "application/lost+xml": ["lostxml"], "application/mac-binhex40": ["hqx"], "application/mac-compactpro": ["cpt"], "application/mads+xml": ["mads"], "application/manifest+json": ["webmanifest"], "application/marc": ["mrc"], "application/marcxml+xml": ["mrcx"], "application/mathematica": ["ma", "nb", "mb"], "application/mathml+xml": ["mathml"], "application/mbox": ["mbox"], "application/mediaservercontrol+xml": ["mscml"], "application/metalink+xml": ["metalink"], "application/metalink4+xml": ["meta4"], "application/mets+xml": ["mets"], "application/mmt-aei+xml": ["maei"], "application/mmt-usd+xml": ["musd"], "application/mods+xml": ["mods"], "application/mp21": ["m21", "mp21"], "application/mp4": ["mp4s", "m4p"], "application/mrb-consumer+xml": ["*xdf"], "application/mrb-publish+xml": ["*xdf"], "application/msword": ["doc", "dot"], "application/mxf": ["mxf"], "application/n-quads": ["nq"], "application/n-triples": ["nt"], "application/node": ["cjs"], "application/octet-stream": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"], "application/oda": ["oda"], "application/oebps-package+xml": ["opf"], "application/ogg": ["ogx"], "application/omdoc+xml": ["omdoc"], "application/onenote": ["onetoc", "onetoc2", "onetmp", "onepkg"], "application/oxps": ["oxps"], "application/p2p-overlay+xml": ["relo"], "application/patch-ops-error+xml": ["*xer"], "application/pdf": ["pdf"], "application/pgp-encrypted": ["pgp"], "application/pgp-signature": ["asc", "sig"], "application/pics-rules": ["prf"], "application/pkcs10": ["p10"], "application/pkcs7-mime": ["p7m", "p7c"], "application/pkcs7-signature": ["p7s"], "application/pkcs8": ["p8"], "application/pkix-attr-cert": ["ac"], "application/pkix-cert": ["cer"], "application/pkix-crl": ["crl"], "application/pkix-pkipath": ["pkipath"], "application/pkixcmp": ["pki"], "application/pls+xml": ["pls"], "application/postscript": ["ai", "eps", "ps"], "application/provenance+xml": ["provx"], "application/pskc+xml": ["pskcxml"], "application/raml+yaml": ["raml"], "application/rdf+xml": ["rdf", "owl"], "application/reginfo+xml": ["rif"], "application/relax-ng-compact-syntax": ["rnc"], "application/resource-lists+xml": ["rl"], "application/resource-lists-diff+xml": ["rld"], "application/rls-services+xml": ["rs"], "application/route-apd+xml": ["rapd"], "application/route-s-tsid+xml": ["sls"], "application/route-usd+xml": ["rusd"], "application/rpki-ghostbusters": ["gbr"], "application/rpki-manifest": ["mft"], "application/rpki-roa": ["roa"], "application/rsd+xml": ["rsd"], "application/rss+xml": ["rss"], "application/rtf": ["rtf"], "application/sbml+xml": ["sbml"], "application/scvp-cv-request": ["scq"], "application/scvp-cv-response": ["scs"], "application/scvp-vp-request": ["spq"], "application/scvp-vp-response": ["spp"], "application/sdp": ["sdp"], "application/senml+xml": ["senmlx"], "application/sensml+xml": ["sensmlx"], "application/set-payment-initiation": ["setpay"], "application/set-registration-initiation": ["setreg"], "application/shf+xml": ["shf"], "application/sieve": ["siv", "sieve"], "application/smil+xml": ["smi", "smil"], "application/sparql-query": ["rq"], "application/sparql-results+xml": ["srx"], "application/srgs": ["gram"], "application/srgs+xml": ["grxml"], "application/sru+xml": ["sru"], "application/ssdl+xml": ["ssdl"], "application/ssml+xml": ["ssml"], "application/swid+xml": ["swidtag"], "application/tei+xml": ["tei", "teicorpus"], "application/thraud+xml": ["tfi"], "application/timestamped-data": ["tsd"], "application/toml": ["toml"], "application/ttml+xml": ["ttml"], "application/ubjson": ["ubj"], "application/urc-ressheet+xml": ["rsheet"], "application/urc-targetdesc+xml": ["td"], "application/voicexml+xml": ["vxml"], "application/wasm": ["wasm"], "application/widget": ["wgt"], "application/winhlp": ["hlp"], "application/wsdl+xml": ["wsdl"], "application/wspolicy+xml": ["wspolicy"], "application/xaml+xml": ["xaml"], "application/xcap-att+xml": ["xav"], "application/xcap-caps+xml": ["xca"], "application/xcap-diff+xml": ["xdf"], "application/xcap-el+xml": ["xel"], "application/xcap-error+xml": ["xer"], "application/xcap-ns+xml": ["xns"], "application/xenc+xml": ["xenc"], "application/xhtml+xml": ["xhtml", "xht"], "application/xliff+xml": ["xlf"], "application/xml": ["xml", "xsl", "xsd", "rng"], "application/xml-dtd": ["dtd"], "application/xop+xml": ["xop"], "application/xproc+xml": ["xpl"], "application/xslt+xml": ["*xsl", "xslt"], "application/xspf+xml": ["xspf"], "application/xv+xml": ["mxml", "xhvml", "xvml", "xvm"], "application/yang": ["yang"], "application/yin+xml": ["yin"], "application/zip": ["zip"], "audio/3gpp": ["*3gpp"], "audio/adpcm": ["adp"], "audio/amr": ["amr"], "audio/basic": ["au", "snd"], "audio/midi": ["mid", "midi", "kar", "rmi"], "audio/mobile-xmf": ["mxmf"], "audio/mp3": ["*mp3"], "audio/mp4": ["m4a", "mp4a"], "audio/mpeg": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"], "audio/ogg": ["oga", "ogg", "spx", "opus"], "audio/s3m": ["s3m"], "audio/silk": ["sil"], "audio/wav": ["wav"], "audio/wave": ["*wav"], "audio/webm": ["weba"], "audio/xm": ["xm"], "font/collection": ["ttc"], "font/otf": ["otf"], "font/ttf": ["ttf"], "font/woff": ["woff"], "font/woff2": ["woff2"], "image/aces": ["exr"], "image/apng": ["apng"], "image/avif": ["avif"], "image/bmp": ["bmp"], "image/cgm": ["cgm"], "image/dicom-rle": ["drle"], "image/emf": ["emf"], "image/fits": ["fits"], "image/g3fax": ["g3"], "image/gif": ["gif"], "image/heic": ["heic"], "image/heic-sequence": ["heics"], "image/heif": ["heif"], "image/heif-sequence": ["heifs"], "image/hej2k": ["hej2"], "image/hsj2": ["hsj2"], "image/ief": ["ief"], "image/jls": ["jls"], "image/jp2": ["jp2", "jpg2"], "image/jpeg": ["jpeg", "jpg", "jpe"], "image/jph": ["jph"], "image/jphc": ["jhc"], "image/jpm": ["jpm"], "image/jpx": ["jpx", "jpf"], "image/jxr": ["jxr"], "image/jxra": ["jxra"], "image/jxrs": ["jxrs"], "image/jxs": ["jxs"], "image/jxsc": ["jxsc"], "image/jxsi": ["jxsi"], "image/jxss": ["jxss"], "image/ktx": ["ktx"], "image/ktx2": ["ktx2"], "image/png": ["png"], "image/sgi": ["sgi"], "image/svg+xml": ["svg", "svgz"], "image/t38": ["t38"], "image/tiff": ["tif", "tiff"], "image/tiff-fx": ["tfx"], "image/webp": ["webp"], "image/wmf": ["wmf"], "message/disposition-notification": ["disposition-notification"], "message/global": ["u8msg"], "message/global-delivery-status": ["u8dsn"], "message/global-disposition-notification": ["u8mdn"], "message/global-headers": ["u8hdr"], "message/rfc822": ["eml", "mime"], "model/3mf": ["3mf"], "model/gltf+json": ["gltf"], "model/gltf-binary": ["glb"], "model/iges": ["igs", "iges"], "model/mesh": ["msh", "mesh", "silo"], "model/mtl": ["mtl"], "model/obj": ["obj"], "model/stl": ["stl"], "model/vrml": ["wrl", "vrml"], "model/x3d+binary": ["*x3db", "x3dbz"], "model/x3d+fastinfoset": ["x3db"], "model/x3d+vrml": ["*x3dv", "x3dvz"], "model/x3d+xml": ["x3d", "x3dz"], "model/x3d-vrml": ["x3dv"], "text/cache-manifest": ["appcache", "manifest"], "text/calendar": ["ics", "ifb"], "text/coffeescript": ["coffee", "litcoffee"], "text/css": ["css"], "text/csv": ["csv"], "text/html": ["html", "htm", "shtml"], "text/jade": ["jade"], "text/jsx": ["jsx"], "text/less": ["less"], "text/markdown": ["markdown", "md"], "text/mathml": ["mml"], "text/mdx": ["mdx"], "text/n3": ["n3"], "text/plain": ["txt", "text", "conf", "def", "list", "log", "in", "ini"], "text/richtext": ["rtx"], "text/rtf": ["*rtf"], "text/sgml": ["sgml", "sgm"], "text/shex": ["shex"], "text/slim": ["slim", "slm"], "text/spdx": ["spdx"], "text/stylus": ["stylus", "styl"], "text/tab-separated-values": ["tsv"], "text/troff": ["t", "tr", "roff", "man", "me", "ms"], "text/turtle": ["ttl"], "text/uri-list": ["uri", "uris", "urls"], "text/vcard": ["vcard"], "text/vtt": ["vtt"], "text/xml": ["*xml"], "text/yaml": ["yaml", "yml"], "video/3gpp": ["3gp", "3gpp"], "video/3gpp2": ["3g2"], "video/h261": ["h261"], "video/h263": ["h263"], "video/h264": ["h264"], "video/iso.segment": ["m4s"], "video/jpeg": ["jpgv"], "video/jpm": ["*jpm", "jpgm"], "video/mj2": ["mj2", "mjp2"], "video/mp2t": ["ts"], "video/mp4": ["mp4", "mp4v", "mpg4"], "video/mpeg": ["mpeg", "mpg", "mpe", "m1v", "m2v"], "video/ogg": ["ogv"], "video/quicktime": ["qt", "mov"], "video/webm": ["webm"] };
|
|
114
119
|
}
|
|
115
120
|
});
|
|
116
121
|
|
|
117
122
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js
|
|
118
|
-
var require_lite =
|
|
123
|
+
var require_lite = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
119
124
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js"(exports, module) {
|
|
125
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
120
126
|
"use strict";
|
|
121
127
|
var Mime = require_Mime();
|
|
122
128
|
module.exports = new Mime(require_standard());
|
|
@@ -124,10 +130,11 @@ var require_lite = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
124
130
|
});
|
|
125
131
|
|
|
126
132
|
// ../../node_modules/.pnpm/sirv@1.0.17/node_modules/sirv/build.js
|
|
127
|
-
var require_build2 =
|
|
133
|
+
var require_build2 = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
128
134
|
"../../node_modules/.pnpm/sirv@1.0.17/node_modules/sirv/build.js"(exports, module) {
|
|
129
|
-
|
|
130
|
-
var
|
|
135
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
136
|
+
var fs2 = _chunkZKLT77C5js.__require.call(void 0, "fs");
|
|
137
|
+
var { join: join2, normalize, resolve: resolve2 } = _chunkZKLT77C5js.__require.call(void 0, "path");
|
|
131
138
|
var { parse } = require_build();
|
|
132
139
|
var list = require_sync();
|
|
133
140
|
var mime = require_lite();
|
|
@@ -180,7 +187,7 @@ var require_build2 = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
180
187
|
}
|
|
181
188
|
function send(req, res, file, stats, headers) {
|
|
182
189
|
let code = 200, tmp, opts = {};
|
|
183
|
-
headers =
|
|
190
|
+
headers = _chunkZKLT77C5js.__spreadValues.call(void 0, {}, headers);
|
|
184
191
|
for (let key in headers) {
|
|
185
192
|
tmp = res.getHeader(key);
|
|
186
193
|
if (tmp)
|
|
@@ -300,7 +307,8 @@ var require_build2 = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
300
307
|
});
|
|
301
308
|
|
|
302
309
|
// node/build.ts
|
|
303
|
-
|
|
310
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
311
|
+
var import_sirv = _chunkZKLT77C5js.__toModule.call(void 0, require_build2());
|
|
304
312
|
var _path = require('path');
|
|
305
313
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
306
314
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -314,12 +322,12 @@ async function build(options, viteConfig = {}) {
|
|
|
314
322
|
let originalIndexHTML;
|
|
315
323
|
if (_fsextra2.default.existsSync(indexPath))
|
|
316
324
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
317
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
325
|
+
await _fsextra2.default.writeFile(indexPath, await _chunk2C5QEPFEjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
318
326
|
let config = void 0;
|
|
319
327
|
try {
|
|
320
328
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
321
329
|
plugins: [
|
|
322
|
-
await
|
|
330
|
+
await _chunk2C5QEPFEjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
323
331
|
{
|
|
324
332
|
name: "resolve-config",
|
|
325
333
|
configResolved(_config) {
|
|
@@ -369,7 +377,7 @@ async function build(options, viteConfig = {}) {
|
|
|
369
377
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
370
378
|
`, "utf-8");
|
|
371
379
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
372
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
380
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkZKLT77C5js.__toModule.call(void 0, _chunkZKLT77C5js.__require.call(void 0, "./export-VLRAN6SC.js")));
|
|
373
381
|
const port = 12445;
|
|
374
382
|
const app = _connect2.default.call(void 0, );
|
|
375
383
|
const server = _http2.default.createServer(app);
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
var _chunkZKLT77C5js = require('./chunk-ZKLT77C5.js');
|
|
12
13
|
|
|
13
14
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
14
|
-
var require_fast_deep_equal =
|
|
15
|
+
var require_fast_deep_equal = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
15
16
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
17
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
16
18
|
"use strict";
|
|
17
19
|
module.exports = function equal2(a, b) {
|
|
18
20
|
if (a === b)
|
|
@@ -56,6 +58,7 @@ var require_fast_deep_equal = _chunkKRCSYS75js.__commonJS.call(void 0, {
|
|
|
56
58
|
});
|
|
57
59
|
|
|
58
60
|
// node/common.ts
|
|
61
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
59
62
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
60
63
|
var _path = require('path');
|
|
61
64
|
var _utils = require('@antfu/utils');
|
|
@@ -82,12 +85,13 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
82
85
|
body += '\n<script async src="https://platform.twitter.com/widgets.js"><\/script>';
|
|
83
86
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
84
87
|
head += `
|
|
85
|
-
<link rel="stylesheet" href="${
|
|
86
|
-
main = main.replace("__ENTRY__",
|
|
88
|
+
<link rel="stylesheet" href="${_chunkZKLT77C5js.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
89
|
+
main = main.replace("__ENTRY__", _chunkZKLT77C5js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
|
|
87
90
|
return main;
|
|
88
91
|
}
|
|
89
92
|
|
|
90
93
|
// node/plugins/windicss.ts
|
|
94
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
91
95
|
|
|
92
96
|
|
|
93
97
|
|
|
@@ -95,12 +99,13 @@ var _vitepluginwindicss = require('vite-plugin-windicss'); var _vitepluginwindic
|
|
|
95
99
|
var _jiti = require('jiti'); var _jiti2 = _interopRequireDefault(_jiti);
|
|
96
100
|
|
|
97
101
|
// node/plugins/setupNode.ts
|
|
102
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
98
103
|
|
|
99
104
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
100
105
|
|
|
101
106
|
|
|
102
107
|
function deepMerge(a, b, rootPath = "") {
|
|
103
|
-
a =
|
|
108
|
+
a = _chunkZKLT77C5js.__spreadValues.call(void 0, {}, a);
|
|
104
109
|
Object.keys(b).forEach((key) => {
|
|
105
110
|
if (_utils.isObject.call(void 0, a[key]))
|
|
106
111
|
a[key] = deepMerge(a[key], b[key], rootPath ? `${rootPath}.${key}` : key);
|
|
@@ -138,7 +143,7 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
|
|
|
138
143
|
if (config.default)
|
|
139
144
|
config = config.default;
|
|
140
145
|
config = await loadSetups(roots, "windicss.ts", {}, config, true);
|
|
141
|
-
return _vitepluginwindicss2.default.call(void 0,
|
|
146
|
+
return _vitepluginwindicss2.default.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
142
147
|
configFiles: [configFile],
|
|
143
148
|
config,
|
|
144
149
|
onConfigResolved(config2) {
|
|
@@ -160,14 +165,15 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
|
|
|
160
165
|
config2.scanOptions.include.push(`${i}/layouts/*.{vue,ts}`);
|
|
161
166
|
});
|
|
162
167
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
163
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
164
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
165
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
168
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkZKLT77C5js.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
169
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkZKLT77C5js.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
170
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkZKLT77C5js.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
166
171
|
}
|
|
167
172
|
}, windiOptions));
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
// node/plugins/preset.ts
|
|
176
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
171
177
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
172
178
|
var _vite = require('unplugin-icons/vite'); var _vite2 = _interopRequireDefault(_vite);
|
|
173
179
|
var _resolver = require('unplugin-icons/resolver'); var _resolver2 = _interopRequireDefault(_resolver);
|
|
@@ -177,6 +183,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
177
183
|
|
|
178
184
|
|
|
179
185
|
// node/drawings.ts
|
|
186
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
180
187
|
|
|
181
188
|
|
|
182
189
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -222,6 +229,7 @@ ${value}
|
|
|
222
229
|
}
|
|
223
230
|
|
|
224
231
|
// node/plugins/extendConfig.ts
|
|
232
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
225
233
|
|
|
226
234
|
var _vite5 = require('vite');
|
|
227
235
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -233,28 +241,29 @@ var dependencies = {
|
|
|
233
241
|
"@antfu/utils": "^0.3.0",
|
|
234
242
|
"@slidev/parser": "workspace:*",
|
|
235
243
|
"@slidev/types": "workspace:*",
|
|
236
|
-
"@vueuse/core": "^6.
|
|
244
|
+
"@vueuse/core": "^6.4.0",
|
|
237
245
|
"@vueuse/head": "^0.6.0",
|
|
238
246
|
"@vueuse/motion": "^1.6.0",
|
|
239
247
|
codemirror: "^5.62.3",
|
|
240
|
-
drauu: "
|
|
248
|
+
drauu: "0.1.0",
|
|
241
249
|
"file-saver": "^2.0.5",
|
|
242
|
-
"js-base64": "^3.7.
|
|
250
|
+
"js-base64": "^3.7.1",
|
|
243
251
|
"js-yaml": "^4.1.0",
|
|
244
252
|
katex: "^0.13.18",
|
|
245
253
|
mermaid: "^8.12.1",
|
|
246
254
|
"monaco-editor": "^0.27.0",
|
|
247
255
|
nanoid: "^3.1.25",
|
|
248
|
-
prettier: "^2.4.
|
|
256
|
+
prettier: "^2.4.1",
|
|
249
257
|
recordrtc: "^5.6.2",
|
|
250
258
|
resolve: "^1.20.0",
|
|
251
|
-
"vite-plugin-windicss": "^1.4.
|
|
252
|
-
vue: "^3.2.
|
|
259
|
+
"vite-plugin-windicss": "^1.4.3",
|
|
260
|
+
vue: "^3.2.12",
|
|
253
261
|
"vue-router": "^4.0.11",
|
|
254
262
|
windicss: "^3.1.7"
|
|
255
263
|
};
|
|
256
264
|
|
|
257
265
|
// node/vite/searchRoot.ts
|
|
266
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
258
267
|
|
|
259
268
|
|
|
260
269
|
var ROOT_FILES = [
|
|
@@ -314,7 +323,7 @@ function createConfigPlugin(options) {
|
|
|
314
323
|
define: getDefine(options),
|
|
315
324
|
resolve: {
|
|
316
325
|
alias: {
|
|
317
|
-
"@slidev/client/": `${
|
|
326
|
+
"@slidev/client/": `${_chunkZKLT77C5js.toAtFS.call(void 0, options.clientRoot)}/`
|
|
318
327
|
}
|
|
319
328
|
},
|
|
320
329
|
optimizeDeps: {
|
|
@@ -348,7 +357,7 @@ function createConfigPlugin(options) {
|
|
|
348
357
|
if (_isinstalledglobally2.default) {
|
|
349
358
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
350
359
|
injection.root = options.cliRoot;
|
|
351
|
-
injection.resolve.alias.vue = `${
|
|
360
|
+
injection.resolve.alias.vue = `${_chunkZKLT77C5js.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
352
361
|
}
|
|
353
362
|
return _vite5.mergeConfig.call(void 0, config, injection);
|
|
354
363
|
},
|
|
@@ -369,7 +378,7 @@ function createConfigPlugin(options) {
|
|
|
369
378
|
}
|
|
370
379
|
function getDefine(options) {
|
|
371
380
|
return {
|
|
372
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
381
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkZKLT77C5js.toAtFS.call(void 0, options.clientRoot)),
|
|
373
382
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
374
383
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
375
384
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -378,7 +387,8 @@ function getDefine(options) {
|
|
|
378
387
|
}
|
|
379
388
|
|
|
380
389
|
// node/plugins/loaders.ts
|
|
381
|
-
|
|
390
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
391
|
+
var import_fast_deep_equal = _chunkZKLT77C5js.__toModule.call(void 0, require_fast_deep_equal());
|
|
382
392
|
|
|
383
393
|
|
|
384
394
|
|
|
@@ -415,7 +425,7 @@ md.use(_markdownitlinkattributes2.default, {
|
|
|
415
425
|
}
|
|
416
426
|
});
|
|
417
427
|
function prepareSlideInfo(data) {
|
|
418
|
-
return
|
|
428
|
+
return _chunkZKLT77C5js.__spreadProps.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {}, data), {
|
|
419
429
|
notesHTML: md.render((data == null ? void 0 : data.note) || "")
|
|
420
430
|
});
|
|
421
431
|
}
|
|
@@ -505,7 +515,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
505
515
|
const file = `${slidePrefix}${i + 1}.md`;
|
|
506
516
|
try {
|
|
507
517
|
const md2 = await transformMarkdown(MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
|
|
508
|
-
return await VuePlugin.handleHotUpdate(
|
|
518
|
+
return await VuePlugin.handleHotUpdate(_chunkZKLT77C5js.__spreadProps.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {}, ctx), {
|
|
509
519
|
modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
|
|
510
520
|
file,
|
|
511
521
|
read() {
|
|
@@ -587,13 +597,13 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
587
597
|
async function transformMarkdown(code, pageNo, data2) {
|
|
588
598
|
var _a, _b;
|
|
589
599
|
const layouts = await getLayouts();
|
|
590
|
-
const frontmatter =
|
|
600
|
+
const frontmatter = _chunkZKLT77C5js.__spreadValues.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
|
|
591
601
|
const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
|
|
592
602
|
if (!layouts[layoutName])
|
|
593
603
|
throw new Error(`Unknown layout "${layoutName}"`);
|
|
594
604
|
delete frontmatter.title;
|
|
595
605
|
const imports = [
|
|
596
|
-
`import InjectedLayout from "${
|
|
606
|
+
`import InjectedLayout from "${_chunkZKLT77C5js.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
597
607
|
`const frontmatter = ${JSON.stringify(frontmatter)}`
|
|
598
608
|
];
|
|
599
609
|
code = code.replace(/(<script setup.*>)/g, `$1
|
|
@@ -639,9 +649,9 @@ ${code.slice(injectB)}`;
|
|
|
639
649
|
}
|
|
640
650
|
async function generateUserStyles() {
|
|
641
651
|
const imports = [
|
|
642
|
-
`import "${
|
|
643
|
-
`import "${
|
|
644
|
-
`import "${
|
|
652
|
+
`import "${_chunkZKLT77C5js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
653
|
+
`import "${_chunkZKLT77C5js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
654
|
+
`import "${_chunkZKLT77C5js.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
|
|
645
655
|
];
|
|
646
656
|
const roots2 = _utils.uniq.call(void 0, [
|
|
647
657
|
...themeRoots,
|
|
@@ -657,13 +667,13 @@ ${code.slice(injectB)}`;
|
|
|
657
667
|
];
|
|
658
668
|
for (const style of styles) {
|
|
659
669
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
660
|
-
imports.push(`import "${
|
|
670
|
+
imports.push(`import "${_chunkZKLT77C5js.toAtFS.call(void 0, style)}"`);
|
|
661
671
|
continue;
|
|
662
672
|
}
|
|
663
673
|
}
|
|
664
674
|
}
|
|
665
675
|
if (data.features.katex)
|
|
666
|
-
imports.push(`import "${
|
|
676
|
+
imports.push(`import "${_chunkZKLT77C5js.toAtFS.call(void 0, _chunkZKLT77C5js.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
667
677
|
return imports.join("\n");
|
|
668
678
|
}
|
|
669
679
|
async function generateMonacoTypes() {
|
|
@@ -672,7 +682,7 @@ ${code.slice(injectB)}`;
|
|
|
672
682
|
async function generateLayouts() {
|
|
673
683
|
const imports = [];
|
|
674
684
|
const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
|
|
675
|
-
imports.push(`import __layout_${k} from "${
|
|
685
|
+
imports.push(`import __layout_${k} from "${_chunkZKLT77C5js.toAtFS.call(void 0, v)}"`);
|
|
676
686
|
return [k, `__layout_${k}`];
|
|
677
687
|
});
|
|
678
688
|
return [
|
|
@@ -718,10 +728,10 @@ ${routes.join(",\n")}
|
|
|
718
728
|
return [...imports, routesStr].join("\n");
|
|
719
729
|
}
|
|
720
730
|
function generateConfigs() {
|
|
721
|
-
const config =
|
|
731
|
+
const config = _chunkZKLT77C5js.__spreadValues.call(void 0, {}, data.config);
|
|
722
732
|
if (_utils.isString.call(void 0, config.title)) {
|
|
723
733
|
const tokens = md.parseInline(config.title, {});
|
|
724
|
-
config.title =
|
|
734
|
+
config.title = _chunkZKLT77C5js.stringifyMarkdownTokens.call(void 0, tokens);
|
|
725
735
|
}
|
|
726
736
|
if (_utils.isString.call(void 0, config.info))
|
|
727
737
|
config.info = md.render(config.info);
|
|
@@ -742,7 +752,7 @@ ${routes.join(",\n")}
|
|
|
742
752
|
];
|
|
743
753
|
}
|
|
744
754
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
745
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
755
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkZKLT77C5js.toAtFS.call(void 0, i)}'`).join("\n");
|
|
746
756
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
747
757
|
return `
|
|
748
758
|
${imports}
|
|
@@ -757,6 +767,7 @@ export default {
|
|
|
757
767
|
}
|
|
758
768
|
|
|
759
769
|
// node/plugins/monacoTransform.ts
|
|
770
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
760
771
|
|
|
761
772
|
|
|
762
773
|
|
|
@@ -790,6 +801,7 @@ function createMonacoTypesLoader() {
|
|
|
790
801
|
}
|
|
791
802
|
|
|
792
803
|
// node/plugins/setupClient.ts
|
|
804
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
793
805
|
|
|
794
806
|
|
|
795
807
|
|
|
@@ -811,7 +823,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
811
823
|
setups.forEach((path, idx) => {
|
|
812
824
|
if (!_fs.existsSync.call(void 0, path))
|
|
813
825
|
return;
|
|
814
|
-
imports.push(`import __n${idx} from '${
|
|
826
|
+
imports.push(`import __n${idx} from '${_chunkZKLT77C5js.toAtFS.call(void 0, path)}'`);
|
|
815
827
|
let fn = `__n${idx}`;
|
|
816
828
|
let awaitFn = `await __n${idx}`;
|
|
817
829
|
if (/\binjection_return\b/g.test(code)) {
|
|
@@ -839,6 +851,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
839
851
|
}
|
|
840
852
|
|
|
841
853
|
// node/plugins/markdown.ts
|
|
854
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
842
855
|
var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
|
|
843
856
|
var _jsbase64 = require('js-base64'); var _jsbase642 = _interopRequireDefault(_jsbase64);
|
|
844
857
|
|
|
@@ -847,6 +860,7 @@ var _markdownitfootnote = require('markdown-it-footnote'); var _markdownitfootno
|
|
|
847
860
|
var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
848
861
|
|
|
849
862
|
// node/plugins/markdown-it-katex.ts
|
|
863
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
850
864
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
851
865
|
function isValidDelim(state, pos) {
|
|
852
866
|
const max = state.posMax;
|
|
@@ -993,6 +1007,7 @@ function math_plugin(md2, options) {
|
|
|
993
1007
|
}
|
|
994
1008
|
|
|
995
1009
|
// node/plugins/markdown-it-prism.ts
|
|
1010
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
996
1011
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
997
1012
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
998
1013
|
var DEFAULTS = {
|
|
@@ -1015,7 +1030,7 @@ function loadPrismLang(lang) {
|
|
|
1015
1030
|
}
|
|
1016
1031
|
function loadPrismPlugin(name) {
|
|
1017
1032
|
try {
|
|
1018
|
-
|
|
1033
|
+
_chunkZKLT77C5js.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1019
1034
|
} catch (e) {
|
|
1020
1035
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1021
1036
|
}
|
|
@@ -1055,6 +1070,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1055
1070
|
}
|
|
1056
1071
|
|
|
1057
1072
|
// node/plugins/markdown-it-shiki.ts
|
|
1073
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
1058
1074
|
function getThemeName(theme) {
|
|
1059
1075
|
if (typeof theme === "string")
|
|
1060
1076
|
return theme;
|
|
@@ -1076,7 +1092,7 @@ function resolveShikiOptions(options) {
|
|
|
1076
1092
|
themes.push(options.theme);
|
|
1077
1093
|
}
|
|
1078
1094
|
}
|
|
1079
|
-
return
|
|
1095
|
+
return _chunkZKLT77C5js.__spreadProps.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {}, options), {
|
|
1080
1096
|
themes,
|
|
1081
1097
|
darkModeThemes: darkModeThemes ? {
|
|
1082
1098
|
dark: getThemeName(darkModeThemes.dark),
|
|
@@ -1114,7 +1130,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1114
1130
|
const setups = [];
|
|
1115
1131
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1116
1132
|
if (config.highlighter === "shiki") {
|
|
1117
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1133
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkZKLT77C5js.__toModule.call(void 0, _chunkZKLT77C5js.__require.call(void 0, "shiki")));
|
|
1118
1134
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1119
1135
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1120
1136
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1123,11 +1139,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1123
1139
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
1124
1140
|
}
|
|
1125
1141
|
const KatexOptions2 = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1126
|
-
return _vitepluginmd2.default.call(void 0,
|
|
1142
|
+
return _vitepluginmd2.default.call(void 0, _chunkZKLT77C5js.__spreadProps.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1127
1143
|
wrapperClasses: "",
|
|
1128
1144
|
headEnabled: false,
|
|
1129
1145
|
frontmatter: false,
|
|
1130
|
-
markdownItOptions:
|
|
1146
|
+
markdownItOptions: _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1131
1147
|
quotes: `""''`,
|
|
1132
1148
|
html: true,
|
|
1133
1149
|
xhtmlOut: true,
|
|
@@ -1256,6 +1272,7 @@ function escapeVueInCode(md2) {
|
|
|
1256
1272
|
}
|
|
1257
1273
|
|
|
1258
1274
|
// node/plugins/patchTransform.ts
|
|
1275
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
1259
1276
|
|
|
1260
1277
|
function createFixPlugins(options) {
|
|
1261
1278
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1309,10 +1326,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1309
1326
|
clientRoot,
|
|
1310
1327
|
data: { config }
|
|
1311
1328
|
} = options;
|
|
1312
|
-
const VuePlugin = _pluginvue2.default.call(void 0,
|
|
1329
|
+
const VuePlugin = _pluginvue2.default.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1313
1330
|
include: [/\.vue$/, /\.md$/],
|
|
1314
1331
|
exclude: [],
|
|
1315
|
-
template:
|
|
1332
|
+
template: _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1316
1333
|
compilerOptions: {
|
|
1317
1334
|
isCustomElement(tag) {
|
|
1318
1335
|
return customElements.has(tag);
|
|
@@ -1327,7 +1344,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1327
1344
|
MarkdownPlugin,
|
|
1328
1345
|
VuePlugin,
|
|
1329
1346
|
createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
|
|
1330
|
-
_vite4.default.call(void 0,
|
|
1347
|
+
_vite4.default.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1331
1348
|
extensions: ["vue", "md", "ts"],
|
|
1332
1349
|
dirs: [
|
|
1333
1350
|
`${clientRoot}/builtin`,
|
|
@@ -1340,12 +1357,15 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1340
1357
|
exclude: [],
|
|
1341
1358
|
resolvers: [
|
|
1342
1359
|
_resolver2.default.call(void 0, {
|
|
1343
|
-
prefix: ""
|
|
1360
|
+
prefix: "",
|
|
1361
|
+
customCollections: Object.keys(iconsOptions.customCollections || [])
|
|
1344
1362
|
})
|
|
1345
1363
|
]
|
|
1346
1364
|
}, componentsOptions)),
|
|
1347
|
-
_vite2.default.call(void 0,
|
|
1348
|
-
|
|
1365
|
+
_vite2.default.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1366
|
+
defaultClass: "slidev-icon"
|
|
1367
|
+
}, iconsOptions)),
|
|
1368
|
+
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunkZKLT77C5js.__spreadValues.call(void 0, {
|
|
1349
1369
|
rules: [
|
|
1350
1370
|
..._vitepluginremoteassets.DefaultRules,
|
|
1351
1371
|
{
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk2C5QEPFEjs = require('./chunk-2C5QEPFE.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkZKLT77C5js = require('./chunk-ZKLT77C5.js');
|
|
4
7
|
|
|
5
8
|
// node/server.ts
|
|
9
|
+
_chunkZKLT77C5js.init_cjs_shims.call(void 0, );
|
|
6
10
|
var _vite = require('vite');
|
|
7
11
|
async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
8
12
|
const rawConfig = await _vite.resolveConfig.call(void 0, {}, "serve");
|
|
@@ -10,7 +14,7 @@ async function createServer(options, viteConfig = {}, serverOptions = {}) {
|
|
|
10
14
|
process.env.EDITOR = process.env.EDITOR || "code";
|
|
11
15
|
const server = await _vite.createServer.call(void 0, _vite.mergeConfig.call(void 0, viteConfig, {
|
|
12
16
|
plugins: [
|
|
13
|
-
await
|
|
17
|
+
await _chunk2C5QEPFEjs.ViteSlidevPlugin.call(void 0, options, pluginOptions, serverOptions)
|
|
14
18
|
]
|
|
15
19
|
}));
|
|
16
20
|
return server;
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
__require,
|
|
4
4
|
__toModule,
|
|
5
5
|
resolveImportPath
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DFNSCAEG.mjs";
|
|
7
7
|
|
|
8
8
|
// ../../node_modules/.pnpm/@antfu+ni@0.9.3/node_modules/@antfu/ni/dist/chunk-2MNBUMB6.js
|
|
9
9
|
var require_chunk_2MNBUMB6 = __commonJS({
|
|
@@ -10094,7 +10094,7 @@ var require_semver2 = __commonJS({
|
|
|
10094
10094
|
});
|
|
10095
10095
|
|
|
10096
10096
|
// package.json
|
|
10097
|
-
var version = "0.
|
|
10097
|
+
var version = "0.25.2";
|
|
10098
10098
|
|
|
10099
10099
|
// node/themes.ts
|
|
10100
10100
|
var import_ni = __toModule(require_dist());
|