@pixerate/editor 0.256.0 → 0.258.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.
Files changed (124) hide show
  1. package/dist/agent/index.cjs +40 -38
  2. package/dist/agent/index.js +9 -7
  3. package/dist/animation/index.cjs +4 -2
  4. package/dist/animation/index.js +4 -2
  5. package/dist/animation-editor/index.cjs +63 -61
  6. package/dist/animation-editor/index.js +7 -5
  7. package/dist/brushes/colour.d.cts +11 -0
  8. package/dist/brushes/colour.d.ts +11 -0
  9. package/dist/brushes/index.cjs +51 -30
  10. package/dist/brushes/index.d.cts +1 -0
  11. package/dist/brushes/index.d.ts +1 -0
  12. package/dist/brushes/index.js +25 -4
  13. package/dist/brushes/resolve.d.cts +2 -0
  14. package/dist/brushes/resolve.d.ts +2 -0
  15. package/dist/brushes/schema.d.cts +1 -0
  16. package/dist/brushes/schema.d.ts +1 -0
  17. package/dist/brushes/tools.d.cts +7 -0
  18. package/dist/brushes/tools.d.ts +7 -0
  19. package/dist/brushes/types.d.cts +10 -2
  20. package/dist/brushes/types.d.ts +10 -2
  21. package/dist/brushes/ui.d.cts +14 -3
  22. package/dist/brushes/ui.d.ts +14 -3
  23. package/dist/{brushstrokeRender-HCOQUSWW.js → brushstrokeRender-JI4W6F2G.js} +2 -2
  24. package/dist/{brushstrokeRender-ZZOXI5O5.cjs → brushstrokeRender-MQ6PSDM5.cjs} +11 -11
  25. package/dist/canvas/index.cjs +20 -18
  26. package/dist/canvas/index.js +7 -5
  27. package/dist/chart/index.cjs +159 -157
  28. package/dist/chart/index.js +9 -7
  29. package/dist/{chunk-7272D3K2.js → chunk-2EUW2XZX.js} +27 -276
  30. package/dist/{chunk-L6Y7TSQ4.js → chunk-2VJ6OVJV.js} +1 -1
  31. package/dist/{chunk-6ZZKRH7R.js → chunk-47V3WXDG.js} +2 -2
  32. package/dist/{chunk-H7ET2ISK.cjs → chunk-4IMD2TLY.cjs} +52 -52
  33. package/dist/{chunk-VUKUTT2W.js → chunk-4M4E3N6X.js} +1 -1
  34. package/dist/{chunk-TBAVCLEQ.cjs → chunk-5Q5MLXAD.cjs} +23 -23
  35. package/dist/{chunk-MONXNVZK.js → chunk-6I23ZCGK.js} +5 -3
  36. package/dist/{chunk-GOBOCZZI.js → chunk-6NQPKNUZ.js} +1 -1
  37. package/dist/{chunk-WYGSR3IJ.js → chunk-AORZ5M5C.js} +1 -1
  38. package/dist/chunk-AVTPZO4Z.cjs +142 -0
  39. package/dist/{chunk-WKMUBATU.js → chunk-C2WEIEUB.js} +1 -1
  40. package/dist/{chunk-P3K2JCJA.js → chunk-D5BXSOSU.js} +3 -3
  41. package/dist/chunk-E2V5DA3W.js +36 -0
  42. package/dist/{chunk-WZOGDKCQ.js → chunk-F7CPSRLN.js} +0 -133
  43. package/dist/chunk-FJBQTZS4.js +17 -0
  44. package/dist/{chunk-SOSBOS5T.cjs → chunk-G23BTQA5.cjs} +22 -22
  45. package/dist/{chunk-EUIDTZNQ.cjs → chunk-I3Y2Q3PM.cjs} +59 -308
  46. package/dist/{chunk-YHUMGBZD.js → chunk-ICTPLVSR.js} +22 -4
  47. package/dist/{chunk-LRNUZKWV.cjs → chunk-IPUTIUGQ.cjs} +1 -1
  48. package/dist/{chunk-6GRUVGKU.js → chunk-ITURMC2M.js} +3 -3
  49. package/dist/{chunk-HYWRU5VX.js → chunk-IXQZHCOF.js} +1 -1
  50. package/dist/chunk-J5UQHWVL.js +142 -0
  51. package/dist/{chunk-YBAPT7NL.js → chunk-JC2SHA4A.js} +1 -23
  52. package/dist/chunk-LRTR4ASZ.cjs +17 -0
  53. package/dist/{chunk-HUAISCUX.cjs → chunk-M2HG5DJ2.cjs} +18 -18
  54. package/dist/{chunk-N76AMOKE.cjs → chunk-MDLEGVEN.cjs} +42 -42
  55. package/dist/chunk-MEGSQUQO.cjs +36 -0
  56. package/dist/chunk-MLLTWAXH.cjs +276 -0
  57. package/dist/{chunk-RHPSE2YR.js → chunk-MQ6MGIQM.js} +2 -2
  58. package/dist/{chunk-PGPFWC35.cjs → chunk-MQGQTKVW.cjs} +51 -33
  59. package/dist/{chunk-5YWWQ36H.cjs → chunk-O3ZVZSNJ.cjs} +9 -9
  60. package/dist/{chunk-GCTUOTCW.cjs → chunk-P3PZ63M3.cjs} +35 -35
  61. package/dist/{chunk-WRZ6C4TU.cjs → chunk-P6WYDBTH.cjs} +4 -4
  62. package/dist/{chunk-CJ6TBL2N.cjs → chunk-RHEMMGCN.cjs} +16 -16
  63. package/dist/{chunk-HIMGBZAM.cjs → chunk-RSIKDWOP.cjs} +201 -38
  64. package/dist/{chunk-SABJMH6M.cjs → chunk-RVGP2XLF.cjs} +2 -135
  65. package/dist/{chunk-JVRLGV3C.js → chunk-SMTUQWGY.js} +184 -21
  66. package/dist/{chunk-DMTEQ6SH.js → chunk-SSFMWJDK.js} +4 -4
  67. package/dist/{chunk-TFF2GTGN.cjs → chunk-SXQHWXEL.cjs} +2 -24
  68. package/dist/{chunk-IWEVV63O.cjs → chunk-UEYLANO3.cjs} +18 -16
  69. package/dist/chunk-VR6OGHU5.js +276 -0
  70. package/dist/{chunk-AF23QK5F.js → chunk-YQ4PQTBB.js} +1 -1
  71. package/dist/{chunk-B7V34GIH.cjs → chunk-YSGW7VV4.cjs} +88 -88
  72. package/dist/{chunk-3NS5C7FB.cjs → chunk-YYBW6DF2.cjs} +76 -76
  73. package/dist/{chunk-UFEDHACQ.js → chunk-Z7BX4TWO.js} +2 -2
  74. package/dist/{chunk-RUONPPMC.cjs → chunk-ZSE25IZA.cjs} +8 -8
  75. package/dist/color/index.cjs +7 -3
  76. package/dist/color/index.js +18 -14
  77. package/dist/export/index.cjs +8 -6
  78. package/dist/export/index.js +7 -5
  79. package/dist/extensions/index.cjs +11 -9
  80. package/dist/extensions/index.js +10 -8
  81. package/dist/gradient/index.cjs +33 -31
  82. package/dist/gradient/index.js +5 -3
  83. package/dist/image-editor/brush-presets.d.cts +4 -1
  84. package/dist/image-editor/brush-presets.d.ts +4 -1
  85. package/dist/image-editor/controller.d.cts +10 -5
  86. package/dist/image-editor/controller.d.ts +10 -5
  87. package/dist/image-editor/index.cjs +1090 -1073
  88. package/dist/image-editor/index.js +37 -20
  89. package/dist/index.cjs +17 -15
  90. package/dist/index.js +11 -9
  91. package/dist/paint-editor/brushes.d.cts +18 -1
  92. package/dist/paint-editor/brushes.d.ts +18 -1
  93. package/dist/paint-editor/collaboration.d.cts +38 -0
  94. package/dist/paint-editor/collaboration.d.ts +38 -0
  95. package/dist/paint-editor/controller.d.cts +60 -0
  96. package/dist/paint-editor/controller.d.ts +60 -0
  97. package/dist/paint-editor/engine.d.cts +7 -0
  98. package/dist/paint-editor/engine.d.ts +7 -0
  99. package/dist/paint-editor/index.cjs +1564 -1324
  100. package/dist/paint-editor/index.js +1198 -958
  101. package/dist/paint-editor/mark-settings.d.cts +1 -1
  102. package/dist/paint-editor/mark-settings.d.ts +1 -1
  103. package/dist/paint-editor/procedural.d.cts +4 -2
  104. package/dist/paint-editor/procedural.d.ts +4 -2
  105. package/dist/paint-editor/stamp-tip.d.cts +45 -0
  106. package/dist/paint-editor/stamp-tip.d.ts +45 -0
  107. package/dist/paint-editor/stroke.d.cts +4 -0
  108. package/dist/paint-editor/stroke.d.ts +4 -0
  109. package/dist/stickers/index.cjs +4 -2
  110. package/dist/stickers/index.js +6 -4
  111. package/dist/typography/index.cjs +3 -2
  112. package/dist/typography/index.js +2 -1
  113. package/dist/vector/index.cjs +971 -969
  114. package/dist/vector/index.js +8 -6
  115. package/dist/video-editor/index.cjs +4 -2
  116. package/dist/video-editor/index.js +4 -2
  117. package/package.json +1 -1
  118. package/skills/pixerate-brushes/SKILL.md +21 -11
  119. package/skills/pixerate-brushes-design/SKILL.md +6 -2
  120. package/skills/pixerate-brushes-design/evals/canvas-chalk.json +8 -8
  121. package/skills/pixerate-canvas/SKILL.md +3 -2
  122. package/skills/pixerate-image-editor/SKILL.md +1 -1
  123. package/skills/pixerate-paint-editor/SKILL.md +5 -1
  124. package/skills/pixerate-vector/SKILL.md +1 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkSOSBOS5Tcjs = require('../chunk-SOSBOS5T.cjs');
5
+ var _chunkG23BTQA5cjs = require('../chunk-G23BTQA5.cjs');
6
6
 
7
7
 
8
8
  var _chunk6WCQ35GIcjs = require('../chunk-6WCQ35GI.cjs');
@@ -128,17 +128,17 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
128
128
 
129
129
 
130
130
 
131
- var _chunkCJ6TBL2Ncjs = require('../chunk-CJ6TBL2N.cjs');
131
+ var _chunkRHEMMGCNcjs = require('../chunk-RHEMMGCN.cjs');
132
132
 
133
133
 
134
- var _chunk3NS5C7FBcjs = require('../chunk-3NS5C7FB.cjs');
134
+ var _chunkYYBW6DF2cjs = require('../chunk-YYBW6DF2.cjs');
135
135
  require('../chunk-TTCJPX4U.cjs');
136
- require('../chunk-N76AMOKE.cjs');
136
+ require('../chunk-MDLEGVEN.cjs');
137
137
  require('../chunk-VU6WQSMB.cjs');
138
138
 
139
139
 
140
140
 
141
- var _chunkWRZ6C4TUcjs = require('../chunk-WRZ6C4TU.cjs');
141
+ var _chunkP6WYDBTHcjs = require('../chunk-P6WYDBTH.cjs');
142
142
 
143
143
 
144
144
 
@@ -180,8 +180,10 @@ 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-EUIDTZNQ.cjs');
184
- require('../chunk-TFF2GTGN.cjs');
183
+ require('../chunk-I3Y2Q3PM.cjs');
184
+ require('../chunk-MEGSQUQO.cjs');
185
+ require('../chunk-MLLTWAXH.cjs');
186
+ require('../chunk-SXQHWXEL.cjs');
185
187
  require('../chunk-5UEFBM2M.cjs');
186
188
  require('../chunk-IPJ3TEYR.cjs');
187
189
 
@@ -644,14 +646,14 @@ var SIZE_WIDTH = {
644
646
  };
645
647
  var SIZE_HEIGHT = { type: "number", minimum: 50, maximum: 4096, description: "Height in pixels (default 320)." };
646
648
  var SPEC_PROPERTIES = {
647
- ..._chunkSOSBOS5Tcjs.CHART_UPDATE_PROPERTIES,
649
+ ..._chunkG23BTQA5cjs.CHART_UPDATE_PROPERTIES,
648
650
  categories: { type: "array", items: { type: "string" }, description: "Category labels in order (x axis labels, or pie slices)." },
649
651
  series: {
650
652
  type: "array",
651
653
  description: "The series, each with one value per category (padded with gaps).",
652
654
  items: {
653
655
  type: "object",
654
- properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ..._chunkSOSBOS5Tcjs.SERIES_PROPS },
656
+ properties: { id: { type: "string", description: "Stable id (default: from the name)." }, ..._chunkG23BTQA5cjs.SERIES_PROPS },
655
657
  required: ["name", "values"],
656
658
  additionalProperties: false
657
659
  }
@@ -662,7 +664,7 @@ function cleanSeries(series) {
662
664
  return series.map((s) => s && typeof s === "object" ? Object.fromEntries(Object.entries(s).filter(([, v]) => v !== null)) : s);
663
665
  }
664
666
  function checkedSpec(input) {
665
- const { spec, issues } = _chunkWRZ6C4TUcjs.normalizeChartSpec.call(void 0, { ...input, ...input.series !== void 0 ? { series: cleanSeries(input.series) } : {} });
667
+ const { spec, issues } = _chunkP6WYDBTHcjs.normalizeChartSpec.call(void 0, { ...input, ...input.series !== void 0 ? { series: cleanSeries(input.series) } : {} });
666
668
  if (issues.length) throw new Error(`The chart was not changed: ${issues.map((i) => i.message).join(" ")}`);
667
669
  return spec;
668
670
  }
@@ -677,14 +679,14 @@ function describe(chart, includeSpec) {
677
679
  series: spec.series.map((s) => ({ id: s.id, name: s.name })),
678
680
  width: _nullishCoalesce(node.attrs.width, () => ( null)),
679
681
  height: node.attrs.height,
680
- description: _chunk3NS5C7FBcjs.describeChart.call(void 0, spec),
682
+ description: _chunkYYBW6DF2cjs.describeChart.call(void 0, spec),
681
683
  ...includeSpec ? { spec } : {}
682
684
  };
683
685
  }
684
686
  function sparklines(doc) {
685
687
  const found = [];
686
688
  doc.descendants((node, pos) => {
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
+ if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label: _chunkRHEMMGCNcjs.sparklineLabel.call(void 0, node) });
688
690
  });
689
691
  return found;
690
692
  }
@@ -695,7 +697,7 @@ function checkPosition(editor, at) {
695
697
  function createDocumentChartTools(editor) {
696
698
  const chartType = () => editor().schema.nodes.chart;
697
699
  const findChart = (args) => {
698
- const charts = _chunkCJ6TBL2Ncjs.getDocumentCharts.call(void 0, editor().state.doc);
700
+ const charts = _chunkRHEMMGCNcjs.getDocumentCharts.call(void 0, editor().state.doc);
699
701
  const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
700
702
  if (args.chartId !== void 0) {
701
703
  const chart = charts.find((c) => c.id === args.chartId);
@@ -722,7 +724,7 @@ function createDocumentChartTools(editor) {
722
724
  annotations: { title: "List charts in the document", ...READ },
723
725
  handler: ({ includeSpec = false }) => {
724
726
  const doc = editor().state.doc;
725
- return { charts: _chunkCJ6TBL2Ncjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
727
+ return { charts: _chunkRHEMMGCNcjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
726
728
  }
727
729
  };
728
730
  const insertChart = {
@@ -749,7 +751,7 @@ function createDocumentChartTools(editor) {
749
751
  const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
750
752
  const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
751
753
  const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
752
- const chart = _chunkCJ6TBL2Ncjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
754
+ const chart = _chunkRHEMMGCNcjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
753
755
  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
756
  return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
755
757
  }
@@ -796,8 +798,8 @@ function createDocumentChartTools(editor) {
796
798
  inputSchema: {
797
799
  type: "object",
798
800
  properties: {
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)." },
801
+ values: { type: "array", items: _chunkG23BTQA5cjs.VALUE, minItems: 1, maxItems: _chunkRHEMMGCNcjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
802
+ kind: { type: "string", enum: [..._chunkRHEMMGCNcjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
801
803
  at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
802
804
  width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
803
805
  height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
@@ -811,12 +813,12 @@ function createDocumentChartTools(editor) {
811
813
  handler: ({ values, kind = "line", at, width = 80, height = 18, color = null, label = null }) => {
812
814
  const ed = editor();
813
815
  checkPosition(ed, at);
814
- const parsed = values.map((v) => _chunkWRZ6C4TUcjs.parseChartValue.call(void 0, v));
816
+ const parsed = values.map((v) => _chunkP6WYDBTHcjs.parseChartValue.call(void 0, v));
815
817
  const bad = parsed.findIndex((v) => v === void 0);
816
818
  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
819
  const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
818
820
  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 = _chunkCJ6TBL2Ncjs.normalizeSparklineValues.call(void 0, parsed);
821
+ const stored = _chunkRHEMMGCNcjs.normalizeSparklineValues.call(void 0, parsed);
820
822
  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
823
  return { pos, kind, values: stored };
822
824
  }
@@ -1154,8 +1156,8 @@ function createTextPresence(editor, providerId, option) {
1154
1156
  const config = option === false ? null : option === true || option === void 0 ? {} : option;
1155
1157
  const caret = {
1156
1158
  id: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _43 => _43.id]), () => ( providerId)),
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))
1159
+ name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => ( _chunkRHEMMGCNcjs.DEFAULT_AGENT_CARET_NAME)),
1160
+ color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => ( _chunkRHEMMGCNcjs.DEFAULT_AGENT_CARET_COLOR))
1159
1161
  };
1160
1162
  const typing = !_optionalChain([config, 'optionalAccess', _46 => _46.typing]) ? null : config.typing === true ? {} : config.typing;
1161
1163
  const idleMs = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _47 => _47.idleMs]), () => ( 12e3));
@@ -1168,19 +1170,19 @@ function createTextPresence(editor, providerId, option) {
1168
1170
  };
1169
1171
  const touch = () => {
1170
1172
  clearTimeout(idleTimer);
1171
- if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkCJ6TBL2Ncjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
1173
+ if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkRHEMMGCNcjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
1172
1174
  };
1173
1175
  const tint = (ed, ranges) => {
1174
1176
  clearTimeout(tintTimer);
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);
1177
+ _chunkRHEMMGCNcjs.markAgentChanges.call(void 0, ed, caret.id, ranges);
1178
+ if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() && _chunkRHEMMGCNcjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
1177
1179
  };
1178
1180
  return {
1179
1181
  /** Puts the caret at `head`, selecting from `anchor`. */
1180
1182
  show(anchor, head = anchor) {
1181
1183
  const ed = live();
1182
1184
  if (!ed) return;
1183
- _chunkCJ6TBL2Ncjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
1185
+ _chunkRHEMMGCNcjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
1184
1186
  touch();
1185
1187
  },
1186
1188
  /** Shows the caret after ranges just changed by a tool, tinting them. */
@@ -1188,7 +1190,7 @@ function createTextPresence(editor, providerId, option) {
1188
1190
  const ed = live();
1189
1191
  if (!ed || !ranges.length) return;
1190
1192
  const last = ranges[ranges.length - 1];
1191
- _chunkCJ6TBL2Ncjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
1193
+ _chunkRHEMMGCNcjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
1192
1194
  tint(ed, ranges);
1193
1195
  touch();
1194
1196
  },
@@ -1196,12 +1198,12 @@ function createTextPresence(editor, providerId, option) {
1196
1198
  async write(ed, from, to, text, signal) {
1197
1199
  if (live() && typing) {
1198
1200
  clearTimeout(tintTimer);
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);
1201
+ const range2 = await _chunkRHEMMGCNcjs.typeAgentText.call(void 0, ed, { ...typing, from, to, text, caret, signal });
1202
+ if (changedMs > 0) tintTimer = setTimeout(() => live() && _chunkRHEMMGCNcjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
1201
1203
  touch();
1202
1204
  return range2;
1203
1205
  }
1204
- const tr = _history.closeHistory.call(void 0, _chunkCJ6TBL2Ncjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
1206
+ const tr = _history.closeHistory.call(void 0, _chunkRHEMMGCNcjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
1205
1207
  const end = tr.mapping.map(to, 1);
1206
1208
  const range = { from: Math.min(tr.mapping.map(from, -1), end), to: end };
1207
1209
  ed.view.dispatch(tr.scrollIntoView());
@@ -1230,7 +1232,7 @@ function findMatches(editor, query, args, replacement) {
1230
1232
  wholeWord: !!args.wholeWord,
1231
1233
  ...args.regex ? { regex: true } : { literal: true }
1232
1234
  };
1233
- const result = _chunkCJ6TBL2Ncjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
1235
+ const result = _chunkRHEMMGCNcjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
1234
1236
  if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
1235
1237
  return { matches: result.matches, truncated: result.truncated };
1236
1238
  }
@@ -1392,7 +1394,7 @@ function createRichTextToolProvider(target, options) {
1392
1394
  replacement: String(replace).replace(/\r\n?|\n/g, "\r")
1393
1395
  }));
1394
1396
  const tr = _history.closeHistory.call(void 0, ed.state.tr);
1395
- const ends = _chunkCJ6TBL2Ncjs.applyReplacements.call(void 0, tr, chosen);
1397
+ const ends = _chunkRHEMMGCNcjs.applyReplacements.call(void 0, tr, chosen);
1396
1398
  ed.view.dispatch(tr.scrollIntoView());
1397
1399
  const ranges = chosen.map((m, i) => ({ from: tr.mapping.map(m.from, -1), to: ends[i] }));
1398
1400
  presence.changed(ranges.filter((r) => r.from < r.to));
@@ -1493,7 +1495,7 @@ function createRichTextToolProvider(target, options) {
1493
1495
  inputSchema: {
1494
1496
  type: "object",
1495
1497
  properties: {
1496
- operation: { type: "string", enum: _chunkCJ6TBL2Ncjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
1498
+ operation: { type: "string", enum: _chunkRHEMMGCNcjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
1497
1499
  at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
1498
1500
  rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
1499
1501
  cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
@@ -1523,10 +1525,10 @@ function createRichTextToolProvider(target, options) {
1523
1525
  ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
1524
1526
  }
1525
1527
  const action = operation;
1526
- const state = _chunkCJ6TBL2Ncjs.getTableActionState.call(void 0, ed, action, params);
1528
+ const state = _chunkRHEMMGCNcjs.getTableActionState.call(void 0, ed, action, params);
1527
1529
  if (state !== true) throw new Error(state);
1528
- _chunkCJ6TBL2Ncjs.runTableAction.call(void 0, ed, action, params);
1529
- const table = _chunkCJ6TBL2Ncjs.getTableState.call(void 0, ed);
1530
+ _chunkRHEMMGCNcjs.runTableAction.call(void 0, ed, action, params);
1531
+ const table = _chunkRHEMMGCNcjs.getTableState.call(void 0, ed);
1530
1532
  return {
1531
1533
  operation,
1532
1534
  table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
@@ -1545,7 +1547,7 @@ function createRichTextToolProvider(target, options) {
1545
1547
  if (!ed || ed.isDestroyed) return [];
1546
1548
  if (!ed.isEditable) return [getText, findText, ...charts.read()];
1547
1549
  const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection, ...formatting.tools(ed)];
1548
- return [...tools, ..._chunkCJ6TBL2Ncjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
1550
+ return [...tools, ..._chunkRHEMMGCNcjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
1549
1551
  },
1550
1552
  subscribe: (notify) => {
1551
1553
  const ed = editor();
@@ -2221,7 +2223,7 @@ function createReviewToolProvider(target, options) {
2221
2223
  const editor = () => toEditor2(target);
2222
2224
  const author = _nullishCoalesce(options.author, () => ( { id: "agent", name: "Agent" }));
2223
2225
  const store = () => {
2224
- const s = _chunkCJ6TBL2Ncjs.getCommentStore.call(void 0, editor());
2226
+ const s = _chunkRHEMMGCNcjs.getCommentStore.call(void 0, editor());
2225
2227
  if (!s) throw new Error("This editor has no Comments extension.");
2226
2228
  return s;
2227
2229
  };
@@ -2416,7 +2418,7 @@ function createReviewToolProvider(target, options) {
2416
2418
  tools: () => {
2417
2419
  const ed = editor();
2418
2420
  if (!ed || ed.isDestroyed) return [];
2419
- const comments = !!_chunkCJ6TBL2Ncjs.getCommentStore.call(void 0, ed);
2421
+ const comments = !!_chunkRHEMMGCNcjs.getCommentStore.call(void 0, ed);
2420
2422
  const changes = !!_chunk34RQAGWIcjs.getTrackChangesStore.call(void 0, ed);
2421
2423
  const tools = [...comments ? [listComments] : [], ...changes ? [listChanges] : []];
2422
2424
  if (!ed.isEditable) return tools;
@@ -2,7 +2,7 @@ import {
2
2
  CHART_UPDATE_PROPERTIES,
3
3
  SERIES_PROPS,
4
4
  VALUE
5
- } from "../chunk-GOBOCZZI.js";
5
+ } from "../chunk-6NQPKNUZ.js";
6
6
  import {
7
7
  hasVariantCommands
8
8
  } from "../chunk-5P4JEOIV.js";
@@ -128,17 +128,17 @@ import {
128
128
  setAgentCaret,
129
129
  sparklineLabel,
130
130
  typeAgentText
131
- } from "../chunk-6GRUVGKU.js";
131
+ } from "../chunk-ITURMC2M.js";
132
132
  import {
133
133
  describeChart
134
- } from "../chunk-RHPSE2YR.js";
134
+ } from "../chunk-MQ6MGIQM.js";
135
135
  import "../chunk-KGRZMHZB.js";
136
- import "../chunk-WKMUBATU.js";
136
+ import "../chunk-C2WEIEUB.js";
137
137
  import "../chunk-O6OGNDND.js";
138
138
  import {
139
139
  normalizeChartSpec,
140
140
  parseChartValue
141
- } from "../chunk-6ZZKRH7R.js";
141
+ } from "../chunk-47V3WXDG.js";
142
142
  import {
143
143
  getEditorMarkdown,
144
144
  getEditorText
@@ -180,8 +180,10 @@ import {
180
180
  stripPrototypeKeys
181
181
  } from "../chunk-HF5QZS7Z.js";
182
182
  import "../chunk-NS62CQ2B.js";
183
- import "../chunk-7272D3K2.js";
184
- import "../chunk-YBAPT7NL.js";
183
+ import "../chunk-2EUW2XZX.js";
184
+ import "../chunk-E2V5DA3W.js";
185
+ import "../chunk-VR6OGHU5.js";
186
+ import "../chunk-JC2SHA4A.js";
185
187
  import "../chunk-MHLU6GRJ.js";
186
188
  import "../chunk-6ONMQ6WF.js";
187
189
 
@@ -54,8 +54,10 @@ var _chunkDWJJI6RTcjs = require('../chunk-DWJJI6RT.cjs');
54
54
 
55
55
  var _chunk4ZC5QJE2cjs = require('../chunk-4ZC5QJE2.cjs');
56
56
  require('../chunk-A6QWKBJP.cjs');
57
- require('../chunk-EUIDTZNQ.cjs');
58
- require('../chunk-TFF2GTGN.cjs');
57
+ require('../chunk-I3Y2Q3PM.cjs');
58
+ require('../chunk-MEGSQUQO.cjs');
59
+ require('../chunk-MLLTWAXH.cjs');
60
+ require('../chunk-SXQHWXEL.cjs');
59
61
  require('../chunk-5UEFBM2M.cjs');
60
62
  require('../chunk-IPJ3TEYR.cjs');
61
63
 
@@ -54,8 +54,10 @@ import {
54
54
  rgbToOklab
55
55
  } from "../chunk-M2TPMYJE.js";
56
56
  import "../chunk-2WPNAGHI.js";
57
- import "../chunk-7272D3K2.js";
58
- import "../chunk-YBAPT7NL.js";
57
+ import "../chunk-2EUW2XZX.js";
58
+ import "../chunk-E2V5DA3W.js";
59
+ import "../chunk-VR6OGHU5.js";
60
+ import "../chunk-JC2SHA4A.js";
59
61
  import "../chunk-MHLU6GRJ.js";
60
62
  import "../chunk-6ONMQ6WF.js";
61
63
  export {