@slidev/cli 52.18.1 → 52.19.1
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-CMhuImLu.mjs → build-CnBLrEp0.mjs} +1 -1
- package/dist/cli.mjs +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{serve-C3LqO47C.mjs → serve-DzftUF4M.mjs} +19 -19
- package/dist/{stdio-BBaEvAO6.mjs → stdio-BrKVwy-M.mjs} +2 -2
- package/package.json +23 -22
- package/skills/slidev/references/core-components.md +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as isInstalledGlobally, o as resolveEntry } from "./resolver-BIhhHpe7.mjs";
|
|
2
|
-
import { c as getThemeMeta, d as loadSetups, f as updateFrontmatterPatch, l as resolveTheme, o as resolveOptions, s as parser, t as createServer, u as version } from "./serve-
|
|
2
|
+
import { c as getThemeMeta, d as loadSetups, f as updateFrontmatterPatch, l as resolveTheme, o as resolveOptions, s as parser, t as createServer, u as version } from "./serve-DzftUF4M.mjs";
|
|
3
3
|
import process from "node:process";
|
|
4
4
|
import path from "pathe";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
@@ -302,7 +302,7 @@ cli.command("build [entry..]", "Build hostable SPA", (args) => exportOptions(com
|
|
|
302
302
|
describe: "enable the inspect plugin for debugging"
|
|
303
303
|
}).strict().help(), async (args) => {
|
|
304
304
|
const { entry, theme, base, download, out, inspect, "without-notes": withoutNotes, "router-mode": routerMode } = args;
|
|
305
|
-
const { build } = await import("./build-
|
|
305
|
+
const { build } = await import("./build-CnBLrEp0.mjs");
|
|
306
306
|
for (const entryFile of entry) {
|
|
307
307
|
const options = await resolveOptions({
|
|
308
308
|
entry: entryFile,
|
|
@@ -331,7 +331,7 @@ cli.command("format [entry..]", "Format the markdown file", (args) => commonOpti
|
|
|
331
331
|
}
|
|
332
332
|
});
|
|
333
333
|
cli.command("mcp [entry]", "Start an MCP (Model Context Protocol) server over stdio for AI agents to inspect and edit the slides", (args) => commonOptions(args).strict().help(), async ({ entry }) => {
|
|
334
|
-
const { startMcpStdioServer } = await import("./stdio-
|
|
334
|
+
const { startMcpStdioServer } = await import("./stdio-BrKVwy-M.mjs");
|
|
335
335
|
await startMcpStdioServer(await resolveEntry(entry));
|
|
336
336
|
});
|
|
337
337
|
cli.command("theme [subcommand]", "Theme related operations", (command) => {
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createDataUtils, o as resolveOptions, r as ViteSlidevPlugin, s as parser, t as createServer } from "./serve-
|
|
1
|
+
import { a as createDataUtils, o as resolveOptions, r as ViteSlidevPlugin, s as parser, t as createServer } from "./serve-DzftUF4M.mjs";
|
|
2
2
|
export { ViteSlidevPlugin, createDataUtils, createServer, parser, resolveOptions };
|
|
@@ -22,7 +22,7 @@ import equal from "fast-deep-equal";
|
|
|
22
22
|
import fg from "fast-glob";
|
|
23
23
|
import { createDebug } from "obug";
|
|
24
24
|
import pm from "picomatch";
|
|
25
|
-
import { satisfies } from "
|
|
25
|
+
import { satisfies } from "verkit";
|
|
26
26
|
import { parseHtmlForUnheadExtraction } from "unhead/parser";
|
|
27
27
|
import { createHead, transformHtmlTemplate } from "unhead/server";
|
|
28
28
|
import { createBundledHighlighter, createSingletonShorthands } from "shiki/core";
|
|
@@ -40,8 +40,8 @@ import lz from "lz-string";
|
|
|
40
40
|
import { encode } from "plantuml-encoder";
|
|
41
41
|
import { SourceMapConsumer } from "source-map-js";
|
|
42
42
|
import { fromAsyncCodeToHtml } from "@shikijs/markdown-it/async";
|
|
43
|
-
import {
|
|
44
|
-
import { McpServer } from "@modelcontextprotocol/
|
|
43
|
+
import { NodeStreamableHTTPServerTransport } from "@modelcontextprotocol/node";
|
|
44
|
+
import { McpServer } from "@modelcontextprotocol/server";
|
|
45
45
|
import { z } from "zod";
|
|
46
46
|
import ServerRef from "vite-plugin-vue-server-ref";
|
|
47
47
|
import UnoCSS from "unocss/vite";
|
|
@@ -712,7 +712,7 @@ function createLayoutWrapperPlugin({ data, utils }) {
|
|
|
712
712
|
}
|
|
713
713
|
//#endregion
|
|
714
714
|
//#region package.json
|
|
715
|
-
var version = "52.
|
|
715
|
+
var version = "52.19.1";
|
|
716
716
|
//#endregion
|
|
717
717
|
//#region node/integrations/addons.ts
|
|
718
718
|
async function resolveAddons(addonsInConfig) {
|
|
@@ -1797,7 +1797,7 @@ async function setupTransformers(roots) {
|
|
|
1797
1797
|
return result;
|
|
1798
1798
|
}
|
|
1799
1799
|
//#endregion
|
|
1800
|
-
//#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=
|
|
1800
|
+
//#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=49e14003b6caa0b7d164cbe71da573809d375bab_5d0803032f59b14bddf561c39219cd80/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/image-size/specialCharacters.js
|
|
1801
1801
|
var SpecialCharacters;
|
|
1802
1802
|
(function(SpecialCharacters) {
|
|
1803
1803
|
SpecialCharacters[SpecialCharacters["EXCLAMATION_MARK"] = 33] = "EXCLAMATION_MARK";
|
|
@@ -1813,7 +1813,7 @@ var SpecialCharacters;
|
|
|
1813
1813
|
SpecialCharacters[SpecialCharacters["CLOSING_PARENTHESIS"] = 41] = "CLOSING_PARENTHESIS";
|
|
1814
1814
|
})(SpecialCharacters || (SpecialCharacters = {}));
|
|
1815
1815
|
//#endregion
|
|
1816
|
-
//#region ../../node_modules/.pnpm/markdown-it@14.
|
|
1816
|
+
//#region ../../node_modules/.pnpm/markdown-it@14.3.0/node_modules/markdown-it/lib/token.mjs
|
|
1817
1817
|
/**
|
|
1818
1818
|
* class Token
|
|
1819
1819
|
**/
|
|
@@ -1967,7 +1967,7 @@ Token.prototype.attrJoin = function attrJoin(name, value) {
|
|
|
1967
1967
|
else this.attrs[idx][1] = this.attrs[idx][1] + " " + value;
|
|
1968
1968
|
};
|
|
1969
1969
|
//#endregion
|
|
1970
|
-
//#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=
|
|
1970
|
+
//#region ../../node_modules/.pnpm/@hedgedoc+markdown-it-plugins@2.1.4_patch_hash=49e14003b6caa0b7d164cbe71da573809d375bab_5d0803032f59b14bddf561c39219cd80/node_modules/@hedgedoc/markdown-it-plugins/dist/esm/task-lists/index.js
|
|
1971
1971
|
const checkboxRegex = /^ *\[([\sx])] /i;
|
|
1972
1972
|
function taskLists(md, options = {
|
|
1973
1973
|
enabled: false,
|
|
@@ -2771,7 +2771,7 @@ function slideSummary(slide) {
|
|
|
2771
2771
|
};
|
|
2772
2772
|
}
|
|
2773
2773
|
const noSchema = z.number().int().min(1).describe("Slide number (1-based, as displayed in the presentation)");
|
|
2774
|
-
const frontmatterSchema = z.record(z.any()).optional().describe("Slide frontmatter (YAML headmatter of the slide) as an object, e.g. { \"layout\": \"two-cols\" }");
|
|
2774
|
+
const frontmatterSchema = z.record(z.string(), z.any()).optional().describe("Slide frontmatter (YAML headmatter of the slide) as an object, e.g. { \"layout\": \"two-cols\" }");
|
|
2775
2775
|
/**
|
|
2776
2776
|
* Create the Slidev MCP server exposing tools for agents to inspect, edit,
|
|
2777
2777
|
* and (with a running dev server) navigate a slides deck.
|
|
@@ -2820,7 +2820,7 @@ function createSlidevMcpServer(ctx) {
|
|
|
2820
2820
|
server.registerTool("slidev-get-slide", {
|
|
2821
2821
|
title: "Get slide",
|
|
2822
2822
|
description: "Get the full source of one slide: frontmatter, Markdown content, and speaker note.",
|
|
2823
|
-
inputSchema: { no: noSchema },
|
|
2823
|
+
inputSchema: z.object({ no: noSchema }),
|
|
2824
2824
|
annotations: { readOnlyHint: true }
|
|
2825
2825
|
}, async ({ no }) => {
|
|
2826
2826
|
const slide = resolveSlide(await ctx.getData(), no);
|
|
@@ -2835,12 +2835,12 @@ function createSlidevMcpServer(ctx) {
|
|
|
2835
2835
|
server.registerTool("slidev-update-slide", {
|
|
2836
2836
|
title: "Update slide",
|
|
2837
2837
|
description: "Update the content, speaker note, and/or frontmatter of a slide. Only the provided fields are changed. Pass an empty string to clear the content or note. In `frontmatter`, only the given keys are patched; pass `null` as a value to delete that key.",
|
|
2838
|
-
inputSchema: {
|
|
2838
|
+
inputSchema: z.object({
|
|
2839
2839
|
no: noSchema,
|
|
2840
2840
|
content: z.string().optional().describe("New Markdown content of the slide (without frontmatter and note)"),
|
|
2841
2841
|
note: z.string().optional().describe("New speaker note (Markdown, stored as a trailing HTML comment)"),
|
|
2842
2842
|
frontmatter: frontmatterSchema
|
|
2843
|
-
}
|
|
2843
|
+
})
|
|
2844
2844
|
}, async ({ no, content, note, frontmatter }) => {
|
|
2845
2845
|
if (content == null && note == null && frontmatter == null) throw new Error("Nothing to update: provide at least one of `content`, `note`, or `frontmatter`.");
|
|
2846
2846
|
const { slide } = await applySlidePatch(await ctx.getData(), no, {
|
|
@@ -2853,12 +2853,12 @@ function createSlidevMcpServer(ctx) {
|
|
|
2853
2853
|
server.registerTool("slidev-insert-slide", {
|
|
2854
2854
|
title: "Insert slide",
|
|
2855
2855
|
description: "Insert a new slide after an existing slide (into the same markdown file). To add a slide at the very end, pass the last slide number.",
|
|
2856
|
-
inputSchema: {
|
|
2856
|
+
inputSchema: z.object({
|
|
2857
2857
|
after: z.number().int().min(1).describe("Slide number (1-based) after which the new slide is inserted"),
|
|
2858
2858
|
content: z.string().describe("Markdown content of the new slide"),
|
|
2859
2859
|
frontmatter: frontmatterSchema,
|
|
2860
2860
|
note: z.string().optional().describe("Speaker note of the new slide")
|
|
2861
|
-
}
|
|
2861
|
+
})
|
|
2862
2862
|
}, async ({ after, content, frontmatter, note }) => {
|
|
2863
2863
|
const { filepath } = await insertSlide(await ctx.getData(), {
|
|
2864
2864
|
after,
|
|
@@ -2871,7 +2871,7 @@ function createSlidevMcpServer(ctx) {
|
|
|
2871
2871
|
server.registerTool("slidev-remove-slide", {
|
|
2872
2872
|
title: "Remove slide",
|
|
2873
2873
|
description: "Remove a slide from the deck (deletes it from its source markdown file).",
|
|
2874
|
-
inputSchema: { no: noSchema },
|
|
2874
|
+
inputSchema: z.object({ no: noSchema }),
|
|
2875
2875
|
annotations: { destructiveHint: true }
|
|
2876
2876
|
}, async ({ no }) => {
|
|
2877
2877
|
const { removed, filepath } = await removeSlide(await ctx.getData(), no);
|
|
@@ -2880,11 +2880,11 @@ function createSlidevMcpServer(ctx) {
|
|
|
2880
2880
|
server.registerTool("slidev-move-slide", {
|
|
2881
2881
|
title: "Move slide",
|
|
2882
2882
|
description: "Move a slide before or after another slide to reorder the deck. Both slides must be in the same markdown file. To swap two adjacent slides, move one after the other.",
|
|
2883
|
-
inputSchema: {
|
|
2883
|
+
inputSchema: z.object({
|
|
2884
2884
|
from: z.number().int().min(1).describe("Slide number (1-based) of the slide to move"),
|
|
2885
2885
|
before: z.number().int().min(1).optional().describe("Move the slide right before this slide number"),
|
|
2886
2886
|
after: z.number().int().min(1).optional().describe("Move the slide right after this slide number")
|
|
2887
|
-
}
|
|
2887
|
+
})
|
|
2888
2888
|
}, async ({ from, before, after }) => {
|
|
2889
2889
|
const { filepath } = await moveSlide(await ctx.getData(), {
|
|
2890
2890
|
from,
|
|
@@ -2898,10 +2898,10 @@ function createSlidevMcpServer(ctx) {
|
|
|
2898
2898
|
server.registerTool("slidev-goto-slide", {
|
|
2899
2899
|
title: "Go to slide",
|
|
2900
2900
|
description: "Navigate the live presentation (all connected browsers) to a given slide, e.g. to visually verify a slide after editing it.",
|
|
2901
|
-
inputSchema: {
|
|
2901
|
+
inputSchema: z.object({
|
|
2902
2902
|
no: noSchema,
|
|
2903
2903
|
clicks: z.number().int().min(0).optional().describe("Click animation step to reveal (defaults to 0)")
|
|
2904
|
-
},
|
|
2904
|
+
}),
|
|
2905
2905
|
annotations: { idempotentHint: true }
|
|
2906
2906
|
}, async ({ no, clicks }) => {
|
|
2907
2907
|
resolveSlide(await ctx.getData(), no);
|
|
@@ -3063,7 +3063,7 @@ function createMcpPlugin(options) {
|
|
|
3063
3063
|
}
|
|
3064
3064
|
try {
|
|
3065
3065
|
const mcp = createSlidevMcpServer(ctx);
|
|
3066
|
-
const transport = new
|
|
3066
|
+
const transport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: void 0 });
|
|
3067
3067
|
res.on("close", () => {
|
|
3068
3068
|
transport.close();
|
|
3069
3069
|
mcp.close();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as getRoots } from "./resolver-BIhhHpe7.mjs";
|
|
2
|
-
import { i as createSlidevMcpServer, s as parser, u as version } from "./serve-
|
|
3
|
-
import { StdioServerTransport } from "@modelcontextprotocol/
|
|
2
|
+
import { i as createSlidevMcpServer, s as parser, u as version } from "./serve-DzftUF4M.mjs";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
4
4
|
//#region node/mcp/stdio.ts
|
|
5
5
|
/**
|
|
6
6
|
* Start a Slidev MCP server over stdio, operating on the markdown files
|
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.19.1",
|
|
5
5
|
"description": "Presentation slides for developers",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -47,18 +47,19 @@
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@antfu/ni": "^30.
|
|
50
|
+
"@antfu/ni": "^30.5.0",
|
|
51
51
|
"@antfu/utils": "^9.3.0",
|
|
52
52
|
"@comark/markdown-it": "^0.3.4",
|
|
53
|
-
"@iconify-json/carbon": "^1.2.
|
|
53
|
+
"@iconify-json/carbon": "^1.2.25",
|
|
54
54
|
"@iconify-json/ph": "^1.2.2",
|
|
55
55
|
"@iconify-json/svg-spinners": "^1.2.4",
|
|
56
56
|
"@lillallol/outline-pdf": "^4.0.0",
|
|
57
|
-
"@modelcontextprotocol/
|
|
58
|
-
"@
|
|
59
|
-
"@shikijs/
|
|
60
|
-
"@shikijs/
|
|
61
|
-
"@shikijs/
|
|
57
|
+
"@modelcontextprotocol/node": "^2.0.0",
|
|
58
|
+
"@modelcontextprotocol/server": "^2.0.0",
|
|
59
|
+
"@shikijs/magic-move": "^4.4.3",
|
|
60
|
+
"@shikijs/markdown-it": "^4.4.3",
|
|
61
|
+
"@shikijs/twoslash": "^4.4.3",
|
|
62
|
+
"@shikijs/vitepress-twoslash": "^4.4.3",
|
|
62
63
|
"@unocss/extractor-mdc": "^66.7.5",
|
|
63
64
|
"@unocss/reset": "^66.7.5",
|
|
64
65
|
"@vitejs/plugin-vue": "^6.0.8",
|
|
@@ -74,10 +75,10 @@
|
|
|
74
75
|
"htmlparser2": "^12.0.0",
|
|
75
76
|
"is-installed-globally": "^1.0.0",
|
|
76
77
|
"jiti": "^2.7.0",
|
|
77
|
-
"katex": "^0.18.
|
|
78
|
+
"katex": "^0.18.4",
|
|
78
79
|
"local-pkg": "^1.2.1",
|
|
79
80
|
"lz-string": "^1.5.0",
|
|
80
|
-
"magic-string": "^1.
|
|
81
|
+
"magic-string": "^1.2.0",
|
|
81
82
|
"magic-string-stack": "^2.0.0",
|
|
82
83
|
"markdown-exit": "^1.1.0-beta.2",
|
|
83
84
|
"markdown-it-footnote": "^4.0.0",
|
|
@@ -85,42 +86,42 @@
|
|
|
85
86
|
"mlly": "^1.8.2",
|
|
86
87
|
"monaco-editor": "^0.56.0",
|
|
87
88
|
"obug": "^2.1.4",
|
|
88
|
-
"open": "^11.0.
|
|
89
|
+
"open": "^11.0.1",
|
|
89
90
|
"pathe": "^2.0.3",
|
|
90
91
|
"pdf-lib": "^1.17.1",
|
|
91
92
|
"picomatch": "^4.0.5",
|
|
92
93
|
"plantuml-encoder": "^1.4.0",
|
|
93
|
-
"postcss-nested": "^
|
|
94
|
+
"postcss-nested": "^8.0.1",
|
|
94
95
|
"pptxgenjs": "^4.0.1",
|
|
95
96
|
"prompts": "^2.4.2",
|
|
96
97
|
"public-ip": "^8.0.0",
|
|
97
98
|
"resolve-from": "^5.0.0",
|
|
98
99
|
"resolve-global": "^2.0.0",
|
|
99
|
-
"
|
|
100
|
-
"shiki": "^4.3.1",
|
|
100
|
+
"shiki": "^4.4.3",
|
|
101
101
|
"sirv": "^3.0.2",
|
|
102
102
|
"source-map-js": "^1.2.1",
|
|
103
103
|
"typescript": "^6.0.3",
|
|
104
|
-
"unhead": "^3.2
|
|
104
|
+
"unhead": "^3.3.2",
|
|
105
105
|
"unocss": "^66.7.5",
|
|
106
106
|
"unplugin-icons": "^23.0.1",
|
|
107
107
|
"unplugin-vue-components": "^32.1.0",
|
|
108
108
|
"unplugin-vue-markdown": "^32.0.0",
|
|
109
109
|
"untun": "^0.2.2",
|
|
110
110
|
"uqr": "^0.1.3",
|
|
111
|
-
"
|
|
112
|
-
"vite
|
|
111
|
+
"verkit": "^0.4.0",
|
|
112
|
+
"vite": "^8.2.1",
|
|
113
|
+
"vite-plugin-inspect": "^12.0.2",
|
|
113
114
|
"vite-plugin-remote-assets": "^2.1.0",
|
|
114
115
|
"vite-plugin-static-copy": "^4.1.1",
|
|
115
116
|
"vite-plugin-vue-server-ref": "^1.0.0",
|
|
116
117
|
"vitefu": "^1.1.3",
|
|
117
|
-
"vue": "^3.5.
|
|
118
|
+
"vue": "^3.5.41",
|
|
118
119
|
"yaml": "^2.9.0",
|
|
119
120
|
"yargs": "^18.1.0",
|
|
120
|
-
"zod": "^
|
|
121
|
-
"@slidev/
|
|
122
|
-
"@slidev/
|
|
123
|
-
"@slidev/types": "52.
|
|
121
|
+
"zod": "^4.4.3",
|
|
122
|
+
"@slidev/client": "52.19.1",
|
|
123
|
+
"@slidev/parser": "52.19.1",
|
|
124
|
+
"@slidev/types": "52.19.1"
|
|
124
125
|
},
|
|
125
126
|
"devDependencies": {
|
|
126
127
|
"@hedgedoc/markdown-it-plugins": "^2.1.4",
|