@harbour-enterprises/superdoc 0.25.0-next.4 → 0.25.0-next.6

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.
@@ -14294,7 +14294,9 @@ const _Editor = class _Editor extends EventEmitter {
14294
14294
  isHeaderFooterChanged: false,
14295
14295
  isCustomXmlChanged: false,
14296
14296
  focusTarget: null,
14297
- permissionResolver: null
14297
+ permissionResolver: null,
14298
+ // header/footer editors may have parent(main) editor set
14299
+ parentEditor: null
14298
14300
  });
14299
14301
  __privateMethod(this, _Editor_instances, initContainerElement_fn).call(this, options);
14300
14302
  __privateMethod(this, _Editor_instances, checkHeadless_fn).call(this, options);
@@ -26628,58 +26630,6 @@ const registerImages = async (foundImages, editor, view) => {
26628
26630
  }
26629
26631
  });
26630
26632
  };
26631
- const normalizeWrap = (attrs = {}) => {
26632
- const wrap = attrs.wrap;
26633
- if (wrap?.type && wrap.type !== "Inline") {
26634
- return {
26635
- type: wrap.type,
26636
- attrs: wrap.attrs ?? {}
26637
- };
26638
- }
26639
- if (wrap?.type === "Inline" && Object.keys(wrap.attrs ?? {}).length) {
26640
- return {
26641
- type: "Inline",
26642
- attrs: wrap.attrs
26643
- };
26644
- }
26645
- if (!wrap && attrs.wrapText) {
26646
- return {
26647
- type: "Square",
26648
- attrs: {
26649
- wrapText: attrs.wrapText
26650
- }
26651
- };
26652
- }
26653
- if (!wrap && attrs.wrapTopAndBottom) {
26654
- return {
26655
- type: "TopAndBottom",
26656
- attrs: {}
26657
- };
26658
- }
26659
- if (wrap?.type === "Inline") {
26660
- return {
26661
- type: "Inline",
26662
- attrs: wrap.attrs ?? {}
26663
- };
26664
- }
26665
- return {
26666
- type: "Inline",
26667
- attrs: {}
26668
- };
26669
- };
26670
- const normalizeMarginOffset = (marginOffset = {}) => {
26671
- const { left: left2, horizontal, ...rest } = marginOffset;
26672
- return {
26673
- ...rest,
26674
- horizontal: horizontal ?? left2
26675
- };
26676
- };
26677
- const getNormalizedImageAttrs = (attrs = {}) => {
26678
- return {
26679
- wrap: normalizeWrap(attrs),
26680
- marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
26681
- };
26682
- };
26683
26633
  const ImagePositionPluginKey = new PluginKey("ImagePosition");
26684
26634
  const ImagePositionPlugin = ({ editor }) => {
26685
26635
  const { view } = editor;
@@ -26692,8 +26642,9 @@ const ImagePositionPlugin = ({ editor }) => {
26692
26642
  return DecorationSet.empty;
26693
26643
  },
26694
26644
  apply(tr, oldDecorationSet, oldState, newState) {
26695
- if (!tr.docChanged) return oldDecorationSet;
26645
+ if (!tr.docChanged && !shouldUpdate) return oldDecorationSet;
26696
26646
  const decorations = getImagePositionDecorations(newState, view);
26647
+ shouldUpdate = false;
26697
26648
  return DecorationSet.create(newState.doc, decorations);
26698
26649
  }
26699
26650
  },
@@ -26702,7 +26653,6 @@ const ImagePositionPlugin = ({ editor }) => {
26702
26653
  update: (view2, lastState) => {
26703
26654
  const pagination = PaginationPluginKey.getState(lastState);
26704
26655
  if (shouldUpdate) {
26705
- shouldUpdate = false;
26706
26656
  const decorations = getImagePositionDecorations(lastState, view2);
26707
26657
  const updateTransaction = view2.state.tr.setMeta(ImagePositionPluginKey, { decorations });
26708
26658
  view2.dispatch(updateTransaction);
@@ -26728,41 +26678,35 @@ const getImagePositionDecorations = (state, view) => {
26728
26678
  let className = "";
26729
26679
  const { vRelativeFrom, alignH } = node.attrs.anchorData;
26730
26680
  const { size, padding } = node.attrs;
26731
- const { marginOffset } = getNormalizedImageAttrs(node.attrs);
26732
26681
  const pageBreak = findPreviousDomNodeWithClass(view, pos, "pagination-break-wrapper");
26733
- if (pageBreak) {
26734
- switch (alignH) {
26735
- case "left":
26736
- style += "float: left; left: 0; margin-left: 0; ";
26737
- break;
26738
- case "right":
26739
- style += "float: right; right: 0; margin-right: 0; ";
26740
- break;
26741
- case "center":
26742
- style += "display: block; margin-left: auto; margin-right: auto; ";
26743
- break;
26682
+ if (pageBreak && vRelativeFrom === "margin" && alignH) {
26683
+ const topPos = pageBreak?.offsetTop + pageBreak?.offsetHeight;
26684
+ let horizontalAlignment = `${alignH}: 0;`;
26685
+ if (alignH === "center") horizontalAlignment = "left: 50%; transform: translateX(-50%);";
26686
+ style += vRelativeFrom === "margin" ? `position: absolute; top: ${topPos}px; ${horizontalAlignment}` : "";
26687
+ const nextPos = view.posAtDOM(pageBreak, 1);
26688
+ if (nextPos < 0) {
26689
+ const $pos = view.state.doc.resolve(pos);
26690
+ decorations.push(
26691
+ Decoration.node(pos - 1, pos + $pos.parent.nodeSize - 1, {
26692
+ style: `height: ${size.height + parseInt(padding.top) + parseInt(padding.bottom)}px`
26693
+ })
26694
+ );
26744
26695
  }
26745
- const topPos = marginOffset.top !== void 0 ? marginOffset.top : pageBreak?.offsetTop + pageBreak?.offsetHeight;
26746
- style += vRelativeFrom === "margin" ? `position: absolute; top: ${topPos}px; ` : "";
26747
- if (vRelativeFrom === "margin") {
26748
- const nextPos = view.posAtDOM(pageBreak, 1);
26749
- if (nextPos < 0) {
26750
- const $pos = view.state.doc.resolve(pos);
26751
- decorations.push(
26752
- Decoration.node(pos - 1, pos + $pos.parent.nodeSize - 1, {
26753
- style: `height: ${size.height + parseInt(padding.top) + parseInt(padding.bottom)}px`
26754
- })
26755
- );
26756
- }
26757
- const imageBlock = document.createElement("div");
26758
- imageBlock.className = "anchor-image-placeholder";
26759
- imageBlock.style.float = alignH;
26760
- imageBlock.style.width = size.width + parseInt(padding[alignH]) + "px";
26761
- imageBlock.style.height = size.height + parseInt(padding.top) + parseInt(padding.bottom) + "px";
26762
- decorations.push(Decoration.widget(nextPos, imageBlock, { key: "stable-key" }));
26696
+ const imageBlock = document.createElement("div");
26697
+ imageBlock.className = "anchor-image-placeholder";
26698
+ imageBlock.style.float = alignH === "left" || alignH === "right" ? alignH : "none";
26699
+ let paddingHorizontal;
26700
+ if (alignH === "center") {
26701
+ paddingHorizontal = (parseInt(padding.left) || 0) + (parseInt(padding.right) || 0);
26702
+ } else {
26703
+ paddingHorizontal = parseInt(padding[alignH]) || 0;
26763
26704
  }
26705
+ imageBlock.style.width = size.width + paddingHorizontal + "px";
26706
+ imageBlock.style.height = size.height + parseInt(padding.top) + parseInt(padding.bottom) + "px";
26707
+ decorations.push(Decoration.widget(nextPos, imageBlock, { key: "stable-key" }));
26708
+ decorations.push(Decoration.inline(pos, pos + node.nodeSize, { style, class: className }));
26764
26709
  }
26765
- decorations.push(Decoration.inline(pos, pos + node.nodeSize, { style, class: className }));
26766
26710
  }
26767
26711
  });
26768
26712
  return decorations;
@@ -26787,6 +26731,58 @@ const findPreviousDomNodeWithClass = (view, pos, className) => {
26787
26731
  }
26788
26732
  return null;
26789
26733
  };
26734
+ const normalizeWrap = (attrs = {}) => {
26735
+ const wrap = attrs.wrap;
26736
+ if (wrap?.type && wrap.type !== "Inline") {
26737
+ return {
26738
+ type: wrap.type,
26739
+ attrs: wrap.attrs ?? {}
26740
+ };
26741
+ }
26742
+ if (wrap?.type === "Inline" && Object.keys(wrap.attrs ?? {}).length) {
26743
+ return {
26744
+ type: "Inline",
26745
+ attrs: wrap.attrs
26746
+ };
26747
+ }
26748
+ if (!wrap && attrs.wrapText) {
26749
+ return {
26750
+ type: "Square",
26751
+ attrs: {
26752
+ wrapText: attrs.wrapText
26753
+ }
26754
+ };
26755
+ }
26756
+ if (!wrap && attrs.wrapTopAndBottom) {
26757
+ return {
26758
+ type: "TopAndBottom",
26759
+ attrs: {}
26760
+ };
26761
+ }
26762
+ if (wrap?.type === "Inline") {
26763
+ return {
26764
+ type: "Inline",
26765
+ attrs: wrap.attrs ?? {}
26766
+ };
26767
+ }
26768
+ return {
26769
+ type: "Inline",
26770
+ attrs: {}
26771
+ };
26772
+ };
26773
+ const normalizeMarginOffset = (marginOffset = {}) => {
26774
+ const { left: left2, horizontal, ...rest } = marginOffset;
26775
+ return {
26776
+ ...rest,
26777
+ horizontal: horizontal ?? left2
26778
+ };
26779
+ };
26780
+ const getNormalizedImageAttrs = (attrs = {}) => {
26781
+ return {
26782
+ wrap: normalizeWrap(attrs),
26783
+ marginOffset: normalizeMarginOffset(attrs.marginOffset ?? {})
26784
+ };
26785
+ };
26790
26786
  const getRotationMargins = (w, h, angleDegrees) => {
26791
26787
  const rad = angleDegrees * (Math.PI / 180);
26792
26788
  const cos = Math.abs(Math.cos(rad));
@@ -26995,27 +26991,15 @@ const Image = Node$1.create({
26995
26991
  style += "float: right;";
26996
26992
  floatRight = true;
26997
26993
  } else if (["largest", "bothSides"].includes(attrs.wrapText)) {
26998
- const pageStyles2 = this.editor?.converter?.pageStyles;
26999
- if (pageStyles2?.pageSize && pageStyles2?.pageMargins && size.width) {
27000
- const pageWidth = inchesToPixels(pageStyles2.pageSize.width);
27001
- const leftMargin = inchesToPixels(pageStyles2.pageMargins.left);
27002
- const rightMargin = inchesToPixels(pageStyles2.pageMargins.right);
27003
- const contentWidth = pageWidth - leftMargin - rightMargin;
27004
- const imageWidth = size.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
27005
- const leftSpace = marginOffset.horizontal;
27006
- const rightSpace = contentWidth - leftSpace - imageWidth;
27007
- if (rightSpace < 0) {
27008
- style += "float: left;";
27009
- } else if (rightSpace > leftSpace) {
27010
- style += "float: left;";
27011
- } else {
27012
- style += "float: right;";
27013
- floatRight = true;
27014
- baseHorizontal = rightSpace;
27015
- }
27016
- } else {
27017
- style += "float: left;";
27018
- }
26994
+ const pageStylesData2 = getDataFromPageStyles({
26995
+ editor: this.editor,
26996
+ marginOffset,
26997
+ size,
26998
+ attrs
26999
+ });
27000
+ style += pageStylesData2.style;
27001
+ floatRight = pageStylesData2.floatRight;
27002
+ baseHorizontal = pageStylesData2.baseHorizontal;
27019
27003
  }
27020
27004
  if (attrs.distTop) margin.top += attrs.distTop;
27021
27005
  if (attrs.distBottom) margin.bottom += attrs.distBottom;
@@ -27025,27 +27009,15 @@ const Image = Node$1.create({
27025
27009
  case "Through":
27026
27010
  case "Tight":
27027
27011
  style += "clear: both;";
27028
- const pageStyles = this.editor?.converter?.pageStyles;
27029
- if (pageStyles?.pageSize && pageStyles?.pageMargins && size.width) {
27030
- const pageWidth = inchesToPixels(pageStyles.pageSize.width);
27031
- const leftMargin = inchesToPixels(pageStyles.pageMargins.left);
27032
- const rightMargin = inchesToPixels(pageStyles.pageMargins.right);
27033
- const contentWidth = pageWidth - leftMargin - rightMargin;
27034
- const imageWidth = size.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
27035
- const leftSpace = marginOffset.horizontal;
27036
- const rightSpace = contentWidth - leftSpace - imageWidth;
27037
- if (rightSpace < 0) {
27038
- style += "float: left;";
27039
- } else if (rightSpace > leftSpace) {
27040
- style += "float: left;";
27041
- } else {
27042
- style += "float: right;";
27043
- floatRight = true;
27044
- baseHorizontal = rightSpace;
27045
- }
27046
- } else {
27047
- style += "float: left;";
27048
- }
27012
+ const pageStylesData = getDataFromPageStyles({
27013
+ editor: this.editor,
27014
+ marginOffset,
27015
+ size,
27016
+ attrs
27017
+ });
27018
+ style += pageStylesData.style;
27019
+ floatRight = pageStylesData.floatRight;
27020
+ baseHorizontal = pageStylesData.baseHorizontal;
27049
27021
  if (attrs.distTop) margin.top += attrs.distTop;
27050
27022
  if (attrs.distBottom) margin.bottom += attrs.distBottom;
27051
27023
  if (attrs.distLeft) margin.left += attrs.distLeft;
@@ -27082,6 +27054,22 @@ const Image = Node$1.create({
27082
27054
  }
27083
27055
  const hasAnchorData = Boolean(anchorData);
27084
27056
  const hasMarginOffsets = marginOffset?.horizontal != null || marginOffset?.top != null;
27057
+ if (hasAnchorData) {
27058
+ switch (anchorData.hRelativeFrom) {
27059
+ case "page":
27060
+ const pageStyles = this.editor?.converter?.pageStyles || this.editor?.options.parentEditor?.converter?.pageStyles;
27061
+ margin.left -= inchesToPixels(pageStyles?.pageMargins?.left) || 0;
27062
+ break;
27063
+ case "margin":
27064
+ if (anchorData.alignH === "center") {
27065
+ style += "position: absolute; left: 50%; transform: translateX(-50%);";
27066
+ }
27067
+ if (anchorData.alignH === "left" || anchorData.alignH === "right") {
27068
+ style += `position: absolute; ${anchorData.alignH}: 0;`;
27069
+ }
27070
+ break;
27071
+ }
27072
+ }
27085
27073
  if (hasAnchorData || hasMarginOffsets) {
27086
27074
  const relativeFromPageV = anchorData?.vRelativeFrom === "page";
27087
27075
  const maxMarginV = 500;
@@ -27230,6 +27218,37 @@ const Image = Node$1.create({
27230
27218
  return [ImageRegistrationPlugin({ editor: this.editor }), ImagePositionPlugin({ editor: this.editor })];
27231
27219
  }
27232
27220
  });
27221
+ const getDataFromPageStyles = ({ editor, marginOffset, size, attrs }) => {
27222
+ let style = "";
27223
+ let floatRight = false;
27224
+ let baseHorizontal = marginOffset?.horizontal || 0;
27225
+ const pageStyles = editor?.converter?.pageStyles || editor?.options.parentEditor?.converter?.pageStyles;
27226
+ if (pageStyles?.pageSize && pageStyles?.pageMargins && size.width) {
27227
+ const pageWidth = inchesToPixels(pageStyles.pageSize.width);
27228
+ const leftMargin = inchesToPixels(pageStyles.pageMargins.left);
27229
+ const rightMargin = inchesToPixels(pageStyles.pageMargins.right);
27230
+ const contentWidth = pageWidth - leftMargin - rightMargin;
27231
+ const imageWidth = size.width + (attrs.distLeft || 0) + (attrs.distRight || 0);
27232
+ const leftSpace = marginOffset.horizontal;
27233
+ const rightSpace = contentWidth - leftSpace - imageWidth;
27234
+ if (rightSpace < 0) {
27235
+ style += "float: left;";
27236
+ } else if (rightSpace > leftSpace) {
27237
+ style += "float: left;";
27238
+ } else {
27239
+ style += "float: right;";
27240
+ floatRight = true;
27241
+ baseHorizontal = rightSpace;
27242
+ }
27243
+ } else {
27244
+ style += "float: left;";
27245
+ }
27246
+ return {
27247
+ style,
27248
+ floatRight,
27249
+ baseHorizontal
27250
+ };
27251
+ };
27233
27252
  const ACCEPT_IMAGE_TYPES = [".jpg", ".jpeg", ".png", "image/jpeg", "image/png"];
27234
27253
  const getFileOpener = () => {
27235
27254
  let fileInput = document.createElement("input");
@@ -29351,6 +29370,15 @@ const TrackChanges = Extension.create({
29351
29370
  const { from: from2, to } = state.selection;
29352
29371
  return commands2.acceptTrackedChangesBetween(from2, to);
29353
29372
  },
29373
+ acceptTrackedChangeFromToolbar: () => ({ state, commands: commands2 }) => {
29374
+ const commentsPluginState = CommentsPluginKey.getState(state);
29375
+ const activeThreadId = commentsPluginState?.activeThreadId;
29376
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
29377
+ return commands2.acceptTrackedChangeById(activeThreadId);
29378
+ } else {
29379
+ return commands2.acceptTrackedChangeBySelection();
29380
+ }
29381
+ },
29354
29382
  acceptTrackedChangeById: (id) => ({ state, tr, commands: commands2 }) => {
29355
29383
  const toResolve = getChangesByIdToResolve(state, id) || [];
29356
29384
  return toResolve.map(({ from: from2, to }) => {
@@ -29379,6 +29407,15 @@ const TrackChanges = Extension.create({
29379
29407
  const { from: from2, to } = state.selection;
29380
29408
  return commands2.rejectTrackedChangesBetween(from2, to);
29381
29409
  },
29410
+ rejectTrackedChangeFromToolbar: () => ({ state, commands: commands2 }) => {
29411
+ const commentsPluginState = CommentsPluginKey.getState(state);
29412
+ const activeThreadId = commentsPluginState?.activeThreadId;
29413
+ if (activeThreadId && commentsPluginState?.trackedChanges?.[activeThreadId]) {
29414
+ return commands2.rejectTrackedChangeById(activeThreadId);
29415
+ } else {
29416
+ return commands2.rejectTrackedChangeOnSelection();
29417
+ }
29418
+ },
29382
29419
  rejectAllTrackedChanges: () => ({ state, commands: commands2 }) => {
29383
29420
  const from2 = 0, to = state.doc.content.size;
29384
29421
  return commands2.rejectTrackedChangesBetween(from2, to);
@@ -34672,7 +34709,7 @@ const nodeResizer = (nodeNames = ["image"], editor) => {
34672
34709
  return oldState;
34673
34710
  }
34674
34711
  if (typeof document === "undefined" || editor.options.isHeadless) return oldState;
34675
- if (editor.options.documentMode === "viewing" || !editor.isEditable) {
34712
+ if (!editor.options.isHeaderOrFooter && (editor.options.documentMode === "viewing" || !editor.isEditable)) {
34676
34713
  return DecorationSet.empty;
34677
34714
  }
34678
34715
  const { selection } = newState;
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, createVNode, readonly, watch, onMounted, onBeforeUnmount, 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
2
  import { p as process$1 } from "./converter-DOkexB95.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-DC9ZOqdt.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-D1Q0suDz.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 { E } from "./chunks/editor-DC9ZOqdt.js";
1
+ import { E } from "./chunks/editor-D1Q0suDz.js";
2
2
  import "./chunks/converter-DOkexB95.js";
3
3
  import "./chunks/docx-zipper-Ci5JbfjE.js";
4
4
  export {
@@ -253,6 +253,7 @@ export class Editor extends EventEmitter {
253
253
  isCustomXmlChanged: boolean;
254
254
  focusTarget: any;
255
255
  permissionResolver: any;
256
+ parentEditor: any;
256
257
  };
257
258
  setHighContrastMode: (value: any) => void;
258
259
  /**
@@ -11,10 +11,10 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
11
11
  var _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn;
12
12
  import { aA as getDefaultExportFromCjs, V as v4, T as TextSelection$1, v as getMarkRange, aD as vClickOutside, H as findParentNode, aE as getActiveFormatting, av as isInTable, aF as readFromClipboard, aG as handleClipboardPaste, aH as getFileObject, aI as runPropertyTranslators, aJ as translator, aK as translator$1, aL as translator$2, aM as translator$3, aN as translator$4, aO as translator$5, aP as translator$6, aQ as translator$7, aR as translator$8, aS as translator$9, aT as translator$a, aU as translator$b, aV as translator$c, aW as translator$d, aX as translator$e, aY as commentRangeEndTranslator, aZ as commentRangeStartTranslator, a_ as translator$f, a$ as translator$g, b0 as translator$h, b1 as translator$i, b2 as translator$j, b3 as translator$k, b4 as translator$l, b5 as translator$m, b6 as translator$n, b7 as translator$o, b8 as translator$p, b9 as translator$q, ba as translator$r, bb as translator$s, bc as translator$t, bd as translator$u, be as translator$v, bf as translator$w, bg as translator$x, bh as translator$y, bi as translator$z, bj as translator$A, bk as translator$B, bl as translator$C, bm as translator$D, bn as translator$E, bo as translator$F, bp as translator$G, bq as translator$H, br as translator$I, bs as translator$J, bt as translator$K, bu as translator$L, bv as translator$M, bw as translator$N, bx as translator$O, by as translator$P, bz as translator$Q, bA as translator$R, bB as translator$S, bC as translator$T, bD as translator$U, bE as translator$V, bF as translator$W, bG as translator$X, bH as translator$Y, bI as translator$Z, bJ as translator$_, bK as translator$$, bL as translator$10, bM as translator$11, bN as translator$12, bO as translator$13, bP as translator$14, bQ as translator$15, bR as translator$16, bS as translator$17, bT as translator$18, bU as translator$19, bV as translator$1a, bW as translator$1b, bX as translator$1c, bY as translator$1d, bZ as translator$1e, b_ as translator$1f, b$ as translator$1g, c0 as translator$1h, P as PluginKey, a as Plugin } from "./chunks/converter-DOkexB95.js";
13
13
  import { c1, a5, i, a2 } from "./chunks/converter-DOkexB95.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 collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, D as DecorationSet, n as Decoration, M as Mark, o as Extension, A as Attribute, N as Node } from "./chunks/editor-DC9ZOqdt.js";
15
- import { t, C, v, T, p, w, q } from "./chunks/editor-DC9ZOqdt.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 collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, E as Editor, l as getStarterExtensions, P as Placeholder, m as getRichTextExtensions, D as DecorationSet, n as Decoration, M as Mark, o as Extension, A as Attribute, N as Node } from "./chunks/editor-D1Q0suDz.js";
15
+ import { t, C, v, T, p, w, q } from "./chunks/editor-D1Q0suDz.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, reactive, onUnmounted, renderSlot, 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-SPGEoEi0.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-DjuLzygc.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
19
  import { D } from "./chunks/docx-zipper-Ci5JbfjE.js";
20
20
  import { createZip } from "./file-zipper.es.js";
@@ -2088,7 +2088,7 @@ const makeDefaultItems = ({
2088
2088
  disabled: false,
2089
2089
  name: "acceptTrackedChangeBySelection",
2090
2090
  tooltip: toolbarTexts2.trackChangesAccept,
2091
- command: "acceptTrackedChangeBySelection",
2091
+ command: "acceptTrackedChangeFromToolbar",
2092
2092
  icon: toolbarIcons2.trackChangesAccept,
2093
2093
  group: "left",
2094
2094
  attributes: {
@@ -2100,7 +2100,7 @@ const makeDefaultItems = ({
2100
2100
  disabled: false,
2101
2101
  name: "rejectTrackedChangeOnSelection",
2102
2102
  tooltip: toolbarTexts2.trackChangesReject,
2103
- command: "rejectTrackedChangeOnSelection",
2103
+ command: "rejectTrackedChangeFromToolbar",
2104
2104
  icon: toolbarIcons2.trackChangesReject,
2105
2105
  group: "left",
2106
2106
  attributes: {
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-SPGEoEi0.js";
3
- import "./chunks/editor-DC9ZOqdt.js";
2
+ import { T } from "./chunks/toolbar-DjuLzygc.js";
3
+ import "./chunks/editor-D1Q0suDz.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-BJzqCihw.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-GExnUB7l.cjs");
4
4
  require("./chunks/vue-DKMj1I9B.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, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-Beeng5kU.es.js";
1
+ import { A, a, _, C, D, E, b, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-XXbEUVCc.es.js";
2
2
  import "./chunks/vue-ZWZLQtoU.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-BJzqCihw.cjs");
4
- const superdoc = require("./chunks/index-BHS2aLqo.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-GExnUB7l.cjs");
4
+ const superdoc = require("./chunks/index-7exCeEb1.cjs");
5
5
  require("./chunks/vue-DKMj1I9B.cjs");
6
6
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
7
7
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,5 +1,5 @@
1
- import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-Beeng5kU.es.js";
2
- import { D, H, P, S as S2, m, l } from "./chunks/index-D9KYAvvg.es.js";
1
+ import { a, E, b, S, d, i, j, n, r, p, q } from "./chunks/super-editor.es-XXbEUVCc.es.js";
2
+ import { D, H, P, S as S2, m, l } from "./chunks/index-DDGjYIm1.es.js";
3
3
  import "./chunks/vue-ZWZLQtoU.es.js";
4
4
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
5
5
  export {