cursor-canvas-export 0.1.1 → 0.1.2
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/cli.js +7 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -654,14 +654,17 @@ function slug(value) {
|
|
|
654
654
|
}
|
|
655
655
|
|
|
656
656
|
// src/mcp.ts
|
|
657
|
-
var
|
|
657
|
+
var exportThemeSchema = z.enum(["dark", "light"]).describe(
|
|
658
|
+
"Canvas theme. Defaults to dark. Prefer dark: the output is usually read by a developer working in a dark IDE, who may strongly dislike a light page. Use light only if the user explicitly asks for it."
|
|
659
|
+
);
|
|
660
|
+
var previewThemeSchema = z.enum(["dark", "light"]).describe("Canvas theme. Defaults to dark.");
|
|
658
661
|
var widthSchema = z.number().int().min(320).optional().describe("Page width in pixels. Defaults to 800.");
|
|
659
662
|
var browserWait = "If the result tells you to wait because Chromium is downloading, that is not an error. Wait about 30 seconds and call this tool again with the same arguments. Nothing is written until a later call finishes the render.";
|
|
660
663
|
function createServer() {
|
|
661
664
|
holdBrowserProcess();
|
|
662
665
|
warmBrowser();
|
|
663
666
|
const server = new McpServer(
|
|
664
|
-
{ name: "cursor-canvas-export", version: "0.1.
|
|
667
|
+
{ name: "cursor-canvas-export", version: "0.1.2" },
|
|
665
668
|
{
|
|
666
669
|
instructions: "If export_canvas or preview_canvas tells you to wait because Chromium is downloading, that is not an error. Wait about 30 seconds and call the same tool again with the same arguments. The file or preview is ready only when that later call returns it."
|
|
667
670
|
}
|
|
@@ -690,7 +693,7 @@ function createServer() {
|
|
|
690
693
|
inputSchema: {
|
|
691
694
|
canvas: z.string().describe("Absolute path to a .canvas.tsx file, or its name without the extension."),
|
|
692
695
|
format: z.enum(["html", "pdf", "both"]).optional().describe("Defaults to both."),
|
|
693
|
-
theme:
|
|
696
|
+
theme: exportThemeSchema.optional(),
|
|
694
697
|
width: widthSchema,
|
|
695
698
|
out: z.string().optional().describe("Output stem. Extension is ignored. Defaults to beside the canvas.")
|
|
696
699
|
}
|
|
@@ -729,7 +732,7 @@ function createServer() {
|
|
|
729
732
|
description: `Render a canvas and return a PNG of the page so you can check layout before handing the file over. Tall pages are clipped to the top 1600px. Nothing is written next to the canvas. ${browserWait}`,
|
|
730
733
|
inputSchema: {
|
|
731
734
|
canvas: z.string().describe("Absolute path to a .canvas.tsx file, or its name without the extension."),
|
|
732
|
-
theme:
|
|
735
|
+
theme: previewThemeSchema.optional(),
|
|
733
736
|
width: widthSchema
|
|
734
737
|
}
|
|
735
738
|
},
|