@harbour-enterprises/superdoc 1.10.0-next.2 → 1.10.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.
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const vue = require("./vue-De9wkgLl.cjs");
4
- const superdoc = require("./index-DqPLMNAA.cjs");
5
- const index = require("./index-CVYVBhMd.cjs");
4
+ const superdoc = require("./index-C0RvCsI5.cjs");
5
+ const index = require("./index-DtrAARn7.cjs");
6
6
  function self(vars) {
7
7
  const {
8
8
  opacityDisabled,
@@ -1,6 +1,6 @@
1
1
  import { d as defineComponent, h, T as Transition, p as process$1, w as watchEffect, b as computed, r as ref, e as onMounted, f as onUnmounted, c as createElementBlock, o as openBlock, a as createBaseVNode, g as createCommentVNode, i as createVNode, u as unref } from "./vue-DI6_Tcq0.es.js";
2
- import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-olwEekvR.es.js";
3
- import { o as derived, p as c, q as cB, r as fadeInTransition, s as cM, w as warnOnce, u as useConfig, t as useTheme, v as pxfy, x as createKey, y as useThemeClass, z as useCompitable, B as _export_sfc } from "./index-C_Hp6VPp.es.js";
2
+ import { N as NBaseLoading, u as useSuperdocStore, s as storeToRefs, a as useSelection } from "./index-BLdA_js5.es.js";
3
+ import { o as derived, p as c, q as cB, r as fadeInTransition, s as cM, w as warnOnce, u as useConfig, t as useTheme, v as pxfy, x as createKey, y as useThemeClass, z as useCompitable, B as _export_sfc } from "./index-ChwEIGjx.es.js";
4
4
  function self(vars) {
5
5
  const {
6
6
  opacityDisabled,
@@ -33729,7 +33729,7 @@ class SuperConverter {
33729
33729
  static getStoredSuperdocVersion(docx) {
33730
33730
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
33731
33731
  }
33732
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.10.0-next.2") {
33732
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.10.0-next.3") {
33733
33733
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
33734
33734
  }
33735
33735
  /**
@@ -33730,7 +33730,7 @@ class SuperConverter {
33730
33730
  static getStoredSuperdocVersion(docx) {
33731
33731
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
33732
33732
  }
33733
- static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.10.0-next.2") {
33733
+ static setStoredSuperdocVersion(docx = this.convertedXml, version = "1.10.0-next.3") {
33734
33734
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version, false);
33735
33735
  }
33736
33736
  /**
@@ -1,8 +1,8 @@
1
- import { D as BIT8, F as MAX_SAFE_INTEGER, G as create, H as BITS7, I as utf8TextDecoder, J as create$1, K as setIfUndefined, L as create$2, O as from, Q as floor$1, R as equalityDeep, U as writeVarUint, V as writeVarString, W as toUint8Array, X as createEncoder, Y as createInjectionKey, Z as toString, $ as throwError, a0 as useSsrAdapter, a1 as configProviderInjectionKey, a2 as cssrAnchorMetaName, a3 as globalStyle, q as cB, p as c, a4 as isMounted, a5 as commonVariables$2, s as cM, a6 as cNotM, a7 as cE, o as derived, a8 as changeColor, a9 as insideModal, aa as insidePopover, ab as resolveWrappedSlot, ac as on, w as warnOnce, u as useConfig, ad as useMergedState, ae as useMemo, t as useTheme, af as useRtl, x as createKey, y as useThemeClass, ag as createId, ah as call, ai as render, aj as messageProviderInjectionKey, ak as messageApiInjectionKey, j as getStarterExtensions, k as getRichTextExtensions, E as Editor, al as fromBase64, am as onChange, an as varStorage, ao as toBase64, ap as createUint8ArrayFromArrayBuffer, aq as offChange, ar as writeVarUint8Array, as as map, at as length, au as isNode, av as min, aw as pow, ax as comments_module_events, ay as getFileObject, az as getTrackChanges, C as CommentsPluginKey, n as TrackChangesBasePluginKey, aA as ellipsisVerticalSvg, aB as xmarkIconSvg, aC as checkIconSvg, aD as caretDownIconSvg, aE as commentIconSvg, B as _export_sfc, aF as NDropdown, b as SuperInput, aG as vClickOutside, P as PresentationEditor, a as SuperEditor, A as AIWriter, aH as NConfigProvider, S as SuperToolbar } from "./index-C_Hp6VPp.es.js";
1
+ import { D as BIT8, F as MAX_SAFE_INTEGER, G as create, H as BITS7, I as utf8TextDecoder, J as create$1, K as setIfUndefined, L as create$2, O as from, Q as floor$1, R as equalityDeep, U as writeVarUint, V as writeVarString, W as toUint8Array, X as createEncoder, Y as createInjectionKey, Z as toString, $ as throwError, a0 as useSsrAdapter, a1 as configProviderInjectionKey, a2 as cssrAnchorMetaName, a3 as globalStyle, q as cB, p as c, a4 as isMounted, a5 as commonVariables$2, s as cM, a6 as cNotM, a7 as cE, o as derived, a8 as changeColor, a9 as insideModal, aa as insidePopover, ab as resolveWrappedSlot, ac as on, w as warnOnce, u as useConfig, ad as useMergedState, ae as useMemo, t as useTheme, af as useRtl, x as createKey, y as useThemeClass, ag as createId, ah as call, ai as render, aj as messageProviderInjectionKey, ak as messageApiInjectionKey, j as getStarterExtensions, k as getRichTextExtensions, E as Editor, al as fromBase64, am as onChange, an as varStorage, ao as toBase64, ap as createUint8ArrayFromArrayBuffer, aq as offChange, ar as writeVarUint8Array, as as map, at as length, au as isNode, av as min, aw as pow, ax as comments_module_events, ay as getFileObject, az as getTrackChanges, C as CommentsPluginKey, n as TrackChangesBasePluginKey, aA as ellipsisVerticalSvg, aB as xmarkIconSvg, aC as checkIconSvg, aD as caretDownIconSvg, aE as commentIconSvg, B as _export_sfc, aF as NDropdown, b as SuperInput, aG as vClickOutside, P as PresentationEditor, a as SuperEditor, A as AIWriter, aH as NConfigProvider, S as SuperToolbar } from "./index-ChwEIGjx.es.js";
2
2
  import { B as BlankDOCX } from "./blank-docx-ABm6XYAA.es.js";
3
3
  import "./jszip-BjHgpFjf.es.js";
4
4
  import "./helpers-BsvIMOxu.es.js";
5
- import "./SuperConverter-BpZ2bvUr.es.js";
5
+ import "./SuperConverter-ZYSwcJf1.es.js";
6
6
  import { E as EventEmitter } from "./eventemitter3-B9iqx_uA.es.js";
7
7
  import { j as inject, k as provide, b as computed, l as onBeforeUnmount, p as process$1, m as onBeforeMount, d as defineComponent, h, t as toRef, T as Transition, n as TransitionGroup, w as watchEffect, r as ref, e as onMounted, q as Teleport, F as Fragment, s as reactive, v as effectScope, x as markRaw, y as toRaw, z as isRef, A as isReactive, B as getCurrentInstance, C as watch, u as unref, D as hasInjectionContext, E as nextTick, G as getCurrentScope, H as onScopeDispose, I as toRefs, J as global, K as shallowRef, c as createElementBlock, o as openBlock, L as toDisplayString, i as createVNode, M as withCtx, a as createBaseVNode, N as normalizeStyle, g as createCommentVNode, O as createBlock, P as withModifiers, Q as normalizeClass, R as resolveDirective, S as withDirectives, U as renderList, V as createApp, W as resolveDynamicComponent, X as defineAsyncComponent } from "./vue-DI6_Tcq0.es.js";
8
8
  import "./jszip.min-BWx74pG_.es.js";
@@ -7692,7 +7692,7 @@ const _sfc_main = {
7692
7692
  __name: "SuperDoc",
7693
7693
  emits: ["selection-update"],
7694
7694
  setup(__props, { emit: __emit }) {
7695
- const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-to_pB5n1.es.js"));
7695
+ const PdfViewer = defineAsyncComponent(() => import("./PdfViewer-dwbfrfko.es.js"));
7696
7696
  const superdocStore = useSuperdocStore();
7697
7697
  const commentsStore = useCommentsStore();
7698
7698
  const {
@@ -8677,7 +8677,7 @@ class SuperDoc extends EventEmitter {
8677
8677
  this.config.colors = shuffleArray(this.config.colors);
8678
8678
  this.userColorMap = /* @__PURE__ */ new Map();
8679
8679
  this.colorIndex = 0;
8680
- this.version = "1.10.0-next.2";
8680
+ this.version = "1.10.0-next.3";
8681
8681
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8682
8682
  this.superdocId = config.superdocId || v4();
8683
8683
  this.colors = this.config.colors;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
- const index = require("./index-CVYVBhMd.cjs");
2
+ const index = require("./index-DtrAARn7.cjs");
3
3
  const blankDocx = require("./blank-docx-DfW3Eeh2.cjs");
4
4
  require("./jszip-C8_CqJxM.cjs");
5
5
  require("./helpers-C7_u3NNJ.cjs");
6
- require("./SuperConverter-DvmXYI7t.cjs");
6
+ require("./SuperConverter-hF2FJjBO.cjs");
7
7
  const eventemitter3 = require("./eventemitter3-BQuRcMPI.cjs");
8
8
  const vue = require("./vue-De9wkgLl.cjs");
9
9
  require("./jszip.min-BPh2MMAa.cjs");
@@ -7709,7 +7709,7 @@ const _sfc_main = {
7709
7709
  __name: "SuperDoc",
7710
7710
  emits: ["selection-update"],
7711
7711
  setup(__props, { emit: __emit }) {
7712
- const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-Cj9PpDSy.cjs")));
7712
+ const PdfViewer = vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./PdfViewer-4PQtbO4Y.cjs")));
7713
7713
  const superdocStore = useSuperdocStore();
7714
7714
  const commentsStore = useCommentsStore();
7715
7715
  const {
@@ -8694,7 +8694,7 @@ class SuperDoc extends eventemitter3.EventEmitter {
8694
8694
  this.config.colors = shuffleArray(this.config.colors);
8695
8695
  this.userColorMap = /* @__PURE__ */ new Map();
8696
8696
  this.colorIndex = 0;
8697
- this.version = "1.10.0-next.2";
8697
+ this.version = "1.10.0-next.3";
8698
8698
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
8699
8699
  this.superdocId = config.superdocId || uuid.v4();
8700
8700
  this.colors = this.config.colors;
@@ -1,4 +1,4 @@
1
- import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as decodeRPrFromMarks, a3 as carbonCopy, a4 as calculateResolvedParagraphProperties, a5 as encodeCSSFromPPr, a6 as encodeCSSFromRPr, a7 as generateOrderedListIndex, a8 as docxNumberingHelpers, a9 as InputRule, aa as insertNewRelationship, ab as kebabCase$1, ac as getUnderlineCssString } from "./SuperConverter-BpZ2bvUr.es.js";
1
+ import { g as generateDocxRandomId, T as TextSelection$1, o as objectIncludes, w as wrapTextsInRuns, D as DOMParser$1, c as createDocFromMarkdown, a as createDocFromHTML, F as Fragment, b as chainableEditorState, d as convertMarkdownToHTML, f as findParentNode, e as findParentNodeClosestToPos, h as generateRandom32BitHex, i as generateRandomSigned32BitIntStrId, P as PluginKey, j as Plugin, M as Mapping, N as NodeSelection, k as Selection, l as Slice, m as DOMSerializer, n as Mark$1, p as dropPoint, A as AllSelection, q as Schema$1, s as canSplit, t as resolveRunProperties, u as encodeMarksFromRPr, v as liftTarget, x as canJoin, y as joinPoint, z as replaceStep$1, R as ReplaceAroundStep$1, B as htmlHandler, C as ReplaceStep, E as getResolvedParagraphProperties, G as changeListLevel, H as isList$1, I as updateNumberingProperties, L as ListHelpers, J as inputRulesPlugin, K as TrackDeleteMarkName, O as TrackInsertMarkName, Q as TrackFormatMarkName, U as AddMarkStep, V as RemoveMarkStep, W as CommandService, S as SuperConverter, X as EditorState, Y as unflattenListsInHtml, Z as SelectionRange, _ as Transform, $ as resolveParagraphProperties, a0 as resolveDocxFontFamily, a1 as _getReferencedTableStyles, a2 as decodeRPrFromMarks, a3 as carbonCopy, a4 as calculateResolvedParagraphProperties, a5 as encodeCSSFromPPr, a6 as encodeCSSFromRPr, a7 as generateOrderedListIndex, a8 as docxNumberingHelpers, a9 as InputRule, aa as insertNewRelationship, ab as kebabCase$1, ac as getUnderlineCssString } from "./SuperConverter-ZYSwcJf1.es.js";
2
2
  import { B as Buffer$2 } from "./jszip-BjHgpFjf.es.js";
3
3
  import { j as twipsToInches, m as inchesToTwips, p as ptToTwips, d as linesToTwips, f as twipsToLines, k as pixelsToTwips, z as resolveOpcTargetPath, C as getArrayBufferFromUrl, h as halfPointToPoints, c as twipsToPixels$2, D as convertSizeToCSS, E as inchesToPixels } from "./helpers-BsvIMOxu.es.js";
4
4
  import { p as process$1, r as ref, J as global$1, b as computed, c as createElementBlock, F as Fragment$1, U as renderList, P as withModifiers, o as openBlock, Q as normalizeClass, g as createCommentVNode, L as toDisplayString, a as createBaseVNode, V as createApp, e as onMounted, f as onUnmounted, S as withDirectives, u as unref, Y as vModelText, E as nextTick, N as normalizeStyle, C as watch, Z as withKeys, _ as createTextVNode, i as createVNode, h as h$1, $ as readonly, B as getCurrentInstance, l as onBeforeUnmount, s as reactive, m as onBeforeMount, j as inject, a0 as onActivated, a1 as onDeactivated, a2 as Comment, d as defineComponent, k as provide, q as Teleport, t as toRef, a3 as renderSlot, a4 as isVNode, K as shallowRef, w as watchEffect, T as Transition, a5 as mergeProps, a6 as vShow, a7 as cloneVNode, a8 as Text$2, x as markRaw, O as createBlock, M as withCtx, a9 as useCssVars, W as resolveDynamicComponent, aa as normalizeProps, ab as guardReactiveProps } from "./vue-DI6_Tcq0.es.js";
@@ -13723,7 +13723,7 @@ const findTrackedMark = ({
13723
13723
  return markFound;
13724
13724
  };
13725
13725
  const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEditorState, editor) => {
13726
- const { insertedMark, deletionMark, formatMark, deletionNodes } = trackedChangeMeta;
13726
+ const { insertedMark, deletionMark, formatMark, deletionNodes, emitCommentEvent = true } = trackedChangeMeta;
13727
13727
  if (!insertedMark && !deletionMark && !formatMark) {
13728
13728
  return;
13729
13729
  }
@@ -13763,7 +13763,7 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd
13763
13763
  nodes,
13764
13764
  newEditorState
13765
13765
  });
13766
- if (emitParams) editor.emit("commentsUpdate", emitParams);
13766
+ if (emitParams && emitCommentEvent) editor.emit("commentsUpdate", emitParams);
13767
13767
  return newTrackedChanges;
13768
13768
  };
13769
13769
  const getTrackedChangeText = ({ nodes, mark, trackedChangeType, isDeletionInsertion, marks }) => {
@@ -15798,7 +15798,7 @@ const canUseDOM = () => {
15798
15798
  return false;
15799
15799
  }
15800
15800
  };
15801
- const summaryVersion = "1.10.0-next.2";
15801
+ const summaryVersion = "1.10.0-next.3";
15802
15802
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15803
15803
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15804
15804
  function mapAttributes(attrs) {
@@ -18546,7 +18546,7 @@ class Editor extends EventEmitter {
18546
18546
  * Process collaboration migrations
18547
18547
  */
18548
18548
  processCollaborationMigrations() {
18549
- console.debug("[checkVersionMigrations] Current editor version", "1.10.0-next.2");
18549
+ console.debug("[checkVersionMigrations] Current editor version", "1.10.0-next.3");
18550
18550
  if (!this.options.ydoc) return;
18551
18551
  const metaMap = this.options.ydoc.getMap("meta");
18552
18552
  let docVersion = metaMap.get("version");
@@ -27830,7 +27830,7 @@ class DomPainter {
27830
27830
  container.style.height = "100%";
27831
27831
  container.style.position = "relative";
27832
27832
  container.style.overflow = "hidden";
27833
- const { offsetX, offsetY, innerWidth, innerHeight: innerHeight2 } = this.getEffectExtentMetrics(block);
27833
+ const { offsetX, offsetY, innerWidth, innerHeight: innerHeight2 } = this.getEffectExtentMetrics(block, geometry);
27834
27834
  const contentContainer = this.doc.createElement("div");
27835
27835
  contentContainer.style.position = "absolute";
27836
27836
  contentContainer.style.left = `${offsetX}px`;
@@ -28088,13 +28088,14 @@ class DomPainter {
28088
28088
  };
28089
28089
  sanitize(element);
28090
28090
  }
28091
- getEffectExtentMetrics(block) {
28091
+ getEffectExtentMetrics(block, geometry) {
28092
28092
  const left2 = block.effectExtent?.left ?? 0;
28093
28093
  const top2 = block.effectExtent?.top ?? 0;
28094
28094
  const right2 = block.effectExtent?.right ?? 0;
28095
28095
  const bottom2 = block.effectExtent?.bottom ?? 0;
28096
- const width = block.geometry.width ?? 0;
28097
- const height = block.geometry.height ?? 0;
28096
+ const sourceGeometry = geometry ?? block.geometry;
28097
+ const width = sourceGeometry.width ?? 0;
28098
+ const height = sourceGeometry.height ?? 0;
28098
28099
  const innerWidth = Math.max(0, width - left2 - right2);
28099
28100
  const innerHeight2 = Math.max(0, height - top2 - bottom2);
28100
28101
  return { offsetX: left2, offsetY: top2, innerWidth, innerHeight: innerHeight2 };
@@ -72722,7 +72723,8 @@ const TrackChanges = Extension.create({
72722
72723
  text = "",
72723
72724
  user,
72724
72725
  comment,
72725
- addToHistory = true
72726
+ addToHistory = true,
72727
+ emitCommentEvent = true
72726
72728
  } = options;
72727
72729
  const docSize = state.doc.content.size;
72728
72730
  if (from3 < 0 || to > docSize || from3 > to) {
@@ -72791,7 +72793,8 @@ const TrackChanges = Extension.create({
72791
72793
  insertedMark: insertedMark || null,
72792
72794
  deletionMark: deletionMark || null,
72793
72795
  deletionNodes,
72794
- step: mockStep
72796
+ step: mockStep,
72797
+ emitCommentEvent
72795
72798
  });
72796
72799
  tr.setMeta(CommentsPluginKey, { type: "force" });
72797
72800
  tr.setMeta("skipTrackChanges", true);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const superEditor_converter = require("./SuperConverter-DvmXYI7t.cjs");
2
+ const superEditor_converter = require("./SuperConverter-hF2FJjBO.cjs");
3
3
  const jszip = require("./jszip-C8_CqJxM.cjs");
4
4
  const helpers$1 = require("./helpers-C7_u3NNJ.cjs");
5
5
  const vue = require("./vue-De9wkgLl.cjs");
@@ -13740,7 +13740,7 @@ const findTrackedMark = ({
13740
13740
  return markFound;
13741
13741
  };
13742
13742
  const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEditorState, editor) => {
13743
- const { insertedMark, deletionMark, formatMark, deletionNodes } = trackedChangeMeta;
13743
+ const { insertedMark, deletionMark, formatMark, deletionNodes, emitCommentEvent = true } = trackedChangeMeta;
13744
13744
  if (!insertedMark && !deletionMark && !formatMark) {
13745
13745
  return;
13746
13746
  }
@@ -13780,7 +13780,7 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd
13780
13780
  nodes,
13781
13781
  newEditorState
13782
13782
  });
13783
- if (emitParams) editor.emit("commentsUpdate", emitParams);
13783
+ if (emitParams && emitCommentEvent) editor.emit("commentsUpdate", emitParams);
13784
13784
  return newTrackedChanges;
13785
13785
  };
13786
13786
  const getTrackedChangeText = ({ nodes, mark, trackedChangeType, isDeletionInsertion, marks }) => {
@@ -15815,7 +15815,7 @@ const canUseDOM = () => {
15815
15815
  return false;
15816
15816
  }
15817
15817
  };
15818
- const summaryVersion = "1.10.0-next.2";
15818
+ const summaryVersion = "1.10.0-next.3";
15819
15819
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
15820
15820
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
15821
15821
  function mapAttributes(attrs) {
@@ -18563,7 +18563,7 @@ class Editor extends EventEmitter {
18563
18563
  * Process collaboration migrations
18564
18564
  */
18565
18565
  processCollaborationMigrations() {
18566
- console.debug("[checkVersionMigrations] Current editor version", "1.10.0-next.2");
18566
+ console.debug("[checkVersionMigrations] Current editor version", "1.10.0-next.3");
18567
18567
  if (!this.options.ydoc) return;
18568
18568
  const metaMap = this.options.ydoc.getMap("meta");
18569
18569
  let docVersion = metaMap.get("version");
@@ -27847,7 +27847,7 @@ class DomPainter {
27847
27847
  container.style.height = "100%";
27848
27848
  container.style.position = "relative";
27849
27849
  container.style.overflow = "hidden";
27850
- const { offsetX, offsetY, innerWidth, innerHeight: innerHeight2 } = this.getEffectExtentMetrics(block);
27850
+ const { offsetX, offsetY, innerWidth, innerHeight: innerHeight2 } = this.getEffectExtentMetrics(block, geometry);
27851
27851
  const contentContainer = this.doc.createElement("div");
27852
27852
  contentContainer.style.position = "absolute";
27853
27853
  contentContainer.style.left = `${offsetX}px`;
@@ -28105,13 +28105,14 @@ class DomPainter {
28105
28105
  };
28106
28106
  sanitize(element);
28107
28107
  }
28108
- getEffectExtentMetrics(block) {
28108
+ getEffectExtentMetrics(block, geometry) {
28109
28109
  const left2 = block.effectExtent?.left ?? 0;
28110
28110
  const top2 = block.effectExtent?.top ?? 0;
28111
28111
  const right2 = block.effectExtent?.right ?? 0;
28112
28112
  const bottom2 = block.effectExtent?.bottom ?? 0;
28113
- const width = block.geometry.width ?? 0;
28114
- const height = block.geometry.height ?? 0;
28113
+ const sourceGeometry = geometry ?? block.geometry;
28114
+ const width = sourceGeometry.width ?? 0;
28115
+ const height = sourceGeometry.height ?? 0;
28115
28116
  const innerWidth = Math.max(0, width - left2 - right2);
28116
28117
  const innerHeight2 = Math.max(0, height - top2 - bottom2);
28117
28118
  return { offsetX: left2, offsetY: top2, innerWidth, innerHeight: innerHeight2 };
@@ -72739,7 +72740,8 @@ const TrackChanges = Extension.create({
72739
72740
  text = "",
72740
72741
  user,
72741
72742
  comment,
72742
- addToHistory = true
72743
+ addToHistory = true,
72744
+ emitCommentEvent = true
72743
72745
  } = options;
72744
72746
  const docSize = state.doc.content.size;
72745
72747
  if (from3 < 0 || to > docSize || from3 > to) {
@@ -72808,7 +72810,8 @@ const TrackChanges = Extension.create({
72808
72810
  insertedMark: insertedMark || null,
72809
72811
  deletionMark: deletionMark || null,
72810
72812
  deletionNodes,
72811
- step: mockStep
72813
+ step: mockStep,
72814
+ emitCommentEvent
72812
72815
  });
72813
72816
  tr.setMeta(CommentsPluginKey, { type: "force" });
72814
72817
  tr.setMeta("skipTrackChanges", true);
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  require("../chunks/jszip-C8_CqJxM.cjs");
4
4
  require("../chunks/helpers-C7_u3NNJ.cjs");
5
- const superEditor_converter = require("../chunks/SuperConverter-DvmXYI7t.cjs");
5
+ const superEditor_converter = require("../chunks/SuperConverter-hF2FJjBO.cjs");
6
6
  require("../chunks/uuid-R7L08bOx.cjs");
7
7
  exports.SuperConverter = superEditor_converter.SuperConverter;
@@ -1,6 +1,6 @@
1
1
  import "../chunks/jszip-BjHgpFjf.es.js";
2
2
  import "../chunks/helpers-BsvIMOxu.es.js";
3
- import { S } from "../chunks/SuperConverter-BpZ2bvUr.es.js";
3
+ import { S } from "../chunks/SuperConverter-ZYSwcJf1.es.js";
4
4
  import "../chunks/uuid-CjlX8hrF.es.js";
5
5
  export {
6
6
  S as SuperConverter
@@ -1 +1 @@
1
- {"version":3,"file":"track-changes.d.ts","sourceRoot":"","sources":["../../../src/extensions/track-changes/track-changes.js"],"names":[],"mappings":"AAYA,mFAucG;0BAnduB,oBAAoB"}
1
+ {"version":3,"file":"track-changes.d.ts","sourceRoot":"","sources":["../../../src/extensions/track-changes/track-changes.js"],"names":[],"mappings":"AAYA,mFAycG;0BArduB,oBAAoB"}
@@ -34,6 +34,9 @@ export type InsertTrackedChangeOptions = {
34
34
  comment?: string;
35
35
  /** Whether to add the change to the undo history (defaults to true) */
36
36
  addToHistory?: boolean;
37
+ /** Whether to emit commentsUpdate event for the tracked change (defaults to true).
38
+ * Set to false to apply the mark without creating a sidebar entry/bubble. */
39
+ emitCommentEvent?: boolean;
37
40
  };
38
41
  export interface TrackChangesCommands {
39
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"track-changes-commands.d.ts","sourceRoot":"","sources":["../../../src/extensions/types/track-changes-commands.ts"],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AAC;IAEjD;;OAEG;IACH,uBAAuB,EAAE,MAAM,OAAO,CAAC;IAMvC;;;;OAIG;IACH,2BAA2B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAEnE;;;OAGG;IACH,mBAAmB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC;IAEhE;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;;OAGG;IACH,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAEjD;;OAEG;IACH,uBAAuB,EAAE,MAAM,OAAO,CAAC;IAEvC;;;OAGG;IACH,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC;IAMvE;;OAEG;IACH,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAElC;;OAEG;IACH,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAElC;;OAEG;IACH,mBAAmB,EAAE,MAAM,OAAO,CAAC;IAMnC;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;OAEG;IACH,+BAA+B,EAAE,MAAM,OAAO,CAAC;IAE/C;;OAEG;IACH,2BAA2B,EAAE,MAAM,OAAO,CAAC;IAE3C;;OAEG;IACH,2BAA2B,EAAE,MAAM,OAAO,CAAC;CAC5C;AAED,OAAO,QAAQ,qCAAqC,CAAC;IACnD,UAAU,mBAAoB,SAAQ,oBAAoB;KAAG;CAC9D"}
1
+ {"version":3,"file":"track-changes-commands.d.ts","sourceRoot":"","sources":["../../../src/extensions/types/track-changes-commands.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kCAAkC,CAAC;AAE7D,+CAA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M,OAAO,CAAC;IAMvC;;;;OAIG;IACH,2BAA2B,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAEnE;;;OAGG;IACH,mBAAmB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC;IAEhE;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;;OAGG;IACH,uBAAuB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC;IAEjD;;OAEG;IACH,uBAAuB,EAAE,MAAM,OAAO,CAAC;IAEvC;;;OAGG;IACH,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,OAAO,CAAC;IAMvE;;OAEG;IACH,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAElC;;OAEG;IACH,kBAAkB,EAAE,MAAM,OAAO,CAAC;IAElC;;OAEG;IACH,mBAAmB,EAAE,MAAM,OAAO,CAAC;IAMnC;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;OAEG;IACH,8BAA8B,EAAE,MAAM,OAAO,CAAC;IAE9C;;OAEG;IACH,+BAA+B,EAAE,MAAM,OAAO,CAAC;IAE/C;;OAEG;IACH,2BAA2B,EAAE,MAAM,OAAO,CAAC;IAE3C;;OAEG;IACH,2BAA2B,EAAE,MAAM,OAAO,CAAC;CAC5C;AAED,OAAO,QAAQ,qCAAqC,CAAC;IACnD,UAAU,mBAAoB,SAAQ,oBAAoB;KAAG;CAC9D"}
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-CVYVBhMd.cjs");
3
+ const index = require("./chunks/index-DtrAARn7.cjs");
4
4
  const superEditor_docxZipper = require("./super-editor/docx-zipper.cjs");
5
5
  const superEditor_fileZipper = require("./super-editor/file-zipper.cjs");
6
6
  const vue = require("./chunks/vue-De9wkgLl.cjs");
7
- const superEditor_converter = require("./chunks/SuperConverter-DvmXYI7t.cjs");
7
+ const superEditor_converter = require("./chunks/SuperConverter-hF2FJjBO.cjs");
8
8
  function isNodeType(node, name) {
9
9
  return node.type.name === name;
10
10
  }
@@ -1,9 +1,9 @@
1
- import { N as Node, M as Mark } from "./chunks/index-C_Hp6VPp.es.js";
2
- import { A, d, C, E, m, P, e, _, a, b, S, T, n, i, f, l, g, k, j, h, c } from "./chunks/index-C_Hp6VPp.es.js";
1
+ import { N as Node, M as Mark } from "./chunks/index-ChwEIGjx.es.js";
2
+ import { A, d, C, E, m, P, e, _, a, b, S, T, n, i, f, l, g, k, j, h, c } from "./chunks/index-ChwEIGjx.es.js";
3
3
  import { default as default2 } from "./super-editor/docx-zipper.es.js";
4
4
  import { createZip } from "./super-editor/file-zipper.es.js";
5
5
  import { d as defineComponent, c as createElementBlock, o as openBlock, a as createBaseVNode } from "./chunks/vue-DI6_Tcq0.es.js";
6
- import { S as S2, r } from "./chunks/SuperConverter-BpZ2bvUr.es.js";
6
+ import { S as S2, r } from "./chunks/SuperConverter-ZYSwcJf1.es.js";
7
7
  function isNodeType(node, name) {
8
8
  return node.type.name === name;
9
9
  }
package/dist/superdoc.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const index = require("./chunks/index-CVYVBhMd.cjs");
4
- const superdoc = require("./chunks/index-DqPLMNAA.cjs");
3
+ const index = require("./chunks/index-DtrAARn7.cjs");
4
+ const superdoc = require("./chunks/index-C0RvCsI5.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
- const superEditor_converter = require("./chunks/SuperConverter-DvmXYI7t.cjs");
6
+ const superEditor_converter = require("./chunks/SuperConverter-hF2FJjBO.cjs");
7
7
  require("./chunks/jszip-C8_CqJxM.cjs");
8
8
  require("./chunks/helpers-C7_u3NNJ.cjs");
9
9
  require("./chunks/jszip.min-BPh2MMAa.cjs");
@@ -1,7 +1,7 @@
1
- import { d, E, m, e, i, ay, k, h, c } from "./chunks/index-C_Hp6VPp.es.js";
2
- import { D, H, P, S, c as c2, g } from "./chunks/index-olwEekvR.es.js";
1
+ import { d, E, m, e, i, ay, k, h, c } from "./chunks/index-ChwEIGjx.es.js";
2
+ import { D, H, P, S, c as c2, g } from "./chunks/index-BLdA_js5.es.js";
3
3
  import { B } from "./chunks/blank-docx-ABm6XYAA.es.js";
4
- import { S as S2, r } from "./chunks/SuperConverter-BpZ2bvUr.es.js";
4
+ import { S as S2, r } from "./chunks/SuperConverter-ZYSwcJf1.es.js";
5
5
  import "./chunks/jszip-BjHgpFjf.es.js";
6
6
  import "./chunks/helpers-BsvIMOxu.es.js";
7
7
  import "./chunks/jszip.min-BWx74pG_.es.js";
@@ -39284,7 +39284,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
39284
39284
  static getStoredSuperdocVersion(docx) {
39285
39285
  return SuperConverter.getStoredCustomProperty(docx, "SuperdocVersion");
39286
39286
  }
39287
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.10.0-next.2") {
39287
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.10.0-next.3") {
39288
39288
  return SuperConverter.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
39289
39289
  }
39290
39290
  /**
@@ -53149,7 +53149,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
53149
53149
  return markFound;
53150
53150
  };
53151
53151
  const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEditorState, editor) => {
53152
- const { insertedMark, deletionMark, formatMark, deletionNodes } = trackedChangeMeta;
53152
+ const { insertedMark, deletionMark, formatMark, deletionNodes, emitCommentEvent = true } = trackedChangeMeta;
53153
53153
  if (!insertedMark && !deletionMark && !formatMark) {
53154
53154
  return;
53155
53155
  }
@@ -53189,7 +53189,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
53189
53189
  nodes,
53190
53190
  newEditorState
53191
53191
  });
53192
- if (emitParams) editor.emit("commentsUpdate", emitParams);
53192
+ if (emitParams && emitCommentEvent) editor.emit("commentsUpdate", emitParams);
53193
53193
  return newTrackedChanges;
53194
53194
  };
53195
53195
  const getTrackedChangeText = ({ nodes, mark: mark2, trackedChangeType, isDeletionInsertion, marks }) => {
@@ -65699,7 +65699,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
65699
65699
  return false;
65700
65700
  }
65701
65701
  };
65702
- const summaryVersion = "1.10.0-next.2";
65702
+ const summaryVersion = "1.10.0-next.3";
65703
65703
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
65704
65704
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
65705
65705
  function mapAttributes(attrs) {
@@ -68448,7 +68448,7 @@ Please report this to https://github.com/markedjs/marked.`, e) {
68448
68448
  * Process collaboration migrations
68449
68449
  */
68450
68450
  processCollaborationMigrations() {
68451
- console.debug("[checkVersionMigrations] Current editor version", "1.10.0-next.2");
68451
+ console.debug("[checkVersionMigrations] Current editor version", "1.10.0-next.3");
68452
68452
  if (!this.options.ydoc) return;
68453
68453
  const metaMap = this.options.ydoc.getMap("meta");
68454
68454
  let docVersion = metaMap.get("version");
@@ -77734,7 +77734,7 @@ ${o}
77734
77734
  container.style.height = "100%";
77735
77735
  container.style.position = "relative";
77736
77736
  container.style.overflow = "hidden";
77737
- const { offsetX, offsetY, innerWidth, innerHeight: innerHeight2 } = this.getEffectExtentMetrics(block);
77737
+ const { offsetX, offsetY, innerWidth, innerHeight: innerHeight2 } = this.getEffectExtentMetrics(block, geometry);
77738
77738
  const contentContainer = this.doc.createElement("div");
77739
77739
  contentContainer.style.position = "absolute";
77740
77740
  contentContainer.style.left = `${offsetX}px`;
@@ -77992,13 +77992,14 @@ ${o}
77992
77992
  };
77993
77993
  sanitize(element2);
77994
77994
  }
77995
- getEffectExtentMetrics(block) {
77995
+ getEffectExtentMetrics(block, geometry) {
77996
77996
  const left2 = block.effectExtent?.left ?? 0;
77997
77997
  const top2 = block.effectExtent?.top ?? 0;
77998
77998
  const right2 = block.effectExtent?.right ?? 0;
77999
77999
  const bottom2 = block.effectExtent?.bottom ?? 0;
78000
- const width = block.geometry.width ?? 0;
78001
- const height = block.geometry.height ?? 0;
78000
+ const sourceGeometry = geometry ?? block.geometry;
78001
+ const width = sourceGeometry.width ?? 0;
78002
+ const height = sourceGeometry.height ?? 0;
78002
78003
  const innerWidth = Math.max(0, width - left2 - right2);
78003
78004
  const innerHeight2 = Math.max(0, height - top2 - bottom2);
78004
78005
  return { offsetX: left2, offsetY: top2, innerWidth, innerHeight: innerHeight2 };
@@ -122533,7 +122534,8 @@ ${o}
122533
122534
  text: text2 = "",
122534
122535
  user,
122535
122536
  comment: comment2,
122536
- addToHistory = true
122537
+ addToHistory = true,
122538
+ emitCommentEvent = true
122537
122539
  } = options;
122538
122540
  const docSize = state.doc.content.size;
122539
122541
  if (from2 < 0 || to > docSize || from2 > to) {
@@ -122602,7 +122604,8 @@ ${o}
122602
122604
  insertedMark: insertedMark || null,
122603
122605
  deletionMark: deletionMark || null,
122604
122606
  deletionNodes,
122605
- step: mockStep
122607
+ step: mockStep,
122608
+ emitCommentEvent
122606
122609
  });
122607
122610
  tr.setMeta(CommentsPluginKey, { type: "force" });
122608
122611
  tr.setMeta("skipTrackChanges", true);
@@ -152515,7 +152518,7 @@ ${reason}`);
152515
152518
  this.config.colors = shuffleArray(this.config.colors);
152516
152519
  this.userColorMap = /* @__PURE__ */ new Map();
152517
152520
  this.colorIndex = 0;
152518
- this.version = "1.10.0-next.2";
152521
+ this.version = "1.10.0-next.3";
152519
152522
  this.#log("🦋 [superdoc] Using SuperDoc version:", this.version);
152520
152523
  this.superdocId = config2.superdocId || v4();
152521
152524
  this.colors = this.config.colors;