superdoc 1.0.0-beta.17 → 1.0.0-beta.19

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 (31) hide show
  1. package/dist/chunks/{PdfViewer-BIlJaTm7.cjs → PdfViewer-BLFV17De.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-cvzMUtBh.es.js → PdfViewer-D_4g-jsZ.es.js} +1 -1
  3. package/dist/chunks/{index-VCeRjVPO-FBgR9qxX.es.js → index-CRpn1mWd-B4eH8Zok.es.js} +1 -1
  4. package/dist/chunks/{index-VCeRjVPO-DjkejB6t.cjs → index-CRpn1mWd-BUbbd3Jq.cjs} +1 -1
  5. package/dist/chunks/{index-CrIfBvBN.es.js → index-NPXppXmC.es.js} +8 -4
  6. package/dist/chunks/{index-DDx90Dl3.cjs → index-k02voMEs.cjs} +8 -4
  7. package/dist/chunks/{super-editor.es-00SpI-wK.es.js → super-editor.es-CHU4dmes.es.js} +1844 -1123
  8. package/dist/chunks/{super-editor.es-Mlj7AGyt.cjs → super-editor.es-C_Gk8cDd.cjs} +1843 -1122
  9. package/dist/packages/superdoc/src/components/CommentsLayer/use-comment.d.ts.map +1 -1
  10. package/dist/packages/superdoc/src/stores/comments-store.d.ts.map +1 -1
  11. package/dist/style.css +7 -7
  12. package/dist/super-editor/ai-writer.es.js +2 -2
  13. package/dist/super-editor/chunks/{converter-B9zUZjYT.js → converter-Cu26_LdN.js} +207 -15
  14. package/dist/super-editor/chunks/{docx-zipper-r5KdE_SA.js → docx-zipper-C8lozSFd.js} +1 -1
  15. package/dist/super-editor/chunks/{editor-D2k2BwSG.js → editor-BXC2Hzba.js} +1574 -1062
  16. package/dist/super-editor/chunks/{index-VCeRjVPO.js → index-CRpn1mWd.js} +1 -1
  17. package/dist/super-editor/chunks/{toolbar-8o_LgoiW.js → toolbar-BglLOe8y.js} +2 -2
  18. package/dist/super-editor/converter.es.js +1 -1
  19. package/dist/super-editor/docx-zipper.es.js +2 -2
  20. package/dist/super-editor/editor.es.js +3 -3
  21. package/dist/super-editor/file-zipper.es.js +1 -1
  22. package/dist/super-editor/style.css +7 -7
  23. package/dist/super-editor/super-editor.es.js +126 -45
  24. package/dist/super-editor/toolbar.es.js +2 -2
  25. package/dist/super-editor.cjs +3 -3
  26. package/dist/super-editor.es.js +1 -1
  27. package/dist/superdoc.cjs +2 -2
  28. package/dist/superdoc.es.js +2 -2
  29. package/dist/superdoc.umd.js +1842 -1117
  30. package/dist/superdoc.umd.js.map +1 -1
  31. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-B9zUZjYT.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-Cu26_LdN.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-B9zUZjYT.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-D2k2BwSG.js";
2
+ import { p as process$1 } from "./converter-Cu26_LdN.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-BXC2Hzba.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { ac } from "./chunks/converter-B9zUZjYT.js";
1
+ import { ac } from "./chunks/converter-Cu26_LdN.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-B9zUZjYT.js";
2
- import { D } from "./chunks/docx-zipper-r5KdE_SA.js";
1
+ import "./chunks/converter-Cu26_LdN.js";
2
+ import { D } from "./chunks/docx-zipper-C8lozSFd.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-D2k2BwSG.js";
2
- import "./chunks/converter-B9zUZjYT.js";
3
- import "./chunks/docx-zipper-r5KdE_SA.js";
1
+ import { E } from "./chunks/editor-BXC2Hzba.js";
2
+ import "./chunks/converter-Cu26_LdN.js";
3
+ import "./chunks/docx-zipper-C8lozSFd.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-r5KdE_SA.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-C8lozSFd.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -1876,7 +1876,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1876
1876
  }
1877
1877
 
1878
1878
  /* @remarks - popover adds a slight shadow, this can be removed if needed */
1879
- .generic-popover[data-v-cbddcc0f] {
1879
+ .generic-popover[data-v-157855b5] {
1880
1880
  /* @remarks - this should ideally be handled by the content or component - but some are missing */
1881
1881
  background-color: white;
1882
1882
  position: absolute;
@@ -1969,10 +1969,10 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1969
1969
  box-shadow: 0 0 4px rgba(74, 144, 226, 0.5);
1970
1970
  }
1971
1971
 
1972
- .editor-element[data-v-a84087aa] {
1972
+ .editor-element[data-v-08b32c3d] {
1973
1973
  position: relative;
1974
1974
  }
1975
- .super-editor-container[data-v-a84087aa] {
1975
+ .super-editor-container[data-v-08b32c3d] {
1976
1976
  width: auto;
1977
1977
  height: auto;
1978
1978
  min-width: 8in;
@@ -1981,14 +1981,14 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
1981
1981
  display: flex;
1982
1982
  flex-direction: column;
1983
1983
  }
1984
- .ruler[data-v-a84087aa] {
1984
+ .ruler[data-v-08b32c3d] {
1985
1985
  margin-bottom: 2px;
1986
1986
  }
1987
- .super-editor[data-v-a84087aa] {
1987
+ .super-editor[data-v-08b32c3d] {
1988
1988
  color: initial;
1989
1989
  overflow: hidden;
1990
1990
  }
1991
- .placeholder-editor[data-v-a84087aa] {
1991
+ .placeholder-editor[data-v-08b32c3d] {
1992
1992
  position: absolute;
1993
1993
  top: 0;
1994
1994
  left: 0;
@@ -2000,7 +2000,7 @@ https://github.com/ProseMirror/prosemirror-tables/blob/master/demo/index.html
2000
2000
  background-color: white;
2001
2001
  box-sizing: border-box;
2002
2002
  }
2003
- .placeholder-title[data-v-a84087aa] {
2003
+ .placeholder-title[data-v-08b32c3d] {
2004
2004
  display: flex;
2005
2005
  justify-content: center;
2006
2006
  margin-bottom: 40px;
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
12
- import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, U as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, V as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-B9zUZjYT.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-B9zUZjYT.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-D2k2BwSG.js";
15
- import { z, F, B, T, w, C, x } from "./chunks/editor-D2k2BwSG.js";
12
+ import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, U as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, V as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-Cu26_LdN.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-Cu26_LdN.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-BXC2Hzba.js";
15
+ import { z, F, B, T, w, C, x } from "./chunks/editor-BXC2Hzba.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-8o_LgoiW.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-BglLOe8y.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-r5KdE_SA.js";
19
+ import { D } from "./chunks/docx-zipper-C8lozSFd.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -312,7 +312,7 @@ const useToolbarItem = (options) => {
312
312
  };
313
313
  };
314
314
  const _hoisted_1$f = ["onClick", "innerHTML", "aria-label", "onKeydown"];
315
- const _sfc_main$g = {
315
+ const _sfc_main$h = {
316
316
  __name: "AlignmentButtons",
317
317
  emits: ["select"],
318
318
  setup(__props, { emit: __emit }) {
@@ -403,14 +403,14 @@ const _sfc_main$g = {
403
403
  };
404
404
  }
405
405
  };
406
- const AlignmentButtons = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-d84f57b6"]]);
406
+ const AlignmentButtons = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-d84f57b6"]]);
407
407
  const _hoisted_1$e = ["onClick", "onKeydown"];
408
408
  const _hoisted_2$9 = { class: "document-mode-column icon-column" };
409
409
  const _hoisted_3$7 = ["innerHTML"];
410
410
  const _hoisted_4$3 = { class: "document-mode-column text-column" };
411
411
  const _hoisted_5$2 = { class: "document-mode-type" };
412
412
  const _hoisted_6$1 = { class: "document-mode-description" };
413
- const _sfc_main$f = {
413
+ const _sfc_main$g = {
414
414
  __name: "DocumentMode",
415
415
  props: {
416
416
  options: {
@@ -490,14 +490,14 @@ const _sfc_main$f = {
490
490
  };
491
491
  }
492
492
  };
493
- const DocumentMode = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8730b752"]]);
493
+ const DocumentMode = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-8730b752"]]);
494
494
  const _hoisted_1$d = {
495
495
  key: 0,
496
496
  class: "linked-style-buttons",
497
497
  "data-editor-ui-surface": ""
498
498
  };
499
499
  const _hoisted_2$8 = ["onClick", "onKeydown", "aria-label"];
500
- const _sfc_main$e = {
500
+ const _sfc_main$f = {
501
501
  __name: "LinkedStyle",
502
502
  props: {
503
503
  editor: {
@@ -573,7 +573,7 @@ const _sfc_main$e = {
573
573
  };
574
574
  }
575
575
  };
576
- const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-ecb78965"]]);
576
+ const LinkedStyle = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-ecb78965"]]);
577
577
  const _hoisted_1$c = {
578
578
  key: 0,
579
579
  class: "link-title"
@@ -602,7 +602,7 @@ const _hoisted_13 = {
602
602
  key: 4,
603
603
  class: "input-row go-to-anchor clickable"
604
604
  };
605
- const _sfc_main$d = {
605
+ const _sfc_main$e = {
606
606
  __name: "LinkInput",
607
607
  props: {
608
608
  showInput: {
@@ -808,12 +808,12 @@ const _sfc_main$d = {
808
808
  };
809
809
  }
810
810
  };
811
- const LinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-ba50627b"]]);
811
+ const LinkInput = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-ba50627b"]]);
812
812
  const _hoisted_1$b = ["aria-label", "onClick", "onKeydown"];
813
813
  const _hoisted_2$6 = ["innerHTML"];
814
814
  const _hoisted_3$5 = ["innerHTML"];
815
815
  const ROW_SIZE$1 = 7;
816
- const _sfc_main$c = {
816
+ const _sfc_main$d = {
817
817
  __name: "IconGridRow",
818
818
  props: {
819
819
  icons: {
@@ -946,12 +946,12 @@ const _sfc_main$c = {
946
946
  };
947
947
  }
948
948
  };
949
- const IconGridRow = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-0f479b6c"]]);
949
+ const IconGridRow = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-0f479b6c"]]);
950
950
  const DropIcon = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc.--><path d="M320 512c53.2 0 101.4-21.6 136.1-56.6l-298.3-235C140 257.1 128 292.3 128 320c0 106 86 192 192 192zM505.2 370.7c4.4-16.2 6.8-33.1 6.8-50.7c0-91.2-130.2-262.3-166.6-308.3C339.4 4.2 330.5 0 320.9 0l-1.8 0c-9.6 0-18.5 4.2-24.5 11.7C277.8 33 240.7 81.3 205.8 136L38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L505.2 370.7zM224 336c0 44.2 35.8 80 80 80c8.8 0 16 7.2 16 16s-7.2 16-16 16c-61.9 0-112-50.1-112-112c0-8.8 7.2-16 16-16s16 7.2 16 16z"/></svg>\n';
951
951
  const _hoisted_1$a = { class: "options-grid-wrap" };
952
952
  const _hoisted_2$5 = ["innerHTML"];
953
953
  const _hoisted_3$4 = { class: "option-grid-ctn" };
954
- const _sfc_main$b = {
954
+ const _sfc_main$c = {
955
955
  __name: "IconGrid",
956
956
  props: {
957
957
  icons: {
@@ -1011,7 +1011,7 @@ const _sfc_main$b = {
1011
1011
  };
1012
1012
  }
1013
1013
  };
1014
- const IconGrid = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-3d19fedf"]]);
1014
+ const IconGrid = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-3d19fedf"]]);
1015
1015
  const closeDropdown$1 = (dropdown) => {
1016
1016
  dropdown.expand.value = false;
1017
1017
  };
@@ -1123,7 +1123,7 @@ const getAvailableColorOptions = () => {
1123
1123
  const _hoisted_1$9 = ["data-cols", "data-rows", "onKeydown", "onClick"];
1124
1124
  const _hoisted_2$4 = ["aria-valuetext"];
1125
1125
  const ROW_SIZE = 5;
1126
- const _sfc_main$a = {
1126
+ const _sfc_main$b = {
1127
1127
  __name: "TableGrid",
1128
1128
  emits: ["select", "clickoutside"],
1129
1129
  setup(__props, { emit: __emit }) {
@@ -1252,13 +1252,13 @@ const _sfc_main$a = {
1252
1252
  };
1253
1253
  }
1254
1254
  };
1255
- const TableGrid = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-92e8d5fb"]]);
1255
+ const TableGrid = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-92e8d5fb"]]);
1256
1256
  const _hoisted_1$8 = { class: "toolbar-table-actions" };
1257
1257
  const _hoisted_2$3 = ["onClick", "data-item", "ariaLabel"];
1258
1258
  const _hoisted_3$3 = { class: "toolbar-table-actions__icon" };
1259
1259
  const _hoisted_4$1 = ["innerHTML"];
1260
1260
  const _hoisted_5 = { class: "toolbar-table-actions__label" };
1261
- const _sfc_main$9 = {
1261
+ const _sfc_main$a = {
1262
1262
  __name: "TableActions",
1263
1263
  props: {
1264
1264
  options: {
@@ -1294,7 +1294,7 @@ const _sfc_main$9 = {
1294
1294
  };
1295
1295
  }
1296
1296
  };
1297
- const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-990b9a25"]]);
1297
+ const TableActions = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-990b9a25"]]);
1298
1298
  function getScrollableParent(element) {
1299
1299
  let currentElement = element;
1300
1300
  while (currentElement) {
@@ -1321,7 +1321,7 @@ const checkIconSvg = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 5
1321
1321
  const _hoisted_1$7 = { class: "search-input-ctn" };
1322
1322
  const _hoisted_2$2 = { class: "row" };
1323
1323
  const _hoisted_3$2 = ["onKeydown"];
1324
- const _sfc_main$8 = {
1324
+ const _sfc_main$9 = {
1325
1325
  __name: "SearchInput",
1326
1326
  props: {
1327
1327
  searchRef: {
@@ -1360,7 +1360,7 @@ const _sfc_main$8 = {
1360
1360
  };
1361
1361
  }
1362
1362
  };
1363
- const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-957cbcf2"]]);
1363
+ const SearchInput = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-957cbcf2"]]);
1364
1364
  const TOOLBAR_FONTS = [
1365
1365
  {
1366
1366
  label: "Georgia",
@@ -4220,7 +4220,7 @@ const _hoisted_2$1 = {
4220
4220
  };
4221
4221
  const _hoisted_3$1 = ["onClick"];
4222
4222
  const _hoisted_4 = ["innerHTML"];
4223
- const _sfc_main$7 = {
4223
+ const _sfc_main$8 = {
4224
4224
  __name: "SlashMenu",
4225
4225
  props: {
4226
4226
  editor: {
@@ -4572,7 +4572,7 @@ const _sfc_main$7 = {
4572
4572
  }
4573
4573
  };
4574
4574
  const _hoisted_1$5 = ["accept"];
4575
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4575
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
4576
4576
  __name: "BasicUpload",
4577
4577
  props: {
4578
4578
  accept: { default: ".docx, .pdf, .html, .md" }
@@ -4601,7 +4601,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
4601
4601
  const _hoisted_1$4 = { class: "numbering" };
4602
4602
  const MIN_WIDTH = 200;
4603
4603
  const alignment = "flex-end";
4604
- const _sfc_main$5 = {
4604
+ const _sfc_main$6 = {
4605
4605
  __name: "Ruler",
4606
4606
  props: {
4607
4607
  orientation: {
@@ -4806,8 +4806,8 @@ const _sfc_main$5 = {
4806
4806
  };
4807
4807
  }
4808
4808
  };
4809
- const Ruler = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-79f9a944"]]);
4810
- const _sfc_main$4 = {
4809
+ const Ruler = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-79f9a944"]]);
4810
+ const _sfc_main$5 = {
4811
4811
  __name: "GenericPopover",
4812
4812
  props: {
4813
4813
  editor: { type: Object, required: true },
@@ -4835,22 +4835,22 @@ const _sfc_main$4 = {
4835
4835
  () => props.visible,
4836
4836
  (val) => {
4837
4837
  if (val) {
4838
- document.addEventListener("mousedown", handleClickOutside);
4838
+ document.addEventListener("pointerdown", handleClickOutside);
4839
4839
  document.addEventListener("keydown", handleEscape);
4840
4840
  } else {
4841
- document.removeEventListener("mousedown", handleClickOutside);
4841
+ document.removeEventListener("pointerdown", handleClickOutside);
4842
4842
  document.removeEventListener("keydown", handleEscape);
4843
4843
  }
4844
4844
  }
4845
4845
  );
4846
4846
  onMounted(() => {
4847
4847
  if (props.visible) {
4848
- document.addEventListener("mousedown", handleClickOutside);
4848
+ document.addEventListener("pointerdown", handleClickOutside);
4849
4849
  document.addEventListener("keydown", handleEscape);
4850
4850
  }
4851
4851
  });
4852
4852
  onBeforeUnmount(() => {
4853
- document.removeEventListener("mousedown", handleClickOutside);
4853
+ document.removeEventListener("pointerdown", handleClickOutside);
4854
4854
  document.removeEventListener("keydown", handleEscape);
4855
4855
  });
4856
4856
  const derivedStyles = computed(() => ({
@@ -4865,7 +4865,7 @@ const _sfc_main$4 = {
4865
4865
  style: normalizeStyle(derivedStyles.value),
4866
4866
  ref_key: "popover",
4867
4867
  ref: popover,
4868
- onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
4868
+ onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {
4869
4869
  }, ["stop"])),
4870
4870
  onClick: _cache[1] || (_cache[1] = withModifiers(() => {
4871
4871
  }, ["stop"]))
@@ -4875,7 +4875,7 @@ const _sfc_main$4 = {
4875
4875
  };
4876
4876
  }
4877
4877
  };
4878
- const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-cbddcc0f"]]);
4878
+ const GenericPopover = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-157855b5"]]);
4879
4879
  const _hoisted_1$3 = ["data-boundary-index", "data-boundary-type", "onMousedown"];
4880
4880
  const RESIZE_HANDLE_WIDTH_PX = 9;
4881
4881
  const RESIZE_HANDLE_OFFSET_PX = 4;
@@ -4883,7 +4883,7 @@ const DRAG_OVERLAY_EXTENSION_PX = 1e3;
4883
4883
  const MIN_DRAG_OVERLAY_WIDTH_PX = 2e3;
4884
4884
  const THROTTLE_INTERVAL_MS = 16;
4885
4885
  const MIN_RESIZE_DELTA_PX = 1;
4886
- const _sfc_main$3 = {
4886
+ const _sfc_main$4 = {
4887
4887
  __name: "TableResizeOverlay",
4888
4888
  props: {
4889
4889
  /** Editor instance for dispatching transactions */
@@ -5407,7 +5407,7 @@ const _sfc_main$3 = {
5407
5407
  };
5408
5408
  }
5409
5409
  };
5410
- const TableResizeOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-2fdf7836"]]);
5410
+ const TableResizeOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-2fdf7836"]]);
5411
5411
  const _hoisted_1$2 = ["data-handle-position", "onMousedown"];
5412
5412
  const OVERLAY_EXPANSION_PX = 2e3;
5413
5413
  const RESIZE_HANDLE_SIZE_PX = 12;
@@ -5416,7 +5416,7 @@ const DIMENSION_CHANGE_THRESHOLD_PX = 1;
5416
5416
  const Z_INDEX_OVERLAY = 10;
5417
5417
  const Z_INDEX_HANDLE = 15;
5418
5418
  const Z_INDEX_GUIDELINE = 20;
5419
- const _sfc_main$2 = {
5419
+ const _sfc_main$3 = {
5420
5420
  __name: "ImageResizeOverlay",
5421
5421
  props: {
5422
5422
  /** Editor instance for dispatching transactions */
@@ -5840,7 +5840,81 @@ const _sfc_main$2 = {
5840
5840
  };
5841
5841
  }
5842
5842
  };
5843
- const ImageResizeOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-e66ec7bb"]]);
5843
+ const ImageResizeOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-e66ec7bb"]]);
5844
+ const _sfc_main$2 = {
5845
+ __name: "LinkClickHandler",
5846
+ props: {
5847
+ editor: {
5848
+ type: Object,
5849
+ required: true
5850
+ },
5851
+ openPopover: {
5852
+ type: Function,
5853
+ required: true
5854
+ },
5855
+ closePopover: {
5856
+ type: Function,
5857
+ required: true
5858
+ },
5859
+ popoverVisible: {
5860
+ type: Boolean,
5861
+ default: false
5862
+ }
5863
+ },
5864
+ setup(__props) {
5865
+ const props = __props;
5866
+ const handleLinkClick = (event) => {
5867
+ if (props.popoverVisible) {
5868
+ props.closePopover();
5869
+ return;
5870
+ }
5871
+ if (!props.editor || !props.editor.state) {
5872
+ return;
5873
+ }
5874
+ const surface = getEditorSurfaceElement(props.editor);
5875
+ if (!surface) {
5876
+ return;
5877
+ }
5878
+ moveCursorToMouseEvent(event.detail, props.editor);
5879
+ setTimeout(() => {
5880
+ const currentState = props.editor.state;
5881
+ const hasLink = selectionHasNodeOrMark(currentState, "link", { requireEnds: true });
5882
+ if (hasLink) {
5883
+ const surfaceRect = surface.getBoundingClientRect();
5884
+ if (!surfaceRect) return;
5885
+ props.openPopover(
5886
+ markRaw(LinkInput),
5887
+ {
5888
+ showInput: true,
5889
+ editor: props.editor,
5890
+ closePopover: props.closePopover
5891
+ },
5892
+ {
5893
+ left: `${event.detail.clientX - surfaceRect.left}px`,
5894
+ top: `${event.detail.clientY - surfaceRect.top + 15}px`
5895
+ }
5896
+ );
5897
+ }
5898
+ }, 10);
5899
+ };
5900
+ let surfaceElement = null;
5901
+ onMounted(() => {
5902
+ if (!props.editor) return;
5903
+ surfaceElement = getEditorSurfaceElement(props.editor);
5904
+ if (surfaceElement) {
5905
+ surfaceElement.addEventListener("superdoc-link-click", handleLinkClick);
5906
+ }
5907
+ });
5908
+ onBeforeUnmount(() => {
5909
+ if (surfaceElement) {
5910
+ surfaceElement.removeEventListener("superdoc-link-click", handleLinkClick);
5911
+ }
5912
+ });
5913
+ return (_ctx, _cache) => {
5914
+ return null;
5915
+ };
5916
+ }
5917
+ };
5844
5918
  function adjustPaginationBreaks(editorElem, editor) {
5845
5919
  if (!editorElem.value || !editor?.value?.options?.scale || isHeadless(editor)) return;
5846
5920
  const zoom = editor.value.options.scale;
@@ -6182,21 +6256,28 @@ const _sfc_main$1 = {
6182
6256
  class: "editor-element super-editor__element",
6183
6257
  role: "presentation"
6184
6258
  }, null, 512),
6185
- !contextMenuDisabled.value && editorReady.value && activeEditor.value ? (openBlock(), createBlock(_sfc_main$7, {
6259
+ !contextMenuDisabled.value && editorReady.value && activeEditor.value ? (openBlock(), createBlock(_sfc_main$8, {
6186
6260
  key: 0,
6187
6261
  editor: activeEditor.value,
6188
6262
  popoverControls,
6189
6263
  openPopover,
6190
6264
  closePopover
6191
6265
  }, null, 8, ["editor", "popoverControls"])) : createCommentVNode("", true),
6192
- editorReady.value && activeEditor.value ? (openBlock(), createBlock(TableResizeOverlay, {
6266
+ editorReady.value && activeEditor.value ? (openBlock(), createBlock(_sfc_main$2, {
6193
6267
  key: 1,
6194
6268
  editor: activeEditor.value,
6269
+ openPopover,
6270
+ closePopover,
6271
+ popoverVisible: popoverControls.visible
6272
+ }, null, 8, ["editor", "popoverVisible"])) : createCommentVNode("", true),
6273
+ editorReady.value && activeEditor.value ? (openBlock(), createBlock(TableResizeOverlay, {
6274
+ key: 2,
6275
+ editor: activeEditor.value,
6195
6276
  visible: tableResizeState.visible,
6196
6277
  tableElement: tableResizeState.tableElement
6197
6278
  }, null, 8, ["editor", "visible", "tableElement"])) : createCommentVNode("", true),
6198
6279
  editorReady.value && activeEditor.value ? (openBlock(), createBlock(ImageResizeOverlay, {
6199
- key: 2,
6280
+ key: 3,
6200
6281
  editor: activeEditor.value,
6201
6282
  visible: imageResizeState.visible,
6202
6283
  imageElement: imageResizeState.imageElement
@@ -6263,7 +6344,7 @@ const _sfc_main$1 = {
6263
6344
  };
6264
6345
  }
6265
6346
  };
6266
- const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-a84087aa"]]);
6347
+ const SuperEditor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-08b32c3d"]]);
6267
6348
  const _hoisted_1 = ["innerHTML"];
6268
6349
  const _sfc_main = {
6269
6350
  __name: "SuperInput",
@@ -6369,14 +6450,14 @@ const Extensions = {
6369
6450
  export {
6370
6451
  AIWriter,
6371
6452
  z as AnnotatorHelpers,
6372
- _sfc_main$6 as BasicUpload,
6453
+ _sfc_main$7 as BasicUpload,
6373
6454
  F as CommentsPluginKey,
6374
6455
  D as DocxZipper,
6375
6456
  Editor,
6376
6457
  Extensions,
6377
6458
  PresentationEditor,
6378
6459
  B as SectionHelpers,
6379
- _sfc_main$7 as SlashMenu,
6460
+ _sfc_main$8 as SlashMenu,
6380
6461
  ac as SuperConverter,
6381
6462
  SuperEditor,
6382
6463
  SuperInput,
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-8o_LgoiW.js";
3
- import "./chunks/editor-D2k2BwSG.js";
2
+ import { T } from "./chunks/toolbar-BglLOe8y.js";
3
+ import "./chunks/editor-BXC2Hzba.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,17 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-Mlj7AGyt.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-C_Gk8cDd.cjs");
4
4
  require("./chunks/vue-jWLMl8Ts.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
- exports.BasicUpload = superEditor_es._sfc_main$6;
7
+ exports.BasicUpload = superEditor_es._sfc_main$7;
8
8
  exports.CommentsPluginKey = superEditor_es.CommentsPluginKey;
9
9
  exports.DocxZipper = superEditor_es.DocxZipper;
10
10
  exports.Editor = superEditor_es.Editor;
11
11
  exports.Extensions = superEditor_es.Extensions;
12
12
  exports.PresentationEditor = superEditor_es.PresentationEditor;
13
13
  exports.SectionHelpers = superEditor_es.SectionHelpers;
14
- exports.SlashMenu = superEditor_es._sfc_main$7;
14
+ exports.SlashMenu = superEditor_es._sfc_main$8;
15
15
  exports.SuperConverter = superEditor_es.SuperConverter;
16
16
  exports.SuperEditor = superEditor_es.SuperEditor;
17
17
  exports.SuperInput = superEditor_es.SuperInput;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-00SpI-wK.es.js";
1
+ import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-CHU4dmes.es.js";
2
2
  import "./chunks/vue-Dysv_7z5.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-Mlj7AGyt.cjs");
4
- const superdoc = require("./chunks/index-DDx90Dl3.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-C_Gk8cDd.cjs");
4
+ const superdoc = require("./chunks/index-k02voMEs.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
7
  exports.Editor = superEditor_es.Editor;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-00SpI-wK.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-CrIfBvBN.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-CHU4dmes.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-NPXppXmC.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,