@harbour-enterprises/superdoc 0.14.12-next.2 → 0.14.12-next.4

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.
@@ -28348,7 +28348,7 @@ const _SuperConverter = class _SuperConverter2 {
28348
28348
  return;
28349
28349
  }
28350
28350
  }
28351
- static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.12-next.2") {
28351
+ static updateDocumentVersion(docx = this.convertedXml, version2 = "0.14.12-next.4") {
28352
28352
  const customLocation = "docProps/custom.xml";
28353
28353
  if (!docx[customLocation]) {
28354
28354
  docx[customLocation] = generateCustomXml();
@@ -28826,7 +28826,7 @@ function storeSuperdocVersion(docx) {
28826
28826
  function generateCustomXml() {
28827
28827
  return DEFAULT_CUSTOM_XML;
28828
28828
  }
28829
- function generateSuperdocVersion(pid = 2, version2 = "0.14.12-next.2") {
28829
+ function generateSuperdocVersion(pid = 2, version2 = "0.14.12-next.4") {
28830
28830
  return {
28831
28831
  type: "element",
28832
28832
  name: "property",
@@ -43725,14 +43725,41 @@ function useHighContrastMode() {
43725
43725
  const findWordBounds = (doc2, pos) => {
43726
43726
  const $pos = doc2.resolve(pos);
43727
43727
  const parent = $pos.parent;
43728
- const offset2 = $pos.parentOffset;
43729
- const text = parent.textContent;
43730
- if (!text) return { from: pos, to: pos };
43731
- let start2 = offset2, end2 = offset2;
43732
- while (start2 > 0 && /\w/.test(text[start2 - 1])) start2--;
43733
- while (end2 < text.length && /\w/.test(text[end2])) end2++;
43734
- const from2 = $pos.start() + start2;
43735
- const to = $pos.start() + end2;
43728
+ const offsetInParent = $pos.parentOffset;
43729
+ let offset2 = 0;
43730
+ let targetNode = null;
43731
+ let nodeStart = 0;
43732
+ parent.forEach((child, childOffset) => {
43733
+ if (child.isText) {
43734
+ const start2 = offset2;
43735
+ const end2 = offset2 + child.nodeSize;
43736
+ if (start2 <= offsetInParent && offsetInParent <= end2) {
43737
+ targetNode = child;
43738
+ nodeStart = childOffset;
43739
+ }
43740
+ offset2 = end2;
43741
+ } else {
43742
+ offset2 += child.nodeSize;
43743
+ }
43744
+ });
43745
+ if (!targetNode) return;
43746
+ const text = targetNode.text;
43747
+ const cursorOffset = offsetInParent - nodeStart;
43748
+ const isWordChar = (ch) => /\w/.test(ch);
43749
+ const isPunctOrSpace = (ch) => /[.,;:!-?=()[\]{}"'\s]/.test(ch);
43750
+ let from2, to;
43751
+ if (isPunctOrSpace(text[cursorOffset])) {
43752
+ from2 = $pos.start() + nodeStart + cursorOffset;
43753
+ to = from2 + 1;
43754
+ } else {
43755
+ let start2 = cursorOffset;
43756
+ while (start2 > 0 && isWordChar(text[start2 - 1])) start2--;
43757
+ let end2 = cursorOffset;
43758
+ while (end2 < text.length && isWordChar(text[end2])) end2++;
43759
+ if (start2 === end2) return;
43760
+ from2 = $pos.start() + nodeStart + start2;
43761
+ to = $pos.start() + nodeStart + end2;
43762
+ }
43736
43763
  return { from: from2, to };
43737
43764
  };
43738
43765
  const setWordSelection = (view, pos) => {
@@ -44897,7 +44924,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
44897
44924
  * @returns {Object | void} Migration results
44898
44925
  */
44899
44926
  processCollaborationMigrations() {
44900
- console.debug("[checkVersionMigrations] Current editor version", "0.14.12-next.2");
44927
+ console.debug("[checkVersionMigrations] Current editor version", "0.14.12-next.4");
44901
44928
  if (!this.options.ydoc) return;
44902
44929
  const metaMap = this.options.ydoc.getMap("meta");
44903
44930
  let docVersion = metaMap.get("version");
@@ -59643,6 +59670,13 @@ const paintbrushSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576
59643
59670
  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';
59644
59671
  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>';
59645
59672
  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>';
59673
+ 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>';
59674
+ 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>';
59675
+ 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>';
59676
+ 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>';
59677
+ 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>';
59678
+ 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>';
59679
+ 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>';
59646
59680
  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';
59647
59681
  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';
59648
59682
  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>';
@@ -59691,6 +59725,18 @@ const toolbarIcons = {
59691
59725
  highlight: highlighterIcon,
59692
59726
  ai: magicWandIcon,
59693
59727
  table: tableIconSvg,
59728
+ tableActions: tableColumnsIconSvg,
59729
+ splitCell: arrowsLeftRightIconSvg,
59730
+ mergeCells: arrowsToDotIconSvg,
59731
+ addRowBefore: plusIconSvg,
59732
+ addRowAfter: plusIconSvg,
59733
+ addColumnBefore: plusIconSvg,
59734
+ addColumnAfter: plusIconSvg,
59735
+ deleteRow: trashIconSvg,
59736
+ deleteColumn: trashIconSvg,
59737
+ deleteTable: trashIconSvg,
59738
+ deleteBorders: borderNoneIconSvg,
59739
+ fixTables: wrenchIconSvg,
59694
59740
  lineHeight: upDownIconSvg,
59695
59741
  search: magnifyingGlassSvg,
59696
59742
  cut: scissorsIconSvg,
@@ -71437,6 +71483,48 @@ const _sfc_main$8 = {
71437
71483
  }
71438
71484
  };
71439
71485
  const TableGrid = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-92e8d5fb"]]);
71486
+ const _hoisted_1$5 = { class: "toolbar-table-actions" };
71487
+ const _hoisted_2$3 = ["onClick", "data-item", "ariaLabel"];
71488
+ const _hoisted_3$3 = { class: "toolbar-table-actions__icon" };
71489
+ const _hoisted_4$1 = ["innerHTML"];
71490
+ const _hoisted_5 = { class: "toolbar-table-actions__label" };
71491
+ const _sfc_main$7 = {
71492
+ __name: "TableActions",
71493
+ props: {
71494
+ options: {
71495
+ type: Array
71496
+ }
71497
+ },
71498
+ emits: ["select"],
71499
+ setup(__props, { emit: __emit }) {
71500
+ const emit = __emit;
71501
+ const handleClick2 = (item) => {
71502
+ emit("select", { command: item.command });
71503
+ };
71504
+ return (_ctx, _cache) => {
71505
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
71506
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option) => {
71507
+ return vue.openBlock(), vue.createElementBlock("div", {
71508
+ class: vue.normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": option.bottomBorder }]),
71509
+ onClick: ($event) => handleClick2(option),
71510
+ "data-item": option.props?.["data-item"] || "",
71511
+ ariaLabel: option.props?.ariaLabel,
71512
+ role: "menuitem"
71513
+ }, [
71514
+ vue.createBaseVNode("div", _hoisted_3$3, [
71515
+ vue.createBaseVNode("div", {
71516
+ class: "toolbar-table-actions__icon-wrapper",
71517
+ innerHTML: option.icon
71518
+ }, null, 8, _hoisted_4$1)
71519
+ ]),
71520
+ vue.createBaseVNode("div", _hoisted_5, vue.toDisplayString(option.label), 1)
71521
+ ], 10, _hoisted_2$3);
71522
+ }), 256))
71523
+ ]);
71524
+ };
71525
+ }
71526
+ };
71527
+ const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-990b9a25"]]);
71440
71528
  function getScrollableParent(element) {
71441
71529
  let currentElement = element;
71442
71530
  while (currentElement) {
@@ -71460,10 +71548,10 @@ function scrollToElement(targetElement, options = { behavior: "smooth", block: "
71460
71548
  });
71461
71549
  }
71462
71550
  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';
71463
- const _hoisted_1$5 = { class: "search-input-ctn" };
71464
- const _hoisted_2$3 = { class: "row" };
71465
- const _hoisted_3$3 = ["onKeydown"];
71466
- const _sfc_main$7 = {
71551
+ const _hoisted_1$4 = { class: "search-input-ctn" };
71552
+ const _hoisted_2$2 = { class: "row" };
71553
+ const _hoisted_3$2 = ["onKeydown"];
71554
+ const _sfc_main$6 = {
71467
71555
  __name: "SearchInput",
71468
71556
  props: {
71469
71557
  searchRef: {
@@ -71478,8 +71566,8 @@ const _sfc_main$7 = {
71478
71566
  emit("submit", { value: searchValue.value });
71479
71567
  };
71480
71568
  return (_ctx, _cache) => {
71481
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$5, [
71482
- vue.createBaseVNode("div", _hoisted_2$3, [
71569
+ return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
71570
+ vue.createBaseVNode("div", _hoisted_2$2, [
71483
71571
  vue.withDirectives(vue.createBaseVNode("input", {
71484
71572
  ref: __props.searchRef,
71485
71573
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
@@ -71488,7 +71576,7 @@ const _sfc_main$7 = {
71488
71576
  name: "search",
71489
71577
  placeholder: "Type search string",
71490
71578
  onKeydown: vue.withKeys(vue.withModifiers(handleSubmit, ["stop", "prevent"]), ["enter"])
71491
- }, null, 40, _hoisted_3$3), [
71579
+ }, null, 40, _hoisted_3$2), [
71492
71580
  [vue.vModelText, searchValue.value]
71493
71581
  ])
71494
71582
  ]),
@@ -71502,7 +71590,7 @@ const _sfc_main$7 = {
71502
71590
  };
71503
71591
  }
71504
71592
  };
71505
- const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-957cbcf2"]]);
71593
+ const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-957cbcf2"]]);
71506
71594
  const TOOLBAR_FONTS = [
71507
71595
  {
71508
71596
  label: "Georgia",
@@ -71880,6 +71968,136 @@ const makeDefaultItems = ({
71880
71968
  })
71881
71969
  ]);
71882
71970
  }
71971
+ const tableActionsItem = useToolbarItem({
71972
+ type: "dropdown",
71973
+ name: "tableActions",
71974
+ command: "executeTableCommand",
71975
+ icon: toolbarIcons2.tableActions,
71976
+ hideLabel: true,
71977
+ disabled: true,
71978
+ attributes: {
71979
+ ariaLabel: "Table actions"
71980
+ },
71981
+ options: [
71982
+ {
71983
+ type: "render",
71984
+ render: () => renderTableActions(tableActionsItem)
71985
+ }
71986
+ ]
71987
+ });
71988
+ const tableActionsOptions2 = [
71989
+ {
71990
+ label: toolbarTexts2.addRowBefore,
71991
+ command: "addRowBefore",
71992
+ icon: toolbarIcons2.addRowBefore,
71993
+ props: {
71994
+ "data-item": "btn-tableActions-option",
71995
+ ariaLabel: "Add row before"
71996
+ }
71997
+ },
71998
+ {
71999
+ label: toolbarTexts2.addRowAfter,
72000
+ command: "addRowAfter",
72001
+ icon: toolbarIcons2.addRowAfter,
72002
+ props: {
72003
+ "data-item": "btn-tableActions-option",
72004
+ ariaLabel: "Add row after"
72005
+ }
72006
+ },
72007
+ {
72008
+ label: toolbarTexts2.addColumnBefore,
72009
+ command: "addColumnBefore",
72010
+ icon: toolbarIcons2.addColumnBefore,
72011
+ props: {
72012
+ "data-item": "btn-tableActions-option",
72013
+ ariaLabel: "Add column before"
72014
+ }
72015
+ },
72016
+ {
72017
+ label: toolbarTexts2.addColumnAfter,
72018
+ command: "addColumnAfter",
72019
+ icon: toolbarIcons2.addColumnAfter,
72020
+ bottomBorder: true,
72021
+ props: {
72022
+ "data-item": "btn-tableActions-option",
72023
+ ariaLabel: "Add column after"
72024
+ }
72025
+ },
72026
+ {
72027
+ label: toolbarTexts2.deleteRow,
72028
+ command: "deleteRow",
72029
+ icon: toolbarIcons2.deleteRow,
72030
+ props: {
72031
+ "data-item": "btn-tableActions-option",
72032
+ ariaLabel: "Delete row"
72033
+ }
72034
+ },
72035
+ {
72036
+ label: toolbarTexts2.deleteColumn,
72037
+ command: "deleteColumn",
72038
+ icon: toolbarIcons2.deleteColumn,
72039
+ props: {
72040
+ "data-item": "btn-tableActions-option",
72041
+ ariaLabel: "Delete column"
72042
+ }
72043
+ },
72044
+ {
72045
+ label: toolbarTexts2.deleteTable,
72046
+ command: "deleteTable",
72047
+ icon: toolbarIcons2.deleteTable,
72048
+ props: {
72049
+ "data-item": "btn-tableActions-option",
72050
+ ariaLabel: "Delete table"
72051
+ }
72052
+ },
72053
+ {
72054
+ label: toolbarTexts2.transparentBorders,
72055
+ command: "deleteCellAndTableBorders",
72056
+ icon: toolbarIcons2.deleteBorders,
72057
+ bottomBorder: true,
72058
+ props: {
72059
+ "data-item": "btn-tableActions-option",
72060
+ ariaLabel: "Delete cell and table borders"
72061
+ }
72062
+ },
72063
+ {
72064
+ label: toolbarTexts2.mergeCells,
72065
+ command: "mergeCells",
72066
+ icon: toolbarIcons2.mergeCells,
72067
+ props: {
72068
+ "data-item": "btn-tableActions-option",
72069
+ ariaLabel: "Merge cells"
72070
+ }
72071
+ },
72072
+ {
72073
+ label: toolbarTexts2.splitCell,
72074
+ command: "splitCell",
72075
+ icon: toolbarIcons2.splitCell,
72076
+ props: {
72077
+ "data-item": "btn-tableActions-option",
72078
+ ariaLabel: "Split cells"
72079
+ }
72080
+ },
72081
+ {
72082
+ label: toolbarTexts2.fixTables,
72083
+ command: "fixTables",
72084
+ icon: toolbarIcons2.fixTables,
72085
+ props: {
72086
+ "data-item": "btn-tableActions-option",
72087
+ ariaLabel: "Fix tables"
72088
+ }
72089
+ }
72090
+ ];
72091
+ function renderTableActions(tableActionsItem2) {
72092
+ return vue.h(TableActions, {
72093
+ options: tableActionsOptions2,
72094
+ onSelect: (event) => {
72095
+ closeDropdown(tableActionsItem2);
72096
+ const { command: command2 } = event;
72097
+ superToolbar.emitCommand({ item: tableActionsItem2, argument: { command: command2 } });
72098
+ }
72099
+ });
72100
+ }
71883
72101
  const alignment2 = useToolbarItem({
71884
72102
  type: "dropdown",
71885
72103
  name: "textAlign",
@@ -72363,6 +72581,7 @@ const makeDefaultItems = ({
72363
72581
  link,
72364
72582
  image,
72365
72583
  tableItem,
72584
+ tableActionsItem,
72366
72585
  separator,
72367
72586
  alignment2,
72368
72587
  bulletedList,
@@ -72447,12 +72666,22 @@ const toolbarTexts = {
72447
72666
  italic: "Italic",
72448
72667
  underline: "Underline",
72449
72668
  highlight: "Highlight color",
72450
- strikethrough: "Strikethrough",
72451
72669
  color: "Text color",
72452
72670
  search: "Search",
72453
72671
  link: "Link",
72454
72672
  image: "Image",
72455
72673
  table: "Insert table",
72674
+ addRowBefore: "Insert row above",
72675
+ addRowAfter: "Insert row below",
72676
+ addColumnBefore: "Insert column left",
72677
+ addColumnAfter: "Insert column right",
72678
+ deleteRow: "Delete row",
72679
+ deleteColumn: "Delete column",
72680
+ deleteTable: "Delete table",
72681
+ transparentBorders: "Transparent borders",
72682
+ mergeCells: "Merge cells",
72683
+ splitCell: "Split cell",
72684
+ fixTables: "Fix tables",
72456
72685
  textAlign: "Alignment",
72457
72686
  bulletList: "Bullet list",
72458
72687
  numberedList: "Numbered list",
@@ -73068,12 +73297,6 @@ runCommandWithArgumentOnly_fn = function({ item, argument, noArgumentCallback =
73068
73297
  this.updateToolbarState();
73069
73298
  }
73070
73299
  };
73071
- 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>';
73072
- 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>';
73073
- 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>';
73074
- 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>';
73075
- 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>';
73076
- 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>';
73077
73300
  const ICONS = {
73078
73301
  addRowBefore: plusIconSvg,
73079
73302
  addRowAfter: plusIconSvg,
@@ -73403,48 +73626,6 @@ function moveCursorToMouseEvent(event, editor) {
73403
73626
  view.focus();
73404
73627
  }
73405
73628
  }
73406
- const _hoisted_1$4 = { class: "toolbar-table-actions" };
73407
- const _hoisted_2$2 = ["onClick", "data-item", "ariaLabel"];
73408
- const _hoisted_3$2 = { class: "toolbar-table-actions__icon" };
73409
- const _hoisted_4$1 = ["innerHTML"];
73410
- const _hoisted_5 = { class: "toolbar-table-actions__label" };
73411
- const _sfc_main$6 = {
73412
- __name: "TableActions",
73413
- props: {
73414
- options: {
73415
- type: Array
73416
- }
73417
- },
73418
- emits: ["select"],
73419
- setup(__props, { emit: __emit }) {
73420
- const emit = __emit;
73421
- const handleClick2 = (item) => {
73422
- emit("select", { command: item.command });
73423
- };
73424
- return (_ctx, _cache) => {
73425
- return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
73426
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.options, (option) => {
73427
- return vue.openBlock(), vue.createElementBlock("div", {
73428
- class: vue.normalizeClass(["toolbar-table-actions__item", { "toolbar-table-actions__item--border": option.bottomBorder }]),
73429
- onClick: ($event) => handleClick2(option),
73430
- "data-item": option.props?.["data-item"] || "",
73431
- ariaLabel: option.props?.ariaLabel,
73432
- role: "menuitem"
73433
- }, [
73434
- vue.createBaseVNode("div", _hoisted_3$2, [
73435
- vue.createBaseVNode("div", {
73436
- class: "toolbar-table-actions__icon-wrapper",
73437
- innerHTML: option.icon
73438
- }, null, 8, _hoisted_4$1)
73439
- ]),
73440
- vue.createBaseVNode("div", _hoisted_5, vue.toDisplayString(option.label), 1)
73441
- ], 10, _hoisted_2$2);
73442
- }), 256))
73443
- ]);
73444
- };
73445
- }
73446
- };
73447
- const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-990b9a25"]]);
73448
73629
  const isModuleEnabled = (editorOptions, moduleName) => {
73449
73630
  switch (moduleName) {
73450
73631
  case "ai":