@harbour-enterprises/superdoc 0.14.12 → 0.14.13

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 (35) hide show
  1. package/dist/chunks/{super-editor.es-Ch4tw0qj.es.js → super-editor.es-D971SpTa.es.js} +320 -74
  2. package/dist/chunks/{super-editor.es-iwelrKFm.cjs → super-editor.es-Dd2aio_k.cjs} +320 -74
  3. package/dist/super-editor/ai-writer.es.js +2 -2
  4. package/dist/super-editor/chunks/{converter-7qTE5kAM.js → converter-C5f6eTMy.js} +2 -2
  5. package/dist/super-editor/chunks/{docx-zipper-DQH6gZwK.js → docx-zipper-DucuzM0s.js} +1 -1
  6. package/dist/super-editor/chunks/{editor-D6ECTcoN.js → editor-DHiDsdyh.js} +99 -14
  7. package/dist/super-editor/chunks/{toolbar-B4qfai6i.js → toolbar-4KoAQ2zZ.js} +38 -6
  8. package/dist/super-editor/components/toolbar/defaultItems.d.ts.map +1 -1
  9. package/dist/super-editor/components/toolbar/toolbarIcons.d.ts +12 -0
  10. package/dist/super-editor/components/toolbar/toolbarTexts.d.ts +11 -1
  11. package/dist/super-editor/converter.es.js +1 -1
  12. package/dist/super-editor/core/Editor.d.ts.map +1 -1
  13. package/dist/super-editor/core/commands/index.d.ts +1 -0
  14. package/dist/super-editor/core/commands/restoreSelection.d.ts +6 -0
  15. package/dist/super-editor/core/commands/restoreSelection.d.ts.map +1 -0
  16. package/dist/super-editor/core/helpers/findWordBounds.d.ts.map +1 -1
  17. package/dist/super-editor/docx-zipper.es.js +2 -2
  18. package/dist/super-editor/editor.es.js +3 -3
  19. package/dist/super-editor/extensions/custom-selection/custom-selection.d.ts +4 -0
  20. package/dist/super-editor/extensions/custom-selection/custom-selection.d.ts.map +1 -0
  21. package/dist/super-editor/extensions/custom-selection/index.d.ts +2 -0
  22. package/dist/super-editor/extensions/custom-selection/index.d.ts.map +1 -0
  23. package/dist/super-editor/extensions/index.d.ts +2 -1
  24. package/dist/super-editor/extensions/index.d.ts.map +1 -1
  25. package/dist/super-editor/file-zipper.es.js +1 -1
  26. package/dist/super-editor/super-editor.css +54 -48
  27. package/dist/super-editor/super-editor.es.js +198 -63
  28. package/dist/super-editor/toolbar.es.js +2 -2
  29. package/dist/super-editor.cjs +1 -1
  30. package/dist/super-editor.es.js +1 -1
  31. package/dist/superdoc.cjs +2 -2
  32. package/dist/superdoc.es.js +3 -3
  33. package/dist/superdoc.umd.js +321 -75
  34. package/dist/superdoc.umd.js.map +1 -1
  35. package/package.json +1 -1
@@ -28331,7 +28331,7 @@ const _SuperConverter = class _SuperConverter2 {
28331
28331
  return;
28332
28332
  }
28333
28333
  }
28334
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.12") {
28334
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.13") {
28335
28335
  const customLocation = "docProps/custom.xml";
28336
28336
  if (!docx[customLocation]) {
28337
28337
  docx[customLocation] = generateCustomXml();
@@ -28809,7 +28809,7 @@ function storeSuperdocVersion(docx) {
28809
28809
  function generateCustomXml() {
28810
28810
  return DEFAULT_CUSTOM_XML;
28811
28811
  }
28812
- function generateSuperdocVersion(pid = 2, version2 = "0.14.12") {
28812
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.13") {
28813
28813
  return {
28814
28814
  type: "element",
28815
28815
  name: "property",
@@ -33948,6 +33948,14 @@ const increaseListIndent = () => ({ editor, tr }) => {
33948
33948
  });
33949
33949
  return true;
33950
33950
  };
33951
+ const restoreSelection = () => ({ editor, state: state2, tr }) => {
33952
+ if (editor.options.lastSelection) {
33953
+ const selectionTr = tr.setSelection(
33954
+ TextSelection$1.create(state2.doc, editor.options.lastSelection.from, editor.options.lastSelection.to)
33955
+ );
33956
+ editor.view.dispatch(selectionTr);
33957
+ }
33958
+ };
33951
33959
  const commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33952
33960
  __proto__: null,
33953
33961
  clearNodes,
@@ -33974,6 +33982,7 @@ const commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
33974
33982
  liftListItem,
33975
33983
  newlineInCode,
33976
33984
  resetAttributes,
33985
+ restoreSelection,
33977
33986
  selectAll,
33978
33987
  selectNodeBackward,
33979
33988
  selectNodeForward,
@@ -43708,14 +43717,41 @@ function useHighContrastMode() {
43708
43717
  const findWordBounds = (doc2, pos) => {
43709
43718
  const $pos = doc2.resolve(pos);
43710
43719
  const parent = $pos.parent;
43711
- const offset2 = $pos.parentOffset;
43712
- const text = parent.textContent;
43713
- if (!text) return { from: pos, to: pos };
43714
- let start2 = offset2, end2 = offset2;
43715
- while (start2 > 0 && /\w/.test(text[start2 - 1])) start2--;
43716
- while (end2 < text.length && /\w/.test(text[end2])) end2++;
43717
- const from2 = $pos.start() + start2;
43718
- const to = $pos.start() + end2;
43720
+ const offsetInParent = $pos.parentOffset;
43721
+ let offset2 = 0;
43722
+ let targetNode = null;
43723
+ let nodeStart = 0;
43724
+ parent.forEach((child, childOffset) => {
43725
+ if (child.isText) {
43726
+ const start2 = offset2;
43727
+ const end2 = offset2 + child.nodeSize;
43728
+ if (start2 <= offsetInParent && offsetInParent <= end2) {
43729
+ targetNode = child;
43730
+ nodeStart = childOffset;
43731
+ }
43732
+ offset2 = end2;
43733
+ } else {
43734
+ offset2 += child.nodeSize;
43735
+ }
43736
+ });
43737
+ if (!targetNode) return;
43738
+ const text = targetNode.text;
43739
+ const cursorOffset = offsetInParent - nodeStart;
43740
+ const isWordChar = (ch) => /\w/.test(ch);
43741
+ const isPunctOrSpace = (ch) => /[.,;:!-?=()[\]{}"'\s]/.test(ch);
43742
+ let from2, to;
43743
+ if (isPunctOrSpace(text[cursorOffset])) {
43744
+ from2 = $pos.start() + nodeStart + cursorOffset;
43745
+ to = from2 + 1;
43746
+ } else {
43747
+ let start2 = cursorOffset;
43748
+ while (start2 > 0 && isWordChar(text[start2 - 1])) start2--;
43749
+ let end2 = cursorOffset;
43750
+ while (end2 < text.length && isWordChar(text[end2])) end2++;
43751
+ if (start2 === end2) return;
43752
+ from2 = $pos.start() + nodeStart + start2;
43753
+ to = $pos.start() + nodeStart + end2;
43754
+ }
43719
43755
  return { from: from2, to };
43720
43756
  };
43721
43757
  const setWordSelection = (view, pos) => {
@@ -44880,7 +44916,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
44880
44916
  * @returns {Object | void} Migration results
44881
44917
  */
44882
44918
  processCollaborationMigrations() {
44883
- console.debug("[checkVersionMigrations] Current editor version", "0.14.12");
44919
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.13");
44884
44920
  if (!this.options.ydoc) return;
44885
44921
  const metaMap = this.options.ydoc.getMap("meta");
44886
44922
  let docVersion = metaMap.get("version");
@@ -45383,6 +45419,9 @@ dispatchTransaction_fn = function(transaction) {
45383
45419
  });
45384
45420
  };
45385
45421
  handleNodeSelection_fn = function(view, pos) {
45422
+ this.setOptions({
45423
+ lastSelection: null
45424
+ });
45386
45425
  if (this.options.isHeaderOrFooter) {
45387
45426
  return setImageNodeSelection(view, pos);
45388
45427
  }
@@ -50338,7 +50377,7 @@ const Table = Node$1.create({
50338
50377
  },
50339
50378
  resizable: true,
50340
50379
  handleWidth: 5,
50341
- cellMinWidth: 25,
50380
+ cellMinWidth: 10,
50342
50381
  lastColumnResizable: true,
50343
50382
  allowTableNodeSelection: false
50344
50383
  };
@@ -59438,6 +59477,50 @@ const NodeResizer = Extension.create({
59438
59477
  return [nodeResizer(["image"], this.editor)];
59439
59478
  }
59440
59479
  });
59480
+ const CustomSelectionPluginKey = new PluginKey("CustomSelection");
59481
+ const CustomSelection = Extension.create({
59482
+ name: "customSelection",
59483
+ addPmPlugins() {
59484
+ const customSelectionPlugin = new Plugin({
59485
+ key: CustomSelectionPluginKey,
59486
+ state: {
59487
+ init(_, { doc: doc2 }) {
59488
+ return DecorationSet.empty;
59489
+ },
59490
+ apply(tr, oldDecorationSet, oldState, newState) {
59491
+ const sel = tr.selection;
59492
+ let newDecos = [];
59493
+ if (sel.from !== sel.to && tr.doc.resolve(sel.from).parent.isTextblock) {
59494
+ newDecos.push(
59495
+ Decoration.inline(sel.from, sel.to, {
59496
+ class: "sd-custom-selection"
59497
+ })
59498
+ );
59499
+ }
59500
+ return DecorationSet.create(newState.doc, newDecos);
59501
+ }
59502
+ },
59503
+ props: {
59504
+ handleDOMEvents: {
59505
+ focusout: (view, event) => {
59506
+ if (document.activeElement && !event.relatedTarget) {
59507
+ this.editor.setOptions({
59508
+ lastSelection: view.state.selection
59509
+ });
59510
+ const clearSelectionTr = view.state.tr.setSelection(TextSelection$1.create(view.state.doc, 0));
59511
+ view.dispatch(clearSelectionTr);
59512
+ }
59513
+ return false;
59514
+ }
59515
+ },
59516
+ decorations(state2) {
59517
+ return CustomSelectionPluginKey.getState(state2);
59518
+ }
59519
+ }
59520
+ });
59521
+ return [customSelectionPlugin];
59522
+ }
59523
+ });
59441
59524
  const getRichTextExtensions = () => {
59442
59525
  return [
59443
59526
  Bold,
@@ -59476,7 +59559,8 @@ const getRichTextExtensions = () => {
59476
59559
  TrackFormat,
59477
59560
  AiPlugin,
59478
59561
  Image,
59479
- NodeResizer
59562
+ NodeResizer,
59563
+ CustomSelection
59480
59564
  ];
59481
59565
  };
59482
59566
  const getStarterExtensions = () => {
@@ -59542,7 +59626,8 @@ const getStarterExtensions = () => {
59542
59626
  ContentBlock,
59543
59627
  Search,
59544
59628
  StructuredContent,
59545
- NodeResizer
59629
+ NodeResizer,
59630
+ CustomSelection
59546
59631
  ];
59547
59632
  };
59548
59633
  const sanitizeNumber = (value, defaultNumber) => {
@@ -59626,6 +59711,13 @@ const paintbrushSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576
59626
59711
  const highlighterIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M315 315l158.4-215L444.1 70.6 229 229 315 315zm-187 5s0 0 0 0l0-71.7c0-15.3 7.2-29.6 19.5-38.6L420.6 8.4C428 2.9 437 0 446.2 0c11.4 0 22.4 4.5 30.5 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5c0 9.2-2.9 18.2-8.4 25.6L334.4 396.5c-9 12.3-23.4 19.5-38.6 19.5L224 416l-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L128 320zM7 466.3l63-63 70.6 70.6-31 31c-4.5 4.5-10.6 7-17 7L24 512c-13.3 0-24-10.7-24-24l0-4.7c0-6.4 2.5-12.5 7-17z"/></svg>\n';
59627
59712
  const magicWandIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M224 96l16-32 32-16-32-16-16-32-16 32-32 16 32 16 16 32zM80 160l26.7-53.3L160 80l-53.3-26.7L80 0 53.3 53.3 0 80l53.3 26.7L80 160zm352 128l-26.7 53.3L352 368l53.3 26.7L432 448l26.7-53.3L512 368l-53.3-26.7L432 288zm70.6-193.8L417.8 9.4C411.5 3.1 403.3 0 395.2 0c-8.2 0-16.4 3.1-22.6 9.4L9.4 372.5c-12.5 12.5-12.5 32.8 0 45.3l84.9 84.9c6.3 6.3 14.4 9.4 22.6 9.4 8.2 0 16.4-3.1 22.6-9.4l363.1-363.2c12.5-12.5 12.5-32.8 0-45.2zM359.5 203.5l-50.9-50.9 86.6-86.6 50.9 50.9-86.6 86.6z"/></svg>';
59628
59713
  const tableIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M64 256l0-96 160 0 0 96L64 256zm0 64l160 0 0 96L64 416l0-96zm224 96l0-96 160 0 0 96-160 0zM448 256l-160 0 0-96 160 0 0 96zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32z"/></svg>';
59714
+ const tableColumnsIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm64 64l0 256 160 0 0-256L64 160zm384 0l-160 0 0 256 160 0 0-256z"/></svg>';
59715
+ const arrowsLeftRightIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M406.6 374.6l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224l-293.5 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288l293.5 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/></svg>';
59716
+ const arrowsToDotIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 0c17.7 0 32 14.3 32 32l0 32 32 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-64 64c-12.5 12.5-32.8 12.5-45.3 0l-64-64c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l32 0 0-32c0-17.7 14.3-32 32-32zM169.4 393.4l64-64c12.5-12.5 32.8-12.5 45.3 0l64 64c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9zM32 224l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c12.5 12.5 12.5 32.8 0 45.3l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm297.4 54.6c-12.5-12.5-12.5-32.8 0-45.3l64-64c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 32 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-64-64zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>';
59717
+ const plusIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"/></svg>';
59718
+ const trashIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"/></svg>';
59719
+ const wrenchIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>';
59720
+ const borderNoneIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M32 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm96-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM320 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-320a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-448a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm192 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 320a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64z"/></svg>';
59629
59721
  const upDownIconSvg = '<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" viewBox="3 4 18 16"><path stroke="#000000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 10V5m0 0L4 7m2-2 2 2m-2 7v5m0 0 2-2m-2 2-2-2m8-10h8m0 5h-8m0 5h8"></path></svg>\n';
59630
59722
  const magnifyingGlassSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>\n';
59631
59723
  const scissorsIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M278.1 256L444.5 89.6c4.7-4.7 4.7-12.3 0-17-32.8-32.8-86-32.8-118.8 0L210.2 188.1l-24.9-24.9c4.3-10.9 6.7-22.8 6.7-35.3 0-53-43-96-96-96S0 75 0 128s43 96 96 96c4.5 0 9-.3 13.4-.9L142.3 256l-32.9 32.9c-4.4-.6-8.8-.9-13.4-.9-53 0-96 43-96 96s43 96 96 96 96-43 96-96c0-12.5-2.4-24.3-6.7-35.3l24.9-24.9L325.7 439.4c32.8 32.8 86 32.8 118.8 0 4.7-4.7 4.7-12.3 0-17L278.1 256zM96 160c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32zm0 256c-17.6 0-32-14.4-32-32s14.4-32 32-32 32 14.4 32 32-14.4 32-32 32z"/></svg>';
@@ -59674,6 +59766,18 @@ const toolbarIcons = {
59674
59766
  highlight: highlighterIcon,
59675
59767
  ai: magicWandIcon,
59676
59768
  table: tableIconSvg,
59769
+ tableActions: tableColumnsIconSvg,
59770
+ splitCell: arrowsLeftRightIconSvg,
59771
+ mergeCells: arrowsToDotIconSvg,
59772
+ addRowBefore: plusIconSvg,
59773
+ addRowAfter: plusIconSvg,
59774
+ addColumnBefore: plusIconSvg,
59775
+ addColumnAfter: plusIconSvg,
59776
+ deleteRow: trashIconSvg,
59777
+ deleteColumn: trashIconSvg,
59778
+ deleteTable: trashIconSvg,
59779
+ deleteBorders: borderNoneIconSvg,
59780
+ fixTables: wrenchIconSvg,
59677
59781
  lineHeight: upDownIconSvg,
59678
59782
  search: magnifyingGlassSvg,
59679
59783
  cut: scissorsIconSvg,
@@ -69359,6 +69463,7 @@ const _sfc_main$1$1 = {
69359
69463
  const isSeparator = (item) => item.type === "separator";
69360
69464
  const isOverflow = (item) => item.type === "overflow";
69361
69465
  const handleToolbarButtonClick = (item, argument = null) => {
69466
+ emit("item-clicked");
69362
69467
  currentItem.value = item;
69363
69468
  currentItem.value.expand = !currentItem.value.expand;
69364
69469
  if (item.disabled.value) return;
@@ -69575,7 +69680,7 @@ const _sfc_main$1$1 = {
69575
69680
  };
69576
69681
  }
69577
69682
  };
69578
- const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-78efc297"]]);
69683
+ const ButtonGroup = /* @__PURE__ */ _export_sfc(_sfc_main$1$1, [["__scopeId", "data-v-4ccab1c9"]]);
69579
69684
  const _sfc_main$g = {
69580
69685
  __name: "Toolbar",
69581
69686
  emits: ["command", "toggle", "select"],
@@ -69617,6 +69722,9 @@ const _sfc_main$g = {
69617
69722
  const handleCommand = ({ item, argument, option }) => {
69618
69723
  proxy.$toolbar.emitCommand({ item, argument, option });
69619
69724
  };
69725
+ const restoreSelection2 = () => {
69726
+ proxy.$toolbar.activeEditor?.commands?.restoreSelection();
69727
+ };
69620
69728
  return (_ctx, _cache) => {
69621
69729
  return openBlock(), createElementBlock("div", {
69622
69730
  class: "superdoc-toolbar",
@@ -69630,6 +69738,7 @@ const _sfc_main$g = {
69630
69738
  "toolbar-items": getFilteredItems("left"),
69631
69739
  position: "left",
69632
69740
  onCommand: handleCommand,
69741
+ onItemClicked: restoreSelection2,
69633
69742
  class: "superdoc-toolbar-group-side"
69634
69743
  }, null, 8, ["toolbar-items"])) : createCommentVNode("", true),
69635
69744
  createVNode(ButtonGroup, {
@@ -69637,7 +69746,8 @@ const _sfc_main$g = {
69637
69746
  "toolbar-items": getFilteredItems("center"),
69638
69747
  "overflow-items": unref(proxy).$toolbar.overflowItems,
69639
69748
  position: "center",
69640
- onCommand: handleCommand
69749
+ onCommand: handleCommand,
69750
+ onItemClicked: restoreSelection2
69641
69751
  }, null, 8, ["toolbar-items", "overflow-items"]),
69642
69752
  unref(showRightSide) ? (openBlock(), createBlock(ButtonGroup, {
69643
69753
  key: 1,
@@ -69645,13 +69755,14 @@ const _sfc_main$g = {
69645
69755
  "toolbar-items": getFilteredItems("right"),
69646
69756
  position: "right",
69647
69757
  onCommand: handleCommand,
69758
+ onItemClicked: restoreSelection2,
69648
69759
  class: "superdoc-toolbar-group-side"
69649
69760
  }, null, 8, ["toolbar-items"])) : createCommentVNode("", true)
69650
69761
  ]);
69651
69762
  };
69652
69763
  }
69653
69764
  };
69654
- const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-8ce1122d"]]);
69765
+ const Toolbar = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-f119b310"]]);
69655
69766
  const DEFAULT_API_ENDPOINT = "https://sd-dev-express-gateway-i6xtm.ondigitalocean.app/insights";
69656
69767
  const SYSTEM_PROMPT = "You are an expert copywriter and you are immersed in a document editor. You are to provide document related text responses based on the user prompts. Only write what is asked for. Do not provide explanations. Try to keep placeholders as short as possible. Do not output your prompt. Your instructions are: ";
69657
69768
  async function baseInsightsFetch(payload, options = {}) {
@@ -71420,6 +71531,48 @@ const _sfc_main$8 = {
71420
71531
  }
71421
71532
  };
71422
71533
  const TableGrid = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-92e8d5fb"]]);
71534
+ const _hoisted_1$5 = { class: "toolbar-table-actions" };
71535
+ const _hoisted_2$3 = ["onClick", "data-item", "ariaLabel"];
71536
+ const _hoisted_3$3 = { class: "toolbar-table-actions__icon" };
71537
+ const _hoisted_4$1 = ["innerHTML"];
71538
+ const _hoisted_5 = { class: "toolbar-table-actions__label" };
71539
+ const _sfc_main$7 = {
71540
+ __name: "TableActions",
71541
+ props: {
71542
+ options: {
71543
+ type: Array
71544
+ }
71545
+ },
71546
+ emits: ["select"],
71547
+ setup(__props, { emit: __emit }) {
71548
+ const emit = __emit;
71549
+ const handleClick2 = (item) => {
71550
+ emit("select", { command: item.command });
71551
+ };
71552
+ return (_ctx, _cache) => {
71553
+ return openBlock(), createElementBlock("div", _hoisted_1$5, [
71554
+ (openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.options, (option) => {
71555
+ return openBlock(), createElementBlock("div", {
71556
+ class: normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": option.bottomBorder }]),
71557
+ onClick: ($event) => handleClick2(option),
71558
+ "data-item": option.props?.["data-item"] || "",
71559
+ ariaLabel: option.props?.ariaLabel,
71560
+ role: "menuitem"
71561
+ }, [
71562
+ createBaseVNode("div", _hoisted_3$3, [
71563
+ createBaseVNode("div", {
71564
+ class: "toolbar-table-actions__icon-wrapper",
71565
+ innerHTML: option.icon
71566
+ }, null, 8, _hoisted_4$1)
71567
+ ]),
71568
+ createBaseVNode("div", _hoisted_5, toDisplayString(option.label), 1)
71569
+ ], 10, _hoisted_2$3);
71570
+ }), 256))
71571
+ ]);
71572
+ };
71573
+ }
71574
+ };
71575
+ const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-990b9a25"]]);
71423
71576
  function getScrollableParent(element) {
71424
71577
  let currentElement = element;
71425
71578
  while (currentElement) {
@@ -71443,10 +71596,10 @@ function scrollToElement(targetElement, options = { behavior: "smooth", block: "
71443
71596
  });
71444
71597
  }
71445
71598
  const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z"/></svg>\n';
71446
- const _hoisted_1$5 = { class: "search-input-ctn" };
71447
- const _hoisted_2$3 = { class: "row" };
71448
- const _hoisted_3$3 = ["onKeydown"];
71449
- const _sfc_main$7 = {
71599
+ const _hoisted_1$4 = { class: "search-input-ctn" };
71600
+ const _hoisted_2$2 = { class: "row" };
71601
+ const _hoisted_3$2 = ["onKeydown"];
71602
+ const _sfc_main$6 = {
71450
71603
  __name: "SearchInput",
71451
71604
  props: {
71452
71605
  searchRef: {
@@ -71461,8 +71614,8 @@ const _sfc_main$7 = {
71461
71614
  emit("submit", { value: searchValue.value });
71462
71615
  };
71463
71616
  return (_ctx, _cache) => {
71464
- return openBlock(), createElementBlock("div", _hoisted_1$5, [
71465
- createBaseVNode("div", _hoisted_2$3, [
71617
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [
71618
+ createBaseVNode("div", _hoisted_2$2, [
71466
71619
  withDirectives(createBaseVNode("input", {
71467
71620
  ref: __props.searchRef,
71468
71621
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
@@ -71471,7 +71624,7 @@ const _sfc_main$7 = {
71471
71624
  name: "search",
71472
71625
  placeholder: "Type search string",
71473
71626
  onKeydown: withKeys(withModifiers(handleSubmit, ["stop", "prevent"]), ["enter"])
71474
- }, null, 40, _hoisted_3$3), [
71627
+ }, null, 40, _hoisted_3$2), [
71475
71628
  [vModelText, searchValue.value]
71476
71629
  ])
71477
71630
  ]),
@@ -71485,7 +71638,7 @@ const _sfc_main$7 = {
71485
71638
  };
71486
71639
  }
71487
71640
  };
71488
- const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-957cbcf2"]]);
71641
+ const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-957cbcf2"]]);
71489
71642
  const TOOLBAR_FONTS = [
71490
71643
  {
71491
71644
  label: "Georgia",
@@ -71863,6 +72016,136 @@ const makeDefaultItems = ({
71863
72016
  })
71864
72017
  ]);
71865
72018
  }
72019
+ const tableActionsItem = useToolbarItem({
72020
+ type: "dropdown",
72021
+ name: "tableActions",
72022
+ command: "executeTableCommand",
72023
+ icon: toolbarIcons2.tableActions,
72024
+ hideLabel: true,
72025
+ disabled: true,
72026
+ attributes: {
72027
+ ariaLabel: "Table actions"
72028
+ },
72029
+ options: [
72030
+ {
72031
+ type: "render",
72032
+ render: () => renderTableActions(tableActionsItem)
72033
+ }
72034
+ ]
72035
+ });
72036
+ const tableActionsOptions2 = [
72037
+ {
72038
+ label: toolbarTexts2.addRowBefore,
72039
+ command: "addRowBefore",
72040
+ icon: toolbarIcons2.addRowBefore,
72041
+ props: {
72042
+ "data-item": "btn-tableActions-option",
72043
+ ariaLabel: "Add row before"
72044
+ }
72045
+ },
72046
+ {
72047
+ label: toolbarTexts2.addRowAfter,
72048
+ command: "addRowAfter",
72049
+ icon: toolbarIcons2.addRowAfter,
72050
+ props: {
72051
+ "data-item": "btn-tableActions-option",
72052
+ ariaLabel: "Add row after"
72053
+ }
72054
+ },
72055
+ {
72056
+ label: toolbarTexts2.addColumnBefore,
72057
+ command: "addColumnBefore",
72058
+ icon: toolbarIcons2.addColumnBefore,
72059
+ props: {
72060
+ "data-item": "btn-tableActions-option",
72061
+ ariaLabel: "Add column before"
72062
+ }
72063
+ },
72064
+ {
72065
+ label: toolbarTexts2.addColumnAfter,
72066
+ command: "addColumnAfter",
72067
+ icon: toolbarIcons2.addColumnAfter,
72068
+ bottomBorder: true,
72069
+ props: {
72070
+ "data-item": "btn-tableActions-option",
72071
+ ariaLabel: "Add column after"
72072
+ }
72073
+ },
72074
+ {
72075
+ label: toolbarTexts2.deleteRow,
72076
+ command: "deleteRow",
72077
+ icon: toolbarIcons2.deleteRow,
72078
+ props: {
72079
+ "data-item": "btn-tableActions-option",
72080
+ ariaLabel: "Delete row"
72081
+ }
72082
+ },
72083
+ {
72084
+ label: toolbarTexts2.deleteColumn,
72085
+ command: "deleteColumn",
72086
+ icon: toolbarIcons2.deleteColumn,
72087
+ props: {
72088
+ "data-item": "btn-tableActions-option",
72089
+ ariaLabel: "Delete column"
72090
+ }
72091
+ },
72092
+ {
72093
+ label: toolbarTexts2.deleteTable,
72094
+ command: "deleteTable",
72095
+ icon: toolbarIcons2.deleteTable,
72096
+ props: {
72097
+ "data-item": "btn-tableActions-option",
72098
+ ariaLabel: "Delete table"
72099
+ }
72100
+ },
72101
+ {
72102
+ label: toolbarTexts2.transparentBorders,
72103
+ command: "deleteCellAndTableBorders",
72104
+ icon: toolbarIcons2.deleteBorders,
72105
+ bottomBorder: true,
72106
+ props: {
72107
+ "data-item": "btn-tableActions-option",
72108
+ ariaLabel: "Delete cell and table borders"
72109
+ }
72110
+ },
72111
+ {
72112
+ label: toolbarTexts2.mergeCells,
72113
+ command: "mergeCells",
72114
+ icon: toolbarIcons2.mergeCells,
72115
+ props: {
72116
+ "data-item": "btn-tableActions-option",
72117
+ ariaLabel: "Merge cells"
72118
+ }
72119
+ },
72120
+ {
72121
+ label: toolbarTexts2.splitCell,
72122
+ command: "splitCell",
72123
+ icon: toolbarIcons2.splitCell,
72124
+ props: {
72125
+ "data-item": "btn-tableActions-option",
72126
+ ariaLabel: "Split cells"
72127
+ }
72128
+ },
72129
+ {
72130
+ label: toolbarTexts2.fixTables,
72131
+ command: "fixTables",
72132
+ icon: toolbarIcons2.fixTables,
72133
+ props: {
72134
+ "data-item": "btn-tableActions-option",
72135
+ ariaLabel: "Fix tables"
72136
+ }
72137
+ }
72138
+ ];
72139
+ function renderTableActions(tableActionsItem2) {
72140
+ return h(TableActions, {
72141
+ options: tableActionsOptions2,
72142
+ onSelect: (event) => {
72143
+ closeDropdown(tableActionsItem2);
72144
+ const { command: command2 } = event;
72145
+ superToolbar.emitCommand({ item: tableActionsItem2, argument: { command: command2 } });
72146
+ }
72147
+ });
72148
+ }
71866
72149
  const alignment2 = useToolbarItem({
71867
72150
  type: "dropdown",
71868
72151
  name: "textAlign",
@@ -72346,6 +72629,7 @@ const makeDefaultItems = ({
72346
72629
  link,
72347
72630
  image,
72348
72631
  tableItem,
72632
+ tableActionsItem,
72349
72633
  separator,
72350
72634
  alignment2,
72351
72635
  bulletedList,
@@ -72430,12 +72714,22 @@ const toolbarTexts = {
72430
72714
  italic: "Italic",
72431
72715
  underline: "Underline",
72432
72716
  highlight: "Highlight color",
72433
- strikethrough: "Strikethrough",
72434
72717
  color: "Text color",
72435
72718
  search: "Search",
72436
72719
  link: "Link",
72437
72720
  image: "Image",
72438
72721
  table: "Insert table",
72722
+ addRowBefore: "Insert row above",
72723
+ addRowAfter: "Insert row below",
72724
+ addColumnBefore: "Insert column left",
72725
+ addColumnAfter: "Insert column right",
72726
+ deleteRow: "Delete row",
72727
+ deleteColumn: "Delete column",
72728
+ deleteTable: "Delete table",
72729
+ transparentBorders: "Transparent borders",
72730
+ mergeCells: "Merge cells",
72731
+ splitCell: "Split cell",
72732
+ fixTables: "Fix tables",
72439
72733
  textAlign: "Alignment",
72440
72734
  bulletList: "Bullet list",
72441
72735
  numberedList: "Numbered list",
@@ -73051,12 +73345,6 @@ runCommandWithArgumentOnly_fn = function({ item, argument, noArgumentCallback =
73051
73345
  this.updateToolbarState();
73052
73346
  }
73053
73347
  };
73054
- const plusIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 80c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 144L48 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l144 0 0 144c0 17.7 14.3 32 32 32s32-14.3 32-32l0-144 144 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-144 0 0-144z"/></svg>';
73055
- const trashIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M135.2 17.7C140.6 6.8 151.7 0 163.8 0L284.2 0c12.1 0 23.2 6.8 28.6 17.7L320 32l96 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 7.2-14.3zM32 128l384 0 0 320c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-320zm96 64c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16s16-7.2 16-16l0-224c0-8.8-7.2-16-16-16z"/></svg>';
73056
- const wrenchIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M352 320c88.4 0 160-71.6 160-160c0-15.3-2.2-30.1-6.2-44.2c-3.1-10.8-16.4-13.2-24.3-5.3l-76.8 76.8c-3 3-7.1 4.7-11.3 4.7L336 192c-8.8 0-16-7.2-16-16l0-57.4c0-4.2 1.7-8.3 4.7-11.3l76.8-76.8c7.9-7.9 5.4-21.2-5.3-24.3C382.1 2.2 367.3 0 352 0C263.6 0 192 71.6 192 160c0 19.1 3.4 37.5 9.5 54.5L19.9 396.1C7.2 408.8 0 426.1 0 444.1C0 481.6 30.4 512 67.9 512c18 0 35.3-7.2 48-19.9L297.5 310.5c17 6.2 35.4 9.5 54.5 9.5zM80 408a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>';
73057
- const borderNoneIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M32 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm96-64a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM320 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-320a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM224 480a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm0-448a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0 256a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 416a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm0-384a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 96a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM416 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM32 288a32 32 0 1 1 0-64 32 32 0 1 1 0 64zm192 32a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 320a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM416 192a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM32 128a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm192 64a32 32 0 1 1 0-64 32 32 0 1 1 0 64z"/></svg>';
73058
- const arrowsLeftRightIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M406.6 374.6l96-96c12.5-12.5 12.5-32.8 0-45.3l-96-96c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224l-293.5 0 41.4-41.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-96 96c-12.5 12.5-12.5 32.8 0 45.3l96 96c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 288l293.5 0-41.4 41.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0z"/></svg>';
73059
- const arrowsToDotIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M256 0c17.7 0 32 14.3 32 32l0 32 32 0c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-64 64c-12.5 12.5-32.8 12.5-45.3 0l-64-64c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8l32 0 0-32c0-17.7 14.3-32 32-32zM169.4 393.4l64-64c12.5-12.5 32.8-12.5 45.3 0l64 64c9.2 9.2 11.9 22.9 6.9 34.9s-16.6 19.8-29.6 19.8l-32 0 0 32c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-32-32 0c-12.9 0-24.6-7.8-29.6-19.8s-2.2-25.7 6.9-34.9zM32 224l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c12.5 12.5 12.5 32.8 0 45.3l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-17.7 0-32-14.3-32-32s14.3-32 32-32zm297.4 54.6c-12.5-12.5-12.5-32.8 0-45.3l64-64c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6l0 32 32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0 0 32c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-64-64zM256 224a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/></svg>';
73060
73348
  const ICONS = {
73061
73349
  addRowBefore: plusIconSvg,
73062
73350
  addRowAfter: plusIconSvg,
@@ -73386,48 +73674,6 @@ function moveCursorToMouseEvent(event, editor) {
73386
73674
  view.focus();
73387
73675
  }
73388
73676
  }
73389
- const _hoisted_1$4 = { class: "toolbar-table-actions" };
73390
- const _hoisted_2$2 = ["onClick", "data-item", "ariaLabel"];
73391
- const _hoisted_3$2 = { class: "toolbar-table-actions__icon" };
73392
- const _hoisted_4$1 = ["innerHTML"];
73393
- const _hoisted_5 = { class: "toolbar-table-actions__label" };
73394
- const _sfc_main$6 = {
73395
- __name: "TableActions",
73396
- props: {
73397
- options: {
73398
- type: Array
73399
- }
73400
- },
73401
- emits: ["select"],
73402
- setup(__props, { emit: __emit }) {
73403
- const emit = __emit;
73404
- const handleClick2 = (item) => {
73405
- emit("select", { command: item.command });
73406
- };
73407
- return (_ctx, _cache) => {
73408
- return openBlock(), createElementBlock("div", _hoisted_1$4, [
73409
- (openBlock(true), createElementBlock(Fragment$1, null, renderList(__props.options, (option) => {
73410
- return openBlock(), createElementBlock("div", {
73411
- class: normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": option.bottomBorder }]),
73412
- onClick: ($event) => handleClick2(option),
73413
- "data-item": option.props?.["data-item"] || "",
73414
- ariaLabel: option.props?.ariaLabel,
73415
- role: "menuitem"
73416
- }, [
73417
- createBaseVNode("div", _hoisted_3$2, [
73418
- createBaseVNode("div", {
73419
- class: "toolbar-table-actions__icon-wrapper",
73420
- innerHTML: option.icon
73421
- }, null, 8, _hoisted_4$1)
73422
- ]),
73423
- createBaseVNode("div", _hoisted_5, toDisplayString(option.label), 1)
73424
- ], 10, _hoisted_2$2);
73425
- }), 256))
73426
- ]);
73427
- };
73428
- }
73429
- };
73430
- const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-990b9a25"]]);
73431
73677
  const isModuleEnabled = (editorOptions, moduleName) => {
73432
73678
  switch (moduleName) {
73433
73679
  case "ai":