@slidev/cli 0.50.0-beta.6 → 0.50.0-beta.8
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.8";
|
|
13
13
|
|
|
14
14
|
// node/integrations/themes.ts
|
|
15
15
|
import { join } from "node:path";
|
|
@@ -1385,8 +1385,8 @@ function startsWithTodoMarkdown(token) {
|
|
|
1385
1385
|
}
|
|
1386
1386
|
|
|
1387
1387
|
// node/syntax/markdown-it/index.ts
|
|
1388
|
-
import MarkdownItMdc from "markdown-it-mdc";
|
|
1389
1388
|
import MarkdownItFootnote from "markdown-it-footnote";
|
|
1389
|
+
import MarkdownItMdc from "markdown-it-mdc";
|
|
1390
1390
|
|
|
1391
1391
|
// node/setups/load.ts
|
|
1392
1392
|
import { resolve as resolve4 } from "node:path";
|
|
@@ -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}
|
|
@@ -2521,6 +2523,8 @@ ${(index.match(/<body>([\s\S]*?)<\/body>/i)?.[1] || "").trim()}`;
|
|
|
2521
2523
|
if (data.config.fonts.webfonts.length && data.config.fonts.provider !== "none")
|
|
2522
2524
|
head += `
|
|
2523
2525
|
<link rel="stylesheet" href="${generateGoogleFontsUrl(data.config.fonts)}" type="text/css">`;
|
|
2526
|
+
if (data.headmatter.lang)
|
|
2527
|
+
main = main.replace('<html lang="en">', `<html lang="${data.headmatter.lang}">`);
|
|
2524
2528
|
main = main.replace("__ENTRY__", toAtFS(join13(clientRoot, "main.ts"))).replace("<!-- head -->", head).replace("<!-- body -->", body);
|
|
2525
2529
|
return main;
|
|
2526
2530
|
}
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TZUMD5EL.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-KRKJOCDL.js";
|
|
13
13
|
import {
|
|
14
14
|
getRoots,
|
|
15
15
|
isInstalledGlobally,
|
|
@@ -35,9 +35,7 @@ import { uniq } from "@antfu/utils";
|
|
|
35
35
|
import { injectPreparserExtensionLoader } from "@slidev/parser/fs";
|
|
36
36
|
function setupPreparser() {
|
|
37
37
|
injectPreparserExtensionLoader(async (headmatter, filepath, mode) => {
|
|
38
|
-
const addons = headmatter?.addons;
|
|
39
|
-
if (!addons?.length)
|
|
40
|
-
return [];
|
|
38
|
+
const addons = Array.isArray(headmatter?.addons) ? headmatter.addons : [];
|
|
41
39
|
const { userRoot } = await getRoots();
|
|
42
40
|
const roots = uniq([
|
|
43
41
|
...await resolveAddons(addons),
|
|
@@ -332,7 +330,7 @@ cli.command(
|
|
|
332
330
|
}).strict().help(),
|
|
333
331
|
async (args) => {
|
|
334
332
|
const { entry, theme, base, download, out, inspect } = args;
|
|
335
|
-
const { build } = await import("./build-
|
|
333
|
+
const { build } = await import("./build-GOV3YBDB.js");
|
|
336
334
|
for (const entryFile of entry) {
|
|
337
335
|
const options = await resolveOptions({ entry: entryFile, theme, inspect, download }, "build");
|
|
338
336
|
printInfo(options);
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TZUMD5EL.js";
|
|
4
4
|
import {
|
|
5
5
|
ViteSlidevPlugin,
|
|
6
6
|
createDataUtils,
|
|
7
7
|
parser,
|
|
8
8
|
resolveOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-KRKJOCDL.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.8",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "antfu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,19 +42,19 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@antfu/ni": "^0.23.
|
|
45
|
+
"@antfu/ni": "^0.23.1",
|
|
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.1
|
|
57
|
-
"@vitejs/plugin-vue-jsx": "^4.
|
|
51
|
+
"@shikijs/markdown-it": "^1.24.0",
|
|
52
|
+
"@shikijs/twoslash": "^1.24.0",
|
|
53
|
+
"@shikijs/vitepress-twoslash": "^1.24.0",
|
|
54
|
+
"@unocss/extractor-mdc": "^0.65.0-beta.2",
|
|
55
|
+
"@unocss/reset": "^0.65.0-beta.2",
|
|
56
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
57
|
+
"@vitejs/plugin-vue-jsx": "^4.1.1",
|
|
58
58
|
"chokidar": "^4.0.1",
|
|
59
59
|
"cli-progress": "^3.12.0",
|
|
60
60
|
"connect": "^3.7.0",
|
|
@@ -66,52 +66,52 @@
|
|
|
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.1",
|
|
70
70
|
"katex": "^0.16.11",
|
|
71
71
|
"kolorist": "^1.8.0",
|
|
72
|
-
"local-pkg": "^0.5.
|
|
72
|
+
"local-pkg": "^0.5.1",
|
|
73
73
|
"lz-string": "^1.5.0",
|
|
74
|
-
"magic-string": "^0.30.
|
|
74
|
+
"magic-string": "^0.30.14",
|
|
75
75
|
"magic-string-stack": "^0.1.1",
|
|
76
76
|
"markdown-it": "^14.1.0",
|
|
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.24.0",
|
|
93
93
|
"shiki-magic-move": "^0.5.0",
|
|
94
94
|
"sirv": "^3.0.0",
|
|
95
95
|
"source-map-js": "^1.2.1",
|
|
96
|
-
"typescript": "
|
|
97
|
-
"unocss": "^0.
|
|
98
|
-
"unplugin-icons": "^0.
|
|
99
|
-
"unplugin-vue-components": "^0.27.
|
|
100
|
-
"unplugin-vue-markdown": "^0.
|
|
96
|
+
"typescript": "5.6.3",
|
|
97
|
+
"unocss": "^0.65.0-beta.2",
|
|
98
|
+
"unplugin-icons": "^0.20.2",
|
|
99
|
+
"unplugin-vue-components": "^0.27.5",
|
|
100
|
+
"unplugin-vue-markdown": "^0.27.0",
|
|
101
101
|
"untun": "^0.1.3",
|
|
102
102
|
"uqr": "^0.1.2",
|
|
103
|
-
"vite": "^
|
|
104
|
-
"vite-plugin-inspect": "^0.
|
|
103
|
+
"vite": "^6.0.1",
|
|
104
|
+
"vite-plugin-inspect": "^0.10.2",
|
|
105
105
|
"vite-plugin-remote-assets": "^0.5.0",
|
|
106
|
-
"vite-plugin-static-copy": "^2.
|
|
106
|
+
"vite-plugin-static-copy": "^2.2.0",
|
|
107
107
|
"vite-plugin-vue-server-ref": "^0.4.2",
|
|
108
|
-
"vitefu": "^1.0.
|
|
109
|
-
"vue": "^3.5.
|
|
110
|
-
"yaml": "^2.6.
|
|
108
|
+
"vitefu": "^1.0.4",
|
|
109
|
+
"vue": "^3.5.13",
|
|
110
|
+
"yaml": "^2.6.1",
|
|
111
111
|
"yargs": "^17.7.2",
|
|
112
|
-
"@slidev/
|
|
113
|
-
"@slidev/types": "0.50.0-beta.
|
|
114
|
-
"@slidev/
|
|
112
|
+
"@slidev/client": "0.50.0-beta.8",
|
|
113
|
+
"@slidev/types": "0.50.0-beta.8",
|
|
114
|
+
"@slidev/parser": "0.50.0-beta.8"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|
package/template.md
CHANGED
|
@@ -22,14 +22,14 @@ mdc: true
|
|
|
22
22
|
Presentation slides for developers
|
|
23
23
|
|
|
24
24
|
<div class="pt-12">
|
|
25
|
-
<span @click="$slidev.nav.next" class="px-2 py-1 rounded cursor-pointer" hover="bg-white bg-opacity-10">
|
|
26
|
-
Press Space for next page <carbon:arrow-right
|
|
25
|
+
<span @click="$slidev.nav.next" class="px-2 py-1 rounded cursor-pointer" flex="~ justify-center items-center gap-2" hover="bg-white bg-opacity-10">
|
|
26
|
+
Press Space for next page <div class="i-carbon:arrow-right inline-block"/>
|
|
27
27
|
</span>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
30
30
|
<div class="abs-br m-6 flex gap-2">
|
|
31
31
|
<button @click="$slidev.nav.openInEditor()" title="Open in Editor" class="text-xl slidev-icon-btn opacity-50 !border-none !hover:text-white">
|
|
32
|
-
<carbon:edit />
|
|
32
|
+
<div class="i-carbon:edit" />
|
|
33
33
|
</button>
|
|
34
34
|
<a href="https://github.com/slidevjs/slidev" target="_blank" alt="GitHub" title="Open in GitHub"
|
|
35
35
|
class="text-xl slidev-icon-btn opacity-50 !border-none !hover:text-white">
|