@slidev/cli 0.27.16 → 0.28.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@slidev/cli",
3
- "version": "0.27.16",
3
+ "version": "0.28.0",
4
4
  "description": "Presentation slides for developers",
5
5
  "homepage": "https://sli.dev",
6
6
  "bugs": "https://github.com/slidevjs/slidev/issues",
@@ -39,57 +39,57 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@antfu/utils": "^0.3.0",
43
- "@iconify-json/carbon": "^1.0.7",
44
- "@iconify-json/ph": "^1.0.1",
45
- "@slidev/client": "0.27.16",
46
- "@slidev/parser": "0.27.16",
47
- "@slidev/types": "0.27.16",
48
- "@vitejs/plugin-vue": "^1.9.3",
49
- "@vue/compiler-sfc": "^3.2.20",
50
- "cli-progress": "^3.9.1",
51
- "codemirror": "^5.63.3",
42
+ "@antfu/utils": "^0.4.0",
43
+ "@iconify-json/carbon": "^1.0.12",
44
+ "@iconify-json/ph": "^1.0.4",
45
+ "@slidev/client": "0.28.0",
46
+ "@slidev/parser": "0.28.0",
47
+ "@slidev/types": "0.28.0",
48
+ "@vitejs/plugin-vue": "^2.0.1",
49
+ "@vue/compiler-sfc": "^3.2.26",
50
+ "cli-progress": "^3.10.0",
51
+ "codemirror": "^5.65.0",
52
52
  "connect": "^3.7.0",
53
- "debug": "^4.3.2",
54
- "fast-glob": "^3.2.7",
53
+ "debug": "^4.3.3",
54
+ "fast-glob": "^3.2.10",
55
55
  "fs-extra": "^10.0.0",
56
56
  "global-dirs": "^3.0.0",
57
57
  "import-from": "^4.0.0",
58
58
  "is-installed-globally": "^0.4.0",
59
59
  "jiti": "^1.12.9",
60
60
  "js-base64": "^3.7.2",
61
- "katex": "^0.13.18",
62
- "kolorist": "^1.5.0",
63
- "markdown-it": "^12.2.0",
61
+ "katex": "^0.15.2",
62
+ "kolorist": "^1.5.1",
63
+ "markdown-it": "^12.3.2",
64
64
  "markdown-it-footnote": "^3.0.3",
65
- "markdown-it-link-attributes": "^3.0.0",
66
- "monaco-editor": "^0.29.1",
67
- "nanoid": "^3.1.30",
68
- "open": "^8.3.0",
69
- "pdf-lib": "^1.17.0",
65
+ "markdown-it-link-attributes": "^4.0.0",
66
+ "monaco-editor": "^0.31.1",
67
+ "nanoid": "^3.1.32",
68
+ "open": "^8.4.0",
69
+ "pdf-lib": "^1.17.1",
70
70
  "plantuml-encoder": "^1.4.0",
71
- "prismjs": "^1.25.0",
71
+ "prismjs": "^1.26.0",
72
72
  "prompts": "^2.4.2",
73
- "resolve": "^1.20.0",
73
+ "resolve": "^1.21.0",
74
74
  "resolve-from": "^5.0.0",
75
75
  "resolve-global": "^1.0.0",
76
- "shiki": "^0.9.12",
77
- "unplugin-icons": "^0.12.16",
78
- "unplugin-vue-components": "^0.16.0",
79
- "vite": "^2.6.10",
80
- "vite-plugin-md": "^0.11.2",
76
+ "shiki": "^0.10.0",
77
+ "unplugin-icons": "^0.13.0",
78
+ "unplugin-vue-components": "^0.17.11",
79
+ "vite": "^2.7.12",
80
+ "vite-plugin-md": "^0.11.7",
81
81
  "vite-plugin-remote-assets": "^0.2.2",
82
82
  "vite-plugin-vue-server-ref": "^0.2.4",
83
- "vite-plugin-windicss": "^1.4.12",
84
- "vue": "^3.2.20",
85
- "windicss": "^3.1.9",
86
- "yargs": "^17.2.1"
83
+ "vite-plugin-windicss": "^1.6.2",
84
+ "vue": "^3.2.26",
85
+ "windicss": "^3.4.2",
86
+ "yargs": "^17.3.1"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@types/plantuml-encoder": "^1.4.0",
90
90
  "fast-deep-equal": "^3.1.3",
91
91
  "semver": "^7.3.5",
92
- "sirv": "^1.0.18"
92
+ "sirv": "^2.0.0"
93
93
  },
94
94
  "engines": {
95
95
  "node": ">=14.0.0"
@@ -98,5 +98,6 @@
98
98
  "build": "rimraf dist && tsup node/index.ts node/cli.ts --dts --format cjs,esm --splitting --external @slidev/client/package.json",
99
99
  "dev": "nr build --watch",
100
100
  "start": "esno node/cli.ts"
101
- }
101
+ },
102
+ "readme": "<br>\n<p align=\"center\">\n<a href=\"https://sli.dev\" target=\"_blank\">\n<img src=\"https://sli.dev/logo-title.png\" alt=\"Slidev\" height=\"250\" width=\"250\"/>\n</a>\n</p>\n\n<p align=\"center\">\nPresentation <b>slide</b>s for <b>dev</b>elopers 🧑‍💻👩‍💻👨‍💻\n</p>\n\n<p align=\"center\">\n<a href=\"https://www.npmjs.com/package/@slidev/cli\" target=\"__blank\"><img src=\"https://img.shields.io/npm/v/@slidev/cli?color=2B90B6&label=\" alt=\"NPM version\"></a>\n<a href=\"https://www.npmjs.com/package/@slidev/cli\" target=\"__blank\"><img alt=\"NPM Downloads\" src=\"https://img.shields.io/npm/dm/@slidev/cli?color=349dbe&label=\"></a>\n<a href=\"https://sli.dev/\" target=\"__blank\"><img src=\"https://img.shields.io/static/v1?label=&message=docs%20%26%20demos&color=45b8cd\" alt=\"Docs & Demos\"></a>\n<a href=\"https://sli.dev/themes/gallery.html\" target=\"__blank\"><img src=\"https://img.shields.io/static/v1?label=&message=themes&color=4ec5d4\" alt=\"Themes\"></a>\n<br>\n<a href=\"https://github.com/slidevjs/slidev\" target=\"__blank\"><img alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/slidevjs/slidev?style=social\"></a>\n</p>\n\n<p align=\"center\">\n <a href=\"https://twitter.com/antfu7/status/1389604687502995457\">Video Preview</a> | <a href=\"https://sli.dev\">Documentation</a>\n</p>\n\n<p align=\"center\">\n<table>\n<tbody>\n<td align=\"center\">\n<img width=\"2000\" height=\"0\"><br>\nStatus: <b>Public Beta 🎉</b><br>\n<sub>Made possible by my <a href=\"https://github.com/sponsors/antfu\">Sponsor Program 💖</a></sub><br>\n<img width=\"2000\" height=\"0\">\n</td>\n</tbody>\n</table>\n</p>\n\n## Features\n\n- 📝 [**Markdown-based**](https://sli.dev/guide/syntax.html) - use your favorite editors and workflow\n- 🧑‍💻 [**Developer Friendly**](https://sli.dev/guide/syntax.html#code-blocks) - built-in syntax highlighting, live coding, etc.\n- 🎨 [**Themable**](https://sli.dev/themes/gallery.html) - theme can be shared and used with npm packages.\n- 🌈 [**Stylish**](https://sli.dev/guide/syntax.html#embedded-styles) - [Windi CSS](https://windicss.org/) on-demand utilities, easy-to-use embedded stylesheets.\n- 🤹 [**Interactive**](https://sli.dev/custom/directory-structure.html#components) - embedding Vue components seamlessly.\n- 🎙 [**Presenter Mode**](https://sli.dev/guide/presenter-mode.html) - use another window, or even your phone to control your slides.\n- 🧮 [**LaTeX**](https://sli.dev/guide/syntax.html#latex) - built-in LaTeX math equations support.\n- 📰 [**Diagrams**](https://sli.dev/guide/syntax.html#diagrams) - creates diagrams with textual descriptions\n- 🌟 [**Icons**](https://sli.dev/guide/syntax.html#icons) - access to icons from any iconset directly.\n- 💻 [**Editors**](https://sli.dev/guide/editors.html) - integrated editor, or [extension for VS Code](https://github.com/slidevjs/slidev-vscode)\n- 🎥 [**Recording**](https://sli.dev/guide/recording.html) - built-in recording and camera view.\n- 📤 [**Portable**](https://sli.dev/guide/exporting.html) - export into PDF, PNGs, or even a hostable SPA.\n- ⚡️ [**Fast**](https://vitejs.dev) - instant reloading powered by [Vite](https://vitejs.dev).\n- 🛠 [**Hackable**](https://sli.dev/custom/config-vite.html) - using Vite plugins, Vue components, or any npm packages.\n\n## Getting Started\n\n### Try it Online ⚡️\n\n[sli.dev/new](https://sli.dev/new)\n\n[![](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://sli.dev/new)\n\n### Init Project Locally\n\nInstall [Node.js >=14](https://nodejs.org/) and run the following command:\n\n```bash\nnpm init slidev\n```\n\nDocumentations:\n**[English](https://sli.dev)** | [中文文档](https://cn.sli.dev) | [Français](https://fr.sli.dev) | [Español](https://es.sli.dev) | [Русский](https://ru.sli.dev) | [Português-BR](https://br.sli.dev)\n\nDiscord: [chat.sli.dev](https://chat.sli.dev)\n\nFor a full example, you can check the [demo](https://github.com/slidevjs/slidev/blob/main/demo) folder, which is also the source file for [my previous talk](https://antfu.me/posts/composable-vue-vueday-2021).\n\n## Tech Stack\n\n- [Vite](https://vitejs.dev) - An extremely fast frontend tooling\n- [Vue 3](https://v3.vuejs.org/) powered [Markdown](https://daringfireball.net/projects/markdown/syntax) - Focus on the content while having the power of HTML and Vue components whenever needed\n- [Windi CSS](https://github.com/windicss/windicss) - On-demand utility-first CSS framework, style your slides at ease\n- [Prism](https://github.com/PrismJS/prism), [Shiki](https://github.com/shikijs/shiki), [Monaco Editor](https://github.com/Microsoft/monaco-editor) - First-class code snippets support with live coding capability\n- [RecordRTC](https://recordrtc.org) - Built-in recording and camera view\n- [VueUse](https://vueuse.org) family - [`@vueuse/core`](https://github.com/vueuse/vueuse), [`@vueuse/head`](https://github.com/vueuse/head), [`@vueuse/motion`](https://github.com/vueuse/motion), etc.\n- [Iconify](https://iconify.design/) - Iconsets collection.\n- [Drauu](https://github.com/antfu/drauu) - Drawing and annotations support\n- [KaTeX](https://katex.org/) - LaTeX math rendering.\n- [Mermaid](https://mermaid-js.github.io/mermaid) - Textual Diagrams.\n\n## Sponsors\n\nThis project is made possible by all the sponsors supporting my work:\n\n<p align=\"center\">\n <a href=\"https://github.com/sponsors/antfu\">\n <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>\n </a>\n</p>\n\n## License\n\nMIT License © 2021 [Anthony Fu](https://github.com/antfu)\n"
102
103
  }
@@ -1,407 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
-
4
- var _chunkDVHCB7TLjs = require('./chunk-DVHCB7TL.js');
5
-
6
-
7
-
8
-
9
-
10
-
11
- var _chunk7EYE5BOQjs = require('./chunk-7EYE5BOQ.js');
12
-
13
- // ../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js
14
- var require_build = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
15
- "../../node_modules/.pnpm/@polka+url@1.0.0-next.20/node_modules/@polka/url/build.js"(exports) {
16
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
17
- var qs = _chunk7EYE5BOQjs.__require.call(void 0, "querystring");
18
- function parse(req) {
19
- let raw = req.url;
20
- if (raw == null)
21
- return;
22
- let prev = req._parsedUrl;
23
- if (prev && prev.raw === raw)
24
- return prev;
25
- let pathname = raw, search = "", query;
26
- if (raw.length > 1) {
27
- let idx = raw.indexOf("?", 1);
28
- if (idx !== -1) {
29
- search = raw.substring(idx);
30
- pathname = raw.substring(0, idx);
31
- if (search.length > 1) {
32
- query = qs.parse(search.substring(1));
33
- }
34
- }
35
- }
36
- return req._parsedUrl = { pathname, search, query, raw };
37
- }
38
- exports.parse = parse;
39
- }
40
- });
41
-
42
- // ../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js
43
- var require_sync = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
44
- "../../node_modules/.pnpm/totalist@1.1.0/node_modules/totalist/sync/index.js"(exports, module) {
45
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
46
- var { join: join2, resolve: resolve2 } = _chunk7EYE5BOQjs.__require.call(void 0, "path");
47
- var { readdirSync, statSync } = _chunk7EYE5BOQjs.__require.call(void 0, "fs");
48
- module.exports = function list(dir, callback, pre = "") {
49
- dir = resolve2(".", dir);
50
- let arr = readdirSync(dir);
51
- let i = 0, abs, stats;
52
- for (; i < arr.length; i++) {
53
- abs = join2(dir, arr[i]);
54
- stats = statSync(abs);
55
- stats.isDirectory() ? list(abs, callback, join2(pre, arr[i])) : callback(join2(pre, arr[i]), abs, stats);
56
- }
57
- };
58
- }
59
- });
60
-
61
- // ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js
62
- var require_Mime = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
63
- "../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/Mime.js"(exports, module) {
64
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
65
- "use strict";
66
- function Mime() {
67
- this._types = Object.create(null);
68
- this._extensions = Object.create(null);
69
- for (let i = 0; i < arguments.length; i++) {
70
- this.define(arguments[i]);
71
- }
72
- this.define = this.define.bind(this);
73
- this.getType = this.getType.bind(this);
74
- this.getExtension = this.getExtension.bind(this);
75
- }
76
- Mime.prototype.define = function(typeMap, force) {
77
- for (let type in typeMap) {
78
- let extensions = typeMap[type].map(function(t) {
79
- return t.toLowerCase();
80
- });
81
- type = type.toLowerCase();
82
- for (let i = 0; i < extensions.length; i++) {
83
- const ext = extensions[i];
84
- if (ext[0] === "*") {
85
- continue;
86
- }
87
- if (!force && ext in this._types) {
88
- throw new Error('Attempt to change mapping for "' + ext + '" extension from "' + this._types[ext] + '" to "' + type + '". Pass `force=true` to allow this, otherwise remove "' + ext + '" from the list of extensions for "' + type + '".');
89
- }
90
- this._types[ext] = type;
91
- }
92
- if (force || !this._extensions[type]) {
93
- const ext = extensions[0];
94
- this._extensions[type] = ext[0] !== "*" ? ext : ext.substr(1);
95
- }
96
- }
97
- };
98
- Mime.prototype.getType = function(path) {
99
- path = String(path);
100
- let last = path.replace(/^.*[/\\]/, "").toLowerCase();
101
- let ext = last.replace(/^.*\./, "").toLowerCase();
102
- let hasPath = last.length < path.length;
103
- let hasDot = ext.length < last.length - 1;
104
- return (hasDot || !hasPath) && this._types[ext] || null;
105
- };
106
- Mime.prototype.getExtension = function(type) {
107
- type = /^\s*([^;\s]*)/.test(type) && RegExp.$1;
108
- return type && this._extensions[type.toLowerCase()] || null;
109
- };
110
- module.exports = Mime;
111
- }
112
- });
113
-
114
- // ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js
115
- var require_standard = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
116
- "../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/types/standard.js"(exports, module) {
117
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
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
- }
120
- });
121
-
122
- // ../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js
123
- var require_lite = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
124
- "../../node_modules/.pnpm/mime@2.5.2/node_modules/mime/lite.js"(exports, module) {
125
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
126
- "use strict";
127
- var Mime = require_Mime();
128
- module.exports = new Mime(require_standard());
129
- }
130
- });
131
-
132
- // ../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js
133
- var require_build2 = _chunk7EYE5BOQjs.__commonJS.call(void 0, {
134
- "../../node_modules/.pnpm/sirv@1.0.18/node_modules/sirv/build.js"(exports, module) {
135
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
136
- var fs2 = _chunk7EYE5BOQjs.__require.call(void 0, "fs");
137
- var { join: join2, normalize, resolve: resolve2 } = _chunk7EYE5BOQjs.__require.call(void 0, "path");
138
- var { parse } = require_build();
139
- var list = require_sync();
140
- var mime = require_lite();
141
- var noop = () => {
142
- };
143
- function isMatch(uri, arr) {
144
- for (let i = 0; i < arr.length; i++) {
145
- if (arr[i].test(uri))
146
- return true;
147
- }
148
- }
149
- function toAssume(uri, extns) {
150
- let i = 0, x, len = uri.length - 1;
151
- if (uri.charCodeAt(len) === 47) {
152
- uri = uri.substring(0, len);
153
- }
154
- let arr = [], tmp = `${uri}/index`;
155
- for (; i < extns.length; i++) {
156
- x = extns[i] ? `.${extns[i]}` : "";
157
- if (uri)
158
- arr.push(uri + x);
159
- arr.push(tmp + x);
160
- }
161
- return arr;
162
- }
163
- function viaCache(cache, uri, extns) {
164
- let i = 0, data, arr = toAssume(uri, extns);
165
- for (; i < arr.length; i++) {
166
- if (data = cache[arr[i]])
167
- return data;
168
- }
169
- }
170
- function viaLocal(dir, isEtag, uri, extns) {
171
- let i = 0, arr = toAssume(uri, extns);
172
- let abs, stats, name, headers;
173
- for (; i < arr.length; i++) {
174
- abs = normalize(join2(dir, name = arr[i]));
175
- if (abs.startsWith(dir) && fs2.existsSync(abs)) {
176
- stats = fs2.statSync(abs);
177
- if (stats.isDirectory())
178
- continue;
179
- headers = toHeaders(name, stats, isEtag);
180
- headers["Cache-Control"] = isEtag ? "no-cache" : "no-store";
181
- return { abs, stats, headers };
182
- }
183
- }
184
- }
185
- function is404(req, res) {
186
- return res.statusCode = 404, res.end();
187
- }
188
- function send(req, res, file, stats, headers) {
189
- let code = 200, tmp, opts = {};
190
- headers = _chunk7EYE5BOQjs.__spreadValues.call(void 0, {}, headers);
191
- for (let key in headers) {
192
- tmp = res.getHeader(key);
193
- if (tmp)
194
- headers[key] = tmp;
195
- }
196
- if (tmp = res.getHeader("content-type")) {
197
- headers["Content-Type"] = tmp;
198
- }
199
- if (req.headers.range) {
200
- code = 206;
201
- let [x, y] = req.headers.range.replace("bytes=", "").split("-");
202
- let end = opts.end = parseInt(y, 10) || stats.size - 1;
203
- let start = opts.start = parseInt(x, 10) || 0;
204
- if (start >= stats.size || end >= stats.size) {
205
- res.setHeader("Content-Range", `bytes */${stats.size}`);
206
- res.statusCode = 416;
207
- return res.end();
208
- }
209
- headers["Content-Range"] = `bytes ${start}-${end}/${stats.size}`;
210
- headers["Content-Length"] = end - start + 1;
211
- headers["Accept-Ranges"] = "bytes";
212
- }
213
- res.writeHead(code, headers);
214
- fs2.createReadStream(file, opts).pipe(res);
215
- }
216
- var ENCODING = {
217
- ".br": "br",
218
- ".gz": "gzip"
219
- };
220
- function toHeaders(name, stats, isEtag) {
221
- let enc = ENCODING[name.slice(-3)];
222
- let ctype = mime.getType(name.slice(0, enc && -3)) || "";
223
- if (ctype === "text/html")
224
- ctype += ";charset=utf-8";
225
- let headers = {
226
- "Content-Length": stats.size,
227
- "Content-Type": ctype,
228
- "Last-Modified": stats.mtime.toUTCString()
229
- };
230
- if (enc)
231
- headers["Content-Encoding"] = enc;
232
- if (isEtag)
233
- headers["ETag"] = `W/"${stats.size}-${stats.mtime.getTime()}"`;
234
- return headers;
235
- }
236
- module.exports = function(dir, opts = {}) {
237
- dir = resolve2(dir || ".");
238
- let isNotFound = opts.onNoMatch || is404;
239
- let setHeaders = opts.setHeaders || noop;
240
- let extensions = opts.extensions || ["html", "htm"];
241
- let gzips = opts.gzip && extensions.map((x) => `${x}.gz`).concat("gz");
242
- let brots = opts.brotli && extensions.map((x) => `${x}.br`).concat("br");
243
- const FILES = {};
244
- let fallback = "/";
245
- let isEtag = !!opts.etag;
246
- let isSPA = !!opts.single;
247
- if (typeof opts.single === "string") {
248
- let idx = opts.single.lastIndexOf(".");
249
- fallback += !!~idx ? opts.single.substring(0, idx) : opts.single;
250
- }
251
- let ignores = [];
252
- if (opts.ignores !== false) {
253
- ignores.push(/[/]([A-Za-z\s\d~$._-]+\.\w+){1,}$/);
254
- if (opts.dotfiles)
255
- ignores.push(/\/\.\w/);
256
- else
257
- ignores.push(/\/\.well-known/);
258
- [].concat(opts.ignores || []).forEach((x) => {
259
- ignores.push(new RegExp(x, "i"));
260
- });
261
- }
262
- let cc = opts.maxAge != null && `public,max-age=${opts.maxAge}`;
263
- if (cc && opts.immutable)
264
- cc += ",immutable";
265
- else if (cc && opts.maxAge === 0)
266
- cc += ",must-revalidate";
267
- if (!opts.dev) {
268
- list(dir, (name, abs, stats) => {
269
- if (/\.well-known[\\+\/]/.test(name)) {
270
- } else if (!opts.dotfiles && /(^\.|[\\+|\/+]\.)/.test(name))
271
- return;
272
- let headers = toHeaders(name, stats, isEtag);
273
- if (cc)
274
- headers["Cache-Control"] = cc;
275
- FILES["/" + name.normalize().replace(/\\+/g, "/")] = { abs, stats, headers };
276
- });
277
- }
278
- let lookup = opts.dev ? viaLocal.bind(0, dir, isEtag) : viaCache.bind(0, FILES);
279
- return function(req, res, next) {
280
- let extns = [""];
281
- let pathname = parse(req).pathname;
282
- let val = req.headers["accept-encoding"] || "";
283
- if (gzips && val.includes("gzip"))
284
- extns.unshift(...gzips);
285
- if (brots && /(br|brotli)/i.test(val))
286
- extns.unshift(...brots);
287
- extns.push(...extensions);
288
- if (pathname.indexOf("%") !== -1) {
289
- try {
290
- pathname = decodeURIComponent(pathname);
291
- } catch (err) {
292
- }
293
- }
294
- let data = lookup(pathname, extns) || isSPA && !isMatch(pathname, ignores) && lookup(fallback, extns);
295
- if (!data)
296
- return next ? next() : isNotFound(req, res);
297
- if (isEtag && req.headers["if-none-match"] === data.headers["ETag"]) {
298
- res.writeHead(304);
299
- return res.end();
300
- }
301
- if (gzips || brots) {
302
- res.setHeader("Vary", "Accept-Encoding");
303
- }
304
- setHeaders(res, pathname, data.stats);
305
- send(req, res, data.abs, data.stats, data.headers);
306
- };
307
- };
308
- }
309
- });
310
-
311
- // node/build.ts
312
- _chunk7EYE5BOQjs.init_cjs_shims.call(void 0, );
313
- var import_sirv = _chunk7EYE5BOQjs.__toModule.call(void 0, require_build2());
314
- var _path = require('path');
315
- var _http = require('http'); var _http2 = _interopRequireDefault(_http);
316
- var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
317
- var _vite = require('vite');
318
- var _connect = require('connect'); var _connect2 = _interopRequireDefault(_connect);
319
- var _kolorist = require('kolorist');
320
- async function build(options, viteConfig = {}) {
321
- const indexPath = _path.resolve.call(void 0, options.userRoot, "index.html");
322
- const rawConfig = await _vite.resolveConfig.call(void 0, {}, "build");
323
- const pluginOptions = rawConfig.slidev || {};
324
- let originalIndexHTML;
325
- if (_fsextra2.default.existsSync(indexPath))
326
- originalIndexHTML = await _fsextra2.default.readFile(indexPath, "utf-8");
327
- await _fsextra2.default.writeFile(indexPath, await _chunkDVHCB7TLjs.getIndexHtml.call(void 0, options), "utf-8");
328
- let config = void 0;
329
- try {
330
- const inlineConfig = _vite.mergeConfig.call(void 0, viteConfig, {
331
- plugins: [
332
- await _chunkDVHCB7TLjs.ViteSlidevPlugin.call(void 0, options, pluginOptions),
333
- {
334
- name: "resolve-config",
335
- configResolved(_config) {
336
- config = _config;
337
- }
338
- }
339
- ],
340
- build: {
341
- chunkSizeWarningLimit: 2e3
342
- }
343
- });
344
- await _vite.build.call(void 0, inlineConfig);
345
- if (options.data.features.monaco) {
346
- if (options.data.config.monaco === "dev") {
347
- console.log(_kolorist.yellow.call(void 0, " Monaco is disabled in the build, to enabled it, set `monaco: true` in the frontmatter"));
348
- } else {
349
- console.log(_kolorist.blue.call(void 0, " building for Monaco...\n"));
350
- await _vite.build.call(void 0, _vite.mergeConfig.call(void 0, inlineConfig, {
351
- root: _path.join.call(void 0, options.clientRoot, "iframes/monaco"),
352
- base: `${config.base}iframes/monaco/`,
353
- build: {
354
- outDir: _path.resolve.call(void 0, config.build.outDir, "iframes/monaco"),
355
- rollupOptions: {
356
- output: {
357
- manualChunks: {
358
- jsonWorker: ["monaco-editor/esm/vs/language/json/json.worker"],
359
- cssWorker: ["monaco-editor/esm/vs/language/css/css.worker"],
360
- htmlWorker: ["monaco-editor/esm/vs/language/html/html.worker"],
361
- tsWorker: ["monaco-editor/esm/vs/language/typescript/ts.worker"],
362
- editorWorker: ["monaco-editor/esm/vs/editor/editor.worker"]
363
- }
364
- }
365
- }
366
- }
367
- }));
368
- }
369
- }
370
- } finally {
371
- if (originalIndexHTML != null)
372
- await _fsextra2.default.writeFile(indexPath, originalIndexHTML, "utf-8");
373
- else
374
- await _fsextra2.default.unlink(indexPath);
375
- }
376
- await _fsextra2.default.copyFile(_path.resolve.call(void 0, config.build.outDir, "index.html"), _path.resolve.call(void 0, config.build.outDir, "404.html"));
377
- const redirectsPath = _path.resolve.call(void 0, config.build.outDir, "_redirects");
378
- if (!_fsextra2.default.existsSync(redirectsPath))
379
- await _fsextra2.default.writeFile(redirectsPath, `${config.base}* ${config.base}index.html 200
380
- `, "utf-8");
381
- if ([true, "true", "auto"].includes(options.data.config.download)) {
382
- const { exportSlides } = await Promise.resolve().then(() => _chunk7EYE5BOQjs.__toModule.call(void 0, _chunk7EYE5BOQjs.__require.call(void 0, "./export-U55WC23C.js")));
383
- const port = 12445;
384
- const app = _connect2.default.call(void 0, );
385
- const server = _http2.default.createServer(app);
386
- app.use(config.base, (0, import_sirv.default)(config.build.outDir, {
387
- etag: true,
388
- single: true,
389
- dev: true
390
- }));
391
- server.listen(port);
392
- await exportSlides({
393
- port,
394
- total: options.data.slides.length,
395
- format: "pdf",
396
- output: _path.join.call(void 0, config.build.outDir, "slidev-exported.pdf"),
397
- base: config.base,
398
- dark: options.data.config.colorSchema === "dark",
399
- width: 1920,
400
- height: Math.round(1920 / options.data.config.aspectRatio)
401
- });
402
- server.close();
403
- }
404
- }
405
-
406
-
407
- exports.build = build;