@pixerate/editor 0.243.0 → 0.245.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 +34 -32
- package/dist/agent/index.js +6 -4
- package/dist/animation-editor/index.cjs +61 -61
- package/dist/animation-editor/index.js +4 -4
- package/dist/{brushstrokeRender-274HGNZR.js → brushstrokeRender-4542T5HP.js} +2 -2
- package/dist/{brushstrokeRender-C7RJZPMC.cjs → brushstrokeRender-QA5WVIDT.cjs} +5 -5
- package/dist/canvas/changeFeed.d.cts +71 -0
- package/dist/canvas/changeFeed.d.ts +71 -0
- package/dist/canvas/index.cjs +490 -34
- package/dist/canvas/index.d.cts +3 -0
- package/dist/canvas/index.d.ts +3 -0
- package/dist/canvas/index.js +483 -27
- package/dist/canvas/proposal-tools.d.cts +21 -0
- package/dist/canvas/proposal-tools.d.ts +21 -0
- package/dist/canvas/proposals.d.cts +112 -0
- package/dist/canvas/proposals.d.ts +112 -0
- package/dist/chart/index.cjs +21 -21
- package/dist/chart/index.js +2 -2
- package/dist/{chunk-6L3WWIDW.js → chunk-4EQY4TZJ.js} +1 -1
- package/dist/{chunk-5FZS7J7C.cjs → chunk-4T47Z4J3.cjs} +18 -2
- package/dist/{chunk-4I76OCVD.cjs → chunk-5DLCOQOQ.cjs} +16 -1
- package/dist/{chunk-4ZHXLFXS.js → chunk-5RFENYO5.js} +1 -1
- package/dist/{chunk-SRXWDOUI.js → chunk-7YQNKSQ7.js} +1 -1
- package/dist/{chunk-WGN7AUKB.js → chunk-7YW7T5TJ.js} +1 -1
- package/dist/{chunk-X3ZINLIP.js → chunk-AU6MWQKZ.js} +1 -1
- package/dist/{chunk-OONFIFEU.cjs → chunk-BDIH4DYR.cjs} +23 -23
- package/dist/{chunk-AIS56JOO.js → chunk-BVRRIW7F.js} +1 -1
- package/dist/{chunk-KK2FWMA2.cjs → chunk-HZ547SGQ.cjs} +1 -1
- package/dist/{chunk-3WOZEBXZ.cjs → chunk-IZL5V5RK.cjs} +2 -2
- package/dist/{chunk-IXI5KATU.js → chunk-L5PB7EG3.js} +1 -1
- package/dist/{chunk-R2FVAKFH.cjs → chunk-M6JORA5Z.cjs} +86 -86
- package/dist/{chunk-RNSANXPT.js → chunk-NS62CQ2B.js} +112 -14
- package/dist/{chunk-UZU6DIZA.cjs → chunk-NUTMINJZ.cjs} +45 -45
- package/dist/{chunk-H4Z72Z4Z.js → chunk-OSTKS3YN.js} +1 -1
- package/dist/{chunk-HLBTRSQJ.js → chunk-P3NIPIKS.js} +263 -63
- package/dist/{chunk-7V7QMFTI.cjs → chunk-QOBCBGGI.cjs} +2 -2
- package/dist/{chunk-UV7OOZJQ.cjs → chunk-SD23XMVJ.cjs} +35 -35
- package/dist/{chunk-FQVVO5YA.js → chunk-SGPIVHJB.js} +1 -1
- package/dist/{chunk-HQZHOPNE.js → chunk-TBJEMELS.js} +18 -2
- package/dist/{chunk-QTMQ5TGA.js → chunk-UCYW4M66.js} +16 -1
- package/dist/{chunk-XFYLA3ZO.cjs → chunk-VMROIWLL.cjs} +290 -90
- package/dist/{chunk-W7GRGGBH.cjs → chunk-W7L4HUT2.cjs} +8 -8
- package/dist/{chunk-FJ2MSI43.cjs → chunk-WKPXOGZZ.cjs} +124 -26
- package/dist/{chunk-D2SGV525.cjs → chunk-XZNU4DUX.cjs} +2 -2
- package/dist/diagram/index.cjs +2 -2
- package/dist/diagram/index.js +1 -1
- package/dist/effects/index.cjs +4 -4
- package/dist/effects/index.js +2 -2
- package/dist/extensions/index.cjs +5 -5
- package/dist/extensions/index.js +4 -4
- package/dist/gradient/index.cjs +2 -2
- package/dist/gradient/index.js +1 -1
- package/dist/history/HistoryManager.d.cts +20 -1
- package/dist/history/HistoryManager.d.ts +20 -1
- package/dist/history/index.cjs +8 -2
- package/dist/history/index.js +8 -2
- package/dist/history/types.d.cts +31 -0
- package/dist/history/types.d.ts +31 -0
- package/dist/image-editor/index.cjs +785 -777
- package/dist/image-editor/index.js +13 -5
- package/dist/index.cjs +16 -10
- package/dist/index.js +11 -5
- package/dist/kernel-wasm-4KVONDAU.js +9 -0
- package/dist/kernel-wasm-TTYRBGAK.cjs +9 -0
- package/dist/paint/index.cjs +10 -2
- package/dist/paint/index.js +9 -1
- package/dist/paint/wet/film.d.cts +19 -1
- package/dist/paint/wet/film.d.ts +19 -1
- package/dist/paint/wet/gpu-kernels.d.cts +2 -2
- package/dist/paint/wet/gpu-kernels.d.ts +2 -2
- package/dist/paint/wet/kernel-wasm.d.cts +5 -5
- package/dist/paint/wet/kernel-wasm.d.ts +5 -5
- package/dist/paint/wet/kernel.d.cts +1 -1
- package/dist/paint/wet/kernel.d.ts +1 -1
- package/dist/paint/wet/medium.d.cts +3 -1
- package/dist/paint/wet/medium.d.ts +3 -1
- package/dist/paint/wet/model.d.cts +19 -4
- package/dist/paint/wet/model.d.ts +19 -4
- package/dist/paint/wet/world.d.cts +34 -8
- package/dist/paint/wet/world.d.ts +34 -8
- package/dist/paint-editor/backlight.d.cts +77 -0
- package/dist/paint-editor/backlight.d.ts +77 -0
- package/dist/paint-editor/controller.d.cts +11 -0
- package/dist/paint-editor/controller.d.ts +11 -0
- package/dist/paint-editor/index.cjs +685 -397
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +308 -20
- package/dist/paint-editor/paper.d.cts +7 -0
- package/dist/paint-editor/paper.d.ts +7 -0
- package/dist/paint-editor/wet.d.cts +9 -0
- package/dist/paint-editor/wet.d.ts +9 -0
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +1 -1
- package/dist/tools/index.cjs +4 -2
- package/dist/tools/index.d.cts +1 -0
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +3 -1
- package/dist/tools/origin.d.cts +22 -0
- package/dist/tools/origin.d.ts +22 -0
- package/dist/vector/index.cjs +964 -964
- package/dist/vector/index.js +5 -5
- package/dist/video-editor/index.cjs +4 -4
- package/dist/video-editor/index.js +2 -2
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +25 -0
- package/skills/pixerate-paint-editor/SKILL.md +3 -3
- package/skills/pixerate-paint-editor/references/light-paint.md +30 -7
- package/skills/pixerate-paint-watercolour/SKILL.md +10 -1
- package/skills/pixerate-paint-watercolour/evals/glowing-wash.json +22 -0
- package/skills/pixerate-paint-watercolour/evals/stained-glass.json +16 -0
- package/dist/kernel-wasm-6FPOLVUZ.cjs +0 -9
- package/dist/kernel-wasm-WIMMJUF2.js +0 -9
package/dist/agent/index.cjs
CHANGED
|
@@ -30,7 +30,8 @@ require('../chunk-T7QSEKDY.cjs');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
|
|
34
|
+
var _chunk5DLCOQOQcjs = require('../chunk-5DLCOQOQ.cjs');
|
|
34
35
|
|
|
35
36
|
|
|
36
37
|
|
|
@@ -127,10 +128,10 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
|
127
128
|
|
|
128
129
|
|
|
129
130
|
|
|
130
|
-
var
|
|
131
|
+
var _chunkW7L4HUT2cjs = require('../chunk-W7L4HUT2.cjs');
|
|
131
132
|
|
|
132
133
|
|
|
133
|
-
var
|
|
134
|
+
var _chunkXZNU4DUXcjs = require('../chunk-XZNU4DUX.cjs');
|
|
134
135
|
require('../chunk-TTCJPX4U.cjs');
|
|
135
136
|
require('../chunk-MOW3JMNG.cjs');
|
|
136
137
|
|
|
@@ -178,7 +179,7 @@ var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
|
178
179
|
|
|
179
180
|
|
|
180
181
|
var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
|
|
181
|
-
require('../chunk-
|
|
182
|
+
require('../chunk-WKPXOGZZ.cjs');
|
|
182
183
|
require('../chunk-7PT4RJL5.cjs');
|
|
183
184
|
require('../chunk-PPFJHTW5.cjs');
|
|
184
185
|
require('../chunk-RD7RX52G.cjs');
|
|
@@ -677,14 +678,14 @@ function describe(chart, includeSpec) {
|
|
|
677
678
|
series: spec.series.map((s) => ({ id: s.id, name: s.name })),
|
|
678
679
|
width: _nullishCoalesce(node.attrs.width, () => ( null)),
|
|
679
680
|
height: node.attrs.height,
|
|
680
|
-
description:
|
|
681
|
+
description: _chunkXZNU4DUXcjs.describeChart.call(void 0, spec),
|
|
681
682
|
...includeSpec ? { spec } : {}
|
|
682
683
|
};
|
|
683
684
|
}
|
|
684
685
|
function sparklines(doc) {
|
|
685
686
|
const found = [];
|
|
686
687
|
doc.descendants((node, pos) => {
|
|
687
|
-
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label:
|
|
688
|
+
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label: _chunkW7L4HUT2cjs.sparklineLabel.call(void 0, node) });
|
|
688
689
|
});
|
|
689
690
|
return found;
|
|
690
691
|
}
|
|
@@ -695,7 +696,7 @@ function checkPosition(editor, at) {
|
|
|
695
696
|
function createDocumentChartTools(editor) {
|
|
696
697
|
const chartType = () => editor().schema.nodes.chart;
|
|
697
698
|
const findChart = (args) => {
|
|
698
|
-
const charts =
|
|
699
|
+
const charts = _chunkW7L4HUT2cjs.getDocumentCharts.call(void 0, editor().state.doc);
|
|
699
700
|
const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
|
|
700
701
|
if (args.chartId !== void 0) {
|
|
701
702
|
const chart = charts.find((c) => c.id === args.chartId);
|
|
@@ -722,7 +723,7 @@ function createDocumentChartTools(editor) {
|
|
|
722
723
|
annotations: { title: "List charts in the document", ...READ },
|
|
723
724
|
handler: ({ includeSpec = false }) => {
|
|
724
725
|
const doc = editor().state.doc;
|
|
725
|
-
return { charts:
|
|
726
|
+
return { charts: _chunkW7L4HUT2cjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
|
|
726
727
|
}
|
|
727
728
|
};
|
|
728
729
|
const insertChart = {
|
|
@@ -749,7 +750,7 @@ function createDocumentChartTools(editor) {
|
|
|
749
750
|
const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
|
|
750
751
|
const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
751
752
|
const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
|
|
752
|
-
const chart =
|
|
753
|
+
const chart = _chunkW7L4HUT2cjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
|
|
753
754
|
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.`);
|
|
754
755
|
return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
|
|
755
756
|
}
|
|
@@ -796,8 +797,8 @@ function createDocumentChartTools(editor) {
|
|
|
796
797
|
inputSchema: {
|
|
797
798
|
type: "object",
|
|
798
799
|
properties: {
|
|
799
|
-
values: { type: "array", items: _chunkXWOLPNBWcjs.VALUE, minItems: 1, maxItems:
|
|
800
|
-
kind: { type: "string", enum: [...
|
|
800
|
+
values: { type: "array", items: _chunkXWOLPNBWcjs.VALUE, minItems: 1, maxItems: _chunkW7L4HUT2cjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
|
|
801
|
+
kind: { type: "string", enum: [..._chunkW7L4HUT2cjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
|
|
801
802
|
at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
|
|
802
803
|
width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
|
|
803
804
|
height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
|
|
@@ -816,7 +817,7 @@ function createDocumentChartTools(editor) {
|
|
|
816
817
|
if (bad >= 0) throw new Error(`values[${bad}] ("${String(values[bad])}") is not a number; pass numbers, numeric text or null. Nothing was inserted.`);
|
|
817
818
|
const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
|
|
818
819
|
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}).`);
|
|
819
|
-
const stored =
|
|
820
|
+
const stored = _chunkW7L4HUT2cjs.normalizeSparklineValues.call(void 0, parsed);
|
|
820
821
|
ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true)).insertContentAt(pos, { type: "sparkline", attrs: { values: stored, kind, width, height, color, label } }).run();
|
|
821
822
|
return { pos, kind, values: stored };
|
|
822
823
|
}
|
|
@@ -1154,8 +1155,8 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1154
1155
|
const config = option === false ? null : option === true || option === void 0 ? {} : option;
|
|
1155
1156
|
const caret = {
|
|
1156
1157
|
id: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _43 => _43.id]), () => ( providerId)),
|
|
1157
|
-
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => (
|
|
1158
|
-
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => (
|
|
1158
|
+
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => ( _chunkW7L4HUT2cjs.DEFAULT_AGENT_CARET_NAME)),
|
|
1159
|
+
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => ( _chunkW7L4HUT2cjs.DEFAULT_AGENT_CARET_COLOR))
|
|
1159
1160
|
};
|
|
1160
1161
|
const typing = !_optionalChain([config, 'optionalAccess', _46 => _46.typing]) ? null : config.typing === true ? {} : config.typing;
|
|
1161
1162
|
const idleMs = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _47 => _47.idleMs]), () => ( 12e3));
|
|
@@ -1168,19 +1169,19 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1168
1169
|
};
|
|
1169
1170
|
const touch = () => {
|
|
1170
1171
|
clearTimeout(idleTimer);
|
|
1171
|
-
if (idleMs > 0) idleTimer = setTimeout(() => live() &&
|
|
1172
|
+
if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkW7L4HUT2cjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
|
|
1172
1173
|
};
|
|
1173
1174
|
const tint = (ed, ranges) => {
|
|
1174
1175
|
clearTimeout(tintTimer);
|
|
1175
|
-
|
|
1176
|
-
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() &&
|
|
1176
|
+
_chunkW7L4HUT2cjs.markAgentChanges.call(void 0, ed, caret.id, ranges);
|
|
1177
|
+
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() && _chunkW7L4HUT2cjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1177
1178
|
};
|
|
1178
1179
|
return {
|
|
1179
1180
|
/** Puts the caret at `head`, selecting from `anchor`. */
|
|
1180
1181
|
show(anchor, head = anchor) {
|
|
1181
1182
|
const ed = live();
|
|
1182
1183
|
if (!ed) return;
|
|
1183
|
-
|
|
1184
|
+
_chunkW7L4HUT2cjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
|
|
1184
1185
|
touch();
|
|
1185
1186
|
},
|
|
1186
1187
|
/** Shows the caret after ranges just changed by a tool, tinting them. */
|
|
@@ -1188,7 +1189,7 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1188
1189
|
const ed = live();
|
|
1189
1190
|
if (!ed || !ranges.length) return;
|
|
1190
1191
|
const last = ranges[ranges.length - 1];
|
|
1191
|
-
|
|
1192
|
+
_chunkW7L4HUT2cjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
|
|
1192
1193
|
tint(ed, ranges);
|
|
1193
1194
|
touch();
|
|
1194
1195
|
},
|
|
@@ -1196,12 +1197,12 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1196
1197
|
async write(ed, from, to, text, signal) {
|
|
1197
1198
|
if (live() && typing) {
|
|
1198
1199
|
clearTimeout(tintTimer);
|
|
1199
|
-
const range2 = await
|
|
1200
|
-
if (changedMs > 0) tintTimer = setTimeout(() => live() &&
|
|
1200
|
+
const range2 = await _chunkW7L4HUT2cjs.typeAgentText.call(void 0, ed, { ...typing, from, to, text, caret, signal });
|
|
1201
|
+
if (changedMs > 0) tintTimer = setTimeout(() => live() && _chunkW7L4HUT2cjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1201
1202
|
touch();
|
|
1202
1203
|
return range2;
|
|
1203
1204
|
}
|
|
1204
|
-
const tr = _history.closeHistory.call(void 0,
|
|
1205
|
+
const tr = _history.closeHistory.call(void 0, _chunkW7L4HUT2cjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
|
|
1205
1206
|
const end = tr.mapping.map(to, 1);
|
|
1206
1207
|
const range = { from: Math.min(tr.mapping.map(from, -1), end), to: end };
|
|
1207
1208
|
ed.view.dispatch(tr.scrollIntoView());
|
|
@@ -1230,7 +1231,7 @@ function findMatches(editor, query, args, replacement) {
|
|
|
1230
1231
|
wholeWord: !!args.wholeWord,
|
|
1231
1232
|
...args.regex ? { regex: true } : { literal: true }
|
|
1232
1233
|
};
|
|
1233
|
-
const result =
|
|
1234
|
+
const result = _chunkW7L4HUT2cjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
|
|
1234
1235
|
if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
|
|
1235
1236
|
return { matches: result.matches, truncated: result.truncated };
|
|
1236
1237
|
}
|
|
@@ -1392,7 +1393,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1392
1393
|
replacement: String(replace).replace(/\r\n?|\n/g, "\r")
|
|
1393
1394
|
}));
|
|
1394
1395
|
const tr = _history.closeHistory.call(void 0, ed.state.tr);
|
|
1395
|
-
const ends =
|
|
1396
|
+
const ends = _chunkW7L4HUT2cjs.applyReplacements.call(void 0, tr, chosen);
|
|
1396
1397
|
ed.view.dispatch(tr.scrollIntoView());
|
|
1397
1398
|
const ranges = chosen.map((m, i) => ({ from: tr.mapping.map(m.from, -1), to: ends[i] }));
|
|
1398
1399
|
presence.changed(ranges.filter((r) => r.from < r.to));
|
|
@@ -1493,7 +1494,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1493
1494
|
inputSchema: {
|
|
1494
1495
|
type: "object",
|
|
1495
1496
|
properties: {
|
|
1496
|
-
operation: { type: "string", enum:
|
|
1497
|
+
operation: { type: "string", enum: _chunkW7L4HUT2cjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
|
|
1497
1498
|
at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
|
|
1498
1499
|
rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
|
|
1499
1500
|
cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
|
|
@@ -1523,10 +1524,10 @@ function createRichTextToolProvider(target, options) {
|
|
|
1523
1524
|
ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
|
|
1524
1525
|
}
|
|
1525
1526
|
const action = operation;
|
|
1526
|
-
const state =
|
|
1527
|
+
const state = _chunkW7L4HUT2cjs.getTableActionState.call(void 0, ed, action, params);
|
|
1527
1528
|
if (state !== true) throw new Error(state);
|
|
1528
|
-
|
|
1529
|
-
const table =
|
|
1529
|
+
_chunkW7L4HUT2cjs.runTableAction.call(void 0, ed, action, params);
|
|
1530
|
+
const table = _chunkW7L4HUT2cjs.getTableState.call(void 0, ed);
|
|
1530
1531
|
return {
|
|
1531
1532
|
operation,
|
|
1532
1533
|
table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
|
|
@@ -1545,7 +1546,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1545
1546
|
if (!ed || ed.isDestroyed) return [];
|
|
1546
1547
|
if (!ed.isEditable) return [getText, findText, ...charts.read()];
|
|
1547
1548
|
const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection, ...formatting.tools(ed)];
|
|
1548
|
-
return [...tools, ...
|
|
1549
|
+
return [...tools, ..._chunkW7L4HUT2cjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
|
|
1549
1550
|
},
|
|
1550
1551
|
subscribe: (notify) => {
|
|
1551
1552
|
const ed = editor();
|
|
@@ -2221,7 +2222,7 @@ function createReviewToolProvider(target, options) {
|
|
|
2221
2222
|
const editor = () => toEditor2(target);
|
|
2222
2223
|
const author = _nullishCoalesce(options.author, () => ( { id: "agent", name: "Agent" }));
|
|
2223
2224
|
const store = () => {
|
|
2224
|
-
const s =
|
|
2225
|
+
const s = _chunkW7L4HUT2cjs.getCommentStore.call(void 0, editor());
|
|
2225
2226
|
if (!s) throw new Error("This editor has no Comments extension.");
|
|
2226
2227
|
return s;
|
|
2227
2228
|
};
|
|
@@ -2416,7 +2417,7 @@ function createReviewToolProvider(target, options) {
|
|
|
2416
2417
|
tools: () => {
|
|
2417
2418
|
const ed = editor();
|
|
2418
2419
|
if (!ed || ed.isDestroyed) return [];
|
|
2419
|
-
const comments = !!
|
|
2420
|
+
const comments = !!_chunkW7L4HUT2cjs.getCommentStore.call(void 0, ed);
|
|
2420
2421
|
const changes = !!_chunk34RQAGWIcjs.getTrackChangesStore.call(void 0, ed);
|
|
2421
2422
|
const tools = [...comments ? [listComments] : [], ...changes ? [listChanges] : []];
|
|
2422
2423
|
if (!ed.isEditable) return tools;
|
|
@@ -2541,4 +2542,5 @@ function createReviewToolProvider(target, options) {
|
|
|
2541
2542
|
|
|
2542
2543
|
|
|
2543
2544
|
|
|
2544
|
-
|
|
2545
|
+
|
|
2546
|
+
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkRTPBM46Fcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkRTPBM46Fcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkK7ENM55Pcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkK7ENM55Pcjs.PerformanceQueue; exports.PresenceStore = _chunkK7ENM55Pcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkRTPBM46Fcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkRTPBM46Fcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkRTPBM46Fcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkRTPBM46Fcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkRTPBM46Fcjs.ToolRegistry; exports.ToolRegistryError = _chunkRTPBM46Fcjs.ToolRegistryError; exports.ToolRegistryView = _chunkRTPBM46Fcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkRTPBM46Fcjs.baseToolName; exports.callEvalTool = _chunk5DLCOQOQcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkRTPBM46Fcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createDocumentChartTools = createDocumentChartTools; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkRTPBM46Fcjs.createMcpServer; exports.createOriginMiddleware = _chunk5DLCOQOQcjs.createOriginMiddleware; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createReviewToolProvider = createReviewToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createStyleResolver = _chunk5DLCOQOQcjs.createStyleResolver; exports.createStyleToolProvider = _chunk5DLCOQOQcjs.createStyleToolProvider; exports.createToolRegistry = _chunkRTPBM46Fcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkRTPBM46Fcjs.errorResult; exports.failedEvalChecks = _chunk5DLCOQOQcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunk5DLCOQOQcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunk5DLCOQOQcjs.listSkillEvals; exports.listSkills = _chunkRTPBM46Fcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunk5DLCOQOQcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunk5DLCOQOQcjs.memoryStyleStore; exports.normalizeSide = normalizeSide; exports.parseSkillFrontmatter = _chunkRTPBM46Fcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunk5DLCOQOQcjs.parseStyleDomains; exports.planAgentCommand = planAgentCommand; exports.planCanvasPlaybackSteps = planCanvasPlaybackSteps; exports.planCanvasToolPlayback = planCanvasToolPlayback; exports.planToolCall = planToolCall; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkRTPBM46Fcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunk5DLCOQOQcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runStyleChecks = _chunk5DLCOQOQcjs.runStyleChecks; exports.runToolScript = _chunk5DLCOQOQcjs.runToolScript; exports.searchTokens = _chunkRTPBM46Fcjs.searchTokens; exports.searchTools = _chunkRTPBM46Fcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkRTPBM46Fcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkRTPBM46Fcjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.toolResultError = _chunk5DLCOQOQcjs.toolResultError; exports.toolResultValue = _chunk5DLCOQOQcjs.toolResultValue; exports.toolsetInstructions = _chunkRTPBM46Fcjs.toolsetInstructions; exports.toolsetName = _chunkRTPBM46Fcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunkRTPBM46Fcjs.unknownToolMessage; exports.validateAgentCommand = validateAgentCommand; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
package/dist/agent/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import "../chunk-LPFQHVCO.js";
|
|
18
18
|
import {
|
|
19
19
|
callEvalTool,
|
|
20
|
+
createOriginMiddleware,
|
|
20
21
|
createStyleResolver,
|
|
21
22
|
createStyleToolProvider,
|
|
22
23
|
failedEvalChecks,
|
|
@@ -30,7 +31,7 @@ import {
|
|
|
30
31
|
runToolScript,
|
|
31
32
|
toolResultError,
|
|
32
33
|
toolResultValue
|
|
33
|
-
} from "../chunk-
|
|
34
|
+
} from "../chunk-UCYW4M66.js";
|
|
34
35
|
import {
|
|
35
36
|
JSON_RPC_ERRORS,
|
|
36
37
|
MCP_PROTOCOL_VERSIONS,
|
|
@@ -127,10 +128,10 @@ import {
|
|
|
127
128
|
setAgentCaret,
|
|
128
129
|
sparklineLabel,
|
|
129
130
|
typeAgentText
|
|
130
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-BVRRIW7F.js";
|
|
131
132
|
import {
|
|
132
133
|
describeChart
|
|
133
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-7YW7T5TJ.js";
|
|
134
135
|
import "../chunk-KGRZMHZB.js";
|
|
135
136
|
import "../chunk-N4DFDI73.js";
|
|
136
137
|
import {
|
|
@@ -178,7 +179,7 @@ import {
|
|
|
178
179
|
isUnsafeJsonKey,
|
|
179
180
|
stripPrototypeKeys
|
|
180
181
|
} from "../chunk-HF5QZS7Z.js";
|
|
181
|
-
import "../chunk-
|
|
182
|
+
import "../chunk-NS62CQ2B.js";
|
|
182
183
|
import "../chunk-BP6KSGVD.js";
|
|
183
184
|
import "../chunk-6ADHGQ73.js";
|
|
184
185
|
import "../chunk-JEGJP4OW.js";
|
|
@@ -2487,6 +2488,7 @@ export {
|
|
|
2487
2488
|
createElementCaptureSurface,
|
|
2488
2489
|
createInstantPresenceClock,
|
|
2489
2490
|
createMcpServer,
|
|
2491
|
+
createOriginMiddleware,
|
|
2490
2492
|
createPlaybackToolProvider,
|
|
2491
2493
|
createReviewToolProvider,
|
|
2492
2494
|
createRichTextToolProvider,
|