@harbour-enterprises/superdoc 1.0.0-beta.32 → 1.0.0-beta.33

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-CTKbqDWv.cjs → PdfViewer-1hoKlV0M.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-edjIRb_p.es.js → PdfViewer-CVrn4X-3.es.js} +1 -1
  3. package/dist/chunks/{index-Pwv0a9G5.es.js → index-BTDOWM_2.es.js} +57 -32
  4. package/dist/chunks/{index-Cajp7-Xa.cjs → index-VKd9fPLu.cjs} +57 -32
  5. package/dist/chunks/{index-SGV4U12y-BPGxOtvI.es.js → index-hX4H5xPH-ChjioDix.es.js} +1 -1
  6. package/dist/chunks/{index-SGV4U12y-Dh5jaROA.cjs → index-hX4H5xPH-DfkQd7UH.cjs} +1 -1
  7. package/dist/chunks/{super-editor.es-CdGsYGU1.es.js → super-editor.es-CpmC4G9F.es.js} +158 -81
  8. package/dist/chunks/{super-editor.es-BbbbKgEs.cjs → super-editor.es-Dzrm58hW.cjs} +158 -81
  9. package/dist/style.css +33 -33
  10. package/dist/super-editor/ai-writer.es.js +2 -2
  11. package/dist/super-editor/chunks/{converter-CpuOoAUa.js → converter-DZNL-ld-.js} +1 -1
  12. package/dist/super-editor/chunks/{docx-zipper-Dk99r397.js → docx-zipper-DukE72iM.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-CFv-RJI-.js → editor-CJCGDp-l.js} +159 -71
  14. package/dist/super-editor/chunks/{index-SGV4U12y.js → index-hX4H5xPH.js} +1 -1
  15. package/dist/super-editor/chunks/{toolbar-CQr3Xnx9.js → toolbar-D6tqFv6-.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 +6 -6
  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 +214 -112
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
@@ -18263,9 +18263,9 @@ const canMergeTextNodes = (nodeA, nodeB) => {
18263
18263
  const areAttrsEqual = (attrsA = {}, attrsB = {}) => {
18264
18264
  return objectIncludes(attrsA, attrsB);
18265
18265
  };
18266
- const TrackInsertMarkName = "trackInsert";
18267
- const TrackDeleteMarkName = "trackDelete";
18268
- const TrackFormatMarkName = "trackFormat";
18266
+ const TrackInsertMarkName$1 = "trackInsert";
18267
+ const TrackDeleteMarkName$1 = "trackDelete";
18268
+ const TrackFormatMarkName$1 = "trackFormat";
18269
18269
  const generateV2HandlerEntity = (handlerName, translator2) => ({
18270
18270
  handlerName,
18271
18271
  handler: (params2) => {
@@ -20031,7 +20031,7 @@ function handleStyleChangeMarksV2(rPrChange, currentMarks, params2) {
20031
20031
  const runProperties = translator$1N.encode({ ...params2, nodes: [rPr] });
20032
20032
  submarks = encodeMarksFromRPr(runProperties, params2?.docx);
20033
20033
  }
20034
- return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
20034
+ return [{ type: TrackFormatMarkName$1, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
20035
20035
  }
20036
20036
  function handleStyleChangeMarks(rPr, currentMarks) {
20037
20037
  const styleChangeMark = rPr.elements?.find((el) => el.name === "w:rPrChange");
@@ -20046,7 +20046,7 @@ function handleStyleChangeMarks(rPr, currentMarks) {
20046
20046
  authorEmail: attributes["w:authorEmail"]
20047
20047
  };
20048
20048
  const submarks = parseMarks(styleChangeMark);
20049
- return [{ type: TrackFormatMarkName, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
20049
+ return [{ type: TrackFormatMarkName$1, attrs: { ...mappedAttributes, before: submarks, after: [...currentMarks] } }];
20050
20050
  }
20051
20051
  function createImportMarks(marks) {
20052
20052
  const textStyleMarksToCombine = marks.filter((mark) => mark.type === "textStyle");
@@ -20484,7 +20484,7 @@ const cloneRuns = (runs = []) => runs.map((run2) => cloneNode(run2));
20484
20484
  const prepareRunTrackingContext = (node = {}) => {
20485
20485
  const marks = Array.isArray(node.marks) ? node.marks : [];
20486
20486
  const trackingMarks = marks.filter(
20487
- (mark) => mark?.type === TrackInsertMarkName || mark?.type === TrackDeleteMarkName
20487
+ (mark) => mark?.type === TrackInsertMarkName$1 || mark?.type === TrackDeleteMarkName$1
20488
20488
  );
20489
20489
  if (!trackingMarks.length) {
20490
20490
  return { runNode: node, trackingMarksByType: /* @__PURE__ */ new Map() };
@@ -20493,7 +20493,7 @@ const prepareRunTrackingContext = (node = {}) => {
20493
20493
  trackingMarks.forEach((mark) => {
20494
20494
  if (mark?.type) trackingMarksByType.set(mark.type, cloneMark(mark));
20495
20495
  });
20496
- const preservedMarks = marks.filter((mark) => mark?.type !== TrackInsertMarkName && mark?.type !== TrackDeleteMarkName).map((mark) => cloneMark(mark));
20496
+ const preservedMarks = marks.filter((mark) => mark?.type !== TrackInsertMarkName$1 && mark?.type !== TrackDeleteMarkName$1).map((mark) => cloneMark(mark));
20497
20497
  const clonedContent = Array.isArray(node.content) ? node.content.map((child) => {
20498
20498
  const childClone = cloneNode(child);
20499
20499
  const childMarks = Array.isArray(childClone.marks) ? childClone.marks.slice() : [];
@@ -20532,8 +20532,8 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
20532
20532
  return runs;
20533
20533
  }
20534
20534
  if (!trackingMarksByType.size) return runs;
20535
- if (trackingMarksByType.has(TrackInsertMarkName)) {
20536
- const mark = trackingMarksByType.get(TrackInsertMarkName);
20535
+ if (trackingMarksByType.has(TrackInsertMarkName$1)) {
20536
+ const mark = trackingMarksByType.get(TrackInsertMarkName$1);
20537
20537
  const clonedRuns = cloneRuns(runs);
20538
20538
  const wrapper = {
20539
20539
  name: "w:ins",
@@ -20550,8 +20550,8 @@ const ensureTrackedWrapper = (runs, trackingMarksByType = /* @__PURE__ */ new Ma
20550
20550
  };
20551
20551
  return [wrapper];
20552
20552
  }
20553
- if (trackingMarksByType.has(TrackDeleteMarkName)) {
20554
- const mark = trackingMarksByType.get(TrackDeleteMarkName);
20553
+ if (trackingMarksByType.has(TrackDeleteMarkName$1)) {
20554
+ const mark = trackingMarksByType.get(TrackDeleteMarkName$1);
20555
20555
  const clonedRuns = cloneRuns(runs);
20556
20556
  clonedRuns.forEach(renameTextElementsForDeletion);
20557
20557
  const wrapper = {
@@ -41841,7 +41841,7 @@ const _SuperConverter = class _SuperConverter2 {
41841
41841
  static getStoredSuperdocVersion(docx) {
41842
41842
  return _SuperConverter2.getStoredCustomProperty(docx, "SuperdocVersion");
41843
41843
  }
41844
- static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.32") {
41844
+ static setStoredSuperdocVersion(docx = this.convertedXml, version2 = "1.0.0-beta.33") {
41845
41845
  return _SuperConverter2.setStoredCustomProperty(docx, "SuperdocVersion", version2, false);
41846
41846
  }
41847
41847
  /**
@@ -45147,7 +45147,7 @@ var __privateGet$1 = (obj, member, getter) => (__accessCheck$1(obj, member, "rea
45147
45147
  var __privateAdd$1 = (obj, member, value) => member.has(obj) ? __typeError$1("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
45148
45148
  var __privateSet = (obj, member, value, setter) => (__accessCheck$1(obj, member, "write to private field"), member.set(obj, value), value);
45149
45149
  var __privateMethod$1 = (obj, member, method) => (__accessCheck$1(obj, member, "access private method"), method);
45150
- var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, dispatchWithFallback_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, getPluginKeyName_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _map, _editor2, _descriptors, _collections, _editorEntries, _maxCachedEditors, _editorAccessOrder, _pendingCreations, _cacheHits, _cacheMisses, _evictions, _HeaderFooterEditorManager_instances, hasConverter_fn, extractCollections_fn, collectDescriptors_fn, teardownMissingEditors_fn, teardownEditors_fn, createEditor_fn, createEditorContainer_fn, registerConverterEditor_fn, unregisterConverterEditor_fn, updateAccessOrder_fn, enforceCacheSizeLimit_fn, _manager, _mediaFiles, _blockCache, _HeaderFooterLayoutAdapter_instances, getBlocks_fn, getConverterContext_fn, _selectionOverlay, _activeEditorHost, _activeDecorationContainer, _activeRegion, _borderLine, _dimmingOverlay, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _dragHandlerCleanup, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _dragAnchor, _isDragging, _dragExtensionMode, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupDragHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, calculateExtendedSelection_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handlePointerUp, _handleDragOver, _handleDrop, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, layoutPerRIdHeaderFooters_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, waitForPageMount_fn, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, syncTrackedChangesPreferences_fn, deriveTrackedChangesMode_fn, deriveTrackedChangesEnabled_fn, getTrackChangesPluginState_fn, computeDefaultLayoutDefaults_fn, parseColumns_fn, inchesToPx_fn, applyZoom_fn, createLayoutMetrics_fn, convertPageLocalToOverlayCoords_fn, normalizeClientPoint_fn, computeCaretLayoutRect_fn, computeCaretLayoutRectFromDOM_fn, computeTableCaretLayoutRect_fn, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _isEditable, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _VectorShapeView_instances, ensureParentPositioned_fn, _ShapeGroupView_instances, ensureParentPositioned_fn2;
45150
+ var _Attribute_static, getGlobalAttributes_fn, getNodeAndMarksAttributes_fn, _Schema_static, createNodesSchema_fn, createMarksSchema_fn, _events, _ExtensionService_instances, setupExtensions_fn, attachEditorEvents_fn, _editor, _stateValidators, _xmlValidators, _requiredNodeTypes, _requiredMarkTypes, _SuperValidator_instances, initializeValidators_fn, collectValidatorRequirements_fn, analyzeDocument_fn, dispatchWithFallback_fn, _commandService, _Editor_instances, initContainerElement_fn, init_fn, initRichText_fn, onFocus_fn, checkHeadless_fn, registerCopyHandler_fn, insertNewFileData_fn, getPluginKeyName_fn, createExtensionService_fn, createCommandService_fn, createConverter_fn, initMedia_fn, initFonts_fn, checkFonts_fn, determineUnsupportedFonts_fn, createSchema_fn, generatePmData_fn, createView_fn, onCollaborationReady_fn, initComments_fn, dispatchTransaction_fn, handleNodeSelection_fn, prepareDocumentForImport_fn, prepareDocumentForExport_fn, endCollaboration_fn, validateDocumentInit_fn, validateDocumentExport_fn, initDevTools_fn, _map, _editor2, _descriptors, _collections, _editorEntries, _maxCachedEditors, _editorAccessOrder, _pendingCreations, _cacheHits, _cacheMisses, _evictions, _HeaderFooterEditorManager_instances, hasConverter_fn, extractCollections_fn, collectDescriptors_fn, teardownMissingEditors_fn, teardownEditors_fn, createEditor_fn, createEditorContainer_fn, registerConverterEditor_fn, unregisterConverterEditor_fn, updateAccessOrder_fn, enforceCacheSizeLimit_fn, _manager, _mediaFiles, _blockCache, _HeaderFooterLayoutAdapter_instances, getBlocks_fn, getConverterContext_fn, _selectionOverlay, _activeEditorHost, _activeDecorationContainer, _activeRegion, _borderLine, _dimmingOverlay, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _dragHandlerCleanup, _layoutError, _layoutErrorState, _errorBanner, _errorBannerMessage, _telemetryEmitter, _renderScheduled, _pendingDocChange, _isRerendering, _selectionUpdateScheduled, _remoteCursorUpdateScheduled, _rafHandle, _editorListeners, _sectionMetadata, _documentMode, _inputBridge, _trackedChangesMode, _trackedChangesEnabled, _trackedChangesOverrides, _headerFooterManager, _headerFooterAdapter, _headerFooterIdentifier, _multiSectionIdentifier, _headerLayoutResults, _footerLayoutResults, _headerLayoutsByRId, _footerLayoutsByRId, _headerDecorationProvider, _footerDecorationProvider, _headerFooterManagerCleanups, _headerRegions, _footerRegions, _session, _activeHeaderFooterEditor, _overlayManager, _hoverOverlay, _hoverTooltip, _modeBanner, _ariaLiveRegion, _hoverRegion, _clickCount, _lastClickTime, _lastClickPosition, _lastSelectedImageBlockId, _dragAnchor, _isDragging, _dragExtensionMode, _remoteCursorState, _remoteCursorDirty, _remoteCursorOverlay, _localSelectionLayer, _awarenessCleanup, _scrollCleanup, _remoteCursorRafHandle, _scrollTimeout, _PresentationEditor_instances, collectCommentPositions_fn, aggregateLayoutBounds_fn, safeCleanup_fn, setupEditorListeners_fn, setupCollaborationCursors_fn, normalizeAwarenessStates_fn, getFallbackColor_fn, getValidatedColor_fn, scheduleRemoteCursorUpdate_fn, scheduleRemoteCursorReRender_fn, updateRemoteCursors_fn, renderRemoteCursors_fn, renderRemoteCaret_fn, renderRemoteCursorLabel_fn, renderRemoteSelection_fn, setupPointerHandlers_fn, setupDragHandlers_fn, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, calculateExtendedSelection_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _handlePointerUp, _handleDragOver, _handleDrop, _handleDoubleClick, _handleKeyDown, focusHeaderFooterShortcut_fn, scheduleRerender_fn, flushRerenderQueue_fn, rerender_fn, ensurePainter_fn, scheduleSelectionUpdate_fn, updateSelection_fn, resolveLayoutOptions_fn, buildHeaderFooterInput_fn, computeHeaderFooterConstraints_fn, layoutPerRIdHeaderFooters_fn, updateDecorationProviders_fn, createDecorationProvider_fn, findHeaderFooterPageForPageNumber_fn, computeDecorationBox_fn, rebuildHeaderFooterRegions_fn, hitTestHeaderFooterRegion_fn, pointInRegion_fn, activateHeaderFooterRegion_fn, enterHeaderFooterMode_fn, exitHeaderFooterMode_fn, getActiveDomTarget_fn, emitHeaderFooterModeChanged_fn, emitHeaderFooterEditingContext_fn, updateAwarenessSession_fn, updateModeBanner_fn, announce_fn, validateHeaderFooterEditPermission_fn, emitHeaderFooterEditBlocked_fn, resolveDescriptorForRegion_fn, createDefaultHeaderFooter_fn, getPageElement_fn, scrollPageIntoView_fn, waitForPageMount_fn, getBodyPageHeight_fn, getHeaderFooterPageHeight_fn, renderSelectionRects_fn, renderHoverRegion_fn, clearHoverRegion_fn, renderCaretOverlay_fn, getHeaderFooterContext_fn, computeHeaderFooterSelectionRects_fn, syncTrackedChangesPreferences_fn, deriveTrackedChangesMode_fn, deriveTrackedChangesEnabled_fn, getTrackChangesPluginState_fn, computeDefaultLayoutDefaults_fn, parseColumns_fn, inchesToPx_fn, applyZoom_fn, createLayoutMetrics_fn, convertPageLocalToOverlayCoords_fn, normalizeClientPoint_fn, computeCaretLayoutRect_fn, computeCaretLayoutRectFromDOM_fn, computeTableCaretLayoutRect_fn, findLineContainingPos_fn, lineHeightBeforeIndex_fn, getCurrentPageIndex_fn, findRegionForPage_fn, handleLayoutError_fn, decorateError_fn, showLayoutErrorBanner_fn, dismissErrorBanner_fn, createHiddenHost_fn, _windowRoot, _layoutSurfaces, _getTargetDom, _isEditable, _onTargetChanged, _listeners, _currentTarget, _destroyed, _useWindowFallback, _PresentationInputBridge_instances, addListener_fn, dispatchToTarget_fn, forwardKeyboardEvent_fn, forwardTextEvent_fn, forwardCompositionEvent_fn, forwardContextMenu_fn, isEventOnActiveTarget_fn, shouldSkipSurface_fn, isInLayoutSurface_fn, getListenerTargets_fn, isPlainCharacterKey_fn, _DocumentSectionView_instances, init_fn2, addToolTip_fn, _ParagraphNodeView_instances, checkShouldUpdate_fn, updateHTMLAttributes_fn, updateDOMStyles_fn, resolveNeighborParagraphProperties_fn, updateListStyles_fn, initList_fn, checkIsList_fn, createMarker_fn, createSeparator_fn, calculateTabSeparatorStyle_fn, calculateMarkerStyle_fn, removeList_fn, getParagraphContext_fn, scheduleAnimation_fn, cancelScheduledAnimation_fn, _FieldAnnotationView_instances, createAnnotation_fn, _AutoPageNumberNodeView_instances, renderDom_fn, scheduleUpdateNodeStyle_fn, _VectorShapeView_instances, ensureParentPositioned_fn, _ShapeGroupView_instances, ensureParentPositioned_fn2;
45151
45151
  var GOOD_LEAF_SIZE = 200;
45152
45152
  var RopeSequence = function RopeSequence2() {
45153
45153
  };
@@ -55999,13 +55999,13 @@ const findTrackedMarkBetween = ({
55999
55999
  return markFound;
56000
56000
  };
56001
56001
  const markInsertion = ({ tr, from: from2, to, user, date }) => {
56002
- tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackDeleteMarkName]);
56003
- tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackInsertMarkName]);
56002
+ tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackDeleteMarkName$1]);
56003
+ tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackInsertMarkName$1]);
56004
56004
  let trackedMark = findTrackedMarkBetween({
56005
56005
  tr,
56006
56006
  from: from2,
56007
56007
  to,
56008
- markName: TrackInsertMarkName,
56008
+ markName: TrackInsertMarkName$1,
56009
56009
  attrs: { authorEmail: user.email }
56010
56010
  });
56011
56011
  let id;
@@ -56014,7 +56014,7 @@ const markInsertion = ({ tr, from: from2, to, user, date }) => {
56014
56014
  } else {
56015
56015
  id = v4();
56016
56016
  }
56017
- const insertionMark = tr.doc.type.schema.marks[TrackInsertMarkName].create({
56017
+ const insertionMark = tr.doc.type.schema.marks[TrackInsertMarkName$1].create({
56018
56018
  id,
56019
56019
  author: user.name,
56020
56020
  authorEmail: user.email,
@@ -56040,7 +56040,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
56040
56040
  tr,
56041
56041
  from: from2,
56042
56042
  to,
56043
- markName: TrackDeleteMarkName,
56043
+ markName: TrackDeleteMarkName$1,
56044
56044
  attrs: { authorEmail: user.email }
56045
56045
  });
56046
56046
  let id;
@@ -56051,7 +56051,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
56051
56051
  } else {
56052
56052
  id = v4();
56053
56053
  }
56054
- const deletionMark = tr.doc.type.schema.marks[TrackDeleteMarkName].create({
56054
+ const deletionMark = tr.doc.type.schema.marks[TrackDeleteMarkName$1].create({
56055
56055
  id,
56056
56056
  author: user.name,
56057
56057
  authorEmail: user.email,
@@ -56064,7 +56064,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
56064
56064
  if (node.type.name.includes("table")) {
56065
56065
  return;
56066
56066
  }
56067
- if (node.isInline && node.marks.find((mark) => mark.type.name === TrackInsertMarkName && mark.attrs.authorEmail === user.email)) {
56067
+ if (node.isInline && node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1 && mark.attrs.authorEmail === user.email)) {
56068
56068
  const removeStep = new ReplaceStep(
56069
56069
  deletionMap.map(Math.max(from2, pos)),
56070
56070
  deletionMap.map(Math.min(to, pos + node.nodeSize)),
@@ -56073,14 +56073,14 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
56073
56073
  if (!tr.maybeStep(removeStep).failed) {
56074
56074
  deletionMap.appendMap(removeStep.getMap());
56075
56075
  }
56076
- } else if (node.isInline && !node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
56076
+ } else if (node.isInline && !node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
56077
56077
  nodes.push(node);
56078
56078
  tr.addMark(
56079
56079
  deletionMap.map(Math.max(from2, pos)),
56080
56080
  deletionMap.map(Math.min(to, pos + node.nodeSize)),
56081
56081
  deletionMark
56082
56082
  );
56083
- } else if (node.attrs.track && !node.attrs.track.find((trackAttr) => trackAttr.type === TrackDeleteMarkName) && !["bulletList", "orderedList"].includes(node.type.name)) ;
56083
+ } else if (node.attrs.track && !node.attrs.track.find((trackAttr) => trackAttr.type === TrackDeleteMarkName$1) && !["bulletList", "orderedList"].includes(node.type.name)) ;
56084
56084
  });
56085
56085
  return { deletionMark, deletionMap, nodes };
56086
56086
  };
@@ -56147,7 +56147,7 @@ const getTrackChanges = (state2, id = null) => {
56147
56147
  }
56148
56148
  allInlineNodes.forEach(({ node, pos }) => {
56149
56149
  const { marks } = node;
56150
- const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
56150
+ const trackedMarks = [TrackInsertMarkName$1, TrackDeleteMarkName$1, TrackFormatMarkName$1];
56151
56151
  if (marks.length > 0) {
56152
56152
  marks.forEach((mark) => {
56153
56153
  if (trackedMarks.includes(mark.type.name)) {
@@ -56260,7 +56260,7 @@ const getTrackChangesDecorations = (state2, onlyOriginalShown, onlyModifiedShown
56260
56260
  return DecorationSet.empty;
56261
56261
  }
56262
56262
  trackedChanges.forEach(({ mark, from: from2, to }) => {
56263
- if (mark.type.name === TrackInsertMarkName) {
56263
+ if (mark.type.name === TrackInsertMarkName$1) {
56264
56264
  if (onlyOriginalShown) {
56265
56265
  const decoration = Decoration.inline(from2, to, {
56266
56266
  class: "track-insert-dec hidden"
@@ -56278,7 +56278,7 @@ const getTrackChangesDecorations = (state2, onlyOriginalShown, onlyModifiedShown
56278
56278
  decorations.push(decoration);
56279
56279
  }
56280
56280
  }
56281
- if (mark.type.name === TrackDeleteMarkName) {
56281
+ if (mark.type.name === TrackDeleteMarkName$1) {
56282
56282
  if (onlyOriginalShown) {
56283
56283
  const decoration = Decoration.inline(from2, to, {
56284
56284
  class: "track-delete-dec normal"
@@ -56310,7 +56310,7 @@ const getTrackChangesDecorations = (state2, onlyOriginalShown, onlyModifiedShown
56310
56310
  decorations.push(decorationWidget);
56311
56311
  }
56312
56312
  }
56313
- if (mark.type.name === TrackFormatMarkName) {
56313
+ if (mark.type.name === TrackFormatMarkName$1) {
56314
56314
  if (onlyOriginalShown) {
56315
56315
  const decoration = Decoration.inline(from2, to, {
56316
56316
  class: "track-format-dec before"
@@ -56331,7 +56331,7 @@ const getTrackChangesDecorations = (state2, onlyOriginalShown, onlyModifiedShown
56331
56331
  });
56332
56332
  return DecorationSet.create(state2.doc, decorations);
56333
56333
  };
56334
- const CommentMarkName = "commentMark";
56334
+ const CommentMarkName$1 = "commentMark";
56335
56335
  const resolveCommentMeta = ({ converter, importedId }) => {
56336
56336
  const comments = converter?.comments || [];
56337
56337
  const matchingImportedComment = comments.find((c2) => c2.importedId == importedId);
@@ -56362,7 +56362,7 @@ const ensureFallbackComment = ({ converter, matchingImportedComment, commentId,
56362
56362
  const removeCommentsById = ({ commentId, state: state2, tr, dispatch }) => {
56363
56363
  const positions = getCommentPositionsById(commentId, state2.doc);
56364
56364
  positions.forEach(({ from: from2, to }) => {
56365
- tr.removeMark(from2, to, state2.schema.marks[CommentMarkName]);
56365
+ tr.removeMark(from2, to, state2.schema.marks[CommentMarkName$1]);
56366
56366
  });
56367
56367
  dispatch(tr);
56368
56368
  };
@@ -56370,7 +56370,7 @@ const getCommentPositionsById = (commentId, doc2) => {
56370
56370
  const positions = [];
56371
56371
  doc2.descendants((node, pos) => {
56372
56372
  const { marks } = node;
56373
- const commentMark = marks.find((mark) => mark.type.name === CommentMarkName);
56373
+ const commentMark = marks.find((mark) => mark.type.name === CommentMarkName$1);
56374
56374
  if (commentMark) {
56375
56375
  const { attrs } = commentMark;
56376
56376
  const { commentId: currentCommentId } = attrs;
@@ -56390,7 +56390,7 @@ const prepareCommentsForExport = (doc2, tr, schema, comments = []) => {
56390
56390
  const endNodes = [];
56391
56391
  const seen = /* @__PURE__ */ new Set();
56392
56392
  doc2.descendants((node, pos) => {
56393
- const commentMarks = node.marks?.filter((mark) => mark.type.name === CommentMarkName) || [];
56393
+ const commentMarks = node.marks?.filter((mark) => mark.type.name === CommentMarkName$1) || [];
56394
56394
  commentMarks.forEach((commentMark) => {
56395
56395
  const { attrs = {} } = commentMark;
56396
56396
  const { commentId } = attrs;
@@ -56518,7 +56518,7 @@ const prepareCommentsForImport = (doc2, tr, schema, converter) => {
56518
56518
  importedId,
56519
56519
  internal: itemToMark.internal
56520
56520
  };
56521
- tr.addMark(start2, pos + 1, schema.marks[CommentMarkName].create(markAttrs));
56521
+ tr.addMark(start2, pos + 1, schema.marks[CommentMarkName$1].create(markAttrs));
56522
56522
  toDelete.push({ start: pos, end: pos + 1 });
56523
56523
  } else if (type2.name === "commentReference") {
56524
56524
  toDelete.push({ start: pos, end: pos + 1 });
@@ -56636,7 +56636,7 @@ const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, nod
56636
56636
  existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
56637
56637
  }
56638
56638
  };
56639
- const TRACK_CHANGE_MARKS = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
56639
+ const TRACK_CHANGE_MARKS = [TrackInsertMarkName$1, TrackDeleteMarkName$1, TrackFormatMarkName$1];
56640
56640
  const CommentsPluginKey = new PluginKey("comments");
56641
56641
  const CommentsPlugin = Extension.create({
56642
56642
  name: "comments",
@@ -56652,7 +56652,7 @@ const CommentsPlugin = Extension.create({
56652
56652
  tr.addMark(
56653
56653
  $from.pos,
56654
56654
  $to.pos,
56655
- this.editor.schema.marks[CommentMarkName].create({
56655
+ this.editor.schema.marks[CommentMarkName$1].create({
56656
56656
  commentId: resolvedCommentId,
56657
56657
  internal: resolvedInternal
56658
56658
  })
@@ -56692,7 +56692,7 @@ const CommentsPlugin = Extension.create({
56692
56692
  doc2.descendants((node, pos) => {
56693
56693
  if (foundStartNode) return;
56694
56694
  const { marks = [] } = node;
56695
- const commentMark = marks.find((mark) => mark.type.name === CommentMarkName);
56695
+ const commentMark = marks.find((mark) => mark.type.name === CommentMarkName$1);
56696
56696
  if (commentMark) {
56697
56697
  const { attrs } = commentMark;
56698
56698
  const wid = attrs.commentId;
@@ -56706,7 +56706,7 @@ const CommentsPlugin = Extension.create({
56706
56706
  tr.addMark(
56707
56707
  foundPos,
56708
56708
  foundPos + foundStartNode.nodeSize,
56709
- this.editor.schema.marks[CommentMarkName].create({
56709
+ this.editor.schema.marks[CommentMarkName$1].create({
56710
56710
  commentId,
56711
56711
  internal: isInternal
56712
56712
  })
@@ -56835,10 +56835,10 @@ const CommentsPlugin = Extension.create({
56835
56835
  prevDoc = doc2;
56836
56836
  shouldUpdate = false;
56837
56837
  const decorations = [];
56838
- const allCommentPositions = onlyActiveThreadChanged ? prevAllCommentPositions : {};
56838
+ const allCommentPositions = {};
56839
56839
  doc2.descendants((node, pos) => {
56840
56840
  const { marks = [] } = node;
56841
- const commentMarks = marks.filter((mark) => mark.type.name === CommentMarkName);
56841
+ const commentMarks = marks.filter((mark) => mark.type.name === CommentMarkName$1);
56842
56842
  let hasActive = false;
56843
56843
  commentMarks.forEach((commentMark) => {
56844
56844
  const { attrs } = commentMark;
@@ -56964,7 +56964,7 @@ const getActiveCommentId = (doc2, selection) => {
56964
56964
  return;
56965
56965
  }
56966
56966
  const { marks = [] } = node;
56967
- const commentMark = marks.find((mark) => mark.type.name === CommentMarkName);
56967
+ const commentMark = marks.find((mark) => mark.type.name === CommentMarkName$1);
56968
56968
  if (commentMark) {
56969
56969
  overlaps.push({
56970
56970
  node,
@@ -56987,7 +56987,7 @@ const getActiveCommentId = (doc2, selection) => {
56987
56987
  }
56988
56988
  });
56989
56989
  const { marks: closestMarks = [] } = closestCommentRangeStart || {};
56990
- const closestCommentMark = closestMarks.find((mark) => mark.type.name === CommentMarkName);
56990
+ const closestCommentMark = closestMarks.find((mark) => mark.type.name === CommentMarkName$1);
56991
56991
  return closestCommentMark?.attrs?.commentId || closestCommentMark?.attrs?.importedId;
56992
56992
  };
56993
56993
  const findTrackedMark = ({
@@ -57037,7 +57037,7 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd
57037
57037
  let nodes = step?.slice?.content?.content || [];
57038
57038
  if (!nodes.length) {
57039
57039
  newEditorState.doc.descendants((node) => {
57040
- const hasFormatMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
57040
+ const hasFormatMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
57041
57041
  if (hasFormatMark) {
57042
57042
  nodes = [node];
57043
57043
  return false;
@@ -57062,19 +57062,19 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd
57062
57062
  const getTrackedChangeText = ({ nodes, mark, trackedChangeType, isDeletionInsertion }) => {
57063
57063
  let trackedChangeText = "";
57064
57064
  let deletionText = "";
57065
- if (trackedChangeType === TrackInsertMarkName) {
57065
+ if (trackedChangeType === TrackInsertMarkName$1) {
57066
57066
  trackedChangeText = nodes.reduce((acc, node) => {
57067
57067
  if (!node.marks.find((nodeMark) => nodeMark.type.name === mark.type.name)) return acc;
57068
57068
  acc += node?.text || node?.textContent || "";
57069
57069
  return acc;
57070
57070
  }, "");
57071
57071
  }
57072
- if (trackedChangeType === TrackFormatMarkName) {
57072
+ if (trackedChangeType === TrackFormatMarkName$1) {
57073
57073
  trackedChangeText = translateFormatChangesToEnglish(mark.attrs);
57074
57074
  }
57075
- if (trackedChangeType === TrackDeleteMarkName || isDeletionInsertion) {
57075
+ if (trackedChangeType === TrackDeleteMarkName$1 || isDeletionInsertion) {
57076
57076
  deletionText = nodes.reduce((acc, node) => {
57077
- if (!node.marks.find((nodeMark) => nodeMark.type.name === TrackDeleteMarkName)) return acc;
57077
+ if (!node.marks.find((nodeMark) => nodeMark.type.name === TrackDeleteMarkName$1)) return acc;
57078
57078
  acc += node?.text || node?.textContent || "";
57079
57079
  return acc;
57080
57080
  }, "");
@@ -57140,7 +57140,7 @@ function findRangeById(doc2, id) {
57140
57140
  if (to === null || pos + node.nodeSize > to) to = pos + node.nodeSize;
57141
57141
  }
57142
57142
  const commentMark = node.marks.find(
57143
- (m2) => m2.type.name === CommentMarkName && (m2.attrs.commentId === id || m2.attrs.importedId === id)
57143
+ (m2) => m2.type.name === CommentMarkName$1 && (m2.attrs.commentId === id || m2.attrs.importedId === id)
57144
57144
  );
57145
57145
  if (commentMark) {
57146
57146
  if (from2 === null || pos < from2) from2 = pos;
@@ -57150,7 +57150,7 @@ function findRangeById(doc2, id) {
57150
57150
  return from2 !== null && to !== null ? { from: from2, to } : null;
57151
57151
  }
57152
57152
  const replaceStep = ({ state: state2, tr, step, newTr, map: map22, user, date, originalStep, originalStepIndex }) => {
57153
- const deletionMarkSchema = state2.schema.marks[TrackDeleteMarkName];
57153
+ const deletionMarkSchema = state2.schema.marks[TrackDeleteMarkName$1];
57154
57154
  const deletionMark = findMark(state2, deletionMarkSchema, false);
57155
57155
  const positionTo = deletionMark ? deletionMark.to : step.to;
57156
57156
  const newStep = new ReplaceStep(
@@ -57214,17 +57214,17 @@ const addMarkStep = ({ state: state2, step, newTr, doc: doc2, user, date }) => {
57214
57214
  if (!node.isInline) {
57215
57215
  return;
57216
57216
  }
57217
- if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
57217
+ if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
57218
57218
  return false;
57219
57219
  }
57220
57220
  const existingChangeMark = node.marks.find(
57221
- (mark) => [TrackDeleteMarkName, TrackFormatMarkName].includes(mark.type.name)
57221
+ (mark) => [TrackDeleteMarkName$1, TrackFormatMarkName$1].includes(mark.type.name)
57222
57222
  );
57223
57223
  const wid = existingChangeMark ? existingChangeMark.attrs.id : v4();
57224
57224
  newTr.addMark(Math.max(step.from, pos), Math.min(step.to, pos + node.nodeSize), step.mark);
57225
57225
  const allowedMarks = ["bold", "italic", "strike", "underline", "textStyle"];
57226
57226
  if (allowedMarks.includes(step.mark.type.name) && !node.marks.find((mark) => mark.type === step.mark.type)) {
57227
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
57227
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
57228
57228
  let after = [];
57229
57229
  let before = [];
57230
57230
  if (formatChangeMark) {
@@ -57260,7 +57260,7 @@ const addMarkStep = ({ state: state2, step, newTr, doc: doc2, user, date }) => {
57260
57260
  ];
57261
57261
  }
57262
57262
  if (after.length || before.length) {
57263
- const newFormatMark = state2.schema.marks[TrackFormatMarkName].create({
57263
+ const newFormatMark = state2.schema.marks[TrackFormatMarkName$1].create({
57264
57264
  id: wid,
57265
57265
  author: user.name,
57266
57266
  authorEmail: user.email,
@@ -57292,13 +57292,13 @@ const removeMarkStep = ({ state: state2, step, newTr, doc: doc2, user, date }) =
57292
57292
  if (!node.isInline) {
57293
57293
  return true;
57294
57294
  }
57295
- if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
57295
+ if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
57296
57296
  return false;
57297
57297
  }
57298
57298
  newTr.removeMark(Math.max(step.from, pos), Math.min(step.to, pos + node.nodeSize), step.mark);
57299
57299
  const allowedMarks = ["bold", "italic", "strike", "underline", "textStyle"];
57300
57300
  if (allowedMarks.includes(step.mark.type.name) && node.marks.find((mark) => mark.type === step.mark.type)) {
57301
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
57301
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
57302
57302
  let after = [];
57303
57303
  let before = [];
57304
57304
  if (formatChangeMark) {
@@ -57326,7 +57326,7 @@ const removeMarkStep = ({ state: state2, step, newTr, doc: doc2, user, date }) =
57326
57326
  ];
57327
57327
  }
57328
57328
  if (after.length || before.length) {
57329
- const newFormatMark = state2.schema.marks[TrackFormatMarkName].create({
57329
+ const newFormatMark = state2.schema.marks[TrackFormatMarkName$1].create({
57330
57330
  id: v4(),
57331
57331
  author: user.name,
57332
57332
  authorEmail: user.email,
@@ -57407,7 +57407,7 @@ const trackedTransaction = ({ tr, state: state2, user }) => {
57407
57407
  newTr.setMeta("addToHistory", tr.getMeta("addToHistory"));
57408
57408
  }
57409
57409
  if (tr.selectionSet) {
57410
- const deletionMarkSchema = state2.schema.marks[TrackDeleteMarkName];
57410
+ const deletionMarkSchema = state2.schema.marks[TrackDeleteMarkName$1];
57411
57411
  const deletionMark = findMark(state2, deletionMarkSchema, false);
57412
57412
  if (tr.selection instanceof TextSelection$1 && (tr.selection.from < state2.selection.from || tr.getMeta("inputType") === "deleteContentBackward")) {
57413
57413
  const caretPos = map22.map(tr.selection.from, -1);
@@ -59014,7 +59014,7 @@ const isHeadless = (editor) => {
59014
59014
  const shouldSkipNodeView = (editor) => {
59015
59015
  return isHeadless(editor);
59016
59016
  };
59017
- const summaryVersion = "1.0.0-beta.32";
59017
+ const summaryVersion = "1.0.0-beta.33";
59018
59018
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
59019
59019
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
59020
59020
  function mapAttributes(attrs) {
@@ -59803,7 +59803,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
59803
59803
  { default: remarkStringify },
59804
59804
  { default: remarkGfm }
59805
59805
  ] = await Promise.all([
59806
- import("./index-SGV4U12y-BPGxOtvI.es.js"),
59806
+ import("./index-hX4H5xPH-ChjioDix.es.js"),
59807
59807
  import("./index-DRCvimau-Cw339678.es.js"),
59808
59808
  import("./index-C_x_N6Uh-DJn8hIEt.es.js"),
59809
59809
  import("./index-D_sWOSiG-DE96TaT5.es.js"),
@@ -60008,7 +60008,7 @@ const _Editor = class _Editor2 extends EventEmitter$1 {
60008
60008
  * Process collaboration migrations
60009
60009
  */
60010
60010
  processCollaborationMigrations() {
60011
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.32");
60011
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.33");
60012
60012
  if (!this.options.ydoc) return;
60013
60013
  const metaMap = this.options.ydoc.getMap("meta");
60014
60014
  let docVersion = metaMap.get("version");
@@ -72805,7 +72805,7 @@ function hitTestFragment(layout, pageHit, blocks, measures, point) {
72805
72805
  });
72806
72806
  for (const fragment of fragments) {
72807
72807
  if (fragment.kind !== "para") continue;
72808
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
72808
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
72809
72809
  if (blockIndex === -1) continue;
72810
72810
  const block = blocks[blockIndex];
72811
72811
  const measure = measures[blockIndex];
@@ -72832,7 +72832,7 @@ const hitTestAtomicFragment = (pageHit, blocks, measures, point) => {
72832
72832
  const withinX = point.x >= fragment.x && point.x <= fragment.x + fragment.width;
72833
72833
  const withinY = point.y >= fragment.y && point.y <= fragment.y + fragment.height;
72834
72834
  if (!withinX || !withinY) continue;
72835
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
72835
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
72836
72836
  if (blockIndex === -1) continue;
72837
72837
  const block = blocks[blockIndex];
72838
72838
  const measure = measures[blockIndex];
@@ -72971,7 +72971,7 @@ function clickToPosition(layout, blocks, measures, containerPoint, domContainer,
72971
72971
  blockId = fragment.blockId;
72972
72972
  pageIndex = pi;
72973
72973
  column = determineColumn(layout, fragment.x);
72974
- const blockIndex = blocks.findIndex((b2) => b2.id === fragment.blockId);
72974
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
72975
72975
  if (blockIndex !== -1) {
72976
72976
  const measure = measures[blockIndex];
72977
72977
  if (measure && measure.kind === "paragraph") {
@@ -73121,6 +73121,44 @@ function clickToPosition(layout, blocks, measures, containerPoint, domContainer,
73121
73121
  });
73122
73122
  return null;
73123
73123
  }
73124
+ function findBlockIndexByFragmentId(blocks, fragmentBlockId, targetPmRange) {
73125
+ const index2 = blocks.findIndex(
73126
+ (block) => block.id === fragmentBlockId && block.kind !== "pageBreak" && block.kind !== "sectionBreak"
73127
+ );
73128
+ if (index2 !== -1) {
73129
+ return index2;
73130
+ }
73131
+ const baseBlockId = fragmentBlockId.replace(/-\d+$/, "");
73132
+ if (baseBlockId === fragmentBlockId) {
73133
+ return -1;
73134
+ }
73135
+ const matchingIndices = [];
73136
+ blocks.forEach((block, idx) => {
73137
+ if (block.id === baseBlockId && block.kind === "paragraph") {
73138
+ matchingIndices.push(idx);
73139
+ }
73140
+ });
73141
+ if (matchingIndices.length === 0) {
73142
+ return -1;
73143
+ }
73144
+ if (matchingIndices.length === 1) {
73145
+ return matchingIndices[0];
73146
+ }
73147
+ if (targetPmRange) {
73148
+ for (const idx of matchingIndices) {
73149
+ const block = blocks[idx];
73150
+ if (block.kind !== "paragraph") continue;
73151
+ const hasOverlap = block.runs.some((run2) => {
73152
+ if (run2.pmStart == null || run2.pmEnd == null) return false;
73153
+ return run2.pmEnd > targetPmRange.from && run2.pmStart < targetPmRange.to;
73154
+ });
73155
+ if (hasOverlap) {
73156
+ return idx;
73157
+ }
73158
+ }
73159
+ }
73160
+ return matchingIndices[0];
73161
+ }
73124
73162
  function selectionToRects(layout, blocks, measures, from2, to) {
73125
73163
  if (from2 === to) {
73126
73164
  return [];
@@ -73129,8 +73167,10 @@ function selectionToRects(layout, blocks, measures, from2, to) {
73129
73167
  layout.pages.forEach((page, pageIndex) => {
73130
73168
  page.fragments.forEach((fragment) => {
73131
73169
  if (fragment.kind === "para") {
73132
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
73133
- if (blockIndex === -1) return;
73170
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId, { from: from2, to });
73171
+ if (blockIndex === -1) {
73172
+ return;
73173
+ }
73134
73174
  const block = blocks[blockIndex];
73135
73175
  const measure = measures[blockIndex];
73136
73176
  if (!block || block.kind !== "paragraph" || measure?.kind !== "paragraph") {
@@ -73166,7 +73206,7 @@ function selectionToRects(layout, blocks, measures, from2, to) {
73166
73206
  return;
73167
73207
  }
73168
73208
  if (isAtomicFragment(fragment)) {
73169
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
73209
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId, { from: from2, to });
73170
73210
  if (blockIndex === -1) return;
73171
73211
  const block = blocks[blockIndex];
73172
73212
  const pmRange = getAtomicPmRange(fragment, block);
@@ -73187,7 +73227,7 @@ function getFragmentAtPosition(layout, blocks, measures, pos) {
73187
73227
  for (let pageIndex = 0; pageIndex < layout.pages.length; pageIndex += 1) {
73188
73228
  const page = layout.pages[pageIndex];
73189
73229
  for (const fragment of page.fragments) {
73190
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
73230
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
73191
73231
  if (blockIndex === -1) {
73192
73232
  continue;
73193
73233
  }
@@ -82665,6 +82705,10 @@ function isInRegisteredSurface(event) {
82665
82705
  }
82666
82706
  return false;
82667
82707
  }
82708
+ const CommentMarkName = "commentMark";
82709
+ const TrackInsertMarkName = "trackInsert";
82710
+ const TrackDeleteMarkName = "trackDelete";
82711
+ const TrackFormatMarkName = "trackFormat";
82668
82712
  function isValidFieldAnnotationAttributes(attrs) {
82669
82713
  if (!attrs || typeof attrs !== "object") return false;
82670
82714
  const a = attrs;
@@ -84154,6 +84198,33 @@ _scrollCleanup = /* @__PURE__ */ new WeakMap();
84154
84198
  _remoteCursorRafHandle = /* @__PURE__ */ new WeakMap();
84155
84199
  _scrollTimeout = /* @__PURE__ */ new WeakMap();
84156
84200
  _PresentationEditor_instances = /* @__PURE__ */ new WeakSet();
84201
+ collectCommentPositions_fn = function() {
84202
+ const editorState = __privateGet$1(this, _editor3)?.state;
84203
+ if (!editorState) return {};
84204
+ const doc2 = editorState.doc;
84205
+ const trackChangeMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
84206
+ const pmPositions = {};
84207
+ doc2.descendants((node, pos) => {
84208
+ const marks = node.marks || [];
84209
+ for (const mark of marks) {
84210
+ let threadId;
84211
+ if (mark.type.name === CommentMarkName) {
84212
+ threadId = mark.attrs.commentId || mark.attrs.importedId;
84213
+ } else if (trackChangeMarks.includes(mark.type.name)) {
84214
+ threadId = mark.attrs.id;
84215
+ }
84216
+ if (!threadId) continue;
84217
+ const nodeEnd = pos + node.nodeSize;
84218
+ if (!pmPositions[threadId]) {
84219
+ pmPositions[threadId] = { threadId, start: pos, end: nodeEnd };
84220
+ } else {
84221
+ pmPositions[threadId].start = Math.min(pmPositions[threadId].start, pos);
84222
+ pmPositions[threadId].end = Math.max(pmPositions[threadId].end, nodeEnd);
84223
+ }
84224
+ }
84225
+ });
84226
+ return pmPositions;
84227
+ };
84157
84228
  aggregateLayoutBounds_fn = function(rects) {
84158
84229
  if (!rects.length) return null;
84159
84230
  const top2 = Math.min(...rects.map((rect) => rect.top));
@@ -84964,6 +85035,11 @@ rerender_fn = async function() {
84964
85035
  const payload = { layout, blocks, measures, metrics };
84965
85036
  this.emit("layoutUpdated", payload);
84966
85037
  this.emit("paginationUpdate", payload);
85038
+ const commentPositions = __privateMethod$1(this, _PresentationEditor_instances, collectCommentPositions_fn).call(this);
85039
+ const positionKeys = Object.keys(commentPositions);
85040
+ if (positionKeys.length > 0) {
85041
+ this.emit("commentPositions", { positions: commentPositions });
85042
+ }
84967
85043
  if (__privateGet$1(this, _telemetryEmitter) && metrics) {
84968
85044
  __privateGet$1(this, _telemetryEmitter).call(this, { type: "layout", data: { layout, blocks, measures, metrics } });
84969
85045
  }
@@ -90430,6 +90506,7 @@ const Paragraph = OxmlNode.create({
90430
90506
  return ["p", Attribute2.mergeAttributes(this.options.htmlAttributes, htmlAttributes), 0];
90431
90507
  },
90432
90508
  addNodeView() {
90509
+ if (this.editor.options?.mode !== "docx" || !this.editor.converter) return null;
90433
90510
  if (shouldSkipNodeView(this.editor)) return null;
90434
90511
  return ({ node, editor, getPos, decorations, extensionAttrs }) => {
90435
90512
  return new ParagraphNodeView(node, editor, getPos, decorations, extensionAttrs);
@@ -90672,7 +90749,7 @@ const CommentReference = Node$1.create({
90672
90749
  }
90673
90750
  });
90674
90751
  const CommentsMark = Mark2.create({
90675
- name: CommentMarkName,
90752
+ name: CommentMarkName$1,
90676
90753
  group: "comments",
90677
90754
  excludes: "",
90678
90755
  addOptions() {
@@ -90691,10 +90768,10 @@ const CommentsMark = Mark2.create({
90691
90768
  };
90692
90769
  },
90693
90770
  parseDOM() {
90694
- return [{ tag: CommentMarkName }];
90771
+ return [{ tag: CommentMarkName$1 }];
90695
90772
  },
90696
90773
  renderDOM({ htmlAttributes }) {
90697
- return [CommentMarkName, Attribute2.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
90774
+ return [CommentMarkName$1, Attribute2.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
90698
90775
  }
90699
90776
  });
90700
90777
  let cache$2 = /* @__PURE__ */ new WeakMap();
@@ -100878,7 +100955,7 @@ function addLinkRelationship({ editor, href }) {
100878
100955
  }
100879
100956
  const trackInsertClass = "track-insert";
100880
100957
  const TrackInsert = Mark2.create({
100881
- name: TrackInsertMarkName,
100958
+ name: TrackInsertMarkName$1,
100882
100959
  group: "track",
100883
100960
  inclusive: false,
100884
100961
  addOptions() {
@@ -100955,7 +101032,7 @@ const TrackInsert = Mark2.create({
100955
101032
  });
100956
101033
  const trackDeleteClass = "track-delete";
100957
101034
  const TrackDelete = Mark2.create({
100958
- name: TrackDeleteMarkName,
101035
+ name: TrackDeleteMarkName$1,
100959
101036
  group: "track",
100960
101037
  inclusive: false,
100961
101038
  addOptions() {
@@ -101064,7 +101141,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
101064
101141
  }, Symbol.toStringTag, { value: "Module" }));
101065
101142
  const trackFormatClass = "track-format";
101066
101143
  const TrackFormat = Mark2.create({
101067
- name: TrackFormatMarkName,
101144
+ name: TrackFormatMarkName$1,
101068
101145
  group: "track",
101069
101146
  inclusive: false,
101070
101147
  addOptions() {
@@ -101278,7 +101355,7 @@ const TrackChanges = Extension.create({
101278
101355
  tr.setMeta("inputType", "acceptReject");
101279
101356
  const map22 = new Mapping();
101280
101357
  doc2.nodesBetween(from2, to, (node, pos) => {
101281
- if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
101358
+ if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
101282
101359
  const deletionStep = new ReplaceStep(
101283
101360
  map22.map(Math.max(pos, from2)),
101284
101361
  map22.map(Math.min(pos + node.nodeSize, to)),
@@ -101286,8 +101363,8 @@ const TrackChanges = Extension.create({
101286
101363
  );
101287
101364
  tr.step(deletionStep);
101288
101365
  map22.appendMap(deletionStep.getMap());
101289
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName)) {
101290
- const insertionMark = node.marks.find((mark) => mark.type.name === TrackInsertMarkName);
101366
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1)) {
101367
+ const insertionMark = node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1);
101291
101368
  tr.step(
101292
101369
  new RemoveMarkStep(
101293
101370
  map22.map(Math.max(pos, from2)),
@@ -101295,8 +101372,8 @@ const TrackChanges = Extension.create({
101295
101372
  insertionMark
101296
101373
  )
101297
101374
  );
101298
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName)) {
101299
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
101375
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1)) {
101376
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
101300
101377
  tr.step(
101301
101378
  new RemoveMarkStep(
101302
101379
  map22.map(Math.max(pos, from2)),
@@ -101318,8 +101395,8 @@ const TrackChanges = Extension.create({
101318
101395
  tr.setMeta("inputType", "acceptReject");
101319
101396
  const map22 = new Mapping();
101320
101397
  doc2.nodesBetween(from2, to, (node, pos) => {
101321
- if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
101322
- const deletionMark = node.marks.find((mark) => mark.type.name === TrackDeleteMarkName);
101398
+ if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
101399
+ const deletionMark = node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1);
101323
101400
  tr.step(
101324
101401
  new RemoveMarkStep(
101325
101402
  map22.map(Math.max(pos, from2)),
@@ -101327,7 +101404,7 @@ const TrackChanges = Extension.create({
101327
101404
  deletionMark
101328
101405
  )
101329
101406
  );
101330
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName)) {
101407
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1)) {
101331
101408
  const deletionStep = new ReplaceStep(
101332
101409
  map22.map(Math.max(pos, from2)),
101333
101410
  map22.map(Math.min(pos + node.nodeSize, to)),
@@ -101335,8 +101412,8 @@ const TrackChanges = Extension.create({
101335
101412
  );
101336
101413
  tr.step(deletionStep);
101337
101414
  map22.appendMap(deletionStep.getMap());
101338
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName)) {
101339
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
101415
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1)) {
101416
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
101340
101417
  formatChangeMark.attrs.before.forEach((oldMark) => {
101341
101418
  tr.step(
101342
101419
  new AddMarkStep(
@@ -101512,7 +101589,7 @@ const getChangesByIdToResolve = (state2, id) => {
101512
101589
  const hasContentBetween = state2.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
101513
101590
  return !hasContentBetween;
101514
101591
  };
101515
- const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
101592
+ const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName$1 && secondType === TrackInsertMarkName$1 || firstType === TrackInsertMarkName$1 && secondType === TrackDeleteMarkName$1;
101516
101593
  const linkedBefore = [];
101517
101594
  const linkedAfter = [];
101518
101595
  const collectDirection = (direction, collection) => {