@pixerate/editor 0.249.0 → 0.251.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 (158) hide show
  1. package/dist/agent/index.cjs +40 -41
  2. package/dist/agent/index.js +9 -10
  3. package/dist/animation/index.cjs +6 -7
  4. package/dist/animation/index.js +5 -6
  5. package/dist/animation-editor/index.cjs +124 -123
  6. package/dist/animation-editor/index.js +15 -14
  7. package/dist/brushes/index.cjs +1406 -0
  8. package/dist/brushes/index.d.cts +12 -0
  9. package/dist/brushes/index.d.ts +12 -0
  10. package/dist/brushes/index.js +1406 -0
  11. package/dist/brushes/migrate.d.cts +17 -0
  12. package/dist/brushes/migrate.d.ts +17 -0
  13. package/dist/brushes/normalize.d.cts +15 -0
  14. package/dist/brushes/normalize.d.ts +15 -0
  15. package/dist/brushes/presets.d.cts +12 -0
  16. package/dist/brushes/presets.d.ts +12 -0
  17. package/dist/brushes/resolve.d.cts +56 -0
  18. package/dist/brushes/resolve.d.ts +56 -0
  19. package/dist/brushes/schema.d.cts +29 -0
  20. package/dist/brushes/schema.d.ts +29 -0
  21. package/dist/brushes/types.d.cts +323 -0
  22. package/dist/brushes/types.d.ts +323 -0
  23. package/dist/{brushstrokeRender-T3JZST44.js → brushstrokeRender-5PYSKZIJ.js} +9 -8
  24. package/dist/{brushstrokeRender-GCKK7V2I.cjs → brushstrokeRender-7FLLSQEC.cjs} +15 -14
  25. package/dist/canvas/index.cjs +120 -65
  26. package/dist/canvas/index.d.cts +1 -0
  27. package/dist/canvas/index.d.ts +1 -0
  28. package/dist/canvas/index.js +88 -33
  29. package/dist/canvas/stickers.d.cts +35 -0
  30. package/dist/canvas/stickers.d.ts +35 -0
  31. package/dist/chart/index.cjs +159 -160
  32. package/dist/chart/index.js +9 -10
  33. package/dist/{chunk-RXZL4NG5.js → chunk-226QDRO3.js} +1 -1
  34. package/dist/{chunk-DOIU7VJG.js → chunk-2ZJ4DT3M.js} +1 -1
  35. package/dist/{chunk-XZNU4DUX.cjs → chunk-3NS5C7FB.cjs} +76 -76
  36. package/dist/{chunk-UTI5IITZ.cjs → chunk-4ZC5QJE2.cjs} +3 -3
  37. package/dist/{chunk-L3JFOTBQ.js → chunk-5E2Q7ZHI.js} +1 -1
  38. package/dist/{chunk-6BIDVPED.js → chunk-5JNA6LLY.js} +1 -1
  39. package/dist/{chunk-RD7RX52G.cjs → chunk-5UEFBM2M.cjs} +207 -18
  40. package/dist/{chunk-WA44NKPF.js → chunk-62Z5WLRA.js} +1 -1
  41. package/dist/{chunk-BVRRIW7F.js → chunk-6GRUVGKU.js} +3 -3
  42. package/dist/{chunk-QARCM66V.js → chunk-6ZZKRH7R.js} +3 -3
  43. package/dist/{chunk-BP6KSGVD.js → chunk-7272D3K2.js} +4 -6
  44. package/dist/{chunk-O75V4ZS3.js → chunk-7P6VF3FG.js} +2 -2
  45. package/dist/{chunk-AU6MWQKZ.js → chunk-ABL7IWFZ.js} +1 -1
  46. package/dist/{chunk-5RH3VXAK.js → chunk-APX63ILU.js} +4 -100
  47. package/dist/{chunk-W7L4HUT2.cjs → chunk-CJ6TBL2N.cjs} +16 -16
  48. package/dist/{chunk-7PT4RJL5.cjs → chunk-EUIDTZNQ.cjs} +111 -113
  49. package/dist/{chunk-CXXXAZ7H.js → chunk-F6R67I3A.js} +1 -1
  50. package/dist/{chunk-I7NJPHWV.cjs → chunk-FQPUF2W2.cjs} +35 -606
  51. package/dist/{chunk-D5KGAO4Z.js → chunk-GCVFEPJG.js} +2 -573
  52. package/dist/{chunk-LEQKZGQI.js → chunk-GOBOCZZI.js} +1 -1
  53. package/dist/{chunk-PZP2SZIZ.js → chunk-GYMMNCFT.js} +3 -3
  54. package/dist/{chunk-NUTMINJZ.cjs → chunk-H7ET2ISK.cjs} +52 -52
  55. package/dist/chunk-HS6QDWDF.cjs +1029 -0
  56. package/dist/{chunk-T7KQEMAE.cjs → chunk-HUAISCUX.cjs} +18 -18
  57. package/dist/{chunk-YGQVCQTG.js → chunk-ILP77UD6.js} +1 -1
  58. package/dist/{chunk-GHCSC2WP.cjs → chunk-ISIO63Q5.cjs} +21 -15
  59. package/dist/{chunk-S6OT6CTS.cjs → chunk-IWEVV63O.cjs} +31 -33
  60. package/dist/{chunk-OFH6Q67U.js → chunk-JA57JIT5.js} +9 -3
  61. package/dist/{chunk-LP2MCSBE.cjs → chunk-JFHBXNR2.cjs} +88 -88
  62. package/dist/{chunk-IOFVM3L3.cjs → chunk-JPEHXIB5.cjs} +10 -10
  63. package/dist/chunk-JSDND7DF.cjs +173 -0
  64. package/dist/{chunk-36ZTV7WO.js → chunk-L6Y7TSQ4.js} +1 -1
  65. package/dist/{chunk-KYX7NZ5V.cjs → chunk-LFMKWGFL.cjs} +1 -1
  66. package/dist/{chunk-V6DT2CDH.js → chunk-M2TPMYJE.js} +1 -1
  67. package/dist/{chunk-LJZRHVZV.cjs → chunk-M5GLQQWG.cjs} +2 -2
  68. package/dist/{chunk-JEGJP4OW.js → chunk-MHLU6GRJ.js} +196 -7
  69. package/dist/{chunk-KMPM5JM5.js → chunk-MONXNVZK.js} +4 -6
  70. package/dist/chunk-MTKY6K3Q.js +1029 -0
  71. package/dist/{chunk-MOW3JMNG.cjs → chunk-N76AMOKE.cjs} +42 -42
  72. package/dist/{chunk-75K3W4D6.cjs → chunk-NKGB64CW.cjs} +16 -16
  73. package/dist/{chunk-SGPIVHJB.js → chunk-P3K2JCJA.js} +3 -3
  74. package/dist/chunk-PXDIAYB6.cjs +594 -0
  75. package/dist/{chunk-UBRJOIR5.js → chunk-QC3OXRE4.js} +9 -9
  76. package/dist/{chunk-QOBCBGGI.cjs → chunk-QKXO6JPP.cjs} +14 -14
  77. package/dist/{chunk-WLJZZHUZ.cjs → chunk-QLSGTCYT.cjs} +23 -23
  78. package/dist/{chunk-7YW7T5TJ.js → chunk-RHPSE2YR.js} +2 -2
  79. package/dist/{chunk-44BMJJVA.cjs → chunk-RUONPPMC.cjs} +8 -8
  80. package/dist/{chunk-LJRCU3BJ.cjs → chunk-SABJMH6M.cjs} +150 -15
  81. package/dist/{chunk-XWOLPNBW.cjs → chunk-SOSBOS5T.cjs} +22 -22
  82. package/dist/chunk-SZTI6EER.js +13 -0
  83. package/dist/{chunk-PPFJHTW5.cjs → chunk-TFF2GTGN.cjs} +22 -24
  84. package/dist/{chunk-2SMMZDMG.cjs → chunk-TLOGFIIV.cjs} +37 -37
  85. package/dist/chunk-TXFWZ5ZJ.js +594 -0
  86. package/dist/chunk-U67EN7GG.cjs +13 -0
  87. package/dist/{chunk-GXAK6Q5J.js → chunk-UFEDHACQ.js} +2 -2
  88. package/dist/{chunk-GA4EU4P3.cjs → chunk-UXETV2NC.cjs} +4 -4
  89. package/dist/{chunk-N4DFDI73.js → chunk-WKMUBATU.js} +1 -1
  90. package/dist/{chunk-3R5P3DVY.cjs → chunk-WRZ6C4TU.cjs} +6 -6
  91. package/dist/{chunk-EJLRBS5Q.js → chunk-WZOGDKCQ.js} +137 -2
  92. package/dist/{chunk-6ADHGQ73.js → chunk-YBAPT7NL.js} +2 -4
  93. package/dist/{chunk-K5DS2JTA.cjs → chunk-Z3BRH4JK.cjs} +6 -6
  94. package/dist/{chunk-XNZFVYC2.cjs → chunk-ZBCT5MEA.cjs} +7 -7
  95. package/dist/color/index.cjs +4 -6
  96. package/dist/color/index.js +7 -9
  97. package/dist/effects/helpers.d.cts +6 -0
  98. package/dist/effects/helpers.d.ts +6 -0
  99. package/dist/effects/index.cjs +62 -60
  100. package/dist/effects/index.js +5 -3
  101. package/dist/effects/tools.d.cts +6 -0
  102. package/dist/effects/tools.d.ts +6 -0
  103. package/dist/export/index.cjs +7 -8
  104. package/dist/export/index.js +6 -7
  105. package/dist/extensions/index.cjs +10 -11
  106. package/dist/extensions/index.js +9 -10
  107. package/dist/gradient/index.cjs +33 -34
  108. package/dist/gradient/index.js +4 -5
  109. package/dist/image-editor/effects.d.cts +1 -1
  110. package/dist/image-editor/effects.d.ts +1 -1
  111. package/dist/image-editor/index.cjs +887 -863
  112. package/dist/image-editor/index.d.cts +1 -0
  113. package/dist/image-editor/index.d.ts +1 -0
  114. package/dist/image-editor/index.js +69 -45
  115. package/dist/image-editor/stickers.d.cts +9 -0
  116. package/dist/image-editor/stickers.d.ts +9 -0
  117. package/dist/index.cjs +16 -17
  118. package/dist/index.js +10 -11
  119. package/dist/paint/index.cjs +6 -4
  120. package/dist/paint/index.js +21 -19
  121. package/dist/paint-editor/brushes.d.cts +1 -2
  122. package/dist/paint-editor/brushes.d.ts +1 -2
  123. package/dist/paint-editor/index.cjs +2199 -699
  124. package/dist/paint-editor/index.js +1577 -77
  125. package/dist/paint-editor/mark-settings.d.cts +104 -0
  126. package/dist/paint-editor/mark-settings.d.ts +104 -0
  127. package/dist/paint-editor/procedural.d.cts +2 -75
  128. package/dist/paint-editor/procedural.d.ts +2 -75
  129. package/dist/paint-editor/stickers.d.cts +1 -22
  130. package/dist/paint-editor/stickers.d.ts +1 -22
  131. package/dist/raster/index.cjs +2 -2
  132. package/dist/raster/index.js +9 -9
  133. package/dist/stickers/index.cjs +22 -16
  134. package/dist/stickers/index.d.cts +1 -1
  135. package/dist/stickers/index.d.ts +1 -1
  136. package/dist/stickers/index.js +14 -8
  137. package/dist/stickers/tools.d.cts +57 -1
  138. package/dist/stickers/tools.d.ts +57 -1
  139. package/dist/tokens/index.cjs +3 -4
  140. package/dist/tokens/index.js +2 -3
  141. package/dist/typography/index.cjs +7 -8
  142. package/dist/typography/index.js +2 -3
  143. package/dist/vector/index.cjs +1011 -977
  144. package/dist/vector/index.d.cts +1 -0
  145. package/dist/vector/index.d.ts +1 -0
  146. package/dist/vector/index.js +47 -13
  147. package/dist/vector/stickers.d.cts +11 -0
  148. package/dist/vector/stickers.d.ts +11 -0
  149. package/dist/video-editor/index.cjs +349 -350
  150. package/dist/video-editor/index.js +9 -10
  151. package/package.json +11 -1
  152. package/skills/pixerate-image-editor/SKILL.md +1 -1
  153. package/skills/pixerate-stickers/SKILL.md +13 -1
  154. package/dist/chunk-7AHBW2CQ.cjs +0 -200
  155. package/dist/chunk-F67XMVDI.js +0 -200
  156. package/dist/chunk-H4AOUUBE.cjs +0 -2635
  157. package/dist/chunk-J7T5QZ45.js +0 -2635
  158. package/dist/chunk-ZEYMKDYS.cjs +0 -269
@@ -7,7 +7,7 @@ var _chunkYN6JKAUEcjs = require('./chunk-YN6JKAUE.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunkT7KQEMAEcjs = require('./chunk-T7KQEMAE.cjs');
10
+ var _chunkHUAISCUXcjs = require('./chunk-HUAISCUX.cjs');
11
11
 
12
12
 
13
13
  var _chunkHMGWFXECcjs = require('./chunk-HMGWFXEC.cjs');
@@ -35,10 +35,10 @@ var _chunkHMGWFXECcjs = require('./chunk-HMGWFXEC.cjs');
35
35
 
36
36
 
37
37
 
38
- var _chunkW7L4HUT2cjs = require('./chunk-W7L4HUT2.cjs');
38
+ var _chunkCJ6TBL2Ncjs = require('./chunk-CJ6TBL2N.cjs');
39
39
 
40
40
 
41
- var _chunk3R5P3DVYcjs = require('./chunk-3R5P3DVY.cjs');
41
+ var _chunkWRZ6C4TUcjs = require('./chunk-WRZ6C4TU.cjs');
42
42
 
43
43
 
44
44
 
@@ -2296,13 +2296,13 @@ async function loadCharts(zip, Parser, root, rels, options) {
2296
2296
  const charts = /* @__PURE__ */ new Map();
2297
2297
  if (options.charts === false) return charts;
2298
2298
  for (const el of descendants(root, "chart")) {
2299
- if (el.namespaceURI !== _chunkT7KQEMAEcjs.CHART_OOXML_NS) continue;
2299
+ if (el.namespaceURI !== _chunkHUAISCUXcjs.CHART_OOXML_NS) continue;
2300
2300
  const id = attr(el, "id");
2301
2301
  const rel = id ? rels.get(id) : void 0;
2302
2302
  if (!id || !rel || rel.external || charts.has(id)) continue;
2303
2303
  const entry = zip.get(rel.target);
2304
2304
  if (!entry) continue;
2305
- const read = _chunkT7KQEMAEcjs.chartFromOoxml.call(void 0, await zip.readText(entry), { DOMParser: Parser });
2305
+ const read = _chunkHUAISCUXcjs.chartFromOoxml.call(void 0, await zip.readText(entry), { DOMParser: Parser });
2306
2306
  charts.set(id, {
2307
2307
  id: `chart-${charts.size + 1}`,
2308
2308
  path: rel.target,
@@ -2316,7 +2316,7 @@ async function loadCharts(zip, Parser, root, rels, options) {
2316
2316
  return charts;
2317
2317
  }
2318
2318
  function chartBlockHtml(chart) {
2319
- const [head, ...rows] = _chunk3R5P3DVYcjs.chartDataToTable.call(void 0, chart.spec);
2319
+ const [head, ...rows] = _chunkWRZ6C4TUcjs.chartDataToTable.call(void 0, chart.spec);
2320
2320
  const cell = (v, tag) => `<${tag}><p>${_chunkG43MNQ4Ccjs.escapeHtml.call(void 0, v === null || v === void 0 ? "" : String(v))}</p></${tag}>`;
2321
2321
  const table = `<table><tbody><tr>${head.map((h) => cell(h, "th")).join("")}</tr>${rows.map((r) => `<tr>${r.map((v, i) => cell(v, i ? "td" : "th")).join("")}</tr>`).join("")}</tbody></table>`;
2322
2322
  const caption = `<p>${_chunkG43MNQ4Ccjs.escapeHtml.call(void 0, `[Chart: ${chart.title || "untitled"}]`)}</p>`;
@@ -2969,7 +2969,7 @@ var ParagraphRenderer = (_class2 = class {
2969
2969
  };
2970
2970
  if (child.localName === "AlternateContent") {
2971
2971
  const branch = childElements(child).find(
2972
- (b) => descendants(b, "blip").length || descendants(b, "imagedata").length || descendants(b, "chart").some((el) => el.namespaceURI === _chunkT7KQEMAEcjs.CHART_OOXML_NS)
2972
+ (b) => descendants(b, "blip").length || descendants(b, "imagedata").length || descendants(b, "chart").some((el) => el.namespaceURI === _chunkHUAISCUXcjs.CHART_OOXML_NS)
2973
2973
  );
2974
2974
  if (branch) this.image(branch, format, push);
2975
2975
  return;
@@ -3036,7 +3036,7 @@ var ParagraphRenderer = (_class2 = class {
3036
3036
  /** Charts this paragraph contains, in order. */
3037
3037
  __init4() {this.charts = []}
3038
3038
  image(container, format, push) {
3039
- const chartRef = descendants(container, "chart").find((el) => el.namespaceURI === _chunkT7KQEMAEcjs.CHART_OOXML_NS);
3039
+ const chartRef = descendants(container, "chart").find((el) => el.namespaceURI === _chunkHUAISCUXcjs.CHART_OOXML_NS);
3040
3040
  const chart = chartRef ? this.part.charts.get(_nullishCoalesce(attr(chartRef, "id"), () => ( ""))) : void 0;
3041
3041
  if (chart) {
3042
3042
  if (!this.ctx.charts.includes(chart)) this.ctx.charts.push(chart);
@@ -3475,9 +3475,9 @@ function insertImportedDocument(target, content, options = {}) {
3475
3475
  if (!htmlSlice && from === to && !state.doc.resolve(from).parent.inlineContent) {
3476
3476
  from = to = _state.Selection.near(state.doc.resolve(from)).from;
3477
3477
  }
3478
- if (htmlSlice && _chunkW7L4HUT2cjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkW7L4HUT2cjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
3478
+ if (htmlSlice && _chunkCJ6TBL2Ncjs.sliceContainsTable.call(void 0, htmlSlice) && _chunkCJ6TBL2Ncjs.outermostTableDepth.call(void 0, state.doc.resolve(from)) >= 0) {
3479
3479
  const tr2 = state.tr;
3480
- const end2 = _chunkW7L4HUT2cjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
3480
+ const end2 = _chunkCJ6TBL2Ncjs.insertSliceAfterTable.call(void 0, tr2, from, to, htmlSlice);
3481
3481
  if (end2 !== null) {
3482
3482
  if (options.at === void 0) tr2.setSelection(_state.Selection.near(tr2.doc.resolve(end2), -1));
3483
3483
  view.dispatch(tr2.scrollIntoView().setMeta("uiEvent", "drop"));
@@ -3654,7 +3654,7 @@ var RichClipboard = _core.Extension.create({
3654
3654
  const slice = _chunk3AJMR7EGcjs.readRichClipboard.call(void 0, event, view.state.schema, mimeType);
3655
3655
  if (!slice) return false;
3656
3656
  event.preventDefault();
3657
- if (_chunkW7L4HUT2cjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
3657
+ if (_chunkCJ6TBL2Ncjs.handleTablePasteWithoutNesting.call(void 0, view, event, slice)) return true;
3658
3658
  view.dispatch(
3659
3659
  view.state.tr.replaceSelection(slice).scrollIntoView().setMeta("paste", true).setMeta("uiEvent", "paste")
3660
3660
  );
@@ -4055,7 +4055,7 @@ function createOutlineStore(editor) {
4055
4055
  if (!editor || editor.isDestroyed) return EMPTY_SNAPSHOT;
4056
4056
  const headings = getOutline(editor);
4057
4057
  const activeId = _nullishCoalesce(_optionalChain([getActiveHeading, 'call', _153 => _153(editor, headings), 'optionalAccess', _154 => _154.id]), () => ( null));
4058
- const sameStructure = _chunkW7L4HUT2cjs.arraysEqual.call(void 0, snapshot.headings, headings, sameHeading);
4058
+ const sameStructure = _chunkCJ6TBL2Ncjs.arraysEqual.call(void 0, snapshot.headings, headings, sameHeading);
4059
4059
  if (sameStructure && snapshot.activeId === activeId) return snapshot;
4060
4060
  return {
4061
4061
  headings: sameStructure ? snapshot.headings : headings,
@@ -4103,7 +4103,7 @@ function navigateToHeading(editor, heading, options = {}) {
4103
4103
  editor.view.dispatch(tr);
4104
4104
  editor.view.focus();
4105
4105
  }
4106
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, editor.view, current.pos, behavior);
4106
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, editor.view, current.pos, behavior);
4107
4107
  return true;
4108
4108
  }
4109
4109
  function assignHeadingIds(state, types, generateId) {
@@ -4128,11 +4128,11 @@ function assignHeadingIds(state, types, generateId) {
4128
4128
  }
4129
4129
  var Outline = _core.Extension.create({
4130
4130
  name: "outline",
4131
- priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY,
4131
+ priority: _chunkCJ6TBL2Ncjs.STRUCTURE_PRIORITY,
4132
4132
  addOptions() {
4133
4133
  return {
4134
4134
  types: ["heading"],
4135
- generateId: () => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "h"),
4135
+ generateId: () => _chunkCJ6TBL2Ncjs.generateStructureId.call(void 0, "h"),
4136
4136
  onUpdate: void 0
4137
4137
  };
4138
4138
  },
@@ -4165,14 +4165,14 @@ var Outline = _core.Extension.create({
4165
4165
  tr.scrollIntoView();
4166
4166
  _optionalChain([view, 'optionalAccess', _161 => _161.focus, 'optionalCall', _162 => _162()]);
4167
4167
  }
4168
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4168
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4169
4169
  }
4170
4170
  return true;
4171
4171
  },
4172
4172
  scrollToHeading: (id, options = {}) => ({ state, dispatch, view }) => {
4173
4173
  const heading = findHeading(state, id);
4174
4174
  if (!heading) return false;
4175
- if (dispatch) _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4175
+ if (dispatch) _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, heading.pos, options.behavior);
4176
4176
  return true;
4177
4177
  }
4178
4178
  };
@@ -4193,7 +4193,7 @@ var Outline = _core.Extension.create({
4193
4193
  apply: (tr, prev, _oldState, newState) => {
4194
4194
  if (!tr.docChanged) return prev;
4195
4195
  const next = computeOutline(newState.doc, types);
4196
- if (_chunkW7L4HUT2cjs.arraysEqual.call(void 0, prev, next, sameHeading)) return prev;
4196
+ if (_chunkCJ6TBL2Ncjs.arraysEqual.call(void 0, prev, next, sameHeading)) return prev;
4197
4197
  storage.headings = next;
4198
4198
  _optionalChain([onUpdate, 'call', _163 => _163(), 'optionalCall', _164 => _164(next)]);
4199
4199
  return next;
@@ -4211,7 +4211,7 @@ var Outline = _core.Extension.create({
4211
4211
  },
4212
4212
  onBeforeCreate() {
4213
4213
  const { types, generateId } = this.options;
4214
- _chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => assignHeadingIds(state, types, generateId));
4214
+ _chunkCJ6TBL2Ncjs.syncInitialContent.call(void 0, this.editor, (state) => assignHeadingIds(state, types, generateId));
4215
4215
  }
4216
4216
  });
4217
4217
 
@@ -4381,7 +4381,7 @@ function syncTableOfContents(state, headingTypes) {
4381
4381
  node.attrs.minLevel,
4382
4382
  node.attrs.maxLevel
4383
4383
  );
4384
- if (!_chunkW7L4HUT2cjs.arraysEqual.call(void 0, _nullishCoalesce(node.attrs.entries, () => ( [])), entries, sameEntry)) {
4384
+ if (!_chunkCJ6TBL2Ncjs.arraysEqual.call(void 0, _nullishCoalesce(node.attrs.entries, () => ( [])), entries, sameEntry)) {
4385
4385
  tr = _nullishCoalesce(tr, () => ( state.tr));
4386
4386
  tr.setNodeMarkup(pos, void 0, { ...node.attrs, entries });
4387
4387
  }
@@ -4393,7 +4393,7 @@ function syncTableOfContents(state, headingTypes) {
4393
4393
  }
4394
4394
  var TableOfContents = _core.Node.create({
4395
4395
  name: "tableOfContents",
4396
- priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY - 5,
4396
+ priority: _chunkCJ6TBL2Ncjs.STRUCTURE_PRIORITY - 5,
4397
4397
  group: "block",
4398
4398
  atom: true,
4399
4399
  selectable: true,
@@ -4504,7 +4504,7 @@ var TableOfContents = _core.Node.create({
4504
4504
  return [
4505
4505
  new (0, _state.Plugin)({
4506
4506
  key: tableOfContentsPluginKey,
4507
- state: _chunkW7L4HUT2cjs.presenceStateSpec.call(void 0, [this.name]),
4507
+ state: _chunkCJ6TBL2Ncjs.presenceStateSpec.call(void 0, [this.name]),
4508
4508
  appendTransaction: (transactions, _oldState, newState) => {
4509
4509
  if (!transactions.some((tr) => tr.docChanged)) return null;
4510
4510
  if (!tableOfContentsPluginKey.getState(newState)) return null;
@@ -4528,7 +4528,7 @@ var TableOfContents = _core.Node.create({
4528
4528
  );
4529
4529
  view.focus();
4530
4530
  }
4531
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, heading.pos);
4531
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, heading.pos);
4532
4532
  return true;
4533
4533
  }
4534
4534
  }
@@ -4538,7 +4538,7 @@ var TableOfContents = _core.Node.create({
4538
4538
  },
4539
4539
  onBeforeCreate() {
4540
4540
  const { headingTypes } = this.options;
4541
- _chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => syncTableOfContents(state, headingTypes));
4541
+ _chunkCJ6TBL2Ncjs.syncInitialContent.call(void 0, this.editor, (state) => syncTableOfContents(state, headingTypes));
4542
4542
  }
4543
4543
  });
4544
4544
 
@@ -4596,7 +4596,7 @@ function syncFootnotes(tr, options = {}) {
4596
4596
  const listType = schema.nodes[LIST];
4597
4597
  const itemType = schema.nodes[ITEM];
4598
4598
  if (!listType || !itemType) return false;
4599
- const generateId = _nullishCoalesce(options.generateId, () => ( (() => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "fn"))));
4599
+ const generateId = _nullishCoalesce(options.generateId, () => ( (() => _chunkCJ6TBL2Ncjs.generateStructureId.call(void 0, "fn"))));
4600
4600
  const refs = [];
4601
4601
  const lists = [];
4602
4602
  const existing = /* @__PURE__ */ new Map();
@@ -4680,7 +4680,7 @@ function findReferences(doc, id) {
4680
4680
  }
4681
4681
  var FootnoteReference = _core.Node.create({
4682
4682
  name: REFERENCE,
4683
- priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY - 5,
4683
+ priority: _chunkCJ6TBL2Ncjs.STRUCTURE_PRIORITY - 5,
4684
4684
  group: "inline",
4685
4685
  inline: true,
4686
4686
  atom: true,
@@ -4688,7 +4688,7 @@ var FootnoteReference = _core.Node.create({
4688
4688
  addOptions() {
4689
4689
  return {
4690
4690
  HTMLAttributes: {},
4691
- generateId: () => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "fn")
4691
+ generateId: () => _chunkCJ6TBL2Ncjs.generateStructureId.call(void 0, "fn")
4692
4692
  };
4693
4693
  },
4694
4694
  addAttributes() {
@@ -4799,7 +4799,7 @@ var FootnoteReference = _core.Node.create({
4799
4799
  _state.TextSelection.create(tr.doc, footnote.pos + footnote.node.nodeSize - 2)
4800
4800
  );
4801
4801
  tr.scrollIntoView();
4802
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, footnote.pos);
4802
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, footnote.pos);
4803
4803
  }
4804
4804
  return true;
4805
4805
  },
@@ -4809,7 +4809,7 @@ var FootnoteReference = _core.Node.create({
4809
4809
  if (dispatch) {
4810
4810
  tr.setSelection(_state.NodeSelection.create(tr.doc, ref.pos));
4811
4811
  tr.scrollIntoView();
4812
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, ref.pos);
4812
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, ref.pos);
4813
4813
  }
4814
4814
  return true;
4815
4815
  }
@@ -4821,7 +4821,7 @@ var FootnoteReference = _core.Node.create({
4821
4821
  return [
4822
4822
  new (0, _state.Plugin)({
4823
4823
  key: footnotesPluginKey,
4824
- state: _chunkW7L4HUT2cjs.presenceStateSpec.call(void 0, [REFERENCE, LIST]),
4824
+ state: _chunkCJ6TBL2Ncjs.presenceStateSpec.call(void 0, [REFERENCE, LIST]),
4825
4825
  appendTransaction: (transactions, _oldState, newState) => {
4826
4826
  if (!transactions.some((tr2) => tr2.docChanged)) return null;
4827
4827
  if (!footnotesPluginKey.getState(newState)) return null;
@@ -4842,7 +4842,7 @@ var FootnoteReference = _core.Node.create({
4842
4842
  },
4843
4843
  onBeforeCreate() {
4844
4844
  const { generateId } = this.options;
4845
- _chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => {
4845
+ _chunkCJ6TBL2Ncjs.syncInitialContent.call(void 0, this.editor, (state) => {
4846
4846
  const tr = state.tr;
4847
4847
  return syncFootnotes(tr, { generateId }) ? tr : null;
4848
4848
  });
@@ -4982,7 +4982,7 @@ var Bookmark = _core.Mark.create({
4982
4982
  addOptions() {
4983
4983
  return {
4984
4984
  HTMLAttributes: {},
4985
- generateId: () => _chunkW7L4HUT2cjs.generateStructureId.call(void 0, "bm")
4985
+ generateId: () => _chunkCJ6TBL2Ncjs.generateStructureId.call(void 0, "bm")
4986
4986
  };
4987
4987
  },
4988
4988
  addAttributes() {
@@ -5067,7 +5067,7 @@ var Bookmark = _core.Mark.create({
5067
5067
  tr.setSelection(_state.TextSelection.create(tr.doc, bookmark.from, bookmark.to));
5068
5068
  tr.scrollIntoView();
5069
5069
  const domPos = state.doc.resolve(bookmark.from);
5070
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, domPos.before(domPos.depth));
5070
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, domPos.before(domPos.depth));
5071
5071
  }
5072
5072
  return true;
5073
5073
  }
@@ -5132,7 +5132,7 @@ function syncCrossReferences(state, headingTypes) {
5132
5132
  }
5133
5133
  var CrossReference = _core.Node.create({
5134
5134
  name: NAME,
5135
- priority: _chunkW7L4HUT2cjs.STRUCTURE_PRIORITY - 5,
5135
+ priority: _chunkCJ6TBL2Ncjs.STRUCTURE_PRIORITY - 5,
5136
5136
  group: "inline",
5137
5137
  inline: true,
5138
5138
  atom: true,
@@ -5234,7 +5234,7 @@ var CrossReference = _core.Node.create({
5234
5234
  if (dispatch) {
5235
5235
  tr.setSelection(_state.TextSelection.create(tr.doc, range.from, range.to));
5236
5236
  tr.scrollIntoView();
5237
- _chunkW7L4HUT2cjs.scrollDomAtPos.call(void 0, view, range.blockPos);
5237
+ _chunkCJ6TBL2Ncjs.scrollDomAtPos.call(void 0, view, range.blockPos);
5238
5238
  }
5239
5239
  return true;
5240
5240
  }
@@ -5246,7 +5246,7 @@ var CrossReference = _core.Node.create({
5246
5246
  return [
5247
5247
  new (0, _state.Plugin)({
5248
5248
  key: crossReferencePluginKey,
5249
- state: _chunkW7L4HUT2cjs.presenceStateSpec.call(void 0, [NAME]),
5249
+ state: _chunkCJ6TBL2Ncjs.presenceStateSpec.call(void 0, [NAME]),
5250
5250
  appendTransaction: (transactions, _oldState, newState) => {
5251
5251
  if (!transactions.some((tr) => tr.docChanged)) return null;
5252
5252
  if (!crossReferencePluginKey.getState(newState)) return null;
@@ -5265,7 +5265,7 @@ var CrossReference = _core.Node.create({
5265
5265
  },
5266
5266
  onBeforeCreate() {
5267
5267
  const { headingTypes } = this.options;
5268
- _chunkW7L4HUT2cjs.syncInitialContent.call(void 0, this.editor, (state) => syncCrossReferences(state, headingTypes));
5268
+ _chunkCJ6TBL2Ncjs.syncInitialContent.call(void 0, this.editor, (state) => syncCrossReferences(state, headingTypes));
5269
5269
  }
5270
5270
  });
5271
5271
 
@@ -5520,7 +5520,7 @@ var FindReplace = _core.Extension.create({
5520
5520
  if (!s || !s.active || s.currentIndex < 0 || !s.matches[s.currentIndex]) return false;
5521
5521
  if (dispatch) {
5522
5522
  _history.closeHistory.call(void 0, tr);
5523
- const [end] = _chunkW7L4HUT2cjs.applyReplacements.call(void 0, tr, [s.matches[s.currentIndex]]);
5523
+ const [end] = _chunkCJ6TBL2Ncjs.applyReplacements.call(void 0, tr, [s.matches[s.currentIndex]]);
5524
5524
  tr.setSelection(_state.TextSelection.create(tr.doc, end)).scrollIntoView();
5525
5525
  meta(tr, { type: "replaced", anchor: end, count: 1 });
5526
5526
  }
@@ -5531,7 +5531,7 @@ var FindReplace = _core.Extension.create({
5531
5531
  if (!s || !s.active || !s.matches.length) return false;
5532
5532
  if (dispatch) {
5533
5533
  _history.closeHistory.call(void 0, tr);
5534
- const ends = _chunkW7L4HUT2cjs.applyReplacements.call(void 0, tr, s.matches);
5534
+ const ends = _chunkCJ6TBL2Ncjs.applyReplacements.call(void 0, tr, s.matches);
5535
5535
  meta(tr, { type: "replaced", anchor: ends[ends.length - 1], count: s.matches.length });
5536
5536
  }
5537
5537
  return true;
@@ -5563,7 +5563,7 @@ var FindReplace = _core.Extension.create({
5563
5563
  if (!s.active || !s.query) {
5564
5564
  return { ...s, matches: [], currentIndex: -1, error: null, truncated: false };
5565
5565
  }
5566
- const result = _chunkW7L4HUT2cjs.searchDocument.call(void 0, doc, s.query, s.options, {
5566
+ const result = _chunkCJ6TBL2Ncjs.searchDocument.call(void 0, doc, s.query, s.options, {
5567
5567
  replacement: s.replacement,
5568
5568
  clipboardText: safeClipboard(options.getClipboardText),
5569
5569
  timeLimitMs: options.timeLimitMs,
@@ -6150,7 +6150,7 @@ function createRichTextPreset(options = {}) {
6150
6150
  })
6151
6151
  ];
6152
6152
  if (options.table !== false) {
6153
- extensions2.push(..._chunkW7L4HUT2cjs.createTableExtensions.call(void 0, optionObject(options.table)));
6153
+ extensions2.push(..._chunkCJ6TBL2Ncjs.createTableExtensions.call(void 0, optionObject(options.table)));
6154
6154
  }
6155
6155
  if (characterLimit) {
6156
6156
  extensions2.push(
@@ -6207,7 +6207,7 @@ function createRichTextPreset(options = {}) {
6207
6207
  }
6208
6208
  if (options.comments) {
6209
6209
  extensions2.push(
6210
- typeof options.comments === "object" ? _chunkW7L4HUT2cjs.Comments.configure(options.comments) : _chunkW7L4HUT2cjs.Comments
6210
+ typeof options.comments === "object" ? _chunkCJ6TBL2Ncjs.Comments.configure(options.comments) : _chunkCJ6TBL2Ncjs.Comments
6211
6211
  );
6212
6212
  }
6213
6213
  if (options.trackChanges) {
@@ -6257,8 +6257,8 @@ function createRichTextPreset(options = {}) {
6257
6257
  }
6258
6258
  if (options.chart) {
6259
6259
  const { sparkline = true, ...chartOptions } = optionObject(options.chart);
6260
- extensions2.push(_chunkW7L4HUT2cjs.Chart.configure(chartOptions));
6261
- if (sparkline) extensions2.push(_chunkW7L4HUT2cjs.Sparkline.configure(optionObject(sparkline)));
6260
+ extensions2.push(_chunkCJ6TBL2Ncjs.Chart.configure(chartOptions));
6261
+ if (sparkline) extensions2.push(_chunkCJ6TBL2Ncjs.Sparkline.configure(optionObject(sparkline)));
6262
6262
  }
6263
6263
  if (options.paragraphStyles) {
6264
6264
  extensions2.push(ParagraphStyles.configure(optionObject(options.paragraphStyles)));
@@ -6399,7 +6399,7 @@ function createFindReplaceCommands(editor, options = {}) {
6399
6399
  ];
6400
6400
  }
6401
6401
  function validateFindPattern(query, options = {}) {
6402
- const result = _chunkW7L4HUT2cjs.compileFindPattern.call(void 0, query, options);
6402
+ const result = _chunkCJ6TBL2Ncjs.compileFindPattern.call(void 0, query, options);
6403
6403
  return result.ok ? null : result.error;
6404
6404
  }
6405
6405
 
@@ -6408,8 +6408,8 @@ var PARAMS = {
6408
6408
  insertTable: {
6409
6409
  type: "object",
6410
6410
  properties: {
6411
- rows: { type: "integer", minimum: 1, maximum: _chunkW7L4HUT2cjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
6412
- cols: { type: "integer", minimum: 1, maximum: _chunkW7L4HUT2cjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
6411
+ rows: { type: "integer", minimum: 1, maximum: _chunkCJ6TBL2Ncjs.MAX_TABLE_ROWS, description: "Rows (default 3)." },
6412
+ cols: { type: "integer", minimum: 1, maximum: _chunkCJ6TBL2Ncjs.MAX_TABLE_COLUMNS, description: "Columns (default 3)." },
6413
6413
  withHeaderRow: { type: "boolean", description: "Make the first row a header row (default true)." }
6414
6414
  },
6415
6415
  additionalProperties: false
@@ -6440,7 +6440,7 @@ function createTableCommands(editor, options = {}) {
6440
6440
  const group = _nullishCoalesce(options.group, () => ( "Table"));
6441
6441
  const scope = options.scope ? { scope: options.scope } : {};
6442
6442
  const focus = _nullishCoalesce(options.focus, () => ( true));
6443
- return _chunkW7L4HUT2cjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
6443
+ return _chunkCJ6TBL2Ncjs.TABLE_ACTIONS.map(({ action, label, description, keywords }) => {
6444
6444
  const params = PARAMS[action];
6445
6445
  return {
6446
6446
  id: `${prefix}${action}`,
@@ -6450,13 +6450,13 @@ function createTableCommands(editor, options = {}) {
6450
6450
  description,
6451
6451
  ...params ? { params } : {},
6452
6452
  ...scope,
6453
- enabled: (_ctx, p) => _chunkW7L4HUT2cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
6453
+ enabled: (_ctx, p) => _chunkCJ6TBL2Ncjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {}))),
6454
6454
  run: (_ctx, p) => {
6455
- if (!_chunkW7L4HUT2cjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
6456
- const reason = _chunkW7L4HUT2cjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
6455
+ if (!_chunkCJ6TBL2Ncjs.runTableAction.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})), { focus })) {
6456
+ const reason = _chunkCJ6TBL2Ncjs.getTableActionState.call(void 0, editor, action, _nullishCoalesce(p, () => ( {})));
6457
6457
  throw new Error(reason === true ? `${label} did not change the document.` : reason);
6458
6458
  }
6459
- const state = _chunkW7L4HUT2cjs.getTableState.call(void 0, editor);
6459
+ const state = _chunkCJ6TBL2Ncjs.getTableState.call(void 0, editor);
6460
6460
  return {
6461
6461
  done: true,
6462
6462
  table: state.inTable ? { rows: state.rows, columns: state.columns, row: state.row, column: state.column } : null