@harbour-enterprises/superdoc 2.0.0-next.1 → 2.0.0-next.3

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 (28) hide show
  1. package/dist/chunks/{PdfViewer-BDQHgDVD.es.js → PdfViewer-4xn9rggA.es.js} +1 -1
  2. package/dist/chunks/{PdfViewer-Cun5Zr8u.cjs → PdfViewer-C6tuSJXA.cjs} +1 -1
  3. package/dist/chunks/{index-CGAmeAEK.es.js → index-CSZ7bAL7.es.js} +3 -3
  4. package/dist/chunks/{index-if-EH8uU.cjs → index-k0xTe_8v.cjs} +3 -3
  5. package/dist/chunks/{index-Dq6vXk74-Vm-euNb7.cjs → index-lLnrqNSJ-CMJxa5vJ.cjs} +1 -1
  6. package/dist/chunks/{index-Dq6vXk74-CQD7nLbH.es.js → index-lLnrqNSJ-DoACeFqL.es.js} +1 -1
  7. package/dist/chunks/{super-editor.es-DyaHVXrq.es.js → super-editor.es-B1DZfUz0.es.js} +558 -132
  8. package/dist/chunks/{super-editor.es-CwNpXZzP.cjs → super-editor.es-BY4paJvP.cjs} +558 -132
  9. package/dist/packages/superdoc/src/core/SuperDoc.d.ts.map +1 -1
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-BtoNJWI9.js → converter-Bd6dIe0l.js} +1 -1
  12. package/dist/super-editor/chunks/{docx-zipper-CLkDdGOr.js → docx-zipper-Dzdi5pfi.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-COH8793Z.js → editor-C3sjGwAb.js} +568 -149
  14. package/dist/super-editor/chunks/{index-Dq6vXk74.js → index-lLnrqNSJ.js} +1 -1
  15. package/dist/super-editor/chunks/{toolbar-Ca-BPuJ2.js → toolbar-Bn20lflQ.js} +2 -2
  16. package/dist/super-editor/converter.es.js +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/file-zipper.es.js +1 -1
  20. package/dist/super-editor/super-editor.es.js +28 -14
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +2 -2
  25. package/dist/superdoc.es.js +2 -2
  26. package/dist/superdoc.umd.js +560 -134
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-BtoNJWI9.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-Bd6dIe0l.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 { ref, readonly, watch, computed, getCurrentInstance, onMounted, onBeforeUnmount, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, withDirectives, h, Teleport, toRef, nextTick, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, markRaw, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, withKeys, unref, withModifiers, createBlock, toDisplayString, vModelText, createVNode, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-BtoNJWI9.js";
3
- import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-COH8793Z.js";
2
+ import { p as process$1 } from "./converter-Bd6dIe0l.js";
3
+ import { g as global$1, _ as _export_sfc, u as useHighContrastMode } from "./editor-C3sjGwAb.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-BtoNJWI9.js";
1
+ import { ac } from "./chunks/converter-Bd6dIe0l.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-BtoNJWI9.js";
2
- import { D } from "./chunks/docx-zipper-CLkDdGOr.js";
1
+ import "./chunks/converter-Bd6dIe0l.js";
2
+ import { D } from "./chunks/docx-zipper-Dzdi5pfi.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-COH8793Z.js";
2
- import "./chunks/converter-BtoNJWI9.js";
3
- import "./chunks/docx-zipper-CLkDdGOr.js";
1
+ import { E } from "./chunks/editor-C3sjGwAb.js";
2
+ import "./chunks/converter-Bd6dIe0l.js";
3
+ import "./chunks/docx-zipper-Dzdi5pfi.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-CLkDdGOr.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-Dzdi5pfi.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -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, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-BtoNJWI9.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-BtoNJWI9.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 generateRulerDefinition, n as clampHandlePosition, o as calculateMarginFromHandle, p as measureCache, q as isHeadless, E as Editor, t as getStarterExtensions, P as PresentationEditor, v as Placeholder, w as getRichTextExtensions, D as DecorationSet, x as Decoration, M as Mark, z as Extension, A as Attribute, N as Node } from "./chunks/editor-COH8793Z.js";
15
- import { F, I, G, T, B, H, C } from "./chunks/editor-COH8793Z.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, O as findParentNode, at as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, an as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-Bd6dIe0l.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-Bd6dIe0l.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 SLASH_MENU_HANDLED_FLAG, m as SlashMenuPluginKey, s as shouldBypassContextMenu, n as generateRulerDefinition, o as clampHandlePosition, p as calculateMarginFromHandle, q as measureCache, t as isHeadless, E as Editor, v as getStarterExtensions, P as PresentationEditor, w as Placeholder, x as getRichTextExtensions, D as DecorationSet, z as Decoration, M as Mark, A as Extension, B as Attribute, N as Node } from "./chunks/editor-C3sjGwAb.js";
15
+ import { G, J, H, T, C, I, F } from "./chunks/editor-C3sjGwAb.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, Teleport, 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-Ca-BPuJ2.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-Bn20lflQ.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-CLkDdGOr.js";
19
+ import { D } from "./chunks/docx-zipper-Dzdi5pfi.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -4403,11 +4403,23 @@ const _sfc_main$8 = {
4403
4403
  closeMenu({ restoreCursor: false });
4404
4404
  }
4405
4405
  };
4406
- const handleRightClick = async (event) => {
4406
+ const shouldHandleContextMenu = (event) => {
4407
4407
  const readOnly = !props.editor?.isEditable;
4408
4408
  const contextMenuDisabled = props.editor?.options?.disableContextMenu;
4409
4409
  const bypass = shouldBypassContextMenu(event);
4410
- if (readOnly || contextMenuDisabled || bypass) {
4410
+ return !readOnly && !contextMenuDisabled && !bypass;
4411
+ };
4412
+ const handleRightClickCapture = (event) => {
4413
+ try {
4414
+ if (shouldHandleContextMenu(event)) {
4415
+ event[SLASH_MENU_HANDLED_FLAG] = true;
4416
+ }
4417
+ } catch (error) {
4418
+ console.warn("[SlashMenu] Error in capture phase context menu handler:", error);
4419
+ }
4420
+ };
4421
+ const handleRightClick = async (event) => {
4422
+ if (!shouldHandleContextMenu(event)) {
4411
4423
  return;
4412
4424
  }
4413
4425
  event.preventDefault();
@@ -4518,6 +4530,7 @@ const _sfc_main$8 = {
4518
4530
  props.editor.on("slashMenu:open", slashMenuOpenHandler);
4519
4531
  contextMenuTarget = getEditorSurfaceElement(props.editor);
4520
4532
  if (contextMenuTarget) {
4533
+ contextMenuTarget.addEventListener("contextmenu", handleRightClickCapture, true);
4521
4534
  contextMenuTarget.addEventListener("contextmenu", handleRightClick);
4522
4535
  }
4523
4536
  slashMenuCloseHandler = () => {
@@ -4541,6 +4554,7 @@ const _sfc_main$8 = {
4541
4554
  props.editor.off("slashMenu:close", slashMenuCloseHandler);
4542
4555
  }
4543
4556
  props.editor.off("update", handleEditorUpdate);
4557
+ contextMenuTarget?.removeEventListener("contextmenu", handleRightClickCapture, true);
4544
4558
  contextMenuTarget?.removeEventListener("contextmenu", handleRightClick);
4545
4559
  } catch (error) {
4546
4560
  console.warn("[SlashMenu] Error during cleanup:", error);
@@ -6750,14 +6764,14 @@ const Extensions = {
6750
6764
  };
6751
6765
  export {
6752
6766
  AIWriter,
6753
- F as AnnotatorHelpers,
6767
+ G as AnnotatorHelpers,
6754
6768
  _sfc_main$7 as BasicUpload,
6755
- I as CommentsPluginKey,
6769
+ J as CommentsPluginKey,
6756
6770
  D as DocxZipper,
6757
6771
  Editor,
6758
6772
  Extensions,
6759
6773
  PresentationEditor,
6760
- G as SectionHelpers,
6774
+ H as SectionHelpers,
6761
6775
  _sfc_main$8 as SlashMenu,
6762
6776
  ac as SuperConverter,
6763
6777
  SuperEditor,
@@ -6766,13 +6780,13 @@ export {
6766
6780
  Toolbar,
6767
6781
  T as TrackChangesBasePluginKey,
6768
6782
  createZip,
6769
- B as fieldAnnotationHelpers,
6783
+ C as fieldAnnotationHelpers,
6770
6784
  getActiveFormatting,
6771
- H as getAllowedImageDimensions,
6785
+ I as getAllowedImageDimensions,
6772
6786
  i as getMarksFromSelection,
6773
6787
  getRichTextExtensions,
6774
6788
  getStarterExtensions,
6775
6789
  a9 as helpers,
6776
6790
  aQ as registeredHandlers,
6777
- C as trackChangesHelpers
6791
+ F as trackChangesHelpers
6778
6792
  };
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-Ca-BPuJ2.js";
3
- import "./chunks/editor-COH8793Z.js";
2
+ import { T } from "./chunks/toolbar-Bn20lflQ.js";
3
+ import "./chunks/editor-C3sjGwAb.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-CwNpXZzP.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BY4paJvP.cjs");
4
4
  require("./chunks/vue-gvuFr0vx.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -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-DyaHVXrq.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-B1DZfUz0.es.js";
2
2
  import "./chunks/vue-CLFbn_1r.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-CwNpXZzP.cjs");
4
- const superdoc = require("./chunks/index-if-EH8uU.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-BY4paJvP.cjs");
4
+ const superdoc = require("./chunks/index-k0xTe_8v.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-DyaHVXrq.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-CGAmeAEK.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-B1DZfUz0.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-CSZ7bAL7.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
4
  export {
5
5
  a as AnnotatorHelpers,