@slidev/cli 0.50.0-beta.5 → 0.50.0-beta.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.
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-UNQ5DBLZ.js";
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
|
-
var version = "0.50.0-beta.
|
|
12
|
+
var version = "0.50.0-beta.7";
|
|
13
13
|
|
|
14
14
|
// node/integrations/themes.ts
|
|
15
15
|
import { join } from "node:path";
|
|
@@ -438,7 +438,7 @@ function createConfigPlugin(options) {
|
|
|
438
438
|
configureServer(server) {
|
|
439
439
|
return () => {
|
|
440
440
|
server.middlewares.use(async (req, res, next) => {
|
|
441
|
-
if (req.url
|
|
441
|
+
if (req.url === "/index.html") {
|
|
442
442
|
res.setHeader("Content-Type", "text/html");
|
|
443
443
|
res.statusCode = 200;
|
|
444
444
|
res.end(options.utils.indexHtml);
|
|
@@ -1998,6 +1998,7 @@ function findRegion(lines, regionName) {
|
|
|
1998
1998
|
}
|
|
1999
1999
|
return null;
|
|
2000
2000
|
}
|
|
2001
|
+
var reMonacoWrite = /^\{monaco-write\}/;
|
|
2001
2002
|
function transformSnippet({ s, slide, options }) {
|
|
2002
2003
|
const watchFiles = options.data.watchFiles;
|
|
2003
2004
|
const dir = path2.dirname(slide.source?.filepath ?? options.entry ?? options.userRoot);
|
|
@@ -2008,8 +2009,9 @@ function transformSnippet({ s, slide, options }) {
|
|
|
2008
2009
|
const src = slash2(
|
|
2009
2010
|
/^@\//.test(filepath) ? path2.resolve(options.userRoot, filepath.slice(2)) : path2.resolve(dir, filepath)
|
|
2010
2011
|
);
|
|
2011
|
-
|
|
2012
|
-
|
|
2012
|
+
meta = meta.trim();
|
|
2013
|
+
lang = lang.trim();
|
|
2014
|
+
lang = lang || path2.extname(filepath).slice(1);
|
|
2013
2015
|
const isAFile = fs5.statSync(src).isFile();
|
|
2014
2016
|
if (!fs5.existsSync(src) || !isAFile) {
|
|
2015
2017
|
throw new Error(isAFile ? `Code snippet path not found: ${src}` : `Invalid code snippet option`);
|
|
@@ -2024,15 +2026,15 @@ function transformSnippet({ s, slide, options }) {
|
|
|
2024
2026
|
);
|
|
2025
2027
|
}
|
|
2026
2028
|
}
|
|
2027
|
-
|
|
2028
|
-
lang = lang.trim();
|
|
2029
|
-
lang = lang || path2.extname(filepath).slice(1);
|
|
2030
|
-
if (meta.match(/^\{monaco-write\}/)) {
|
|
2029
|
+
if (meta.match(reMonacoWrite)) {
|
|
2031
2030
|
monacoWriterWhitelist.add(filepath);
|
|
2032
2031
|
lang = lang.trim();
|
|
2033
|
-
meta = meta.replace(
|
|
2032
|
+
meta = meta.replace(reMonacoWrite, "").trim() || "{}";
|
|
2034
2033
|
const encoded = lz4.compressToBase64(content);
|
|
2035
2034
|
return `<Monaco writable=${JSON.stringify(filepath)} code-lz="${encoded}" lang="${lang}" v-bind="${meta}" />`;
|
|
2035
|
+
} else {
|
|
2036
|
+
watchFiles[src] ??= /* @__PURE__ */ new Set();
|
|
2037
|
+
watchFiles[src].add(slide.index);
|
|
2036
2038
|
}
|
|
2037
2039
|
return `\`\`\`${lang} ${meta}
|
|
2038
2040
|
${content}
|
|
@@ -2586,6 +2588,8 @@ async function resolveOptions(entryOptions, mode) {
|
|
|
2586
2588
|
const config = parser.resolveConfig(loaded.headmatter, themeMeta, entryOptions.entry);
|
|
2587
2589
|
const addonRoots = await resolveAddons(config.addons);
|
|
2588
2590
|
const roots = uniq5([...themeRoots, ...addonRoots, rootsInfo.userRoot]);
|
|
2591
|
+
if (entryOptions.download)
|
|
2592
|
+
config.download ||= entryOptions.download;
|
|
2589
2593
|
debug({
|
|
2590
2594
|
...rootsInfo,
|
|
2591
2595
|
...entryOptions,
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4ZMEQ2HY.js";
|
|
4
4
|
import {
|
|
5
5
|
getThemeMeta,
|
|
6
6
|
loadSetups,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
resolveOptions,
|
|
10
10
|
resolveTheme,
|
|
11
11
|
version
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ODXMPS5P.js";
|
|
13
13
|
import {
|
|
14
14
|
getRoots,
|
|
15
15
|
isInstalledGlobally,
|
|
@@ -332,11 +332,9 @@ cli.command(
|
|
|
332
332
|
}).strict().help(),
|
|
333
333
|
async (args) => {
|
|
334
334
|
const { entry, theme, base, download, out, inspect } = args;
|
|
335
|
-
const { build } = await import("./build-
|
|
335
|
+
const { build } = await import("./build-BEK6YBRP.js");
|
|
336
336
|
for (const entryFile of entry) {
|
|
337
|
-
const options = await resolveOptions({ entry: entryFile, theme, inspect }, "build");
|
|
338
|
-
if (download && !options.data.config.download)
|
|
339
|
-
options.data.config.download = download;
|
|
337
|
+
const options = await resolveOptions({ entry: entryFile, theme, inspect, download }, "build");
|
|
340
338
|
printInfo(options);
|
|
341
339
|
await build(
|
|
342
340
|
options,
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4ZMEQ2HY.js";
|
|
4
4
|
import {
|
|
5
5
|
ViteSlidevPlugin,
|
|
6
6
|
createDataUtils,
|
|
7
7
|
parser,
|
|
8
8
|
resolveOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-ODXMPS5P.js";
|
|
10
10
|
import "./chunk-UNQ5DBLZ.js";
|
|
11
11
|
export {
|
|
12
12
|
ViteSlidevPlugin,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.50.0-beta.
|
|
4
|
+
"version": "0.50.0-beta.7",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@antfu/ni": "^0.23.0",
|
|
46
46
|
"@antfu/utils": "^0.7.10",
|
|
47
|
-
"@iconify-json/carbon": "^1.2.
|
|
47
|
+
"@iconify-json/carbon": "^1.2.4",
|
|
48
48
|
"@iconify-json/ph": "^1.2.1",
|
|
49
49
|
"@iconify-json/svg-spinners": "^1.2.1",
|
|
50
50
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
51
|
-
"@shikijs/markdown-it": "^1.
|
|
52
|
-
"@shikijs/twoslash": "^1.
|
|
53
|
-
"@shikijs/vitepress-twoslash": "^1.
|
|
54
|
-
"@unocss/extractor-mdc": "^0.
|
|
55
|
-
"@unocss/reset": "^0.
|
|
56
|
-
"@vitejs/plugin-vue": "^5.
|
|
57
|
-
"@vitejs/plugin-vue-jsx": "^4.0
|
|
51
|
+
"@shikijs/markdown-it": "^1.23.1",
|
|
52
|
+
"@shikijs/twoslash": "^1.23.1",
|
|
53
|
+
"@shikijs/vitepress-twoslash": "^1.23.1",
|
|
54
|
+
"@unocss/extractor-mdc": "^0.64.1",
|
|
55
|
+
"@unocss/reset": "^0.64.1",
|
|
56
|
+
"@vitejs/plugin-vue": "^5.2.0",
|
|
57
|
+
"@vitejs/plugin-vue-jsx": "^4.1.0",
|
|
58
58
|
"chokidar": "^4.0.1",
|
|
59
59
|
"cli-progress": "^3.12.0",
|
|
60
60
|
"connect": "^3.7.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"global-directory": "^4.0.1",
|
|
67
67
|
"htmlparser2": "^9.1.0",
|
|
68
68
|
"is-installed-globally": "^1.0.0",
|
|
69
|
-
"jiti": "^2.
|
|
69
|
+
"jiti": "^2.4.0",
|
|
70
70
|
"katex": "^0.16.11",
|
|
71
71
|
"kolorist": "^1.8.0",
|
|
72
72
|
"local-pkg": "^0.5.0",
|
|
@@ -77,41 +77,41 @@
|
|
|
77
77
|
"markdown-it-footnote": "^4.0.0",
|
|
78
78
|
"markdown-it-mdc": "^0.2.5",
|
|
79
79
|
"micromatch": "^4.0.8",
|
|
80
|
-
"mlly": "^1.7.
|
|
81
|
-
"monaco-editor": "
|
|
80
|
+
"mlly": "^1.7.3",
|
|
81
|
+
"monaco-editor": "0.51.0",
|
|
82
82
|
"open": "^10.1.0",
|
|
83
83
|
"pdf-lib": "^1.17.1",
|
|
84
84
|
"plantuml-encoder": "^1.4.0",
|
|
85
|
-
"postcss-nested": "^
|
|
85
|
+
"postcss-nested": "^7.0.2",
|
|
86
86
|
"pptxgenjs": "^3.12.0",
|
|
87
87
|
"prompts": "^2.4.2",
|
|
88
88
|
"public-ip": "^7.0.1",
|
|
89
89
|
"resolve-from": "^5.0.0",
|
|
90
90
|
"resolve-global": "^2.0.0",
|
|
91
91
|
"semver": "^7.6.3",
|
|
92
|
-
"shiki": "^1.
|
|
92
|
+
"shiki": "^1.23.1",
|
|
93
93
|
"shiki-magic-move": "^0.5.0",
|
|
94
94
|
"sirv": "^3.0.0",
|
|
95
95
|
"source-map-js": "^1.2.1",
|
|
96
96
|
"typescript": "^5.6.3",
|
|
97
|
-
"unocss": "^0.
|
|
98
|
-
"unplugin-icons": "^0.
|
|
97
|
+
"unocss": "^0.64.1",
|
|
98
|
+
"unplugin-icons": "^0.20.1",
|
|
99
99
|
"unplugin-vue-components": "^0.27.4",
|
|
100
100
|
"unplugin-vue-markdown": "^0.26.2",
|
|
101
101
|
"untun": "^0.1.3",
|
|
102
102
|
"uqr": "^0.1.2",
|
|
103
|
-
"vite": "^5.4.
|
|
103
|
+
"vite": "^5.4.11",
|
|
104
104
|
"vite-plugin-inspect": "^0.8.7",
|
|
105
105
|
"vite-plugin-remote-assets": "^0.5.0",
|
|
106
|
-
"vite-plugin-static-copy": "^2.
|
|
106
|
+
"vite-plugin-static-copy": "^2.1.0",
|
|
107
107
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
108
108
|
"vitefu": "^1.0.3",
|
|
109
|
-
"vue": "^3.5.
|
|
109
|
+
"vue": "^3.5.13",
|
|
110
110
|
"yaml": "^2.6.0",
|
|
111
111
|
"yargs": "^17.7.2",
|
|
112
|
-
"@slidev/
|
|
113
|
-
"@slidev/
|
|
114
|
-
"@slidev/
|
|
112
|
+
"@slidev/types": "0.50.0-beta.7",
|
|
113
|
+
"@slidev/parser": "0.50.0-beta.7",
|
|
114
|
+
"@slidev/client": "0.50.0-beta.7"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|