@slidev/cli 0.25.3 → 0.25.7
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-IWDRPFQF.mjs → build-K57CP2CX.mjs} +2 -2
- package/dist/{build-RVGKP6FG.js → build-T2TUHIA6.js} +25 -25
- package/dist/{chunk-P67IPRPH.mjs → chunk-226IETJG.mjs} +1 -1
- package/dist/{chunk-D7KATZKN.mjs → chunk-44AL4CPU.mjs} +1 -1
- package/dist/{chunk-44O4GBAU.js → chunk-5X4UZOIB.js} +64 -65
- package/dist/{chunk-RSMMUZSV.js → chunk-DMF3GKR2.js} +4 -4
- package/dist/{chunk-ZKLT77C5.js → chunk-QIDQYQEG.js} +2 -2
- package/dist/{chunk-OT4BQDBM.js → chunk-TJNUNL74.js} +113 -113
- package/dist/{chunk-WLQ7S4VO.mjs → chunk-ZYM6IFT5.mjs} +11 -12
- package/dist/cli.js +19 -19
- package/dist/cli.mjs +5 -5
- package/dist/{export-GZXBXUOH.mjs → export-NTMD674W.mjs} +1 -1
- package/dist/{export-RUJH34B7.js → export-YIJVRVAE.js} +5 -5
- package/dist/index.js +7 -7
- package/dist/index.mjs +3 -3
- package/package.json +17 -17
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ViteSlidevPlugin,
|
|
3
3
|
getIndexHtml
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ZYM6IFT5.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__commonJS,
|
|
7
7
|
__require,
|
|
@@ -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-NTMD674W.mjs")));
|
|
373
373
|
const port = 12445;
|
|
374
374
|
const app = connect();
|
|
375
375
|
const server = http.createServer(app);
|
|
@@ -1,20 +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 _chunk5X4UZOIBjs = require('./chunk-5X4UZOIB.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkQIDQYQEGjs = require('./chunk-QIDQYQEG.js');
|
|
12
12
|
|
|
13
13
|
// ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
|
|
14
|
-
var require_build =
|
|
14
|
+
var require_build = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
15
15
|
"../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js"(exports) {
|
|
16
|
-
|
|
17
|
-
var qs =
|
|
16
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
17
|
+
var qs = _chunkQIDQYQEGjs.__require.call(void 0, "querystring");
|
|
18
18
|
function parse(req) {
|
|
19
19
|
let raw = req.url;
|
|
20
20
|
if (raw == null)
|
|
@@ -40,11 +40,11 @@ var require_build = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
// ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
|
|
43
|
-
var require_sync =
|
|
43
|
+
var require_sync = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
44
44
|
"../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
|
|
45
|
-
|
|
46
|
-
var { join: join2, resolve: resolve2 } =
|
|
47
|
-
var { readdirSync, statSync } =
|
|
45
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
46
|
+
var { join: join2, resolve: resolve2 } = _chunkQIDQYQEGjs.__require.call(void 0, "path");
|
|
47
|
+
var { readdirSync, statSync } = _chunkQIDQYQEGjs.__require.call(void 0, "fs");
|
|
48
48
|
module.exports = function list(dir, callback, pre = "") {
|
|
49
49
|
dir = resolve2(".", dir);
|
|
50
50
|
let arr = readdirSync(dir);
|
|
@@ -59,9 +59,9 @@ var require_sync = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js
|
|
62
|
-
var require_Mime =
|
|
62
|
+
var require_Mime = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
63
63
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js"(exports, module) {
|
|
64
|
-
|
|
64
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
65
65
|
"use strict";
|
|
66
66
|
function Mime() {
|
|
67
67
|
this._types = Object.create(null);
|
|
@@ -112,17 +112,17 @@ var require_Mime = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
112
112
|
});
|
|
113
113
|
|
|
114
114
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js
|
|
115
|
-
var require_standard =
|
|
115
|
+
var require_standard = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
116
116
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js"(exports, module) {
|
|
117
|
-
|
|
117
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
118
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"] };
|
|
119
119
|
}
|
|
120
120
|
});
|
|
121
121
|
|
|
122
122
|
// ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js
|
|
123
|
-
var require_lite =
|
|
123
|
+
var require_lite = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
124
124
|
"../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js"(exports, module) {
|
|
125
|
-
|
|
125
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
126
126
|
"use strict";
|
|
127
127
|
var Mime = require_Mime();
|
|
128
128
|
module.exports = new Mime(require_standard());
|
|
@@ -130,11 +130,11 @@ var require_lite = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
130
130
|
});
|
|
131
131
|
|
|
132
132
|
// ../../node_modules/.pnpm/sirv@1.0.17/node_modules/sirv/build.js
|
|
133
|
-
var require_build2 =
|
|
133
|
+
var require_build2 = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
134
134
|
"../../node_modules/.pnpm/sirv@1.0.17/node_modules/sirv/build.js"(exports, module) {
|
|
135
|
-
|
|
136
|
-
var fs2 =
|
|
137
|
-
var { join: join2, normalize, resolve: resolve2 } =
|
|
135
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
136
|
+
var fs2 = _chunkQIDQYQEGjs.__require.call(void 0, "fs");
|
|
137
|
+
var { join: join2, normalize, resolve: resolve2 } = _chunkQIDQYQEGjs.__require.call(void 0, "path");
|
|
138
138
|
var { parse } = require_build();
|
|
139
139
|
var list = require_sync();
|
|
140
140
|
var mime = require_lite();
|
|
@@ -187,7 +187,7 @@ var require_build2 = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
187
187
|
}
|
|
188
188
|
function send(req, res, file, stats, headers) {
|
|
189
189
|
let code = 200, tmp, opts = {};
|
|
190
|
-
headers =
|
|
190
|
+
headers = _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, headers);
|
|
191
191
|
for (let key in headers) {
|
|
192
192
|
tmp = res.getHeader(key);
|
|
193
193
|
if (tmp)
|
|
@@ -307,8 +307,8 @@ var require_build2 = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
307
307
|
});
|
|
308
308
|
|
|
309
309
|
// node/build.ts
|
|
310
|
-
|
|
311
|
-
var import_sirv =
|
|
310
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
311
|
+
var import_sirv = _chunkQIDQYQEGjs.__toModule.call(void 0, require_build2());
|
|
312
312
|
var _path = require('path');
|
|
313
313
|
var _http = require('http'); var _http2 = _interopRequireDefault(_http);
|
|
314
314
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -322,12 +322,12 @@ async function build(options, viteConfig = {}) {
|
|
|
322
322
|
let originalIndexHTML;
|
|
323
323
|
if (_fsextra2.default.existsSync(indexPath))
|
|
324
324
|
originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
|
|
325
|
-
await _fsextra2.default.writeFile(indexPath, await
|
|
325
|
+
await _fsextra2.default.writeFile(indexPath, await _chunk5X4UZOIBjs.getIndexHtml.call(void 0, options), "utf-8");
|
|
326
326
|
let config = void 0;
|
|
327
327
|
try {
|
|
328
328
|
const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
|
|
329
329
|
plugins: [
|
|
330
|
-
await
|
|
330
|
+
await _chunk5X4UZOIBjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
|
|
331
331
|
{
|
|
332
332
|
name: "resolve-config",
|
|
333
333
|
configResolved(_config) {
|
|
@@ -377,7 +377,7 @@ async function build(options, viteConfig = {}) {
|
|
|
377
377
|
await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
|
|
378
378
|
`, "utf-8");
|
|
379
379
|
if ([true, "true", "auto"].includes(options.data.config.download)) {
|
|
380
|
-
const { exportSlides } = await Promise.resolve().then(() =>
|
|
380
|
+
const { exportSlides } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "./export-YIJVRVAE.js")));
|
|
381
381
|
const port = 12445;
|
|
382
382
|
const app = _connect2.default.call(void 0, );
|
|
383
383
|
const server = _http2.default.createServer(app);
|
|
@@ -10094,7 +10094,7 @@ var require_semver2 = __commonJS({
|
|
|
10094
10094
|
});
|
|
10095
10095
|
|
|
10096
10096
|
// package.json
|
|
10097
|
-
var version = "0.25.
|
|
10097
|
+
var version = "0.25.7";
|
|
10098
10098
|
|
|
10099
10099
|
// node/themes.ts
|
|
10100
10100
|
var import_ni = __toModule(require_dist());
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _chunkQIDQYQEGjs = require('./chunk-QIDQYQEG.js');
|
|
13
13
|
|
|
14
14
|
// ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
|
|
15
|
-
var require_fast_deep_equal =
|
|
15
|
+
var require_fast_deep_equal = _chunkQIDQYQEGjs.__commonJS.call(void 0, {
|
|
16
16
|
"../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
|
|
17
|
-
|
|
17
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
18
18
|
"use strict";
|
|
19
19
|
module.exports = function equal2(a, b) {
|
|
20
20
|
if (a === b)
|
|
@@ -58,7 +58,7 @@ var require_fast_deep_equal = _chunkZKLT77C5js.__commonJS.call(void 0, {
|
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
// node/common.ts
|
|
61
|
-
|
|
61
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
62
62
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
63
63
|
var _path = require('path');
|
|
64
64
|
var _utils = require('@antfu/utils');
|
|
@@ -85,13 +85,13 @@ ${(((_b = index.match(/<body>([\s\S]*?)<\/body>/im)) == null ? void 0 : _b[1]) |
|
|
|
85
85
|
body += '\n<script async src="https://platform.twitter.com/widgets.js"><\/script>';
|
|
86
86
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
87
87
|
head += `
|
|
88
|
-
<link rel="stylesheet" href="${
|
|
89
|
-
main = main.replace("__ENTRY__",
|
|
88
|
+
<link rel="stylesheet" href="${_chunkQIDQYQEGjs.generateGoogleFontsUrl.call(void 0, data.config.fonts)}" type="text/css">`;
|
|
89
|
+
main = main.replace("__ENTRY__", _chunkQIDQYQEGjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
|
|
90
90
|
return main;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// node/plugins/windicss.ts
|
|
94
|
-
|
|
94
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
@@ -99,13 +99,13 @@ var _vitepluginwindicss = require('vite-plugin-windicss'); var _vitepluginwindic
|
|
|
99
99
|
var _jiti = require('jiti'); var _jiti2 = _interopRequireDefault(_jiti);
|
|
100
100
|
|
|
101
101
|
// node/plugins/setupNode.ts
|
|
102
|
-
|
|
102
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
103
103
|
|
|
104
104
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
function deepMerge(a, b, rootPath = "") {
|
|
108
|
-
a =
|
|
108
|
+
a = _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, a);
|
|
109
109
|
Object.keys(b).forEach((key) => {
|
|
110
110
|
if (_utils.isObject.call(void 0, a[key]))
|
|
111
111
|
a[key] = deepMerge(a[key], b[key], rootPath ? `${rootPath}.${key}` : key);
|
|
@@ -143,7 +143,7 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
|
|
|
143
143
|
if (config.default)
|
|
144
144
|
config = config.default;
|
|
145
145
|
config = await loadSetups(roots, "windicss.ts", {}, config, true);
|
|
146
|
-
return _vitepluginwindicss2.default.call(void 0,
|
|
146
|
+
return _vitepluginwindicss2.default.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
147
147
|
configFiles: [configFile],
|
|
148
148
|
config,
|
|
149
149
|
onConfigResolved(config2) {
|
|
@@ -165,15 +165,15 @@ async function createWindiCSSPlugin({ themeRoots, clientRoot, userRoot, roots, d
|
|
|
165
165
|
config2.scanOptions.include.push(`${i}/layouts/*.{vue,ts}`);
|
|
166
166
|
});
|
|
167
167
|
config2.scanOptions.include.push(`!${_utils.slash.call(void 0, _path.resolve.call(void 0, userRoot, "node_modules"))}`);
|
|
168
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
169
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
170
|
-
config2.scanOptions.exclude.push(_path.dirname.call(void 0,
|
|
168
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQIDQYQEGjs.resolveImportPath.call(void 0, "monaco-editor/package.json", true)));
|
|
169
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQIDQYQEGjs.resolveImportPath.call(void 0, "katex/package.json", true)));
|
|
170
|
+
config2.scanOptions.exclude.push(_path.dirname.call(void 0, _chunkQIDQYQEGjs.resolveImportPath.call(void 0, "prettier/package.json", true)));
|
|
171
171
|
}
|
|
172
172
|
}, windiOptions));
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
// node/plugins/preset.ts
|
|
176
|
-
|
|
176
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
177
177
|
var _pluginvue = require('@vitejs/plugin-vue'); var _pluginvue2 = _interopRequireDefault(_pluginvue);
|
|
178
178
|
var _vite = require('unplugin-icons/vite'); var _vite2 = _interopRequireDefault(_vite);
|
|
179
179
|
var _resolver = require('unplugin-icons/resolver'); var _resolver2 = _interopRequireDefault(_resolver);
|
|
@@ -183,7 +183,7 @@ var _vitepluginvueserverref = require('vite-plugin-vue-server-ref'); var _vitepl
|
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
// node/drawings.ts
|
|
186
|
-
|
|
186
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
187
187
|
|
|
188
188
|
|
|
189
189
|
var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
|
|
@@ -229,7 +229,7 @@ ${value}
|
|
|
229
229
|
}
|
|
230
230
|
|
|
231
231
|
// node/plugins/extendConfig.ts
|
|
232
|
-
|
|
232
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
233
233
|
|
|
234
234
|
var _vite5 = require('vite');
|
|
235
235
|
var _isinstalledglobally = require('is-installed-globally'); var _isinstalledglobally2 = _interopRequireDefault(_isinstalledglobally);
|
|
@@ -241,29 +241,29 @@ var dependencies = {
|
|
|
241
241
|
"@antfu/utils": "^0.3.0",
|
|
242
242
|
"@slidev/parser": "workspace:*",
|
|
243
243
|
"@slidev/types": "workspace:*",
|
|
244
|
-
"@vueuse/core": "^6.
|
|
244
|
+
"@vueuse/core": "^6.5.3",
|
|
245
245
|
"@vueuse/head": "^0.6.0",
|
|
246
246
|
"@vueuse/motion": "^1.6.0",
|
|
247
|
-
codemirror: "^5.
|
|
248
|
-
drauu: "^0.
|
|
247
|
+
codemirror: "^5.63.0",
|
|
248
|
+
drauu: "^0.2.0",
|
|
249
249
|
"file-saver": "^2.0.5",
|
|
250
|
-
"js-base64": "^3.7.
|
|
250
|
+
"js-base64": "^3.7.2",
|
|
251
251
|
"js-yaml": "^4.1.0",
|
|
252
252
|
katex: "^0.13.18",
|
|
253
|
-
mermaid: "^8.
|
|
254
|
-
"monaco-editor": "^0.
|
|
255
|
-
nanoid: "^3.1.
|
|
253
|
+
mermaid: "^8.13.0",
|
|
254
|
+
"monaco-editor": "^0.28.1",
|
|
255
|
+
nanoid: "^3.1.28",
|
|
256
256
|
prettier: "^2.4.1",
|
|
257
257
|
recordrtc: "^5.6.2",
|
|
258
258
|
resolve: "^1.20.0",
|
|
259
|
-
"vite-plugin-windicss": "^1.4.
|
|
260
|
-
vue: "^3.2.
|
|
259
|
+
"vite-plugin-windicss": "^1.4.7",
|
|
260
|
+
vue: "^3.2.19",
|
|
261
261
|
"vue-router": "^4.0.11",
|
|
262
262
|
windicss: "^3.1.7"
|
|
263
263
|
};
|
|
264
264
|
|
|
265
265
|
// node/vite/searchRoot.ts
|
|
266
|
-
|
|
266
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
267
267
|
|
|
268
268
|
|
|
269
269
|
var ROOT_FILES = [
|
|
@@ -323,7 +323,7 @@ function createConfigPlugin(options) {
|
|
|
323
323
|
define: getDefine(options),
|
|
324
324
|
resolve: {
|
|
325
325
|
alias: {
|
|
326
|
-
"@slidev/client/": `${
|
|
326
|
+
"@slidev/client/": `${_chunkQIDQYQEGjs.toAtFS.call(void 0, options.clientRoot)}/`
|
|
327
327
|
}
|
|
328
328
|
},
|
|
329
329
|
optimizeDeps: {
|
|
@@ -357,7 +357,7 @@ function createConfigPlugin(options) {
|
|
|
357
357
|
if (_isinstalledglobally2.default) {
|
|
358
358
|
injection.cacheDir = _path.join.call(void 0, options.cliRoot, "node_modules/.vite");
|
|
359
359
|
injection.root = options.cliRoot;
|
|
360
|
-
injection.resolve.alias.vue = `${
|
|
360
|
+
injection.resolve.alias.vue = `${_chunkQIDQYQEGjs.resolveImportPath.call(void 0, "vue/dist/vue.esm-browser.js", true)}`;
|
|
361
361
|
}
|
|
362
362
|
return _vite5.mergeConfig.call(void 0, config, injection);
|
|
363
363
|
},
|
|
@@ -378,7 +378,7 @@ function createConfigPlugin(options) {
|
|
|
378
378
|
}
|
|
379
379
|
function getDefine(options) {
|
|
380
380
|
return {
|
|
381
|
-
__SLIDEV_CLIENT_ROOT__: JSON.stringify(
|
|
381
|
+
__SLIDEV_CLIENT_ROOT__: JSON.stringify(_chunkQIDQYQEGjs.toAtFS.call(void 0, options.clientRoot)),
|
|
382
382
|
__SLIDEV_HASH_ROUTE__: JSON.stringify(options.data.config.routerMode === "hash"),
|
|
383
383
|
__SLIDEV_FEATURE_DRAWINGS__: JSON.stringify(options.data.config.drawings.enabled === true || options.data.config.drawings.enabled === options.mode),
|
|
384
384
|
__SLIDEV_FEATURE_DRAWINGS_PERSIST__: JSON.stringify(!!options.data.config.drawings.persist === true),
|
|
@@ -387,8 +387,8 @@ function getDefine(options) {
|
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
// node/plugins/loaders.ts
|
|
390
|
-
|
|
391
|
-
var import_fast_deep_equal =
|
|
390
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
391
|
+
var import_fast_deep_equal = _chunkQIDQYQEGjs.__toModule.call(void 0, require_fast_deep_equal());
|
|
392
392
|
|
|
393
393
|
|
|
394
394
|
|
|
@@ -425,7 +425,7 @@ md.use(_markdownitlinkattributes2.default, {
|
|
|
425
425
|
}
|
|
426
426
|
});
|
|
427
427
|
function prepareSlideInfo(data) {
|
|
428
|
-
return
|
|
428
|
+
return _chunkQIDQYQEGjs.__spreadProps.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, data), {
|
|
429
429
|
notesHTML: md.render((data == null ? void 0 : data.note) || "")
|
|
430
430
|
});
|
|
431
431
|
}
|
|
@@ -464,6 +464,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
464
464
|
await _fs3.save.call(void 0, data, entry);
|
|
465
465
|
}
|
|
466
466
|
res.statusCode = 200;
|
|
467
|
+
res.write(JSON.stringify(prepareSlideInfo(slide)));
|
|
467
468
|
return res.end();
|
|
468
469
|
}
|
|
469
470
|
next();
|
|
@@ -492,11 +493,9 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
492
493
|
}
|
|
493
494
|
const length = Math.max(data.slides.length, newData.slides.length);
|
|
494
495
|
for (let i = 0; i < length; i++) {
|
|
495
|
-
if (hmrPages.has(i))
|
|
496
|
-
continue;
|
|
497
496
|
const a = data.slides[i];
|
|
498
497
|
const b = newData.slides[i];
|
|
499
|
-
if ((a == null ? void 0 : a.content.trim()) === (b == null ? void 0 : b.content.trim()) && (0, import_fast_deep_equal.default)(a.frontmatter, b.frontmatter))
|
|
498
|
+
if ((a == null ? void 0 : a.content.trim()) === (b == null ? void 0 : b.content.trim()) && (a == null ? void 0 : a.note) === (b == null ? void 0 : b.note) && (0, import_fast_deep_equal.default)(a.frontmatter, b.frontmatter))
|
|
500
499
|
continue;
|
|
501
500
|
ctx.server.ws.send({
|
|
502
501
|
type: "custom",
|
|
@@ -515,7 +514,7 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
515
514
|
const file = `${slidePrefix}${i + 1}.md`;
|
|
516
515
|
try {
|
|
517
516
|
const md2 = await transformMarkdown(MarkdownPlugin.transform((_a2 = newData.slides[i]) == null ? void 0 : _a2.content, file), i, newData);
|
|
518
|
-
return await VuePlugin.handleHotUpdate(
|
|
517
|
+
return await VuePlugin.handleHotUpdate(_chunkQIDQYQEGjs.__spreadProps.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, ctx), {
|
|
519
518
|
modules: Array.from(ctx.server.moduleGraph.getModulesByFile(file) || []),
|
|
520
519
|
file,
|
|
521
520
|
read() {
|
|
@@ -597,13 +596,13 @@ function createSlidesLoader({ data, entry, clientRoot, themeRoots, userRoot, roo
|
|
|
597
596
|
async function transformMarkdown(code, pageNo, data2) {
|
|
598
597
|
var _a, _b;
|
|
599
598
|
const layouts = await getLayouts();
|
|
600
|
-
const frontmatter =
|
|
599
|
+
const frontmatter = _chunkQIDQYQEGjs.__spreadValues.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, ((_a = data2.headmatter) == null ? void 0 : _a.defaults) || {}), ((_b = data2.slides[pageNo]) == null ? void 0 : _b.frontmatter) || {});
|
|
601
600
|
const layoutName = (frontmatter == null ? void 0 : frontmatter.layout) || (pageNo === 0 ? "cover" : "default");
|
|
602
601
|
if (!layouts[layoutName])
|
|
603
602
|
throw new Error(`Unknown layout "${layoutName}"`);
|
|
604
603
|
delete frontmatter.title;
|
|
605
604
|
const imports = [
|
|
606
|
-
`import InjectedLayout from "${
|
|
605
|
+
`import InjectedLayout from "${_chunkQIDQYQEGjs.toAtFS.call(void 0, layouts[layoutName])}"`,
|
|
607
606
|
`const frontmatter = ${JSON.stringify(frontmatter)}`
|
|
608
607
|
];
|
|
609
608
|
code = code.replace(/(<script setup.*>)/g, `$1
|
|
@@ -649,9 +648,9 @@ ${code.slice(injectB)}`;
|
|
|
649
648
|
}
|
|
650
649
|
async function generateUserStyles() {
|
|
651
650
|
const imports = [
|
|
652
|
-
`import "${
|
|
653
|
-
`import "${
|
|
654
|
-
`import "${
|
|
651
|
+
`import "${_chunkQIDQYQEGjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/vars.css"))}"`,
|
|
652
|
+
`import "${_chunkQIDQYQEGjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/index.css"))}"`,
|
|
653
|
+
`import "${_chunkQIDQYQEGjs.toAtFS.call(void 0, _path.join.call(void 0, clientRoot, "styles/code.css"))}"`
|
|
655
654
|
];
|
|
656
655
|
const roots2 = _utils.uniq.call(void 0, [
|
|
657
656
|
...themeRoots,
|
|
@@ -667,13 +666,13 @@ ${code.slice(injectB)}`;
|
|
|
667
666
|
];
|
|
668
667
|
for (const style of styles) {
|
|
669
668
|
if (_fsextra.existsSync.call(void 0, style)) {
|
|
670
|
-
imports.push(`import "${
|
|
669
|
+
imports.push(`import "${_chunkQIDQYQEGjs.toAtFS.call(void 0, style)}"`);
|
|
671
670
|
continue;
|
|
672
671
|
}
|
|
673
672
|
}
|
|
674
673
|
}
|
|
675
674
|
if (data.features.katex)
|
|
676
|
-
imports.push(`import "${
|
|
675
|
+
imports.push(`import "${_chunkQIDQYQEGjs.toAtFS.call(void 0, _chunkQIDQYQEGjs.resolveImportPath.call(void 0, "katex/dist/katex.min.css", true))}"`);
|
|
677
676
|
return imports.join("\n");
|
|
678
677
|
}
|
|
679
678
|
async function generateMonacoTypes() {
|
|
@@ -682,7 +681,7 @@ ${code.slice(injectB)}`;
|
|
|
682
681
|
async function generateLayouts() {
|
|
683
682
|
const imports = [];
|
|
684
683
|
const layouts = _utils.objectMap.call(void 0, await getLayouts(), (k, v) => {
|
|
685
|
-
imports.push(`import __layout_${k} from "${
|
|
684
|
+
imports.push(`import __layout_${k} from "${_chunkQIDQYQEGjs.toAtFS.call(void 0, v)}"`);
|
|
686
685
|
return [k, `__layout_${k}`];
|
|
687
686
|
});
|
|
688
687
|
return [
|
|
@@ -728,10 +727,10 @@ ${routes.join(",\n")}
|
|
|
728
727
|
return [...imports, routesStr].join("\n");
|
|
729
728
|
}
|
|
730
729
|
function generateConfigs() {
|
|
731
|
-
const config =
|
|
730
|
+
const config = _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, data.config);
|
|
732
731
|
if (_utils.isString.call(void 0, config.title)) {
|
|
733
732
|
const tokens = md.parseInline(config.title, {});
|
|
734
|
-
config.title =
|
|
733
|
+
config.title = _chunkQIDQYQEGjs.stringifyMarkdownTokens.call(void 0, tokens);
|
|
735
734
|
}
|
|
736
735
|
if (_utils.isString.call(void 0, config.info))
|
|
737
736
|
config.info = md.render(config.info);
|
|
@@ -752,7 +751,7 @@ ${routes.join(",\n")}
|
|
|
752
751
|
];
|
|
753
752
|
}
|
|
754
753
|
}).filter((i) => _fsextra2.default.existsSync(i));
|
|
755
|
-
const imports = components.map((i, idx) => `import __n${idx} from '${
|
|
754
|
+
const imports = components.map((i, idx) => `import __n${idx} from '${_chunkQIDQYQEGjs.toAtFS.call(void 0, i)}'`).join("\n");
|
|
756
755
|
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
757
756
|
return `
|
|
758
757
|
${imports}
|
|
@@ -767,7 +766,7 @@ export default {
|
|
|
767
766
|
}
|
|
768
767
|
|
|
769
768
|
// node/plugins/monacoTransform.ts
|
|
770
|
-
|
|
769
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
771
770
|
|
|
772
771
|
|
|
773
772
|
|
|
@@ -801,7 +800,7 @@ function createMonacoTypesLoader() {
|
|
|
801
800
|
}
|
|
802
801
|
|
|
803
802
|
// node/plugins/setupClient.ts
|
|
804
|
-
|
|
803
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
805
804
|
|
|
806
805
|
|
|
807
806
|
|
|
@@ -823,7 +822,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
823
822
|
setups.forEach((path, idx) => {
|
|
824
823
|
if (!_fs.existsSync.call(void 0, path))
|
|
825
824
|
return;
|
|
826
|
-
imports.push(`import __n${idx} from '${
|
|
825
|
+
imports.push(`import __n${idx} from '${_chunkQIDQYQEGjs.toAtFS.call(void 0, path)}'`);
|
|
827
826
|
let fn = `__n${idx}`;
|
|
828
827
|
let awaitFn = `await __n${idx}`;
|
|
829
828
|
if (/\binjection_return\b/g.test(code)) {
|
|
@@ -851,7 +850,7 @@ function createClientSetupPlugin({ clientRoot, themeRoots, userRoot }) {
|
|
|
851
850
|
}
|
|
852
851
|
|
|
853
852
|
// node/plugins/markdown.ts
|
|
854
|
-
|
|
853
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
855
854
|
var _vitepluginmd = require('vite-plugin-md'); var _vitepluginmd2 = _interopRequireDefault(_vitepluginmd);
|
|
856
855
|
var _jsbase64 = require('js-base64'); var _jsbase642 = _interopRequireDefault(_jsbase64);
|
|
857
856
|
|
|
@@ -860,7 +859,7 @@ var _markdownitfootnote = require('markdown-it-footnote'); var _markdownitfootno
|
|
|
860
859
|
var _shiki = require('shiki'); var Shiki = _interopRequireWildcard(_shiki);
|
|
861
860
|
|
|
862
861
|
// node/plugins/markdown-it-katex.ts
|
|
863
|
-
|
|
862
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
864
863
|
var _katex = require('katex'); var _katex2 = _interopRequireDefault(_katex);
|
|
865
864
|
function isValidDelim(state, pos) {
|
|
866
865
|
const max = state.posMax;
|
|
@@ -1007,7 +1006,7 @@ function math_plugin(md2, options) {
|
|
|
1007
1006
|
}
|
|
1008
1007
|
|
|
1009
1008
|
// node/plugins/markdown-it-prism.ts
|
|
1010
|
-
|
|
1009
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
1011
1010
|
var _prismjs = require('prismjs'); var _prismjs2 = _interopRequireDefault(_prismjs);
|
|
1012
1011
|
var _ = require('prismjs/components/'); var _2 = _interopRequireDefault(_);
|
|
1013
1012
|
var DEFAULTS = {
|
|
@@ -1030,7 +1029,7 @@ function loadPrismLang(lang) {
|
|
|
1030
1029
|
}
|
|
1031
1030
|
function loadPrismPlugin(name) {
|
|
1032
1031
|
try {
|
|
1033
|
-
|
|
1032
|
+
_chunkQIDQYQEGjs.__require.call(void 0, `prismjs/plugins/${name}/prism-${name}`);
|
|
1034
1033
|
} catch (e) {
|
|
1035
1034
|
throw new Error(`Cannot load Prism plugin "${name}". Please check the spelling.`);
|
|
1036
1035
|
}
|
|
@@ -1070,7 +1069,7 @@ function markdownItPrism(markdownit, useroptions) {
|
|
|
1070
1069
|
}
|
|
1071
1070
|
|
|
1072
1071
|
// node/plugins/markdown-it-shiki.ts
|
|
1073
|
-
|
|
1072
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
1074
1073
|
function getThemeName(theme) {
|
|
1075
1074
|
if (typeof theme === "string")
|
|
1076
1075
|
return theme;
|
|
@@ -1092,7 +1091,7 @@ function resolveShikiOptions(options) {
|
|
|
1092
1091
|
themes.push(options.theme);
|
|
1093
1092
|
}
|
|
1094
1093
|
}
|
|
1095
|
-
return
|
|
1094
|
+
return _chunkQIDQYQEGjs.__spreadProps.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {}, options), {
|
|
1096
1095
|
themes,
|
|
1097
1096
|
darkModeThemes: darkModeThemes ? {
|
|
1098
1097
|
dark: getThemeName(darkModeThemes.dark),
|
|
@@ -1130,7 +1129,7 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1130
1129
|
const setups = [];
|
|
1131
1130
|
const entryPath = _utils.slash.call(void 0, entry);
|
|
1132
1131
|
if (config.highlighter === "shiki") {
|
|
1133
|
-
const { getHighlighter } = await Promise.resolve().then(() =>
|
|
1132
|
+
const { getHighlighter } = await Promise.resolve().then(() => _chunkQIDQYQEGjs.__toModule.call(void 0, _chunkQIDQYQEGjs.__require.call(void 0, "shiki")));
|
|
1134
1133
|
const shikiOptions = await loadSetups(roots, "shiki.ts", Shiki, DEFAULT_SHIKI_OPTIONS, false);
|
|
1135
1134
|
const { langs, themes } = resolveShikiOptions(shikiOptions);
|
|
1136
1135
|
shikiOptions.highlighter = await getHighlighter({ themes, langs });
|
|
@@ -1139,11 +1138,11 @@ async function createMarkdownPlugin({ data: { config }, roots, mode, entry }, {
|
|
|
1139
1138
|
setups.push((md2) => md2.use(markdownItPrism));
|
|
1140
1139
|
}
|
|
1141
1140
|
const KatexOptions2 = await loadSetups(roots, "katex.ts", {}, { strict: false }, false);
|
|
1142
|
-
return _vitepluginmd2.default.call(void 0,
|
|
1141
|
+
return _vitepluginmd2.default.call(void 0, _chunkQIDQYQEGjs.__spreadProps.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1143
1142
|
wrapperClasses: "",
|
|
1144
1143
|
headEnabled: false,
|
|
1145
1144
|
frontmatter: false,
|
|
1146
|
-
markdownItOptions:
|
|
1145
|
+
markdownItOptions: _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1147
1146
|
quotes: `""''`,
|
|
1148
1147
|
html: true,
|
|
1149
1148
|
xhtmlOut: true,
|
|
@@ -1272,7 +1271,7 @@ function escapeVueInCode(md2) {
|
|
|
1272
1271
|
}
|
|
1273
1272
|
|
|
1274
1273
|
// node/plugins/patchTransform.ts
|
|
1275
|
-
|
|
1274
|
+
_chunkQIDQYQEGjs.init_cjs_shims.call(void 0, );
|
|
1276
1275
|
|
|
1277
1276
|
function createFixPlugins(options) {
|
|
1278
1277
|
const define = _utils.objectEntries.call(void 0, getDefine(options));
|
|
@@ -1326,10 +1325,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1326
1325
|
clientRoot,
|
|
1327
1326
|
data: { config }
|
|
1328
1327
|
} = options;
|
|
1329
|
-
const VuePlugin = _pluginvue2.default.call(void 0,
|
|
1328
|
+
const VuePlugin = _pluginvue2.default.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1330
1329
|
include: [/\.vue$/, /\.md$/],
|
|
1331
1330
|
exclude: [],
|
|
1332
|
-
template:
|
|
1331
|
+
template: _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1333
1332
|
compilerOptions: {
|
|
1334
1333
|
isCustomElement(tag) {
|
|
1335
1334
|
return customElements.has(tag);
|
|
@@ -1344,7 +1343,7 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1344
1343
|
MarkdownPlugin,
|
|
1345
1344
|
VuePlugin,
|
|
1346
1345
|
createSlidesLoader(options, pluginOptions, serverOptions, VuePlugin, MarkdownPlugin),
|
|
1347
|
-
_vite4.default.call(void 0,
|
|
1346
|
+
_vite4.default.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1348
1347
|
extensions: ["vue", "md", "ts"],
|
|
1349
1348
|
dirs: [
|
|
1350
1349
|
`${clientRoot}/builtin`,
|
|
@@ -1362,10 +1361,10 @@ async function ViteSlidevPlugin(options, pluginOptions, serverOptions = {}) {
|
|
|
1362
1361
|
})
|
|
1363
1362
|
]
|
|
1364
1363
|
}, componentsOptions)),
|
|
1365
|
-
_vite2.default.call(void 0,
|
|
1364
|
+
_vite2.default.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1366
1365
|
defaultClass: "slidev-icon"
|
|
1367
1366
|
}, iconsOptions)),
|
|
1368
|
-
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0,
|
|
1367
|
+
config.remoteAssets === true || config.remoteAssets === mode ? _vitepluginremoteassets2.default.call(void 0, _chunkQIDQYQEGjs.__spreadValues.call(void 0, {
|
|
1369
1368
|
rules: [
|
|
1370
1369
|
..._vitepluginremoteassets.DefaultRules,
|
|
1371
1370
|
{
|