@pixerate/editor 0.250.0 → 0.252.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 +40 -41
- package/dist/agent/index.js +9 -10
- package/dist/animation/index.cjs +6 -7
- package/dist/animation/index.js +5 -6
- package/dist/animation-editor/index.cjs +70 -70
- package/dist/animation-editor/index.js +12 -12
- package/dist/brushes/index.cjs +2087 -0
- package/dist/brushes/index.d.cts +17 -0
- package/dist/brushes/index.d.ts +17 -0
- package/dist/brushes/index.js +2087 -0
- package/dist/brushes/library.d.cts +104 -0
- package/dist/brushes/library.d.ts +104 -0
- package/dist/brushes/migrate.d.cts +17 -0
- package/dist/brushes/migrate.d.ts +17 -0
- package/dist/brushes/normalize.d.cts +15 -0
- package/dist/brushes/normalize.d.ts +15 -0
- package/dist/brushes/presets.d.cts +12 -0
- package/dist/brushes/presets.d.ts +12 -0
- package/dist/brushes/profiles.d.cts +85 -0
- package/dist/brushes/profiles.d.ts +85 -0
- package/dist/brushes/resolve.d.cts +56 -0
- package/dist/brushes/resolve.d.ts +56 -0
- package/dist/brushes/schema.d.cts +29 -0
- package/dist/brushes/schema.d.ts +29 -0
- package/dist/brushes/tools.d.cts +37 -0
- package/dist/brushes/tools.d.ts +37 -0
- package/dist/brushes/types.d.cts +323 -0
- package/dist/brushes/types.d.ts +323 -0
- package/dist/{brushstrokeRender-2FHFLSEG.js → brushstrokeRender-5PYSKZIJ.js} +8 -8
- package/dist/{brushstrokeRender-QGRXOKDA.cjs → brushstrokeRender-7FLLSQEC.cjs} +14 -14
- package/dist/canvas/index.cjs +57 -58
- package/dist/canvas/index.js +31 -32
- package/dist/chart/index.cjs +159 -160
- package/dist/chart/index.js +9 -10
- package/dist/{chunk-NOHJP5TK.js → chunk-2ZJ4DT3M.js} +1 -1
- package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
- package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
- package/dist/{chunk-SMSGP2HQ.js → chunk-5JNA6LLY.js} +1 -1
- package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
- package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
- package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
- package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
- package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
- package/dist/{chunk-NTRAVM2I.js → chunk-7P6VF3FG.js} +2 -2
- package/dist/chunk-APX63ILU.js +173 -0
- package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
- package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
- package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
- package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
- package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
- package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
- package/dist/{chunk-KDLBJ6QR.js → chunk-GYMMNCFT.js} +3 -3
- package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
- package/dist/chunk-HS6QDWDF.cjs +1029 -0
- package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
- package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
- package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
- package/dist/{chunk-M2VKFE5L.cjs → chunk-JFHBXNR2.cjs} +88 -88
- package/dist/{chunk-WPUXGDH4.cjs → chunk-JPEHXIB5.cjs} +10 -10
- package/dist/chunk-JSDND7DF.cjs +173 -0
- package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
- package/dist/{chunk-YW43M56C.cjs → chunk-LFMKWGFL.cjs} +1 -1
- package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
- package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
- package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
- package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
- package/dist/chunk-MTKY6K3Q.js +1029 -0
- package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
- package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
- package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
- package/dist/chunk-PXDIAYB6.cjs +594 -0
- package/dist/{chunk-3TWOCSCY.js → chunk-QC3OXRE4.js} +9 -9
- package/dist/{chunk-YM6ZBTXG.cjs → chunk-QLSGTCYT.cjs} +23 -23
- package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
- package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
- package/dist/{chunk-ATK6ABN3.cjs → chunk-SABJMH6M.cjs} +145 -12
- package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
- package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
- package/dist/{chunk-X7WRL5ZZ.cjs → chunk-TLOGFIIV.cjs} +37 -37
- package/dist/chunk-TXFWZ5ZJ.js +594 -0
- package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
- package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
- package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
- package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
- package/dist/{chunk-U4NUOKBT.js → chunk-WZOGDKCQ.js} +134 -1
- package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
- package/dist/color/index.cjs +4 -6
- package/dist/color/index.js +7 -9
- package/dist/export/index.cjs +7 -8
- package/dist/export/index.js +6 -7
- package/dist/extensions/index.cjs +10 -11
- package/dist/extensions/index.js +9 -10
- package/dist/gradient/index.cjs +33 -34
- package/dist/gradient/index.js +4 -5
- package/dist/image-editor/index.cjs +845 -844
- package/dist/image-editor/index.js +39 -38
- package/dist/index.cjs +16 -17
- package/dist/index.js +10 -11
- package/dist/paint/index.cjs +6 -4
- package/dist/paint/index.js +21 -19
- package/dist/paint-editor/brushes.d.cts +1 -2
- package/dist/paint-editor/brushes.d.ts +1 -2
- package/dist/paint-editor/index.cjs +2193 -694
- package/dist/paint-editor/index.js +1575 -76
- package/dist/paint-editor/mark-settings.d.cts +104 -0
- package/dist/paint-editor/mark-settings.d.ts +104 -0
- package/dist/paint-editor/procedural.d.cts +2 -75
- package/dist/paint-editor/procedural.d.ts +2 -75
- package/dist/paint-editor/stickers.d.cts +1 -22
- package/dist/paint-editor/stickers.d.ts +1 -22
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.js +9 -9
- package/dist/stickers/index.cjs +10 -10
- package/dist/stickers/index.js +9 -9
- package/dist/tokens/index.cjs +3 -4
- package/dist/tokens/index.js +2 -3
- package/dist/tools/skill-evals.d.cts +8 -1
- package/dist/tools/skill-evals.d.ts +8 -1
- package/dist/typography/index.cjs +7 -8
- package/dist/typography/index.js +2 -3
- package/dist/vector/index.cjs +974 -974
- package/dist/vector/index.js +12 -12
- package/dist/video-editor/index.cjs +6 -7
- package/dist/video-editor/index.js +5 -6
- package/package.json +11 -1
- package/skills/README.md +2 -0
- package/skills/pixerate-brushes/SKILL.md +104 -0
- package/skills/pixerate-brushes-design/SKILL.md +88 -0
- package/skills/pixerate-brushes-design/evals/canvas-chalk.json +15 -0
- package/skills/pixerate-brushes-design/evals/pink-highlighter.json +15 -0
- package/skills/pixerate-brushes-design/evals/port-to-vector.json +17 -0
- package/dist/chunk-4JNWA3VT.cjs +0 -302
- package/dist/chunk-7AHBW2CQ.cjs +0 -200
- package/dist/chunk-F67XMVDI.js +0 -200
- package/dist/chunk-GT77U7QG.cjs +0 -2637
- package/dist/chunk-OTEPAQJX.js +0 -2637
- package/dist/chunk-WKH5ZAUA.js +0 -302
package/dist/agent/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkSOSBOS5Tcjs = require('../chunk-SOSBOS5T.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
var _chunkCHAWTXBEcjs = require('../chunk-CHAWTXBE.cjs');
|
|
@@ -128,17 +128,17 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
|
|
131
|
-
var
|
|
131
|
+
var _chunkCJ6TBL2Ncjs = require('../chunk-CJ6TBL2N.cjs');
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
var
|
|
134
|
+
var _chunk3NS5C7FBcjs = require('../chunk-3NS5C7FB.cjs');
|
|
135
135
|
require('../chunk-TTCJPX4U.cjs');
|
|
136
|
-
require('../chunk-
|
|
136
|
+
require('../chunk-N76AMOKE.cjs');
|
|
137
|
+
require('../chunk-VU6WQSMB.cjs');
|
|
137
138
|
|
|
138
139
|
|
|
139
140
|
|
|
140
|
-
var
|
|
141
|
-
require('../chunk-VU6WQSMB.cjs');
|
|
141
|
+
var _chunkWRZ6C4TUcjs = require('../chunk-WRZ6C4TU.cjs');
|
|
142
142
|
|
|
143
143
|
|
|
144
144
|
|
|
@@ -180,10 +180,9 @@ var _chunkWOFXZ3XUcjs = require('../chunk-WOFXZ3XU.cjs');
|
|
|
180
180
|
|
|
181
181
|
var _chunk2BSBFBOAcjs = require('../chunk-2BSBFBOA.cjs');
|
|
182
182
|
require('../chunk-WKPXOGZZ.cjs');
|
|
183
|
-
require('../chunk-
|
|
184
|
-
require('../chunk-
|
|
185
|
-
require('../chunk-
|
|
186
|
-
require('../chunk-7AHBW2CQ.cjs');
|
|
183
|
+
require('../chunk-EUIDTZNQ.cjs');
|
|
184
|
+
require('../chunk-TFF2GTGN.cjs');
|
|
185
|
+
require('../chunk-5UEFBM2M.cjs');
|
|
187
186
|
require('../chunk-IPJ3TEYR.cjs');
|
|
188
187
|
|
|
189
188
|
// src/agent/planner.ts
|
|
@@ -645,14 +644,14 @@ var SIZE_WIDTH = {
|
|
|
645
644
|
};
|
|
646
645
|
var SIZE_HEIGHT = { type: "number", minimum: 50, maximum: 4096, description: "Height in pixels (default 320)." };
|
|
647
646
|
var SPEC_PROPERTIES = {
|
|
648
|
-
...
|
|
647
|
+
..._chunkSOSBOS5Tcjs.CHART_UPDATE_PROPERTIES,
|
|
649
648
|
categories: { type: "array", items: { type: "string" }, description: "Category labels in order (x axis labels, or pie slices)." },
|
|
650
649
|
series: {
|
|
651
650
|
type: "array",
|
|
652
651
|
description: "The series, each with one value per category (padded with gaps).",
|
|
653
652
|
items: {
|
|
654
653
|
type: "object",
|
|
655
|
-
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ...
|
|
654
|
+
properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ..._chunkSOSBOS5Tcjs.SERIES_PROPS },
|
|
656
655
|
required: ["name", "values"],
|
|
657
656
|
additionalProperties: false
|
|
658
657
|
}
|
|
@@ -663,7 +662,7 @@ function cleanSeries(series) {
|
|
|
663
662
|
return series.map((s) => s && typeof s === "object" ? Object.fromEntries(Object.entries(s).filter(([, v]) => v !== null)) : s);
|
|
664
663
|
}
|
|
665
664
|
function checkedSpec(input) {
|
|
666
|
-
const { spec, issues } =
|
|
665
|
+
const { spec, issues } = _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, { ...input, ...input.series !== void 0 ? { series: cleanSeries(input.series) } : {} });
|
|
667
666
|
if (issues.length) throw new Error(`The chart was not changed: ${issues.map((i) => i.message).join(" ")}`);
|
|
668
667
|
return spec;
|
|
669
668
|
}
|
|
@@ -678,14 +677,14 @@ function describe(chart, includeSpec) {
|
|
|
678
677
|
series: spec.series.map((s) => ({ id: s.id, name: s.name })),
|
|
679
678
|
width: _nullishCoalesce(node.attrs.width, () => ( null)),
|
|
680
679
|
height: node.attrs.height,
|
|
681
|
-
description:
|
|
680
|
+
description: _chunk3NS5C7FBcjs.describeChart.call(void 0, spec),
|
|
682
681
|
...includeSpec ? { spec } : {}
|
|
683
682
|
};
|
|
684
683
|
}
|
|
685
684
|
function sparklines(doc) {
|
|
686
685
|
const found = [];
|
|
687
686
|
doc.descendants((node, pos) => {
|
|
688
|
-
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: _chunkCJ6TBL2Ncjs.sparklineLabel.call(void 0, node) });
|
|
689
688
|
});
|
|
690
689
|
return found;
|
|
691
690
|
}
|
|
@@ -696,7 +695,7 @@ function checkPosition(editor, at) {
|
|
|
696
695
|
function createDocumentChartTools(editor) {
|
|
697
696
|
const chartType = () => editor().schema.nodes.chart;
|
|
698
697
|
const findChart = (args) => {
|
|
699
|
-
const charts =
|
|
698
|
+
const charts = _chunkCJ6TBL2Ncjs.getDocumentCharts.call(void 0, editor().state.doc);
|
|
700
699
|
const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
|
|
701
700
|
if (args.chartId !== void 0) {
|
|
702
701
|
const chart = charts.find((c) => c.id === args.chartId);
|
|
@@ -723,7 +722,7 @@ function createDocumentChartTools(editor) {
|
|
|
723
722
|
annotations: { title: "List charts in the document", ...READ },
|
|
724
723
|
handler: ({ includeSpec = false }) => {
|
|
725
724
|
const doc = editor().state.doc;
|
|
726
|
-
return { charts:
|
|
725
|
+
return { charts: _chunkCJ6TBL2Ncjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
|
|
727
726
|
}
|
|
728
727
|
};
|
|
729
728
|
const insertChart = {
|
|
@@ -750,7 +749,7 @@ function createDocumentChartTools(editor) {
|
|
|
750
749
|
const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
|
|
751
750
|
const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
752
751
|
const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
|
|
753
|
-
const chart =
|
|
752
|
+
const chart = _chunkCJ6TBL2Ncjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
|
|
754
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.`);
|
|
755
754
|
return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
|
|
756
755
|
}
|
|
@@ -797,8 +796,8 @@ function createDocumentChartTools(editor) {
|
|
|
797
796
|
inputSchema: {
|
|
798
797
|
type: "object",
|
|
799
798
|
properties: {
|
|
800
|
-
values: { type: "array", items:
|
|
801
|
-
kind: { type: "string", enum: [...
|
|
799
|
+
values: { type: "array", items: _chunkSOSBOS5Tcjs.VALUE, minItems: 1, maxItems: _chunkCJ6TBL2Ncjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
|
|
800
|
+
kind: { type: "string", enum: [..._chunkCJ6TBL2Ncjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
|
|
802
801
|
at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
|
|
803
802
|
width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
|
|
804
803
|
height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
|
|
@@ -812,12 +811,12 @@ function createDocumentChartTools(editor) {
|
|
|
812
811
|
handler: ({ values, kind = "line", at, width = 80, height = 18, color = null, label = null }) => {
|
|
813
812
|
const ed = editor();
|
|
814
813
|
checkPosition(ed, at);
|
|
815
|
-
const parsed = values.map((v) =>
|
|
814
|
+
const parsed = values.map((v) => _chunkWRZ6C4TUcjs.parseChartValue.call(void 0, v));
|
|
816
815
|
const bad = parsed.findIndex((v) => v === void 0);
|
|
817
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.`);
|
|
818
817
|
const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
|
|
819
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}).`);
|
|
820
|
-
const stored =
|
|
819
|
+
const stored = _chunkCJ6TBL2Ncjs.normalizeSparklineValues.call(void 0, parsed);
|
|
821
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();
|
|
822
821
|
return { pos, kind, values: stored };
|
|
823
822
|
}
|
|
@@ -1155,8 +1154,8 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1155
1154
|
const config = option === false ? null : option === true || option === void 0 ? {} : option;
|
|
1156
1155
|
const caret = {
|
|
1157
1156
|
id: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _43 => _43.id]), () => ( providerId)),
|
|
1158
|
-
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => (
|
|
1159
|
-
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => (
|
|
1157
|
+
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => ( _chunkCJ6TBL2Ncjs.DEFAULT_AGENT_CARET_NAME)),
|
|
1158
|
+
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => ( _chunkCJ6TBL2Ncjs.DEFAULT_AGENT_CARET_COLOR))
|
|
1160
1159
|
};
|
|
1161
1160
|
const typing = !_optionalChain([config, 'optionalAccess', _46 => _46.typing]) ? null : config.typing === true ? {} : config.typing;
|
|
1162
1161
|
const idleMs = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _47 => _47.idleMs]), () => ( 12e3));
|
|
@@ -1169,19 +1168,19 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1169
1168
|
};
|
|
1170
1169
|
const touch = () => {
|
|
1171
1170
|
clearTimeout(idleTimer);
|
|
1172
|
-
if (idleMs > 0) idleTimer = setTimeout(() => live() &&
|
|
1171
|
+
if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkCJ6TBL2Ncjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
|
|
1173
1172
|
};
|
|
1174
1173
|
const tint = (ed, ranges) => {
|
|
1175
1174
|
clearTimeout(tintTimer);
|
|
1176
|
-
|
|
1177
|
-
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() &&
|
|
1175
|
+
_chunkCJ6TBL2Ncjs.markAgentChanges.call(void 0, ed, caret.id, ranges);
|
|
1176
|
+
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() && _chunkCJ6TBL2Ncjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1178
1177
|
};
|
|
1179
1178
|
return {
|
|
1180
1179
|
/** Puts the caret at `head`, selecting from `anchor`. */
|
|
1181
1180
|
show(anchor, head = anchor) {
|
|
1182
1181
|
const ed = live();
|
|
1183
1182
|
if (!ed) return;
|
|
1184
|
-
|
|
1183
|
+
_chunkCJ6TBL2Ncjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
|
|
1185
1184
|
touch();
|
|
1186
1185
|
},
|
|
1187
1186
|
/** Shows the caret after ranges just changed by a tool, tinting them. */
|
|
@@ -1189,7 +1188,7 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1189
1188
|
const ed = live();
|
|
1190
1189
|
if (!ed || !ranges.length) return;
|
|
1191
1190
|
const last = ranges[ranges.length - 1];
|
|
1192
|
-
|
|
1191
|
+
_chunkCJ6TBL2Ncjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
|
|
1193
1192
|
tint(ed, ranges);
|
|
1194
1193
|
touch();
|
|
1195
1194
|
},
|
|
@@ -1197,12 +1196,12 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1197
1196
|
async write(ed, from, to, text, signal) {
|
|
1198
1197
|
if (live() && typing) {
|
|
1199
1198
|
clearTimeout(tintTimer);
|
|
1200
|
-
const range2 = await
|
|
1201
|
-
if (changedMs > 0) tintTimer = setTimeout(() => live() &&
|
|
1199
|
+
const range2 = await _chunkCJ6TBL2Ncjs.typeAgentText.call(void 0, ed, { ...typing, from, to, text, caret, signal });
|
|
1200
|
+
if (changedMs > 0) tintTimer = setTimeout(() => live() && _chunkCJ6TBL2Ncjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1202
1201
|
touch();
|
|
1203
1202
|
return range2;
|
|
1204
1203
|
}
|
|
1205
|
-
const tr = _history.closeHistory.call(void 0,
|
|
1204
|
+
const tr = _history.closeHistory.call(void 0, _chunkCJ6TBL2Ncjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
|
|
1206
1205
|
const end = tr.mapping.map(to, 1);
|
|
1207
1206
|
const range = { from: Math.min(tr.mapping.map(from, -1), end), to: end };
|
|
1208
1207
|
ed.view.dispatch(tr.scrollIntoView());
|
|
@@ -1231,7 +1230,7 @@ function findMatches(editor, query, args, replacement) {
|
|
|
1231
1230
|
wholeWord: !!args.wholeWord,
|
|
1232
1231
|
...args.regex ? { regex: true } : { literal: true }
|
|
1233
1232
|
};
|
|
1234
|
-
const result =
|
|
1233
|
+
const result = _chunkCJ6TBL2Ncjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
|
|
1235
1234
|
if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
|
|
1236
1235
|
return { matches: result.matches, truncated: result.truncated };
|
|
1237
1236
|
}
|
|
@@ -1393,7 +1392,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1393
1392
|
replacement: String(replace).replace(/\r\n?|\n/g, "\r")
|
|
1394
1393
|
}));
|
|
1395
1394
|
const tr = _history.closeHistory.call(void 0, ed.state.tr);
|
|
1396
|
-
const ends =
|
|
1395
|
+
const ends = _chunkCJ6TBL2Ncjs.applyReplacements.call(void 0, tr, chosen);
|
|
1397
1396
|
ed.view.dispatch(tr.scrollIntoView());
|
|
1398
1397
|
const ranges = chosen.map((m, i) => ({ from: tr.mapping.map(m.from, -1), to: ends[i] }));
|
|
1399
1398
|
presence.changed(ranges.filter((r) => r.from < r.to));
|
|
@@ -1494,7 +1493,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1494
1493
|
inputSchema: {
|
|
1495
1494
|
type: "object",
|
|
1496
1495
|
properties: {
|
|
1497
|
-
operation: { type: "string", enum:
|
|
1496
|
+
operation: { type: "string", enum: _chunkCJ6TBL2Ncjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
|
|
1498
1497
|
at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
|
|
1499
1498
|
rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
|
|
1500
1499
|
cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
|
|
@@ -1524,10 +1523,10 @@ function createRichTextToolProvider(target, options) {
|
|
|
1524
1523
|
ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
|
|
1525
1524
|
}
|
|
1526
1525
|
const action = operation;
|
|
1527
|
-
const state =
|
|
1526
|
+
const state = _chunkCJ6TBL2Ncjs.getTableActionState.call(void 0, ed, action, params);
|
|
1528
1527
|
if (state !== true) throw new Error(state);
|
|
1529
|
-
|
|
1530
|
-
const table =
|
|
1528
|
+
_chunkCJ6TBL2Ncjs.runTableAction.call(void 0, ed, action, params);
|
|
1529
|
+
const table = _chunkCJ6TBL2Ncjs.getTableState.call(void 0, ed);
|
|
1531
1530
|
return {
|
|
1532
1531
|
operation,
|
|
1533
1532
|
table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
|
|
@@ -1546,7 +1545,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1546
1545
|
if (!ed || ed.isDestroyed) return [];
|
|
1547
1546
|
if (!ed.isEditable) return [getText, findText, ...charts.read()];
|
|
1548
1547
|
const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection, ...formatting.tools(ed)];
|
|
1549
|
-
return [...tools, ...
|
|
1548
|
+
return [...tools, ..._chunkCJ6TBL2Ncjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
|
|
1550
1549
|
},
|
|
1551
1550
|
subscribe: (notify) => {
|
|
1552
1551
|
const ed = editor();
|
|
@@ -2222,7 +2221,7 @@ function createReviewToolProvider(target, options) {
|
|
|
2222
2221
|
const editor = () => toEditor2(target);
|
|
2223
2222
|
const author = _nullishCoalesce(options.author, () => ( { id: "agent", name: "Agent" }));
|
|
2224
2223
|
const store = () => {
|
|
2225
|
-
const s =
|
|
2224
|
+
const s = _chunkCJ6TBL2Ncjs.getCommentStore.call(void 0, editor());
|
|
2226
2225
|
if (!s) throw new Error("This editor has no Comments extension.");
|
|
2227
2226
|
return s;
|
|
2228
2227
|
};
|
|
@@ -2417,7 +2416,7 @@ function createReviewToolProvider(target, options) {
|
|
|
2417
2416
|
tools: () => {
|
|
2418
2417
|
const ed = editor();
|
|
2419
2418
|
if (!ed || ed.isDestroyed) return [];
|
|
2420
|
-
const comments = !!
|
|
2419
|
+
const comments = !!_chunkCJ6TBL2Ncjs.getCommentStore.call(void 0, ed);
|
|
2421
2420
|
const changes = !!_chunk34RQAGWIcjs.getTrackChangesStore.call(void 0, ed);
|
|
2422
2421
|
const tools = [...comments ? [listComments] : [], ...changes ? [listChanges] : []];
|
|
2423
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-GOBOCZZI.js";
|
|
6
6
|
import {
|
|
7
7
|
hasVariantCommands
|
|
8
8
|
} from "../chunk-XVIK73LS.js";
|
|
@@ -128,17 +128,17 @@ import {
|
|
|
128
128
|
setAgentCaret,
|
|
129
129
|
sparklineLabel,
|
|
130
130
|
typeAgentText
|
|
131
|
-
} from "../chunk-
|
|
131
|
+
} from "../chunk-6GRUVGKU.js";
|
|
132
132
|
import {
|
|
133
133
|
describeChart
|
|
134
|
-
} from "../chunk-
|
|
134
|
+
} from "../chunk-RHPSE2YR.js";
|
|
135
135
|
import "../chunk-KGRZMHZB.js";
|
|
136
|
-
import "../chunk-
|
|
136
|
+
import "../chunk-WKMUBATU.js";
|
|
137
|
+
import "../chunk-O6OGNDND.js";
|
|
137
138
|
import {
|
|
138
139
|
normalizeChartSpec,
|
|
139
140
|
parseChartValue
|
|
140
|
-
} from "../chunk-
|
|
141
|
-
import "../chunk-O6OGNDND.js";
|
|
141
|
+
} from "../chunk-6ZZKRH7R.js";
|
|
142
142
|
import {
|
|
143
143
|
getEditorMarkdown,
|
|
144
144
|
getEditorText
|
|
@@ -180,10 +180,9 @@ import {
|
|
|
180
180
|
stripPrototypeKeys
|
|
181
181
|
} from "../chunk-HF5QZS7Z.js";
|
|
182
182
|
import "../chunk-NS62CQ2B.js";
|
|
183
|
-
import "../chunk-
|
|
184
|
-
import "../chunk-
|
|
185
|
-
import "../chunk-
|
|
186
|
-
import "../chunk-F67XMVDI.js";
|
|
183
|
+
import "../chunk-7272D3K2.js";
|
|
184
|
+
import "../chunk-YBAPT7NL.js";
|
|
185
|
+
import "../chunk-MHLU6GRJ.js";
|
|
187
186
|
import "../chunk-6ONMQ6WF.js";
|
|
188
187
|
|
|
189
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 _chunkM5GLQQWGcjs = require('../chunk-M5GLQQWG.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -52,12 +52,11 @@ var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
|
|
|
52
52
|
|
|
53
53
|
|
|
54
54
|
|
|
55
|
-
var
|
|
55
|
+
var _chunk4ZC5QJE2cjs = require('../chunk-4ZC5QJE2.cjs');
|
|
56
56
|
require('../chunk-A6QWKBJP.cjs');
|
|
57
|
-
require('../chunk-
|
|
58
|
-
require('../chunk-
|
|
59
|
-
require('../chunk-
|
|
60
|
-
require('../chunk-7AHBW2CQ.cjs');
|
|
57
|
+
require('../chunk-EUIDTZNQ.cjs');
|
|
58
|
+
require('../chunk-TFF2GTGN.cjs');
|
|
59
|
+
require('../chunk-5UEFBM2M.cjs');
|
|
61
60
|
require('../chunk-IPJ3TEYR.cjs');
|
|
62
61
|
|
|
63
62
|
|
|
@@ -105,4 +104,4 @@ require('../chunk-IPJ3TEYR.cjs');
|
|
|
105
104
|
|
|
106
105
|
|
|
107
106
|
|
|
108
|
-
exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON =
|
|
107
|
+
exports.ANIMATION_EASING_LABELS = _chunkDWJJI6RTcjs.ANIMATION_EASING_LABELS; exports.ANIMATION_EASING_PRESETS = _chunkDWJJI6RTcjs.ANIMATION_EASING_PRESETS; exports.ANIMATION_TIME_EPSILON = _chunkM5GLQQWGcjs.ANIMATION_TIME_EPSILON; exports.AnimationPlayer = _chunkM5GLQQWGcjs.AnimationPlayer; exports.CUBIC_BEZIER_PRESETS = _chunkDWJJI6RTcjs.CUBIC_BEZIER_PRESETS; exports.MOTION_BEHAVIORS = _chunk7B5GTJXBcjs.MOTION_BEHAVIORS; exports.ManualClock = _chunkM5GLQQWGcjs.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 = _chunkM5GLQQWGcjs.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 = _chunkM5GLQQWGcjs.evaluateTrack; exports.formatOklab = _chunk4ZC5QJE2cjs.formatOklab; exports.fractalWiggle = _chunk7B5GTJXBcjs.fractalWiggle; exports.interpolateAnimationValue = _chunkM5GLQQWGcjs.interpolateAnimationValue; exports.isAnimationEasing = _chunkDWJJI6RTcjs.isAnimationEasing; exports.isAnimationKeyframe = _chunkM5GLQQWGcjs.isAnimationKeyframe; exports.isMotionBehavior = _chunk7B5GTJXBcjs.isMotionBehavior; exports.mixColorsOklab = _chunk4ZC5QJE2cjs.mixColorsOklab; exports.motionSeedFromId = _chunk7B5GTJXBcjs.motionSeedFromId; exports.normalizeKeyframes = _chunkM5GLQQWGcjs.normalizeKeyframes; exports.oklabToRgb = _chunk4ZC5QJE2cjs.oklabToRgb; exports.pageHidden = _chunkM5GLQQWGcjs.pageHidden; exports.parseCssEasing = _chunkDWJJI6RTcjs.parseCssEasing; exports.parseOklab = _chunk4ZC5QJE2cjs.parseOklab; exports.quinticFade = _chunk7B5GTJXBcjs.quinticFade; exports.realClock = _chunkM5GLQQWGcjs.realClock; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.resolveEasing = _chunkDWJJI6RTcjs.resolveEasing; exports.reverseCubicBezier = _chunkDWJJI6RTcjs.reverseCubicBezier; exports.rgbToOklab = _chunk4ZC5QJE2cjs.rgbToOklab; exports.springAt = _chunkDWJJI6RTcjs.springAt; exports.springSettleMs = _chunkDWJJI6RTcjs.springSettleMs; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.wrapAnimationTime = _chunkM5GLQQWGcjs.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-F6R67I3A.js";
|
|
31
31
|
import {
|
|
32
32
|
ANIMATION_EASING_LABELS,
|
|
33
33
|
ANIMATION_EASING_PRESETS,
|
|
@@ -52,12 +52,11 @@ import {
|
|
|
52
52
|
oklabToRgb,
|
|
53
53
|
parseOklab,
|
|
54
54
|
rgbToOklab
|
|
55
|
-
} from "../chunk-
|
|
55
|
+
} from "../chunk-M2TPMYJE.js";
|
|
56
56
|
import "../chunk-2WPNAGHI.js";
|
|
57
|
-
import "../chunk-
|
|
58
|
-
import "../chunk-
|
|
59
|
-
import "../chunk-
|
|
60
|
-
import "../chunk-F67XMVDI.js";
|
|
57
|
+
import "../chunk-7272D3K2.js";
|
|
58
|
+
import "../chunk-YBAPT7NL.js";
|
|
59
|
+
import "../chunk-MHLU6GRJ.js";
|
|
61
60
|
import "../chunk-6ONMQ6WF.js";
|
|
62
61
|
export {
|
|
63
62
|
ANIMATION_EASING_LABELS,
|