@pixerate/editor 0.236.0 → 0.238.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/agent/index.cjs +40 -39
- package/dist/agent/index.js +9 -8
- package/dist/animation/index.cjs +7 -6
- package/dist/animation/index.js +6 -5
- package/dist/animation-editor/index.cjs +66 -65
- package/dist/animation-editor/index.js +9 -8
- package/dist/{brushstrokeRender-WDTKD54B.cjs → brushstrokeRender-MPOM7BFW.cjs} +7 -5
- package/dist/{brushstrokeRender-MAHOXL7K.js → brushstrokeRender-WB67GMUP.js} +4 -2
- package/dist/canvas/index.cjs +55 -54
- package/dist/canvas/index.js +10 -9
- package/dist/chart/index.cjs +159 -158
- package/dist/chart/index.js +9 -8
- package/dist/{chunk-L6Y7TSQ4.js → chunk-36ZTV7WO.js} +1 -1
- package/dist/{chunk-JVNGCS26.js → chunk-3E36VDMJ.js} +1 -1
- package/dist/{chunk-WRZ6C4TU.cjs → chunk-3R5P3DVY.cjs} +6 -6
- package/dist/{chunk-RUONPPMC.cjs → chunk-44BMJJVA.cjs} +8 -8
- package/dist/{chunk-YBAPT7NL.js → chunk-6ADHGQ73.js} +4 -2
- package/dist/chunk-7AHBW2CQ.cjs +200 -0
- package/dist/{chunk-EUIDTZNQ.cjs → chunk-7PT4RJL5.cjs} +113 -111
- package/dist/{chunk-CU6ANS5L.js → chunk-7YGBSFC6.js} +2 -2
- package/dist/{chunk-ATKKG76G.cjs → chunk-AD7GA3TL.cjs} +23 -23
- package/dist/{chunk-FSLKBQU7.js → chunk-AIS56JOO.js} +3 -3
- package/dist/{chunk-5VQXSS2S.cjs → chunk-BBUE3UJL.cjs} +86 -86
- package/dist/{chunk-7272D3K2.js → chunk-BP6KSGVD.js} +6 -4
- package/dist/{chunk-F6R67I3A.js → chunk-CXXXAZ7H.js} +1 -1
- package/dist/{chunk-5DQPDXOM.cjs → chunk-D2SGV525.cjs} +76 -76
- package/dist/chunk-F67XMVDI.js +200 -0
- package/dist/{chunk-PHYOZK3B.js → chunk-FQVVO5YA.js} +85 -8
- package/dist/{chunk-UXETV2NC.cjs → chunk-GA4EU4P3.cjs} +4 -4
- package/dist/{chunk-UFEDHACQ.js → chunk-GXAK6Q5J.js} +2 -2
- package/dist/{chunk-MHLU6GRJ.js → chunk-JEGJP4OW.js} +7 -196
- package/dist/{chunk-GOBOCZZI.js → chunk-LEQKZGQI.js} +1 -1
- package/dist/{chunk-M5GLQQWG.cjs → chunk-LJZRHVZV.cjs} +2 -2
- package/dist/{chunk-N76AMOKE.cjs → chunk-MOW3JMNG.cjs} +42 -42
- package/dist/{chunk-WKMUBATU.js → chunk-N4DFDI73.js} +1 -1
- package/dist/{chunk-GNZI3KYK.cjs → chunk-NKTNLJUJ.cjs} +49 -9
- package/dist/{chunk-TQOL6CF7.js → chunk-PJYG6FCF.js} +49 -9
- package/dist/{chunk-V3L7U63N.cjs → chunk-PP6BXVRL.cjs} +1 -1
- package/dist/{chunk-TFF2GTGN.cjs → chunk-PPFJHTW5.cjs} +24 -22
- package/dist/{chunk-6ZZKRH7R.js → chunk-QARCM66V.js} +3 -3
- package/dist/{chunk-5UEFBM2M.cjs → chunk-RD7RX52G.cjs} +18 -207
- package/dist/{chunk-CDP2AKMA.js → chunk-RV5DKZHU.js} +1 -1
- package/dist/{chunk-HUAISCUX.cjs → chunk-T7KQEMAE.cjs} +18 -18
- package/dist/{chunk-BQE3Y6ZO.cjs → chunk-THXFU3JB.cjs} +5 -5
- package/dist/{chunk-4ZC5QJE2.cjs → chunk-UTI5IITZ.cjs} +3 -3
- package/dist/{chunk-XSVUNSDJ.js → chunk-UUBO6RB5.js} +1 -1
- package/dist/{chunk-WPWHT4Z6.cjs → chunk-UZU6DIZA.cjs} +221 -144
- package/dist/{chunk-M2TPMYJE.js → chunk-V6DT2CDH.js} +1 -1
- package/dist/{chunk-WV5WTOC6.cjs → chunk-W7GRGGBH.cjs} +16 -16
- package/dist/{chunk-23E5GI2U.js → chunk-WGN7AUKB.js} +2 -2
- package/dist/{chunk-YMREOA67.js → chunk-XK4SST43.js} +2 -2
- package/dist/{chunk-SOSBOS5T.cjs → chunk-XWOLPNBW.cjs} +22 -22
- package/dist/{chunk-ILP77UD6.js → chunk-YGQVCQTG.js} +1 -1
- package/dist/{chunk-GXLZZVR5.cjs → chunk-ZXNO3ZOX.cjs} +37 -37
- package/dist/color/index.cjs +6 -4
- package/dist/color/index.js +9 -7
- package/dist/export/index.cjs +8 -7
- package/dist/export/index.js +7 -6
- package/dist/extensions/index.cjs +13 -10
- package/dist/extensions/index.js +12 -9
- package/dist/extensions/loading-node.d.cts +45 -1
- package/dist/extensions/loading-node.d.ts +45 -1
- package/dist/gradient/index.cjs +29 -28
- package/dist/gradient/index.js +4 -3
- package/dist/image-editor/index.cjs +778 -777
- package/dist/image-editor/index.js +9 -8
- package/dist/index.cjs +19 -16
- package/dist/index.js +13 -10
- package/dist/paint-editor/controller.d.cts +31 -1
- package/dist/paint-editor/controller.d.ts +31 -1
- package/dist/paint-editor/index.cjs +403 -195
- package/dist/paint-editor/index.js +231 -23
- package/dist/paint-editor/sticker-tools.d.cts +1 -1
- package/dist/paint-editor/sticker-tools.d.ts +1 -1
- package/dist/paint-editor/stickers.d.cts +10 -3
- package/dist/paint-editor/stickers.d.ts +10 -3
- package/dist/paint-editor/ui.d.cts +10 -3
- package/dist/paint-editor/ui.d.ts +10 -3
- package/dist/tokens/index.cjs +4 -3
- package/dist/tokens/index.js +3 -2
- package/dist/typography/index.cjs +8 -7
- package/dist/typography/index.js +3 -2
- package/dist/vector/index.cjs +967 -966
- package/dist/vector/index.js +9 -8
- package/dist/video-editor/index.cjs +7 -6
- package/dist/video-editor/index.js +6 -5
- package/package.json +1 -1
- package/skills/pixerate-color/SKILL.md +3 -0
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-paint-editor/SKILL.md +6 -2
package/README.md
CHANGED
|
@@ -90,7 +90,7 @@ controller.insertText("__award_winning__ "); // at the selection; literal text,
|
|
|
90
90
|
controller.isDirty(); // true
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
Extensions (`@pixerate/editor/extensions`): `createRichTextPreset`, `GradientText`, `TemplateSuggestions`, `SlashCommands`, `LoadingNode`, `Mention` / `createMentionExtension`, `Image`, `Markdown`, `SmilieReplacer`, `ColorHighlighter`, `FontSize`.
|
|
93
|
+
Extensions (`@pixerate/editor/extensions`): `createRichTextPreset`, `GradientText`, `TemplateSuggestions`, `SlashCommands`, `LoadingNode` (accessible SVG spinner placeholder; `label`, `renderIndicator`, `nodeView`), `Mention` / `createMentionExtension`, `Image`, `Markdown`, `SmilieReplacer`, `ColorHighlighter`, `FontSize`.
|
|
94
94
|
|
|
95
95
|
## Comments and tracked changes
|
|
96
96
|
|
package/dist/agent/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkXWOLPNBWcjs = require('../chunk-XWOLPNBW.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkCHAWTXBEcjs = require('../chunk-CHAWTXBE.cjs');
|
|
@@ -127,16 +127,16 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
|
127
127
|
|
|
128
128
|
|
|
129
129
|
|
|
130
|
-
var
|
|
130
|
+
var _chunkW7GRGGBHcjs = require('../chunk-W7GRGGBH.cjs');
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
var
|
|
133
|
+
var _chunkD2SGV525cjs = require('../chunk-D2SGV525.cjs');
|
|
134
134
|
require('../chunk-TTCJPX4U.cjs');
|
|
135
|
-
require('../chunk-
|
|
135
|
+
require('../chunk-MOW3JMNG.cjs');
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
|
|
139
|
-
var
|
|
139
|
+
var _chunk3R5P3DVYcjs = require('../chunk-3R5P3DVY.cjs');
|
|
140
140
|
require('../chunk-VU6WQSMB.cjs');
|
|
141
141
|
|
|
142
142
|
|
|
@@ -179,9 +179,10 @@ var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
|
179
179
|
|
|
180
180
|
var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
|
|
181
181
|
require('../chunk-FJ2MSI43.cjs');
|
|
182
|
-
require('../chunk-
|
|
183
|
-
require('../chunk-
|
|
184
|
-
require('../chunk-
|
|
182
|
+
require('../chunk-7PT4RJL5.cjs');
|
|
183
|
+
require('../chunk-PPFJHTW5.cjs');
|
|
184
|
+
require('../chunk-RD7RX52G.cjs');
|
|
185
|
+
require('../chunk-7AHBW2CQ.cjs');
|
|
185
186
|
require('../chunk-IPJ3TEYR.cjs');
|
|
186
187
|
|
|
187
188
|
// src/agent/planner.ts
|
|
@@ -643,14 +644,14 @@ var SIZE_WIDTH = {
|
|
|
643
644
|
};
|
|
644
645
|
var SIZE_HEIGHT = { type: "number", minimum: 50, maximum: 4096, description: "Height in pixels (default 320)." };
|
|
645
646
|
var SPEC_PROPERTIES = {
|
|
646
|
-
...
|
|
647
|
+
..._chunkXWOLPNBWcjs.CHART_UPDATE_PROPERTIES,
|
|
647
648
|
categories: { type: "array", items: { type: "string" }, description: "Category labels in order (x axis labels, or pie slices)." },
|
|
648
649
|
series: {
|
|
649
650
|
type: "array",
|
|
650
651
|
description: "The series, each with one value per category (padded with gaps).",
|
|
651
652
|
items: {
|
|
652
653
|
type: "object",
|
|
653
|
-
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ...
|
|
654
|
+
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ..._chunkXWOLPNBWcjs.SERIES_PROPS },
|
|
654
655
|
required: ["name", "values"],
|
|
655
656
|
additionalProperties: false
|
|
656
657
|
}
|
|
@@ -661,7 +662,7 @@ function cleanSeries(series) {
|
|
|
661
662
|
return series.map((s) => s && typeof s === "object" ? Object.fromEntries(Object.entries(s).filter(([, v]) => v !== null)) : s);
|
|
662
663
|
}
|
|
663
664
|
function checkedSpec(input) {
|
|
664
|
-
const { spec, issues } =
|
|
665
|
+
const { spec, issues } = _chunk3R5P3DVYcjs.normalizeChartSpec.call(void 0, { ...input, ...input.series !== void 0 ? { series: cleanSeries(input.series) } : {} });
|
|
665
666
|
if (issues.length) throw new Error(`The chart was not changed: ${issues.map((i) => i.message).join(" ")}`);
|
|
666
667
|
return spec;
|
|
667
668
|
}
|
|
@@ -676,14 +677,14 @@ function describe(chart, includeSpec) {
|
|
|
676
677
|
series: spec.series.map((s) => ({ id: s.id, name: s.name })),
|
|
677
678
|
width: _nullishCoalesce(node.attrs.width, () => ( null)),
|
|
678
679
|
height: node.attrs.height,
|
|
679
|
-
description:
|
|
680
|
+
description: _chunkD2SGV525cjs.describeChart.call(void 0, spec),
|
|
680
681
|
...includeSpec ? { spec } : {}
|
|
681
682
|
};
|
|
682
683
|
}
|
|
683
684
|
function sparklines(doc) {
|
|
684
685
|
const found = [];
|
|
685
686
|
doc.descendants((node, pos) => {
|
|
686
|
-
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label:
|
|
687
|
+
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label: _chunkW7GRGGBHcjs.sparklineLabel.call(void 0, node) });
|
|
687
688
|
});
|
|
688
689
|
return found;
|
|
689
690
|
}
|
|
@@ -694,7 +695,7 @@ function checkPosition(editor, at) {
|
|
|
694
695
|
function createDocumentChartTools(editor) {
|
|
695
696
|
const chartType = () => editor().schema.nodes.chart;
|
|
696
697
|
const findChart = (args) => {
|
|
697
|
-
const charts =
|
|
698
|
+
const charts = _chunkW7GRGGBHcjs.getDocumentCharts.call(void 0, editor().state.doc);
|
|
698
699
|
const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
|
|
699
700
|
if (args.chartId !== void 0) {
|
|
700
701
|
const chart = charts.find((c) => c.id === args.chartId);
|
|
@@ -721,7 +722,7 @@ function createDocumentChartTools(editor) {
|
|
|
721
722
|
annotations: { title: "List charts in the document", ...READ },
|
|
722
723
|
handler: ({ includeSpec = false }) => {
|
|
723
724
|
const doc = editor().state.doc;
|
|
724
|
-
return { charts:
|
|
725
|
+
return { charts: _chunkW7GRGGBHcjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
|
|
725
726
|
}
|
|
726
727
|
};
|
|
727
728
|
const insertChart = {
|
|
@@ -748,7 +749,7 @@ function createDocumentChartTools(editor) {
|
|
|
748
749
|
const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
|
|
749
750
|
const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
750
751
|
const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
|
|
751
|
-
const chart =
|
|
752
|
+
const chart = _chunkW7GRGGBHcjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
|
|
752
753
|
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.`);
|
|
753
754
|
return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
|
|
754
755
|
}
|
|
@@ -795,8 +796,8 @@ function createDocumentChartTools(editor) {
|
|
|
795
796
|
inputSchema: {
|
|
796
797
|
type: "object",
|
|
797
798
|
properties: {
|
|
798
|
-
values: { type: "array", items:
|
|
799
|
-
kind: { type: "string", enum: [...
|
|
799
|
+
values: { type: "array", items: _chunkXWOLPNBWcjs.VALUE, minItems: 1, maxItems: _chunkW7GRGGBHcjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
|
|
800
|
+
kind: { type: "string", enum: [..._chunkW7GRGGBHcjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
|
|
800
801
|
at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
|
|
801
802
|
width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
|
|
802
803
|
height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
|
|
@@ -810,12 +811,12 @@ function createDocumentChartTools(editor) {
|
|
|
810
811
|
handler: ({ values, kind = "line", at, width = 80, height = 18, color = null, label = null }) => {
|
|
811
812
|
const ed = editor();
|
|
812
813
|
checkPosition(ed, at);
|
|
813
|
-
const parsed = values.map((v) =>
|
|
814
|
+
const parsed = values.map((v) => _chunk3R5P3DVYcjs.parseChartValue.call(void 0, v));
|
|
814
815
|
const bad = parsed.findIndex((v) => v === void 0);
|
|
815
816
|
if (bad >= 0) throw new Error(`values[${bad}] ("${String(values[bad])}") is not a number; pass numbers, numeric text or null. Nothing was inserted.`);
|
|
816
817
|
const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
|
|
817
818
|
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}).`);
|
|
818
|
-
const stored =
|
|
819
|
+
const stored = _chunkW7GRGGBHcjs.normalizeSparklineValues.call(void 0, parsed);
|
|
819
820
|
ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true)).insertContentAt(pos, { type: "sparkline", attrs: { values: stored, kind, width, height, color, label } }).run();
|
|
820
821
|
return { pos, kind, values: stored };
|
|
821
822
|
}
|
|
@@ -1153,8 +1154,8 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1153
1154
|
const config = option === false ? null : option === true || option === void 0 ? {} : option;
|
|
1154
1155
|
const caret = {
|
|
1155
1156
|
id: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _43 => _43.id]), () => ( providerId)),
|
|
1156
|
-
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => (
|
|
1157
|
-
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => (
|
|
1157
|
+
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => ( _chunkW7GRGGBHcjs.DEFAULT_AGENT_CARET_NAME)),
|
|
1158
|
+
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => ( _chunkW7GRGGBHcjs.DEFAULT_AGENT_CARET_COLOR))
|
|
1158
1159
|
};
|
|
1159
1160
|
const typing = !_optionalChain([config, 'optionalAccess', _46 => _46.typing]) ? null : config.typing === true ? {} : config.typing;
|
|
1160
1161
|
const idleMs = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _47 => _47.idleMs]), () => ( 12e3));
|
|
@@ -1167,19 +1168,19 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1167
1168
|
};
|
|
1168
1169
|
const touch = () => {
|
|
1169
1170
|
clearTimeout(idleTimer);
|
|
1170
|
-
if (idleMs > 0) idleTimer = setTimeout(() => live() &&
|
|
1171
|
+
if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkW7GRGGBHcjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
|
|
1171
1172
|
};
|
|
1172
1173
|
const tint = (ed, ranges) => {
|
|
1173
1174
|
clearTimeout(tintTimer);
|
|
1174
|
-
|
|
1175
|
-
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() &&
|
|
1175
|
+
_chunkW7GRGGBHcjs.markAgentChanges.call(void 0, ed, caret.id, ranges);
|
|
1176
|
+
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() && _chunkW7GRGGBHcjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1176
1177
|
};
|
|
1177
1178
|
return {
|
|
1178
1179
|
/** Puts the caret at `head`, selecting from `anchor`. */
|
|
1179
1180
|
show(anchor, head = anchor) {
|
|
1180
1181
|
const ed = live();
|
|
1181
1182
|
if (!ed) return;
|
|
1182
|
-
|
|
1183
|
+
_chunkW7GRGGBHcjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
|
|
1183
1184
|
touch();
|
|
1184
1185
|
},
|
|
1185
1186
|
/** Shows the caret after ranges just changed by a tool, tinting them. */
|
|
@@ -1187,7 +1188,7 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1187
1188
|
const ed = live();
|
|
1188
1189
|
if (!ed || !ranges.length) return;
|
|
1189
1190
|
const last = ranges[ranges.length - 1];
|
|
1190
|
-
|
|
1191
|
+
_chunkW7GRGGBHcjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
|
|
1191
1192
|
tint(ed, ranges);
|
|
1192
1193
|
touch();
|
|
1193
1194
|
},
|
|
@@ -1195,12 +1196,12 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1195
1196
|
async write(ed, from, to, text, signal) {
|
|
1196
1197
|
if (live() && typing) {
|
|
1197
1198
|
clearTimeout(tintTimer);
|
|
1198
|
-
const range2 = await
|
|
1199
|
-
if (changedMs > 0) tintTimer = setTimeout(() => live() &&
|
|
1199
|
+
const range2 = await _chunkW7GRGGBHcjs.typeAgentText.call(void 0, ed, { ...typing, from, to, text, caret, signal });
|
|
1200
|
+
if (changedMs > 0) tintTimer = setTimeout(() => live() && _chunkW7GRGGBHcjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1200
1201
|
touch();
|
|
1201
1202
|
return range2;
|
|
1202
1203
|
}
|
|
1203
|
-
const tr = _history.closeHistory.call(void 0,
|
|
1204
|
+
const tr = _history.closeHistory.call(void 0, _chunkW7GRGGBHcjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
|
|
1204
1205
|
const end = tr.mapping.map(to, 1);
|
|
1205
1206
|
const range = { from: Math.min(tr.mapping.map(from, -1), end), to: end };
|
|
1206
1207
|
ed.view.dispatch(tr.scrollIntoView());
|
|
@@ -1229,7 +1230,7 @@ function findMatches(editor, query, args, replacement) {
|
|
|
1229
1230
|
wholeWord: !!args.wholeWord,
|
|
1230
1231
|
...args.regex ? { regex: true } : { literal: true }
|
|
1231
1232
|
};
|
|
1232
|
-
const result =
|
|
1233
|
+
const result = _chunkW7GRGGBHcjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
|
|
1233
1234
|
if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
|
|
1234
1235
|
return { matches: result.matches, truncated: result.truncated };
|
|
1235
1236
|
}
|
|
@@ -1391,7 +1392,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1391
1392
|
replacement: String(replace).replace(/\r\n?|\n/g, "\r")
|
|
1392
1393
|
}));
|
|
1393
1394
|
const tr = _history.closeHistory.call(void 0, ed.state.tr);
|
|
1394
|
-
const ends =
|
|
1395
|
+
const ends = _chunkW7GRGGBHcjs.applyReplacements.call(void 0, tr, chosen);
|
|
1395
1396
|
ed.view.dispatch(tr.scrollIntoView());
|
|
1396
1397
|
const ranges = chosen.map((m, i) => ({ from: tr.mapping.map(m.from, -1), to: ends[i] }));
|
|
1397
1398
|
presence.changed(ranges.filter((r) => r.from < r.to));
|
|
@@ -1492,7 +1493,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1492
1493
|
inputSchema: {
|
|
1493
1494
|
type: "object",
|
|
1494
1495
|
properties: {
|
|
1495
|
-
operation: { type: "string", enum:
|
|
1496
|
+
operation: { type: "string", enum: _chunkW7GRGGBHcjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
|
|
1496
1497
|
at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
|
|
1497
1498
|
rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
|
|
1498
1499
|
cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
|
|
@@ -1522,10 +1523,10 @@ function createRichTextToolProvider(target, options) {
|
|
|
1522
1523
|
ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
|
|
1523
1524
|
}
|
|
1524
1525
|
const action = operation;
|
|
1525
|
-
const state =
|
|
1526
|
+
const state = _chunkW7GRGGBHcjs.getTableActionState.call(void 0, ed, action, params);
|
|
1526
1527
|
if (state !== true) throw new Error(state);
|
|
1527
|
-
|
|
1528
|
-
const table =
|
|
1528
|
+
_chunkW7GRGGBHcjs.runTableAction.call(void 0, ed, action, params);
|
|
1529
|
+
const table = _chunkW7GRGGBHcjs.getTableState.call(void 0, ed);
|
|
1529
1530
|
return {
|
|
1530
1531
|
operation,
|
|
1531
1532
|
table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
|
|
@@ -1544,7 +1545,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1544
1545
|
if (!ed || ed.isDestroyed) return [];
|
|
1545
1546
|
if (!ed.isEditable) return [getText, findText, ...charts.read()];
|
|
1546
1547
|
const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection, ...formatting.tools(ed)];
|
|
1547
|
-
return [...tools, ...
|
|
1548
|
+
return [...tools, ..._chunkW7GRGGBHcjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
|
|
1548
1549
|
},
|
|
1549
1550
|
subscribe: (notify) => {
|
|
1550
1551
|
const ed = editor();
|
|
@@ -2220,7 +2221,7 @@ function createReviewToolProvider(target, options) {
|
|
|
2220
2221
|
const editor = () => toEditor2(target);
|
|
2221
2222
|
const author = _nullishCoalesce(options.author, () => ( { id: "agent", name: "Agent" }));
|
|
2222
2223
|
const store = () => {
|
|
2223
|
-
const s =
|
|
2224
|
+
const s = _chunkW7GRGGBHcjs.getCommentStore.call(void 0, editor());
|
|
2224
2225
|
if (!s) throw new Error("This editor has no Comments extension.");
|
|
2225
2226
|
return s;
|
|
2226
2227
|
};
|
|
@@ -2415,7 +2416,7 @@ function createReviewToolProvider(target, options) {
|
|
|
2415
2416
|
tools: () => {
|
|
2416
2417
|
const ed = editor();
|
|
2417
2418
|
if (!ed || ed.isDestroyed) return [];
|
|
2418
|
-
const comments = !!
|
|
2419
|
+
const comments = !!_chunkW7GRGGBHcjs.getCommentStore.call(void 0, ed);
|
|
2419
2420
|
const changes = !!_chunk34RQAGWIcjs.getTrackChangesStore.call(void 0, ed);
|
|
2420
2421
|
const tools = [...comments ? [listComments] : [], ...changes ? [listChanges] : []];
|
|
2421
2422
|
if (!ed.isEditable) return tools;
|
package/dist/agent/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CHART_UPDATE_PROPERTIES,
|
|
3
3
|
SERIES_PROPS,
|
|
4
4
|
VALUE
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-LEQKZGQI.js";
|
|
6
6
|
import {
|
|
7
7
|
hasVariantCommands
|
|
8
8
|
} from "../chunk-XVIK73LS.js";
|
|
@@ -127,16 +127,16 @@ import {
|
|
|
127
127
|
setAgentCaret,
|
|
128
128
|
sparklineLabel,
|
|
129
129
|
typeAgentText
|
|
130
|
-
} from "../chunk-
|
|
130
|
+
} from "../chunk-AIS56JOO.js";
|
|
131
131
|
import {
|
|
132
132
|
describeChart
|
|
133
|
-
} from "../chunk-
|
|
133
|
+
} from "../chunk-WGN7AUKB.js";
|
|
134
134
|
import "../chunk-KGRZMHZB.js";
|
|
135
|
-
import "../chunk-
|
|
135
|
+
import "../chunk-N4DFDI73.js";
|
|
136
136
|
import {
|
|
137
137
|
normalizeChartSpec,
|
|
138
138
|
parseChartValue
|
|
139
|
-
} from "../chunk-
|
|
139
|
+
} from "../chunk-QARCM66V.js";
|
|
140
140
|
import "../chunk-O6OGNDND.js";
|
|
141
141
|
import {
|
|
142
142
|
getEditorMarkdown,
|
|
@@ -179,9 +179,10 @@ import {
|
|
|
179
179
|
stripPrototypeKeys
|
|
180
180
|
} from "../chunk-HF5QZS7Z.js";
|
|
181
181
|
import "../chunk-RNSANXPT.js";
|
|
182
|
-
import "../chunk-
|
|
183
|
-
import "../chunk-
|
|
184
|
-
import "../chunk-
|
|
182
|
+
import "../chunk-BP6KSGVD.js";
|
|
183
|
+
import "../chunk-6ADHGQ73.js";
|
|
184
|
+
import "../chunk-JEGJP4OW.js";
|
|
185
|
+
import "../chunk-F67XMVDI.js";
|
|
185
186
|
import "../chunk-6ONMQ6WF.js";
|
|
186
187
|
|
|
187
188
|
// src/agent/planner.ts
|
package/dist/animation/index.cjs
CHANGED
|
@@ -27,7 +27,7 @@ var _chunk7B5GTJXBcjs = require('../chunk-7B5GTJXB.cjs');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkLJZRHVZVcjs = require('../chunk-LJZRHVZV.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -52,11 +52,12 @@ var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunkUTI5IITZcjs = require('../chunk-UTI5IITZ.cjs');
|
|
56
56
|
require('../chunk-A6QWKBJP.cjs');
|
|
57
|
-
require('../chunk-
|
|
58
|
-
require('../chunk-
|
|
59
|
-
require('../chunk-
|
|
57
|
+
require('../chunk-7PT4RJL5.cjs');
|
|
58
|
+
require('../chunk-PPFJHTW5.cjs');
|
|
59
|
+
require('../chunk-RD7RX52G.cjs');
|
|
60
|
+
require('../chunk-7AHBW2CQ.cjs');
|
|
60
61
|
require('../chunk-IPJ3TEYR.cjs');
|
|
61
62
|
|
|
62
63
|
|
|
@@ -104,4 +105,4 @@ require('../chunk-IPJ3TEYR.cjs');
|
|
|
104
105
|
|
|
105
106
|
|
|
106
107
|
|
|
107
|
-
exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON =
|
|
108
|
+
exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkLJZRHVZVcjs.ANIMATION_TIME_EPSILON; exports.AnimationPlayer = _chunkLJZRHVZVcjs.AnimationPlayer; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.MOTION_BEHAVIORS = _chunk7B5GTJXBcjs.MOTION_BEHAVIORS; exports.ManualClock = _chunkLJZRHVZVcjs.ManualClock; exports.PRESENCE_COLORS = _chunkK7ENM55Pcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkK7ENM55Pcjs.PerformanceQueue; exports.PresenceStore = _chunkK7ENM55Pcjs.PresenceStore; exports.SPRING_PRESETS = _chunkDWJJI6RTcjs.SPRING_PRESETS; exports.behaviorProgress = _chunk7B5GTJXBcjs.behaviorProgress; exports.createAnimationPlayer = _chunkLJZRHVZVcjs.createAnimationPlayer; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.cubicBezierAt = _chunkDWJJI6RTcjs.cubicBezierAt; exports.easingFromInfluence = _chunkDWJJI6RTcjs.easingFromInfluence; exports.easingLabel = _chunkDWJJI6RTcjs.easingLabel; exports.easingToCss = _chunkDWJJI6RTcjs.easingToCss; exports.elasticAt = _chunkDWJJI6RTcjs.elasticAt; exports.evaluateEasing = _chunkDWJJI6RTcjs.evaluateEasing; exports.evaluateTrack = _chunkLJZRHVZVcjs.evaluateTrack; exports.formatOklab = _chunkUTI5IITZcjs.formatOklab; exports.fractalWiggle = _chunk7B5GTJXBcjs.fractalWiggle; exports.interpolateAnimationValue = _chunkLJZRHVZVcjs.interpolateAnimationValue; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkLJZRHVZVcjs.isAnimationKeyframe; exports.isMotionBehavior = _chunk7B5GTJXBcjs.isMotionBehavior; exports.mixColorsOklab = _chunkUTI5IITZcjs.mixColorsOklab; exports.motionSeedFromId = _chunk7B5GTJXBcjs.motionSeedFromId; exports.normalizeKeyframes = _chunkLJZRHVZVcjs.normalizeKeyframes; exports.oklabToRgb = _chunkUTI5IITZcjs.oklabToRgb; exports.pageHidden = _chunkLJZRHVZVcjs.pageHidden; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseOklab = _chunkUTI5IITZcjs.parseOklab; exports.quinticFade = _chunk7B5GTJXBcjs.quinticFade; exports.realClock = _chunkLJZRHVZVcjs.realClock; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.rgbToOklab = _chunkUTI5IITZcjs.rgbToOklab; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.wrapAnimationTime = _chunkLJZRHVZVcjs.wrapAnimationTime;
|
package/dist/animation/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
pageHidden,
|
|
28
28
|
realClock,
|
|
29
29
|
wrapAnimationTime
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-CXXXAZ7H.js";
|
|
31
31
|
import {
|
|
32
32
|
ANIMATION_EASING_LABELS,
|
|
33
33
|
ANIMATION_EASING_PRESETS,
|
|
@@ -52,11 +52,12 @@ import {
|
|
|
52
52
|
oklabToRgb,
|
|
53
53
|
parseOklab,
|
|
54
54
|
rgbToOklab
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-V6DT2CDH.js";
|
|
56
56
|
import "../chunk-2WPNAGHI.js";
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
57
|
+
import "../chunk-BP6KSGVD.js";
|
|
58
|
+
import "../chunk-6ADHGQ73.js";
|
|
59
|
+
import "../chunk-JEGJP4OW.js";
|
|
60
|
+
import "../chunk-F67XMVDI.js";
|
|
60
61
|
import "../chunk-6ONMQ6WF.js";
|
|
61
62
|
export {
|
|
62
63
|
ANIMATION_EASING_LABELS,
|