@pixerate/editor 0.52.0 → 0.54.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/dist/agent/index.cjs +37 -29
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +4 -3
- package/dist/agent/index.d.ts +4 -3
- package/dist/agent/index.js +16 -8
- package/dist/agent/index.js.map +1 -1
- package/dist/animation/index.cjs +15 -1
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +3 -226
- package/dist/animation/index.d.ts +3 -226
- package/dist/animation/index.js +14 -0
- package/dist/bridge/cli.cjs +36 -0
- package/dist/bridge/cli.cjs.map +1 -0
- package/dist/bridge/cli.d.cts +1 -0
- package/dist/bridge/cli.d.ts +1 -0
- package/dist/bridge/cli.js +36 -0
- package/dist/bridge/cli.js.map +1 -0
- package/dist/bridge/index.cjs +16 -0
- package/dist/bridge/index.cjs.map +1 -0
- package/dist/bridge/index.d.cts +65 -0
- package/dist/bridge/index.d.ts +65 -0
- package/dist/bridge/index.js +16 -0
- package/dist/bridge/index.js.map +1 -0
- package/dist/bridge-client-C5OziCRK.d.cts +148 -0
- package/dist/bridge-client-C5dRjrz5.d.ts +148 -0
- package/dist/canvas/index.cjs +1308 -528
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +309 -5
- package/dist/canvas/index.d.ts +309 -5
- package/dist/canvas/index.js +1295 -515
- package/dist/canvas/index.js.map +1 -1
- package/dist/chart/index.cjs +193 -192
- package/dist/chart/index.cjs.map +1 -1
- package/dist/chart/index.d.cts +77 -59
- package/dist/chart/index.d.ts +77 -59
- package/dist/chart/index.js +87 -86
- package/dist/chart/index.js.map +1 -1
- package/dist/{chunk-UAW5FEMD.js → chunk-3S72F46R.js} +66 -8
- package/dist/chunk-3S72F46R.js.map +1 -0
- package/dist/{chunk-5TWIN7ZJ.js → chunk-47WWV3LI.js} +34 -4
- package/dist/chunk-47WWV3LI.js.map +1 -0
- package/dist/{chunk-OV7UAKIY.js → chunk-633QC34G.js} +172 -1
- package/dist/chunk-633QC34G.js.map +1 -0
- package/dist/chunk-AWKPSOSX.js +401 -0
- package/dist/chunk-AWKPSOSX.js.map +1 -0
- package/dist/chunk-B6DSIEXA.js +96 -0
- package/dist/chunk-B6DSIEXA.js.map +1 -0
- package/dist/{chunk-5N6AQCVB.js → chunk-BQQZ6MOI.js} +3 -3
- package/dist/{chunk-M5Z77GFH.cjs → chunk-C3JHII3M.cjs} +53 -53
- package/dist/{chunk-M5Z77GFH.cjs.map → chunk-C3JHII3M.cjs.map} +1 -1
- package/dist/{chunk-JOX6MJW4.cjs → chunk-CKRNELPO.cjs} +176 -5
- package/dist/chunk-CKRNELPO.cjs.map +1 -0
- package/dist/{chunk-TGBCBQFV.cjs → chunk-DK6QBGCS.cjs} +45 -15
- package/dist/chunk-DK6QBGCS.cjs.map +1 -0
- package/dist/chunk-EGFUVXKK.cjs +96 -0
- package/dist/chunk-EGFUVXKK.cjs.map +1 -0
- package/dist/{chunk-AMWXSYCI.js → chunk-GPWNYQ7R.js} +2 -370
- package/dist/chunk-GPWNYQ7R.js.map +1 -0
- package/dist/chunk-H5K77C7Y.cjs +3848 -0
- package/dist/chunk-H5K77C7Y.cjs.map +1 -0
- package/dist/chunk-K73CKYUM.cjs +458 -0
- package/dist/chunk-K73CKYUM.cjs.map +1 -0
- package/dist/{chunk-GTZXF4BI.cjs → chunk-NK3WL5TJ.cjs} +298 -133
- package/dist/chunk-NK3WL5TJ.cjs.map +1 -0
- package/dist/{chunk-3ZBAXET6.cjs → chunk-NN3JGUSX.cjs} +80 -22
- package/dist/chunk-NN3JGUSX.cjs.map +1 -0
- package/dist/chunk-NV22EMOZ.cjs +401 -0
- package/dist/chunk-NV22EMOZ.cjs.map +1 -0
- package/dist/{chunk-YMKPMXZ4.js → chunk-OIKYP7XC.js} +4 -4
- package/dist/{chunk-FEMIVHN3.cjs → chunk-P43HUQRX.cjs} +16 -16
- package/dist/{chunk-FEMIVHN3.cjs.map → chunk-P43HUQRX.cjs.map} +1 -1
- package/dist/chunk-PTMIGXZ2.js +467 -0
- package/dist/chunk-PTMIGXZ2.js.map +1 -0
- package/dist/chunk-QIWFEEWG.cjs +467 -0
- package/dist/chunk-QIWFEEWG.cjs.map +1 -0
- package/dist/{chunk-QFTVLEVN.js → chunk-RIXTW3C4.js} +3 -3
- package/dist/{chunk-WBOAXDKD.js → chunk-VODBAO32.js} +222 -57
- package/dist/chunk-VODBAO32.js.map +1 -0
- package/dist/chunk-WWJNC7SX.js +3848 -0
- package/dist/chunk-WWJNC7SX.js.map +1 -0
- package/dist/{chunk-2DEBI6KU.cjs → chunk-YZZMX6V7.cjs} +10 -10
- package/dist/{chunk-2DEBI6KU.cjs.map → chunk-YZZMX6V7.cjs.map} +1 -1
- package/dist/commands/index.d.cts +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/{controller-DS3drIvy.d.cts → controller-CX0QfSv0.d.cts} +53 -2
- package/dist/{controller-BdKzaxs2.d.ts → controller-DscWQbjO.d.ts} +53 -2
- package/dist/diagram/index.cjs +1146 -0
- package/dist/diagram/index.cjs.map +1 -0
- package/dist/diagram/index.d.cts +787 -0
- package/dist/diagram/index.d.ts +787 -0
- package/dist/diagram/index.js +1146 -0
- package/dist/diagram/index.js.map +1 -0
- package/dist/{easing-DTmX99QG.d.cts → easing-CNGk-W6d.d.cts} +1 -1
- package/dist/{easing-DTmX99QG.d.ts → easing-CNGk-W6d.d.ts} +1 -1
- package/dist/export/index.cjs +4 -4
- package/dist/export/index.js +3 -3
- package/dist/extensions/index.cjs +6 -6
- package/dist/extensions/index.d.cts +2 -2
- package/dist/extensions/index.d.ts +2 -2
- package/dist/extensions/index.js +5 -5
- package/dist/generation/index.d.cts +2 -2
- package/dist/generation/index.d.ts +2 -2
- package/dist/image-editor/index.d.cts +1 -1
- package/dist/image-editor/index.d.ts +1 -1
- package/dist/{index-Dt9lzydb.d.ts → index-CALDD35B.d.ts} +1 -1
- package/dist/{index-DOy9HzfC.d.cts → index-DIWB6xMf.d.cts} +1 -1
- package/dist/index.cjs +13 -13
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/parameters/index.d.cts +1 -1
- package/dist/parameters/index.d.ts +1 -1
- package/dist/player-DSMjdgQ9.d.cts +225 -0
- package/dist/player-DdfVrKWq.d.ts +225 -0
- package/dist/presence-Cb6WhcrQ.d.cts +77 -0
- package/dist/presence-Cb6WhcrQ.d.ts +77 -0
- package/dist/{registry-CSlH4iUn.d.ts → registry-7AZFuand.d.ts} +1 -1
- package/dist/{registry-B4l-lYts.d.cts → registry-DIpIaCkH.d.cts} +1 -1
- package/dist/tools/index.cjs +10 -2
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +3 -74
- package/dist/tools/index.d.ts +3 -74
- package/dist/tools/index.js +12 -4
- package/dist/types-BULrFyuQ.d.cts +316 -0
- package/dist/types-BULrFyuQ.d.ts +316 -0
- package/dist/vector/index.d.cts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/package.json +14 -1
- package/dist/chunk-3ZBAXET6.cjs.map +0 -1
- package/dist/chunk-5TWIN7ZJ.js.map +0 -1
- package/dist/chunk-AMWXSYCI.js.map +0 -1
- package/dist/chunk-GTZXF4BI.cjs.map +0 -1
- package/dist/chunk-JOX6MJW4.cjs.map +0 -1
- package/dist/chunk-OV7UAKIY.js.map +0 -1
- package/dist/chunk-TGBCBQFV.cjs.map +0 -1
- package/dist/chunk-UAW5FEMD.js.map +0 -1
- package/dist/chunk-WBOAXDKD.js.map +0 -1
- package/dist/chunk-XFYUFVAX.cjs +0 -826
- package/dist/chunk-XFYUFVAX.cjs.map +0 -1
- /package/dist/{chunk-5N6AQCVB.js.map → chunk-BQQZ6MOI.js.map} +0 -0
- /package/dist/{chunk-YMKPMXZ4.js.map → chunk-OIKYP7XC.js.map} +0 -0
- /package/dist/{chunk-QFTVLEVN.js.map → chunk-RIXTW3C4.js.map} +0 -0
package/dist/agent/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDK6QBGCScjs = require('../chunk-DK6QBGCS.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -24,6 +24,7 @@ var _chunkTGBCBQFVcjs = require('../chunk-TGBCBQFV.cjs');
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
+
var _chunkK73CKYUMcjs = require('../chunk-K73CKYUM.cjs');
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
|
|
@@ -32,7 +33,11 @@ var _chunkTGBCBQFVcjs = require('../chunk-TGBCBQFV.cjs');
|
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
var _chunkQIWFEEWGcjs = require('../chunk-QIWFEEWG.cjs');
|
|
36
41
|
|
|
37
42
|
|
|
38
43
|
var _chunkHXDMZQTDcjs = require('../chunk-HXDMZQTD.cjs');
|
|
@@ -52,14 +57,14 @@ var _chunkRIWPYSKUcjs = require('../chunk-RIWPYSKU.cjs');
|
|
|
52
57
|
|
|
53
58
|
|
|
54
59
|
|
|
55
|
-
var
|
|
60
|
+
var _chunkP43HUQRXcjs = require('../chunk-P43HUQRX.cjs');
|
|
56
61
|
|
|
57
62
|
|
|
58
|
-
var
|
|
63
|
+
var _chunkNK3WL5TJcjs = require('../chunk-NK3WL5TJ.cjs');
|
|
59
64
|
|
|
60
65
|
|
|
61
66
|
|
|
62
|
-
var
|
|
67
|
+
var _chunkCKRNELPOcjs = require('../chunk-CKRNELPO.cjs');
|
|
63
68
|
|
|
64
69
|
|
|
65
70
|
|
|
@@ -420,14 +425,14 @@ var SIZE_WIDTH = {
|
|
|
420
425
|
};
|
|
421
426
|
var SIZE_HEIGHT = { type: "number", minimum: 50, maximum: 4096, description: "Height in pixels (default 320)." };
|
|
422
427
|
var SPEC_PROPERTIES = {
|
|
423
|
-
...
|
|
428
|
+
..._chunkDK6QBGCScjs.CHART_UPDATE_PROPERTIES,
|
|
424
429
|
categories: { type: "array", items: { type: "string" }, description: "Category labels in order (x axis labels, or pie slices)." },
|
|
425
430
|
series: {
|
|
426
431
|
type: "array",
|
|
427
432
|
description: "The series, each with one value per category (padded with gaps).",
|
|
428
433
|
items: {
|
|
429
434
|
type: "object",
|
|
430
|
-
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ...
|
|
435
|
+
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ..._chunkDK6QBGCScjs.SERIES_PROPS },
|
|
431
436
|
required: ["name", "values"],
|
|
432
437
|
additionalProperties: false
|
|
433
438
|
}
|
|
@@ -438,7 +443,7 @@ function cleanSeries(series) {
|
|
|
438
443
|
return series.map((s) => s && typeof s === "object" ? Object.fromEntries(Object.entries(s).filter(([, v]) => v !== null)) : s);
|
|
439
444
|
}
|
|
440
445
|
function checkedSpec(input) {
|
|
441
|
-
const { spec, issues } =
|
|
446
|
+
const { spec, issues } = _chunkCKRNELPOcjs.normalizeChartSpec.call(void 0, { ...input, ...input.series !== void 0 ? { series: cleanSeries(input.series) } : {} });
|
|
442
447
|
if (issues.length) throw new Error(`The chart was not changed: ${issues.map((i) => i.message).join(" ")}`);
|
|
443
448
|
return spec;
|
|
444
449
|
}
|
|
@@ -453,14 +458,14 @@ function describe(chart, includeSpec) {
|
|
|
453
458
|
series: spec.series.map((s) => ({ id: s.id, name: s.name })),
|
|
454
459
|
width: _nullishCoalesce(node.attrs.width, () => ( null)),
|
|
455
460
|
height: node.attrs.height,
|
|
456
|
-
description:
|
|
461
|
+
description: _chunkNK3WL5TJcjs.describeChart.call(void 0, spec),
|
|
457
462
|
...includeSpec ? { spec } : {}
|
|
458
463
|
};
|
|
459
464
|
}
|
|
460
465
|
function sparklines(doc) {
|
|
461
466
|
const found = [];
|
|
462
467
|
doc.descendants((node, pos) => {
|
|
463
|
-
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label:
|
|
468
|
+
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label: _chunkP43HUQRXcjs.sparklineLabel.call(void 0, node) });
|
|
464
469
|
});
|
|
465
470
|
return found;
|
|
466
471
|
}
|
|
@@ -471,7 +476,7 @@ function checkPosition(editor, at) {
|
|
|
471
476
|
function createDocumentChartTools(editor) {
|
|
472
477
|
const chartType = () => editor().schema.nodes.chart;
|
|
473
478
|
const findChart = (args) => {
|
|
474
|
-
const charts =
|
|
479
|
+
const charts = _chunkP43HUQRXcjs.getDocumentCharts.call(void 0, editor().state.doc);
|
|
475
480
|
const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
|
|
476
481
|
if (args.chartId !== void 0) {
|
|
477
482
|
const chart = charts.find((c) => c.id === args.chartId);
|
|
@@ -498,7 +503,7 @@ function createDocumentChartTools(editor) {
|
|
|
498
503
|
annotations: { title: "List charts in the document", ...READ },
|
|
499
504
|
handler: ({ includeSpec = false }) => {
|
|
500
505
|
const doc = editor().state.doc;
|
|
501
|
-
return { charts:
|
|
506
|
+
return { charts: _chunkP43HUQRXcjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
|
|
502
507
|
}
|
|
503
508
|
};
|
|
504
509
|
const insertChart = {
|
|
@@ -525,7 +530,7 @@ function createDocumentChartTools(editor) {
|
|
|
525
530
|
const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
|
|
526
531
|
const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
527
532
|
const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
|
|
528
|
-
const chart =
|
|
533
|
+
const chart = _chunkP43HUQRXcjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
|
|
529
534
|
if (!ok || !chart) throw new Error(`A chart cannot go at ${_nullishCoalesce(at, () => ( ed.state.selection.from))}; pass a position between blocks or inside a paragraph.`);
|
|
530
535
|
return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
|
|
531
536
|
}
|
|
@@ -572,8 +577,8 @@ function createDocumentChartTools(editor) {
|
|
|
572
577
|
inputSchema: {
|
|
573
578
|
type: "object",
|
|
574
579
|
properties: {
|
|
575
|
-
values: { type: "array", items:
|
|
576
|
-
kind: { type: "string", enum: [...
|
|
580
|
+
values: { type: "array", items: _chunkDK6QBGCScjs.VALUE, minItems: 1, maxItems: _chunkP43HUQRXcjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
|
|
581
|
+
kind: { type: "string", enum: [..._chunkP43HUQRXcjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
|
|
577
582
|
at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
|
|
578
583
|
width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
|
|
579
584
|
height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
|
|
@@ -587,12 +592,12 @@ function createDocumentChartTools(editor) {
|
|
|
587
592
|
handler: ({ values, kind = "line", at, width = 80, height = 18, color = null, label = null }) => {
|
|
588
593
|
const ed = editor();
|
|
589
594
|
checkPosition(ed, at);
|
|
590
|
-
const parsed = values.map((v) =>
|
|
595
|
+
const parsed = values.map((v) => _chunkCKRNELPOcjs.parseChartValue.call(void 0, v));
|
|
591
596
|
const bad = parsed.findIndex((v) => v === void 0);
|
|
592
597
|
if (bad >= 0) throw new Error(`values[${bad}] ("${String(values[bad])}") is not a number; pass numbers, numeric text or null. Nothing was inserted.`);
|
|
593
598
|
const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
|
|
594
599
|
if (!ed.state.doc.resolve(pos).parent.inlineContent) throw new Error(`Position ${pos} is between blocks; a sparkline goes inside a paragraph (use a position from get_text {blocks: true}).`);
|
|
595
|
-
const stored =
|
|
600
|
+
const stored = _chunkP43HUQRXcjs.normalizeSparklineValues.call(void 0, parsed);
|
|
596
601
|
ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true)).insertContentAt(pos, { type: "sparkline", attrs: { values: stored, kind, width, height, color, label } }).run();
|
|
597
602
|
return { pos, kind, values: stored };
|
|
598
603
|
}
|
|
@@ -643,7 +648,7 @@ function findMatches(editor, query, args, replacement) {
|
|
|
643
648
|
wholeWord: !!args.wholeWord,
|
|
644
649
|
...args.regex ? { regex: true } : { literal: true }
|
|
645
650
|
};
|
|
646
|
-
const result =
|
|
651
|
+
const result = _chunkP43HUQRXcjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
|
|
647
652
|
if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
|
|
648
653
|
return { matches: result.matches, truncated: result.truncated };
|
|
649
654
|
}
|
|
@@ -795,7 +800,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
795
800
|
replacement: String(replace).replace(/\r\n?|\n/g, "\r")
|
|
796
801
|
}));
|
|
797
802
|
const tr = ed.state.tr;
|
|
798
|
-
const ends =
|
|
803
|
+
const ends = _chunkP43HUQRXcjs.applyReplacements.call(void 0, tr, chosen);
|
|
799
804
|
ed.view.dispatch(tr.scrollIntoView());
|
|
800
805
|
return {
|
|
801
806
|
replaced: chosen.length,
|
|
@@ -892,7 +897,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
892
897
|
inputSchema: {
|
|
893
898
|
type: "object",
|
|
894
899
|
properties: {
|
|
895
|
-
operation: { type: "string", enum:
|
|
900
|
+
operation: { type: "string", enum: _chunkP43HUQRXcjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
|
|
896
901
|
at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
|
|
897
902
|
rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
|
|
898
903
|
cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
|
|
@@ -922,10 +927,10 @@ function createRichTextToolProvider(target, options) {
|
|
|
922
927
|
ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
|
|
923
928
|
}
|
|
924
929
|
const action = operation;
|
|
925
|
-
const state =
|
|
930
|
+
const state = _chunkP43HUQRXcjs.getTableActionState.call(void 0, ed, action, params);
|
|
926
931
|
if (state !== true) throw new Error(state);
|
|
927
|
-
|
|
928
|
-
const table =
|
|
932
|
+
_chunkP43HUQRXcjs.runTableAction.call(void 0, ed, action, params);
|
|
933
|
+
const table = _chunkP43HUQRXcjs.getTableState.call(void 0, ed);
|
|
929
934
|
return {
|
|
930
935
|
operation,
|
|
931
936
|
table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
|
|
@@ -941,7 +946,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
941
946
|
if (!ed || ed.isDestroyed) return [];
|
|
942
947
|
if (!ed.isEditable) return [getText, findText, ...charts.read()];
|
|
943
948
|
const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection];
|
|
944
|
-
return [...tools, ...
|
|
949
|
+
return [...tools, ..._chunkP43HUQRXcjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write()];
|
|
945
950
|
},
|
|
946
951
|
subscribe: (notify) => {
|
|
947
952
|
const ed = editor();
|
|
@@ -1200,7 +1205,7 @@ function createSpreadsheetToolProvider(controller, options) {
|
|
|
1200
1205
|
};
|
|
1201
1206
|
}
|
|
1202
1207
|
function missingArgumentsMessage(name, args) {
|
|
1203
|
-
const required =
|
|
1208
|
+
const required = _chunkK73CKYUMcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS[name][args.operation];
|
|
1204
1209
|
if (!required) return `Unknown operation "${args.operation}".`;
|
|
1205
1210
|
const missing = required.filter(
|
|
1206
1211
|
(key) => key === "id" ? args.id === void 0 && _optionalChain([args, 'access', _23 => _23.node, 'optionalAccess', _24 => _24.id]) === void 0 : args[key] === void 0
|
|
@@ -1237,10 +1242,10 @@ function createEditorMcpToolProvider(options) {
|
|
|
1237
1242
|
};
|
|
1238
1243
|
const canvas = _nullishCoalesce(_optionalChain([options, 'access', _25 => _25.surfaces, 'optionalAccess', _26 => _26.canvas]), () => ( true));
|
|
1239
1244
|
const prompt = _nullishCoalesce(_optionalChain([options, 'access', _27 => _27.surfaces, 'optionalAccess', _28 => _28.prompt]), () => ( true));
|
|
1240
|
-
const editTools = options.toolStyle === "combined" ? [...canvas ? [
|
|
1245
|
+
const editTools = options.toolStyle === "combined" ? [...canvas ? [_chunkK73CKYUMcjs.MCP_TOOL_EDIT_CANVAS] : [], ...prompt ? [_chunkK73CKYUMcjs.MCP_TOOL_EDIT_PROMPT] : []] : [...canvas ? _chunkK73CKYUMcjs.EDITOR_CANVAS_TOOLS : [], ...prompt ? _chunkK73CKYUMcjs.EDITOR_PROMPT_TOOLS : []];
|
|
1241
1246
|
const tools = [
|
|
1242
1247
|
{
|
|
1243
|
-
...
|
|
1248
|
+
..._chunkK73CKYUMcjs.MCP_TOOL_GET_EDITOR_STATE,
|
|
1244
1249
|
handler: ({ includeDocument = true, includeCanvas = true }) => {
|
|
1245
1250
|
const snapshot = options.getSnapshot();
|
|
1246
1251
|
return {
|
|
@@ -1254,7 +1259,7 @@ function createEditorMcpToolProvider(options) {
|
|
|
1254
1259
|
if (options.captureView) {
|
|
1255
1260
|
const capture = options.captureView;
|
|
1256
1261
|
tools.push({
|
|
1257
|
-
...
|
|
1262
|
+
..._chunkK73CKYUMcjs.MCP_TOOL_VIEW_EDITOR,
|
|
1258
1263
|
handler: async (args) => {
|
|
1259
1264
|
const image = await capture(args);
|
|
1260
1265
|
return { content: [{ type: "image", data: image.data, mimeType: image.mimeType }] };
|
|
@@ -1499,5 +1504,8 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
|
|
|
1499
1504
|
|
|
1500
1505
|
|
|
1501
1506
|
|
|
1502
|
-
|
|
1507
|
+
|
|
1508
|
+
|
|
1509
|
+
|
|
1510
|
+
exports.EDITOR_CANVAS_TOOLS = _chunkK73CKYUMcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkK73CKYUMcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkK73CKYUMcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkK73CKYUMcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkK73CKYUMcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkQIWFEEWGcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkQIWFEEWGcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkK73CKYUMcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkK73CKYUMcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkK73CKYUMcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkK73CKYUMcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkK73CKYUMcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkK73CKYUMcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkK73CKYUMcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkK73CKYUMcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkK73CKYUMcjs.MCP_TOOL_VIEW_EDITOR; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkQIWFEEWGcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkQIWFEEWGcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_NAMESPACE_SEPARATOR = _chunkQIWFEEWGcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkQIWFEEWGcjs.ToolRegistry; exports.ToolRegistryError = _chunkQIWFEEWGcjs.ToolRegistryError; exports.connectToolBridge = _chunkQIWFEEWGcjs.connectToolBridge; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createDocumentChartTools = createDocumentChartTools; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createMcpServer = _chunkQIWFEEWGcjs.createMcpServer; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createToolRegistry = _chunkQIWFEEWGcjs.createToolRegistry; exports.normalizeSide = normalizeSide; exports.planAgentCommand = planAgentCommand; exports.planToolCall = planToolCall; exports.toToolResult = _chunkQIWFEEWGcjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.validateAgentCommand = validateAgentCommand; exports.validateJsonSchema = _chunkRIWPYSKUcjs.validateJsonSchema;
|
|
1503
1511
|
//# sourceMappingURL=index.cjs.map
|