@slidev/cli 52.2.5 → 52.4.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/README.md +1 -1
- package/dist/{build-Cm80m3td.js → build-C0y3jflF.js} +6 -7
- package/dist/cli.js +7 -8
- package/dist/{export-DCKSbBi5.js → export-DxrcqKLf.js} +7 -11
- package/dist/index.js +3 -3
- package/dist/{resolver-3bFppHAb.js → resolver-BVx3X6zp.js} +2 -4
- package/dist/serve-DmyF8x-T.js +13 -0
- package/dist/{shared-BFEB8gHi.js → shared-Dgsw_Krn.js} +27 -30
- package/package.json +17 -17
- package/dist/serve-DRKKt6zF.js +0 -14
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Presentation <b>slide</b>s for <b>dev</b>elopers 🧑💻👩💻👨
|
|
|
15
15
|
<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>
|
|
16
16
|
<a href="https://sli.dev/resources/theme-gallery" target="__blank"><img src="https://img.shields.io/static/v1?label=&message=themes&color=4ec5d4" alt="Themes"></a>
|
|
17
17
|
<br>
|
|
18
|
-
<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>
|
|
18
|
+
<a href="https://github.com/slidevjs/slidev/stargazers" target="__blank"><img alt="GitHub stars" src="https://img.shields.io/github/stars/slidevjs/slidev?style=social"></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveViteConfigs } from "./shared-
|
|
2
|
-
import "./resolver-
|
|
1
|
+
import { resolveViteConfigs } from "./shared-Dgsw_Krn.js";
|
|
2
|
+
import "./resolver-BVx3X6zp.js";
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import { join, resolve } from "node:path";
|
|
5
5
|
import { build as build$1 } from "vite";
|
|
@@ -16,7 +16,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
16
16
|
await fs.writeFile(indexPath, options.utils.indexHtml, "utf-8");
|
|
17
17
|
let config = void 0;
|
|
18
18
|
try {
|
|
19
|
-
|
|
19
|
+
await build$1(await resolveViteConfigs(options, {
|
|
20
20
|
plugins: [{
|
|
21
21
|
name: "resolve-config",
|
|
22
22
|
configResolved(_config) {
|
|
@@ -24,8 +24,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
24
24
|
}
|
|
25
25
|
}],
|
|
26
26
|
build: { chunkSizeWarningLimit: 2e3 }
|
|
27
|
-
}, viteConfig, "build");
|
|
28
|
-
await build$1(inlineConfig);
|
|
27
|
+
}, viteConfig, "build"));
|
|
29
28
|
} finally {
|
|
30
29
|
if (originalIndexHTML != null) await fs.writeFile(indexPath, originalIndexHTML, "utf-8");
|
|
31
30
|
else await fs.unlink(indexPath);
|
|
@@ -46,7 +45,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
46
45
|
dev: true
|
|
47
46
|
}));
|
|
48
47
|
server.listen(port);
|
|
49
|
-
const { exportSlides } = await import("./export-
|
|
48
|
+
const { exportSlides } = await import("./export-DxrcqKLf.js");
|
|
50
49
|
const tempDir = resolve(outDir, "temp");
|
|
51
50
|
await fs.mkdir(tempDir, { recursive: true });
|
|
52
51
|
await exportSlides({
|
|
@@ -87,7 +86,7 @@ async function build(options, viteConfig = {}, args) {
|
|
|
87
86
|
"true",
|
|
88
87
|
"auto"
|
|
89
88
|
].includes(options.data.config.download)) {
|
|
90
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
89
|
+
const { exportSlides, getExportOptions } = await import("./export-DxrcqKLf.js");
|
|
91
90
|
const port = 12445;
|
|
92
91
|
const app = connect();
|
|
93
92
|
const server = http.createServer(app);
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getThemeMeta, loadSetups, parser, resolveAddons, resolveOptions, resolveTheme, updateFrontmatterPatch, version } from "./shared-
|
|
2
|
-
import { getRoots, isInstalledGlobally, resolveEntry } from "./resolver-
|
|
3
|
-
import { createServer } from "./serve-
|
|
1
|
+
import { getThemeMeta, loadSetups, parser, resolveAddons, resolveOptions, resolveTheme, updateFrontmatterPatch, version } from "./shared-Dgsw_Krn.js";
|
|
2
|
+
import { getRoots, isInstalledGlobally, resolveEntry } from "./resolver-BVx3X6zp.js";
|
|
3
|
+
import { createServer } from "./serve-DmyF8x-T.js";
|
|
4
4
|
import { exec } from "node:child_process";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import os from "node:os";
|
|
@@ -21,8 +21,7 @@ function setupPreparser() {
|
|
|
21
21
|
injectPreparserExtensionLoader(async (headmatter, filepath, mode) => {
|
|
22
22
|
const addons = Array.isArray(headmatter?.addons) ? headmatter.addons : [];
|
|
23
23
|
const { userRoot } = await getRoots();
|
|
24
|
-
|
|
25
|
-
return (await loadSetups(roots, "preparser.ts", [{
|
|
24
|
+
return (await loadSetups(uniq([...await resolveAddons(addons), userRoot]), "preparser.ts", [{
|
|
26
25
|
filepath,
|
|
27
26
|
headmatter,
|
|
28
27
|
mode
|
|
@@ -293,7 +292,7 @@ cli.command("build [entry..]", "Build hostable SPA", (args) => exportOptions(com
|
|
|
293
292
|
describe: "enable the inspect plugin for debugging"
|
|
294
293
|
}).strict().help(), async (args) => {
|
|
295
294
|
const { entry, theme, base, download, out, inspect } = args;
|
|
296
|
-
const { build } = await import("./build-
|
|
295
|
+
const { build } = await import("./build-C0y3jflF.js");
|
|
297
296
|
for (const entryFile of entry) {
|
|
298
297
|
const options = await resolveOptions({
|
|
299
298
|
entry: entryFile,
|
|
@@ -356,7 +355,7 @@ cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
|
|
356
355
|
});
|
|
357
356
|
cli.command("export [entry..]", "Export slides to PDF", (args) => exportOptions(commonOptions(args)).strict().help(), async (args) => {
|
|
358
357
|
const { entry, theme } = args;
|
|
359
|
-
const { exportSlides, getExportOptions } = await import("./export-
|
|
358
|
+
const { exportSlides, getExportOptions } = await import("./export-DxrcqKLf.js");
|
|
360
359
|
const port = await getPort(12445);
|
|
361
360
|
let warned = false;
|
|
362
361
|
for (const entryFile of entry) {
|
|
@@ -403,7 +402,7 @@ cli.command("export-notes [entry..]", "Export slide notes to PDF", (args) => arg
|
|
|
403
402
|
type: "number",
|
|
404
403
|
describe: "wait for the specified ms before exporting"
|
|
405
404
|
}).strict().help(), async ({ entry, output, timeout, wait }) => {
|
|
406
|
-
const { exportNotes } = await import("./export-
|
|
405
|
+
const { exportNotes } = await import("./export-DxrcqKLf.js");
|
|
407
406
|
const port = await getPort(12445);
|
|
408
407
|
for (const entryFile of entry) {
|
|
409
408
|
const options = await resolveOptions({ entry: entryFile }, "export");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getRoots } from "./resolver-
|
|
1
|
+
import { getRoots } from "./resolver-BVx3X6zp.js";
|
|
2
2
|
import fs from "node:fs/promises";
|
|
3
3
|
import path, { dirname, relative } from "node:path";
|
|
4
4
|
import process from "node:process";
|
|
@@ -116,10 +116,8 @@ async function exportSlides({ port = 18724, total = 0, range: range$1, format =
|
|
|
116
116
|
if (format === "pdf") await genPagePdf();
|
|
117
117
|
else if (format === "png") await genPagePng(output);
|
|
118
118
|
else if (format === "md") await genPageMd();
|
|
119
|
-
else if (format === "pptx")
|
|
120
|
-
|
|
121
|
-
await genPagePptx(buffers);
|
|
122
|
-
} else throw new Error(`[slidev] Unsupported exporting format "${format}"`);
|
|
119
|
+
else if (format === "pptx") await genPagePptx(await genPagePng(false));
|
|
120
|
+
else throw new Error(`[slidev] Unsupported exporting format "${format}"`);
|
|
123
121
|
progress.stop();
|
|
124
122
|
browser.close();
|
|
125
123
|
const relativeOutput = slash(relative(".", output));
|
|
@@ -355,13 +353,11 @@ async function exportSlides({ port = 18724, total = 0, range: range$1, format =
|
|
|
355
353
|
async function addTocToPdf(pdf) {
|
|
356
354
|
const outlinePdf = outlinePdfFactory(pdfLib);
|
|
357
355
|
const slideIndexes = await getSlidesIndex();
|
|
358
|
-
const tocTree = slides.filter((slide) => slide.title).reduce((acc, slide) => {
|
|
359
|
-
addToTree(acc, slide, slideIndexes);
|
|
360
|
-
return acc;
|
|
361
|
-
}, []);
|
|
362
|
-
const outline = makeOutline(tocTree);
|
|
363
356
|
return await outlinePdf({
|
|
364
|
-
outline,
|
|
357
|
+
outline: makeOutline(slides.filter((slide) => slide.title).reduce((acc, slide) => {
|
|
358
|
+
addToTree(acc, slide, slideIndexes);
|
|
359
|
+
return acc;
|
|
360
|
+
}, [])),
|
|
365
361
|
pdf
|
|
366
362
|
});
|
|
367
363
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ViteSlidevPlugin, createDataUtils, parser, resolveOptions } from "./shared-
|
|
2
|
-
import "./resolver-
|
|
3
|
-
import { createServer } from "./serve-
|
|
1
|
+
import { ViteSlidevPlugin, createDataUtils, parser, resolveOptions } from "./shared-Dgsw_Krn.js";
|
|
2
|
+
import "./resolver-BVx3X6zp.js";
|
|
3
|
+
import { createServer } from "./serve-DmyF8x-T.js";
|
|
4
4
|
|
|
5
5
|
export { ViteSlidevPlugin, createDataUtils, createServer, parser, resolveOptions };
|
|
@@ -136,14 +136,12 @@ async function getRoots(entry) {
|
|
|
136
136
|
isInstalledGlobally.value = slash(relative(userRoot, process.argv[1])).includes("/.pnpm/") || (await import("is-installed-globally")).default;
|
|
137
137
|
const clientRoot = await findPkgRoot("@slidev/client", cliRoot, true);
|
|
138
138
|
const closestPkgRoot = dirname(await findClosestPkgJsonPath(userRoot) || userRoot);
|
|
139
|
-
const userPkgJson = getUserPkgJson(closestPkgRoot);
|
|
140
|
-
const userWorkspaceRoot = searchForWorkspaceRoot(closestPkgRoot);
|
|
141
139
|
rootsInfo = {
|
|
142
140
|
cliRoot,
|
|
143
141
|
clientRoot,
|
|
144
142
|
userRoot,
|
|
145
|
-
userPkgJson,
|
|
146
|
-
userWorkspaceRoot
|
|
143
|
+
userPkgJson: getUserPkgJson(closestPkgRoot),
|
|
144
|
+
userWorkspaceRoot: searchForWorkspaceRoot(closestPkgRoot)
|
|
147
145
|
};
|
|
148
146
|
return rootsInfo;
|
|
149
147
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { resolveViteConfigs } from "./shared-Dgsw_Krn.js";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import { createServer } from "vite";
|
|
5
|
+
|
|
6
|
+
//#region node/commands/serve.ts
|
|
7
|
+
async function createServer$1(options, viteConfig = {}, serverOptions) {
|
|
8
|
+
process.env.EDITOR = process.env.EDITOR || "code";
|
|
9
|
+
return await createServer(await resolveViteConfigs(options, { optimizeDeps: { entries: [join(options.clientRoot, "main.ts")] } }, viteConfig, "serve", serverOptions));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { createServer$1 as createServer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createResolver, getRoots, isInstalledGlobally, resolveEntry, resolveImportPath, resolveImportUrl, toAtFS } from "./resolver-
|
|
1
|
+
import { createResolver, getRoots, isInstalledGlobally, resolveEntry, resolveImportPath, resolveImportUrl, toAtFS } from "./resolver-BVx3X6zp.js";
|
|
2
2
|
import { builtinModules } from "node:module";
|
|
3
3
|
import fs, { readFile } from "node:fs/promises";
|
|
4
4
|
import path, { basename, dirname, join, resolve } from "node:path";
|
|
@@ -42,7 +42,7 @@ import Vue from "@vitejs/plugin-vue";
|
|
|
42
42
|
import VueJsx from "@vitejs/plugin-vue-jsx";
|
|
43
43
|
|
|
44
44
|
//#region package.json
|
|
45
|
-
var version = "52.
|
|
45
|
+
var version = "52.4.0";
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region node/syntax/markdown-it/markdown-it-link.ts
|
|
@@ -1090,12 +1090,10 @@ const templateNavControls = {
|
|
|
1090
1090
|
const components = roots.flatMap((root) => {
|
|
1091
1091
|
return [join(root, "custom-nav-controls.vue"), join(root, "CustomNavControls.vue")];
|
|
1092
1092
|
}).filter((i) => existsSync(i));
|
|
1093
|
-
|
|
1094
|
-
const render = components.map((i, idx) => `h(__n${idx})`).join(",");
|
|
1095
|
-
return `${imports}
|
|
1093
|
+
return `${components.map((i, idx) => `import __n${idx} from '${toAtFS(i)}'`).join("\n")}
|
|
1096
1094
|
import { h } from 'vue'
|
|
1097
1095
|
export default {
|
|
1098
|
-
render: () => [${
|
|
1096
|
+
render: () => [${components.map((i, idx) => `h(__n${idx})`).join(",")}],
|
|
1099
1097
|
}`;
|
|
1100
1098
|
}
|
|
1101
1099
|
};
|
|
@@ -1159,8 +1157,7 @@ const templateShiki = {
|
|
|
1159
1157
|
return r.default || r;
|
|
1160
1158
|
}
|
|
1161
1159
|
async function resolveLangs(langs$1) {
|
|
1162
|
-
|
|
1163
|
-
return uniq(awaited.flat());
|
|
1160
|
+
return uniq((await Promise.all(langs$1.map((lang) => normalizeGetter(lang)))).flat());
|
|
1164
1161
|
}
|
|
1165
1162
|
async function resolveTheme$1(theme) {
|
|
1166
1163
|
return typeof theme === "string" ? theme : await normalizeGetter(theme);
|
|
@@ -1411,11 +1408,10 @@ function createSlidesLoader(options, serverOptions) {
|
|
|
1411
1408
|
const vueModules = Array.from(hmrSlidesIndexes).flatMap((idx) => {
|
|
1412
1409
|
const frontmatter = ctx.server.moduleGraph.getModuleById(sourceIds.frontmatter[idx]);
|
|
1413
1410
|
const main = ctx.server.moduleGraph.getModuleById(sourceIds.md[idx]);
|
|
1414
|
-
const styles = main ? [...main.clientImportedModules].find((m) => m.id?.includes(`&type=style`)) : void 0;
|
|
1415
1411
|
return [
|
|
1416
1412
|
frontmatter,
|
|
1417
1413
|
main,
|
|
1418
|
-
|
|
1414
|
+
main ? [...main.clientImportedModules].find((m) => m.id?.includes(`&type=style`)) : void 0
|
|
1419
1415
|
];
|
|
1420
1416
|
});
|
|
1421
1417
|
hmrSlidesIndexes.clear();
|
|
@@ -1517,10 +1513,20 @@ function createSlidesLoader(options, serverOptions) {
|
|
|
1517
1513
|
};
|
|
1518
1514
|
function renderNote(text = "") {
|
|
1519
1515
|
let clickCount = 0;
|
|
1520
|
-
|
|
1516
|
+
const notesAutoRuby = data.headmatter.notesAutoRuby || {};
|
|
1517
|
+
let md = text.replace(/\[click(?::(\d+))?\]/gi, (_, count = 1) => {
|
|
1521
1518
|
clickCount += Number(count);
|
|
1522
1519
|
return `<span class="slidev-note-click-mark" data-clicks="${clickCount}"></span>`;
|
|
1523
|
-
})
|
|
1520
|
+
});
|
|
1521
|
+
const keys = Object.keys(notesAutoRuby).sort((b, a) => b.length - a.length).map((i) => /^[\w-]+$/.test(i) ? `\\b${i}\\b` : i);
|
|
1522
|
+
if (keys.length) {
|
|
1523
|
+
const regex = new RegExp(`(${keys.join("|")})`, "g");
|
|
1524
|
+
md = md.replace(regex, (match) => {
|
|
1525
|
+
if (notesAutoRuby[match]) return `<ruby>${match}<rt>${notesAutoRuby[match]}</rt></ruby>`;
|
|
1526
|
+
return match;
|
|
1527
|
+
});
|
|
1528
|
+
}
|
|
1529
|
+
return notesMd.render(md);
|
|
1524
1530
|
}
|
|
1525
1531
|
function withRenderedNote(data$1) {
|
|
1526
1532
|
return {
|
|
@@ -1562,8 +1568,7 @@ function taskLists(md, options = {
|
|
|
1562
1568
|
const disabledAttribute = token.attrGet("disabled") ? "disabled=\"\" " : "";
|
|
1563
1569
|
const line = token.attrGet("line");
|
|
1564
1570
|
const idAttribute = `id="${token.attrGet("id")}" `;
|
|
1565
|
-
|
|
1566
|
-
return `<input class="task-list-item-checkbox" type="checkbox" ${checkedAttribute}${disabledAttribute}${dataLineAttribute}${idAttribute}/>`;
|
|
1571
|
+
return `<input class="task-list-item-checkbox" type="checkbox" ${checkedAttribute}${disabledAttribute}${line && options.lineNumber ? `data-line="${line}" ` : ""}${idAttribute}/>`;
|
|
1567
1572
|
};
|
|
1568
1573
|
md.renderer.rules.taskListItemLabel_close = () => {
|
|
1569
1574
|
return "</label>";
|
|
@@ -1653,13 +1658,11 @@ function getCodeBlocks(md) {
|
|
|
1653
1658
|
const codeblocks = Array.from(md.matchAll(/^```[\s\S]*?^```/gm)).map((m) => {
|
|
1654
1659
|
const start = m.index;
|
|
1655
1660
|
const end = m.index + m[0].length;
|
|
1656
|
-
const startLine = md.slice(0, start).match(/\n/g)?.length || 0;
|
|
1657
|
-
const endLine = md.slice(0, end).match(/\n/g)?.length || 0;
|
|
1658
1661
|
return [
|
|
1659
1662
|
start,
|
|
1660
1663
|
end,
|
|
1661
|
-
|
|
1662
|
-
|
|
1664
|
+
md.slice(0, start).match(/\n/g)?.length || 0,
|
|
1665
|
+
md.slice(0, end).match(/\n/g)?.length || 0
|
|
1663
1666
|
];
|
|
1664
1667
|
});
|
|
1665
1668
|
return {
|
|
@@ -1867,8 +1870,7 @@ function transformMagicMove(ctx) {
|
|
|
1867
1870
|
lang: i[1]
|
|
1868
1871
|
}, lineNumbers);
|
|
1869
1872
|
});
|
|
1870
|
-
|
|
1871
|
-
return `<ShikiMagicMove v-bind="${options}" steps-lz="${compressed}" :title='${JSON.stringify(title)}' :step-ranges='${JSON.stringify(ranges)}' />`;
|
|
1873
|
+
return `<ShikiMagicMove v-bind="${options}" steps-lz="${lz.compressToBase64(JSON.stringify(steps))}" :title='${JSON.stringify(title)}' :step-ranges='${JSON.stringify(ranges)}' />`;
|
|
1872
1874
|
});
|
|
1873
1875
|
}
|
|
1874
1876
|
|
|
@@ -1895,9 +1897,7 @@ function transformMonaco(ctx) {
|
|
|
1895
1897
|
ctx.s.replace(/^```(\w+) *\{monaco-diff\} *(?:(\{[^\n]*\}) *)?\n([\s\S]+?)^~~~ *\n([\s\S]+?)^```/gm, (full, lang = "ts", options = "{}", code, diff) => {
|
|
1896
1898
|
lang = lang.trim();
|
|
1897
1899
|
options = options.trim() || "{}";
|
|
1898
|
-
|
|
1899
|
-
const encodedDiff = lz.compressToBase64(diff);
|
|
1900
|
-
return `<Monaco code-lz="${encoded}" diff-lz="${encodedDiff}" lang="${lang}" v-bind="${options}" />`;
|
|
1900
|
+
return `<Monaco code-lz="${lz.compressToBase64(code)}" diff-lz="${lz.compressToBase64(diff)}" lang="${lang}" v-bind="${options}" />`;
|
|
1901
1901
|
});
|
|
1902
1902
|
ctx.s.replace(/^```(\w+) *\{monaco\} *(?:(\{[^\n]*\}) *)?\n([\s\S]+?)^```/gm, (full, lang = "ts", options = "{}", code) => {
|
|
1903
1903
|
lang = lang.trim();
|
|
@@ -2247,8 +2247,7 @@ async function writeDrawings(options, drawing) {
|
|
|
2247
2247
|
const dir = resolveDrawingsDir(options);
|
|
2248
2248
|
if (!dir) return;
|
|
2249
2249
|
const width = options.data.config.canvasWidth;
|
|
2250
|
-
const
|
|
2251
|
-
const SVG_HEAD = `<svg width="${width}" height="${height}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">`;
|
|
2250
|
+
const SVG_HEAD = `<svg width="${width}" height="${Math.round(width / options.data.config.aspectRatio)}" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">`;
|
|
2252
2251
|
await fs.mkdir(dir, { recursive: true });
|
|
2253
2252
|
return Promise.all(Object.entries(drawing).map(async ([key, value]) => {
|
|
2254
2253
|
if (!value) return;
|
|
@@ -2325,7 +2324,7 @@ async function setupUnocss({ clientRoot, roots, data, utils }) {
|
|
|
2325
2324
|
}))).filter((x) => !!x);
|
|
2326
2325
|
}
|
|
2327
2326
|
const tokens = await loadModule(resolve(clientRoot, ".generated/unocss-tokens.ts"));
|
|
2328
|
-
const
|
|
2327
|
+
const config = mergeConfigs([
|
|
2329
2328
|
{
|
|
2330
2329
|
presets: [presetIcons({
|
|
2331
2330
|
collectionsNodeResolvePath: utils.iconsResolvePath,
|
|
@@ -2335,8 +2334,7 @@ async function setupUnocss({ clientRoot, roots, data, utils }) {
|
|
|
2335
2334
|
},
|
|
2336
2335
|
...await loadFileConfigs(clientRoot),
|
|
2337
2336
|
...await loadSetups(roots, "unocss.ts", [], loadFileConfigs)
|
|
2338
|
-
].filter(Boolean);
|
|
2339
|
-
const config = mergeConfigs(configs);
|
|
2337
|
+
].filter(Boolean));
|
|
2340
2338
|
config.theme ||= {};
|
|
2341
2339
|
config.theme.fontFamily ||= {};
|
|
2342
2340
|
config.theme.fontFamily.sans ||= data.config.fonts.sans.join(",");
|
|
@@ -2453,8 +2451,7 @@ function ViteSlidevPlugin(options, pluginOptions = {}, serverOptions = {}) {
|
|
|
2453
2451
|
const sharedMd = MarkdownIt({ html: true });
|
|
2454
2452
|
sharedMd.use(MarkdownItLink);
|
|
2455
2453
|
function getSlideTitle(data) {
|
|
2456
|
-
const
|
|
2457
|
-
const title = stringifyMarkdownTokens(tokens);
|
|
2454
|
+
const title = stringifyMarkdownTokens(sharedMd.parseInline(data.config.title, {}));
|
|
2458
2455
|
const slideTitle = data.config.titleTemplate.replace("%s", title);
|
|
2459
2456
|
return slideTitle === "Slidev - Slidev" ? "Slidev" : slideTitle;
|
|
2460
2457
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slidev/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "52.
|
|
4
|
+
"version": "52.4.0",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@antfu/ni": "^
|
|
45
|
+
"@antfu/ni": "^27.0.0",
|
|
46
46
|
"@antfu/utils": "^9.3.0",
|
|
47
|
-
"@iconify-json/carbon": "^1.2.
|
|
47
|
+
"@iconify-json/carbon": "^1.2.14",
|
|
48
48
|
"@iconify-json/ph": "^1.2.2",
|
|
49
49
|
"@iconify-json/svg-spinners": "^1.2.4",
|
|
50
50
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
51
51
|
"@shikijs/markdown-it": "^3.13.0",
|
|
52
52
|
"@shikijs/twoslash": "^3.13.0",
|
|
53
53
|
"@shikijs/vitepress-twoslash": "^3.13.0",
|
|
54
|
-
"@unocss/extractor-mdc": "^66.5.
|
|
55
|
-
"@unocss/reset": "^66.5.
|
|
54
|
+
"@unocss/extractor-mdc": "^66.5.4",
|
|
55
|
+
"@unocss/reset": "^66.5.4",
|
|
56
56
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
57
57
|
"@vitejs/plugin-vue-jsx": "^5.1.1",
|
|
58
58
|
"ansis": "^4.2.0",
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"htmlparser2": "^10.0.0",
|
|
68
68
|
"is-installed-globally": "^1.0.0",
|
|
69
69
|
"jiti": "^2.6.1",
|
|
70
|
-
"katex": "^0.16.
|
|
70
|
+
"katex": "^0.16.25",
|
|
71
71
|
"local-pkg": "^1.1.2",
|
|
72
72
|
"lz-string": "^1.5.0",
|
|
73
73
|
"magic-string": "^0.30.19",
|
|
@@ -84,34 +84,34 @@
|
|
|
84
84
|
"postcss-nested": "^7.0.2",
|
|
85
85
|
"pptxgenjs": "^4.0.1",
|
|
86
86
|
"prompts": "^2.4.2",
|
|
87
|
-
"public-ip": "^
|
|
87
|
+
"public-ip": "^8.0.0",
|
|
88
88
|
"resolve-from": "^5.0.0",
|
|
89
89
|
"resolve-global": "^2.0.0",
|
|
90
|
-
"semver": "^7.7.
|
|
90
|
+
"semver": "^7.7.3",
|
|
91
91
|
"shiki": "^3.13.0",
|
|
92
92
|
"shiki-magic-move": "^1.2.0",
|
|
93
93
|
"sirv": "^3.0.2",
|
|
94
94
|
"source-map-js": "^1.2.1",
|
|
95
95
|
"typescript": "^5.9.3",
|
|
96
|
-
"unhead": "^2.0.
|
|
97
|
-
"unocss": "^66.5.
|
|
98
|
-
"unplugin-icons": "^22.
|
|
99
|
-
"unplugin-vue-components": "^
|
|
96
|
+
"unhead": "^2.0.19",
|
|
97
|
+
"unocss": "^66.5.4",
|
|
98
|
+
"unplugin-icons": "^22.5.0",
|
|
99
|
+
"unplugin-vue-components": "^30.0.0",
|
|
100
100
|
"unplugin-vue-markdown": "^29.2.0",
|
|
101
101
|
"untun": "^0.1.3",
|
|
102
102
|
"uqr": "^0.1.2",
|
|
103
|
-
"vite": "^7.1.
|
|
103
|
+
"vite": "^7.1.10",
|
|
104
104
|
"vite-plugin-inspect": "^11.3.3",
|
|
105
105
|
"vite-plugin-remote-assets": "^2.1.0",
|
|
106
|
-
"vite-plugin-static-copy": "^3.1.
|
|
106
|
+
"vite-plugin-static-copy": "^3.1.4",
|
|
107
107
|
"vite-plugin-vue-server-ref": "^1.0.0",
|
|
108
108
|
"vitefu": "^1.1.1",
|
|
109
109
|
"vue": "^3.5.22",
|
|
110
110
|
"yaml": "^2.8.1",
|
|
111
111
|
"yargs": "^18.0.0",
|
|
112
|
-
"@slidev/client": "52.
|
|
113
|
-
"@slidev/parser": "52.
|
|
114
|
-
"@slidev/types": "52.
|
|
112
|
+
"@slidev/client": "52.4.0",
|
|
113
|
+
"@slidev/parser": "52.4.0",
|
|
114
|
+
"@slidev/types": "52.4.0"
|
|
115
115
|
},
|
|
116
116
|
"devDependencies": {
|
|
117
117
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|
package/dist/serve-DRKKt6zF.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { resolveViteConfigs } from "./shared-BFEB8gHi.js";
|
|
2
|
-
import { join } from "node:path";
|
|
3
|
-
import process from "node:process";
|
|
4
|
-
import { createServer } from "vite";
|
|
5
|
-
|
|
6
|
-
//#region node/commands/serve.ts
|
|
7
|
-
async function createServer$1(options, viteConfig = {}, serverOptions) {
|
|
8
|
-
process.env.EDITOR = process.env.EDITOR || "code";
|
|
9
|
-
const inlineConfig = await resolveViteConfigs(options, { optimizeDeps: { entries: [join(options.clientRoot, "main.ts")] } }, viteConfig, "serve", serverOptions);
|
|
10
|
-
return await createServer(inlineConfig);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { createServer$1 as createServer };
|