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
@@ -9,11 +9,11 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- 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, hideDimmingOverlay_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;
12
+ 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, hideDimmingOverlay_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;
13
13
  import * as Y from "yjs";
14
14
  import { UndoManager, Item as Item$1, ContentType, Text as Text$1, XmlElement, encodeStateAsUpdate } from "yjs";
15
- import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName, $ as TrackInsertMarkName, a0 as v4, a1 as TrackFormatMarkName, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as encodeCSSFromPPr, at as twipsToPixels$2, au as resolveRunProperties, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-CpuOoAUa.js";
16
- import { D as DocxZipper } from "./docx-zipper-Dk99r397.js";
15
+ import { P as PluginKey, a as Plugin, M as Mapping, N as NodeSelection, S as Selection, T as TextSelection, b as Slice, D as DOMSerializer, F as Fragment, c as DOMParser$1, d as Mark$1, e as dropPoint, A as AllSelection, p as process$1, B as Buffer2, f as callOrGet, g as getExtensionConfigField, h as getMarkType, i as getMarksFromSelection, j as getNodeType, k as getSchemaTypeNameByName, l as Schema$1, m as cleanSchemaItem, n as canSplit, o as defaultBlockAt$1, q as liftTarget, r as canJoin, s as joinPoint, t as replaceStep$1, R as ReplaceAroundStep$1, u as isTextSelection, v as getMarkRange, w as isMarkActive, x as isNodeActive, y as deleteProps, z as processContent, C as htmlHandler, E as ReplaceStep, G as twipsToInches, H as inchesToTwips, I as ptToTwips, J as getResolvedParagraphProperties, K as linesToTwips, L as changeListLevel, O as findParentNode, Q as isList, U as updateNumberingProperties, V as ListHelpers, W as isMacOS, X as isIOS, Y as getSchemaTypeByName, Z as inputRulesPlugin, _ as TrackDeleteMarkName$1, $ as TrackInsertMarkName$1, a0 as v4, a1 as TrackFormatMarkName$1, a2 as comments_module_events, a3 as findMark, a4 as objectIncludes, a5 as AddMarkStep, a6 as RemoveMarkStep, a7 as twipsToLines, a8 as pixelsToTwips, a9 as helpers, aa as posToDOMRect, ab as CommandService, ac as SuperConverter, ad as createDocument, ae as createDocFromMarkdown, af as createDocFromHTML, ag as EditorState, ah as isActive, ai as unflattenListsInHtml, aj as resolveParagraphProperties, ak as _getReferencedTableStyles, al as parseSizeUnit, am as minMax, an as updateDOMAttributes, ao as findChildren$5, ap as generateRandomSigned32BitIntStrId, aq as decodeRPrFromMarks, ar as calculateResolvedParagraphProperties, as as encodeCSSFromPPr, at as twipsToPixels$2, au as resolveRunProperties, av as encodeCSSFromRPr, aw as generateOrderedListIndex, ax as docxNumberingHelpers, ay as InputRule, az as convertSizeToCSS, aA as SelectionRange, aB as Transform, aC as findParentNodeClosestToPos, aD as isInTable$1, aE as generateDocxRandomId, aF as insertNewRelationship, aG as inchesToPixels, aH as kebabCase, aI as getUnderlineCssString } from "./converter-DZNL-ld-.js";
16
+ import { D as DocxZipper } from "./docx-zipper-DukE72iM.js";
17
17
  import { ref, computed, createElementBlock, openBlock, withModifiers, Fragment as Fragment$1, renderList, normalizeClass, createCommentVNode, toDisplayString, createElementVNode, createApp } from "vue";
18
18
  var GOOD_LEAF_SIZE = 200;
19
19
  var RopeSequence = function RopeSequence2() {
@@ -10875,13 +10875,13 @@ const findTrackedMarkBetween = ({
10875
10875
  return markFound;
10876
10876
  };
10877
10877
  const markInsertion = ({ tr, from: from2, to, user, date }) => {
10878
- tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackDeleteMarkName]);
10879
- tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackInsertMarkName]);
10878
+ tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackDeleteMarkName$1]);
10879
+ tr.removeMark(from2, to, tr.doc.type.schema.marks[TrackInsertMarkName$1]);
10880
10880
  let trackedMark = findTrackedMarkBetween({
10881
10881
  tr,
10882
10882
  from: from2,
10883
10883
  to,
10884
- markName: TrackInsertMarkName,
10884
+ markName: TrackInsertMarkName$1,
10885
10885
  attrs: { authorEmail: user.email }
10886
10886
  });
10887
10887
  let id;
@@ -10890,7 +10890,7 @@ const markInsertion = ({ tr, from: from2, to, user, date }) => {
10890
10890
  } else {
10891
10891
  id = v4();
10892
10892
  }
10893
- const insertionMark = tr.doc.type.schema.marks[TrackInsertMarkName].create({
10893
+ const insertionMark = tr.doc.type.schema.marks[TrackInsertMarkName$1].create({
10894
10894
  id,
10895
10895
  author: user.name,
10896
10896
  authorEmail: user.email,
@@ -10916,7 +10916,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
10916
10916
  tr,
10917
10917
  from: from2,
10918
10918
  to,
10919
- markName: TrackDeleteMarkName,
10919
+ markName: TrackDeleteMarkName$1,
10920
10920
  attrs: { authorEmail: user.email }
10921
10921
  });
10922
10922
  let id;
@@ -10927,7 +10927,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
10927
10927
  } else {
10928
10928
  id = v4();
10929
10929
  }
10930
- const deletionMark = tr.doc.type.schema.marks[TrackDeleteMarkName].create({
10930
+ const deletionMark = tr.doc.type.schema.marks[TrackDeleteMarkName$1].create({
10931
10931
  id,
10932
10932
  author: user.name,
10933
10933
  authorEmail: user.email,
@@ -10940,7 +10940,7 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
10940
10940
  if (node.type.name.includes("table")) {
10941
10941
  return;
10942
10942
  }
10943
- if (node.isInline && node.marks.find((mark) => mark.type.name === TrackInsertMarkName && mark.attrs.authorEmail === user.email)) {
10943
+ if (node.isInline && node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1 && mark.attrs.authorEmail === user.email)) {
10944
10944
  const removeStep = new ReplaceStep(
10945
10945
  deletionMap.map(Math.max(from2, pos)),
10946
10946
  deletionMap.map(Math.min(to, pos + node.nodeSize)),
@@ -10949,14 +10949,14 @@ const markDeletion = ({ tr, from: from2, to, user, date, id: providedId }) => {
10949
10949
  if (!tr.maybeStep(removeStep).failed) {
10950
10950
  deletionMap.appendMap(removeStep.getMap());
10951
10951
  }
10952
- } else if (node.isInline && !node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
10952
+ } else if (node.isInline && !node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
10953
10953
  nodes.push(node);
10954
10954
  tr.addMark(
10955
10955
  deletionMap.map(Math.max(from2, pos)),
10956
10956
  deletionMap.map(Math.min(to, pos + node.nodeSize)),
10957
10957
  deletionMark
10958
10958
  );
10959
- } else if (node.attrs.track && !node.attrs.track.find((trackAttr) => trackAttr.type === TrackDeleteMarkName) && !["bulletList", "orderedList"].includes(node.type.name)) ;
10959
+ } else if (node.attrs.track && !node.attrs.track.find((trackAttr) => trackAttr.type === TrackDeleteMarkName$1) && !["bulletList", "orderedList"].includes(node.type.name)) ;
10960
10960
  });
10961
10961
  return { deletionMark, deletionMap, nodes };
10962
10962
  };
@@ -11023,7 +11023,7 @@ const getTrackChanges = (state, id = null) => {
11023
11023
  }
11024
11024
  allInlineNodes.forEach(({ node, pos }) => {
11025
11025
  const { marks } = node;
11026
- const trackedMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
11026
+ const trackedMarks = [TrackInsertMarkName$1, TrackDeleteMarkName$1, TrackFormatMarkName$1];
11027
11027
  if (marks.length > 0) {
11028
11028
  marks.forEach((mark) => {
11029
11029
  if (trackedMarks.includes(mark.type.name)) {
@@ -11136,7 +11136,7 @@ const getTrackChangesDecorations = (state, onlyOriginalShown, onlyModifiedShown)
11136
11136
  return DecorationSet.empty;
11137
11137
  }
11138
11138
  trackedChanges.forEach(({ mark, from: from2, to }) => {
11139
- if (mark.type.name === TrackInsertMarkName) {
11139
+ if (mark.type.name === TrackInsertMarkName$1) {
11140
11140
  if (onlyOriginalShown) {
11141
11141
  const decoration = Decoration.inline(from2, to, {
11142
11142
  class: "track-insert-dec hidden"
@@ -11154,7 +11154,7 @@ const getTrackChangesDecorations = (state, onlyOriginalShown, onlyModifiedShown)
11154
11154
  decorations.push(decoration);
11155
11155
  }
11156
11156
  }
11157
- if (mark.type.name === TrackDeleteMarkName) {
11157
+ if (mark.type.name === TrackDeleteMarkName$1) {
11158
11158
  if (onlyOriginalShown) {
11159
11159
  const decoration = Decoration.inline(from2, to, {
11160
11160
  class: "track-delete-dec normal"
@@ -11186,7 +11186,7 @@ const getTrackChangesDecorations = (state, onlyOriginalShown, onlyModifiedShown)
11186
11186
  decorations.push(decorationWidget);
11187
11187
  }
11188
11188
  }
11189
- if (mark.type.name === TrackFormatMarkName) {
11189
+ if (mark.type.name === TrackFormatMarkName$1) {
11190
11190
  if (onlyOriginalShown) {
11191
11191
  const decoration = Decoration.inline(from2, to, {
11192
11192
  class: "track-format-dec before"
@@ -11207,7 +11207,7 @@ const getTrackChangesDecorations = (state, onlyOriginalShown, onlyModifiedShown)
11207
11207
  });
11208
11208
  return DecorationSet.create(state.doc, decorations);
11209
11209
  };
11210
- const CommentMarkName = "commentMark";
11210
+ const CommentMarkName$1 = "commentMark";
11211
11211
  const resolveCommentMeta = ({ converter, importedId }) => {
11212
11212
  const comments = converter?.comments || [];
11213
11213
  const matchingImportedComment = comments.find((c) => c.importedId == importedId);
@@ -11238,7 +11238,7 @@ const ensureFallbackComment = ({ converter, matchingImportedComment, commentId,
11238
11238
  const removeCommentsById = ({ commentId, state, tr, dispatch }) => {
11239
11239
  const positions = getCommentPositionsById(commentId, state.doc);
11240
11240
  positions.forEach(({ from: from2, to }) => {
11241
- tr.removeMark(from2, to, state.schema.marks[CommentMarkName]);
11241
+ tr.removeMark(from2, to, state.schema.marks[CommentMarkName$1]);
11242
11242
  });
11243
11243
  dispatch(tr);
11244
11244
  };
@@ -11246,7 +11246,7 @@ const getCommentPositionsById = (commentId, doc2) => {
11246
11246
  const positions = [];
11247
11247
  doc2.descendants((node, pos) => {
11248
11248
  const { marks } = node;
11249
- const commentMark = marks.find((mark) => mark.type.name === CommentMarkName);
11249
+ const commentMark = marks.find((mark) => mark.type.name === CommentMarkName$1);
11250
11250
  if (commentMark) {
11251
11251
  const { attrs } = commentMark;
11252
11252
  const { commentId: currentCommentId } = attrs;
@@ -11266,7 +11266,7 @@ const prepareCommentsForExport = (doc2, tr, schema, comments = []) => {
11266
11266
  const endNodes = [];
11267
11267
  const seen = /* @__PURE__ */ new Set();
11268
11268
  doc2.descendants((node, pos) => {
11269
- const commentMarks = node.marks?.filter((mark) => mark.type.name === CommentMarkName) || [];
11269
+ const commentMarks = node.marks?.filter((mark) => mark.type.name === CommentMarkName$1) || [];
11270
11270
  commentMarks.forEach((commentMark) => {
11271
11271
  const { attrs = {} } = commentMark;
11272
11272
  const { commentId } = attrs;
@@ -11394,7 +11394,7 @@ const prepareCommentsForImport = (doc2, tr, schema, converter) => {
11394
11394
  importedId,
11395
11395
  internal: itemToMark.internal
11396
11396
  };
11397
- tr.addMark(start2, pos + 1, schema.marks[CommentMarkName].create(markAttrs));
11397
+ tr.addMark(start2, pos + 1, schema.marks[CommentMarkName$1].create(markAttrs));
11398
11398
  toDelete.push({ start: pos, end: pos + 1 });
11399
11399
  } else if (type.name === "commentReference") {
11400
11400
  toDelete.push({ start: pos, end: pos + 1 });
@@ -11512,7 +11512,7 @@ const updatePosition = ({ allCommentPositions, threadId, pos, currentBounds, nod
11512
11512
  existing.bounds.bottom = Math.max(existing.bounds.bottom, currentBounds.bottom);
11513
11513
  }
11514
11514
  };
11515
- const TRACK_CHANGE_MARKS = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
11515
+ const TRACK_CHANGE_MARKS = [TrackInsertMarkName$1, TrackDeleteMarkName$1, TrackFormatMarkName$1];
11516
11516
  const CommentsPluginKey = new PluginKey("comments");
11517
11517
  const CommentsPlugin = Extension.create({
11518
11518
  name: "comments",
@@ -11528,7 +11528,7 @@ const CommentsPlugin = Extension.create({
11528
11528
  tr.addMark(
11529
11529
  $from.pos,
11530
11530
  $to.pos,
11531
- this.editor.schema.marks[CommentMarkName].create({
11531
+ this.editor.schema.marks[CommentMarkName$1].create({
11532
11532
  commentId: resolvedCommentId,
11533
11533
  internal: resolvedInternal
11534
11534
  })
@@ -11568,7 +11568,7 @@ const CommentsPlugin = Extension.create({
11568
11568
  doc2.descendants((node, pos) => {
11569
11569
  if (foundStartNode) return;
11570
11570
  const { marks = [] } = node;
11571
- const commentMark = marks.find((mark) => mark.type.name === CommentMarkName);
11571
+ const commentMark = marks.find((mark) => mark.type.name === CommentMarkName$1);
11572
11572
  if (commentMark) {
11573
11573
  const { attrs } = commentMark;
11574
11574
  const wid = attrs.commentId;
@@ -11582,7 +11582,7 @@ const CommentsPlugin = Extension.create({
11582
11582
  tr.addMark(
11583
11583
  foundPos,
11584
11584
  foundPos + foundStartNode.nodeSize,
11585
- this.editor.schema.marks[CommentMarkName].create({
11585
+ this.editor.schema.marks[CommentMarkName$1].create({
11586
11586
  commentId,
11587
11587
  internal: isInternal
11588
11588
  })
@@ -11711,10 +11711,10 @@ const CommentsPlugin = Extension.create({
11711
11711
  prevDoc = doc2;
11712
11712
  shouldUpdate = false;
11713
11713
  const decorations = [];
11714
- const allCommentPositions = onlyActiveThreadChanged ? prevAllCommentPositions : {};
11714
+ const allCommentPositions = {};
11715
11715
  doc2.descendants((node, pos) => {
11716
11716
  const { marks = [] } = node;
11717
- const commentMarks = marks.filter((mark) => mark.type.name === CommentMarkName);
11717
+ const commentMarks = marks.filter((mark) => mark.type.name === CommentMarkName$1);
11718
11718
  let hasActive = false;
11719
11719
  commentMarks.forEach((commentMark) => {
11720
11720
  const { attrs } = commentMark;
@@ -11840,7 +11840,7 @@ const getActiveCommentId = (doc2, selection) => {
11840
11840
  return;
11841
11841
  }
11842
11842
  const { marks = [] } = node;
11843
- const commentMark = marks.find((mark) => mark.type.name === CommentMarkName);
11843
+ const commentMark = marks.find((mark) => mark.type.name === CommentMarkName$1);
11844
11844
  if (commentMark) {
11845
11845
  overlaps.push({
11846
11846
  node,
@@ -11863,7 +11863,7 @@ const getActiveCommentId = (doc2, selection) => {
11863
11863
  }
11864
11864
  });
11865
11865
  const { marks: closestMarks = [] } = closestCommentRangeStart || {};
11866
- const closestCommentMark = closestMarks.find((mark) => mark.type.name === CommentMarkName);
11866
+ const closestCommentMark = closestMarks.find((mark) => mark.type.name === CommentMarkName$1);
11867
11867
  return closestCommentMark?.attrs?.commentId || closestCommentMark?.attrs?.importedId;
11868
11868
  };
11869
11869
  const findTrackedMark = ({
@@ -11913,7 +11913,7 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd
11913
11913
  let nodes = step?.slice?.content?.content || [];
11914
11914
  if (!nodes.length) {
11915
11915
  newEditorState.doc.descendants((node) => {
11916
- const hasFormatMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
11916
+ const hasFormatMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
11917
11917
  if (hasFormatMark) {
11918
11918
  nodes = [node];
11919
11919
  return false;
@@ -11938,19 +11938,19 @@ const handleTrackedChangeTransaction = (trackedChangeMeta, trackedChanges, newEd
11938
11938
  const getTrackedChangeText = ({ nodes, mark, trackedChangeType, isDeletionInsertion }) => {
11939
11939
  let trackedChangeText = "";
11940
11940
  let deletionText = "";
11941
- if (trackedChangeType === TrackInsertMarkName) {
11941
+ if (trackedChangeType === TrackInsertMarkName$1) {
11942
11942
  trackedChangeText = nodes.reduce((acc, node) => {
11943
11943
  if (!node.marks.find((nodeMark) => nodeMark.type.name === mark.type.name)) return acc;
11944
11944
  acc += node?.text || node?.textContent || "";
11945
11945
  return acc;
11946
11946
  }, "");
11947
11947
  }
11948
- if (trackedChangeType === TrackFormatMarkName) {
11948
+ if (trackedChangeType === TrackFormatMarkName$1) {
11949
11949
  trackedChangeText = translateFormatChangesToEnglish(mark.attrs);
11950
11950
  }
11951
- if (trackedChangeType === TrackDeleteMarkName || isDeletionInsertion) {
11951
+ if (trackedChangeType === TrackDeleteMarkName$1 || isDeletionInsertion) {
11952
11952
  deletionText = nodes.reduce((acc, node) => {
11953
- if (!node.marks.find((nodeMark) => nodeMark.type.name === TrackDeleteMarkName)) return acc;
11953
+ if (!node.marks.find((nodeMark) => nodeMark.type.name === TrackDeleteMarkName$1)) return acc;
11954
11954
  acc += node?.text || node?.textContent || "";
11955
11955
  return acc;
11956
11956
  }, "");
@@ -12016,7 +12016,7 @@ function findRangeById(doc2, id) {
12016
12016
  if (to === null || pos + node.nodeSize > to) to = pos + node.nodeSize;
12017
12017
  }
12018
12018
  const commentMark = node.marks.find(
12019
- (m) => m.type.name === CommentMarkName && (m.attrs.commentId === id || m.attrs.importedId === id)
12019
+ (m) => m.type.name === CommentMarkName$1 && (m.attrs.commentId === id || m.attrs.importedId === id)
12020
12020
  );
12021
12021
  if (commentMark) {
12022
12022
  if (from2 === null || pos < from2) from2 = pos;
@@ -12026,7 +12026,7 @@ function findRangeById(doc2, id) {
12026
12026
  return from2 !== null && to !== null ? { from: from2, to } : null;
12027
12027
  }
12028
12028
  const replaceStep = ({ state, tr, step, newTr, map: map2, user, date, originalStep, originalStepIndex }) => {
12029
- const deletionMarkSchema = state.schema.marks[TrackDeleteMarkName];
12029
+ const deletionMarkSchema = state.schema.marks[TrackDeleteMarkName$1];
12030
12030
  const deletionMark = findMark(state, deletionMarkSchema, false);
12031
12031
  const positionTo = deletionMark ? deletionMark.to : step.to;
12032
12032
  const newStep = new ReplaceStep(
@@ -12090,17 +12090,17 @@ const addMarkStep = ({ state, step, newTr, doc: doc2, user, date }) => {
12090
12090
  if (!node.isInline) {
12091
12091
  return;
12092
12092
  }
12093
- if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
12093
+ if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
12094
12094
  return false;
12095
12095
  }
12096
12096
  const existingChangeMark = node.marks.find(
12097
- (mark) => [TrackDeleteMarkName, TrackFormatMarkName].includes(mark.type.name)
12097
+ (mark) => [TrackDeleteMarkName$1, TrackFormatMarkName$1].includes(mark.type.name)
12098
12098
  );
12099
12099
  const wid = existingChangeMark ? existingChangeMark.attrs.id : v4();
12100
12100
  newTr.addMark(Math.max(step.from, pos), Math.min(step.to, pos + node.nodeSize), step.mark);
12101
12101
  const allowedMarks = ["bold", "italic", "strike", "underline", "textStyle"];
12102
12102
  if (allowedMarks.includes(step.mark.type.name) && !node.marks.find((mark) => mark.type === step.mark.type)) {
12103
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
12103
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
12104
12104
  let after = [];
12105
12105
  let before = [];
12106
12106
  if (formatChangeMark) {
@@ -12136,7 +12136,7 @@ const addMarkStep = ({ state, step, newTr, doc: doc2, user, date }) => {
12136
12136
  ];
12137
12137
  }
12138
12138
  if (after.length || before.length) {
12139
- const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
12139
+ const newFormatMark = state.schema.marks[TrackFormatMarkName$1].create({
12140
12140
  id: wid,
12141
12141
  author: user.name,
12142
12142
  authorEmail: user.email,
@@ -12168,13 +12168,13 @@ const removeMarkStep = ({ state, step, newTr, doc: doc2, user, date }) => {
12168
12168
  if (!node.isInline) {
12169
12169
  return true;
12170
12170
  }
12171
- if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
12171
+ if (node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
12172
12172
  return false;
12173
12173
  }
12174
12174
  newTr.removeMark(Math.max(step.from, pos), Math.min(step.to, pos + node.nodeSize), step.mark);
12175
12175
  const allowedMarks = ["bold", "italic", "strike", "underline", "textStyle"];
12176
12176
  if (allowedMarks.includes(step.mark.type.name) && node.marks.find((mark) => mark.type === step.mark.type)) {
12177
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
12177
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
12178
12178
  let after = [];
12179
12179
  let before = [];
12180
12180
  if (formatChangeMark) {
@@ -12202,7 +12202,7 @@ const removeMarkStep = ({ state, step, newTr, doc: doc2, user, date }) => {
12202
12202
  ];
12203
12203
  }
12204
12204
  if (after.length || before.length) {
12205
- const newFormatMark = state.schema.marks[TrackFormatMarkName].create({
12205
+ const newFormatMark = state.schema.marks[TrackFormatMarkName$1].create({
12206
12206
  id: v4(),
12207
12207
  author: user.name,
12208
12208
  authorEmail: user.email,
@@ -12283,7 +12283,7 @@ const trackedTransaction = ({ tr, state, user }) => {
12283
12283
  newTr.setMeta("addToHistory", tr.getMeta("addToHistory"));
12284
12284
  }
12285
12285
  if (tr.selectionSet) {
12286
- const deletionMarkSchema = state.schema.marks[TrackDeleteMarkName];
12286
+ const deletionMarkSchema = state.schema.marks[TrackDeleteMarkName$1];
12287
12287
  const deletionMark = findMark(state, deletionMarkSchema, false);
12288
12288
  if (tr.selection instanceof TextSelection && (tr.selection.from < state.selection.from || tr.getMeta("inputType") === "deleteContentBackward")) {
12289
12289
  const caretPos = map2.map(tr.selection.from, -1);
@@ -13913,7 +13913,7 @@ const isHeadless = (editor) => {
13913
13913
  const shouldSkipNodeView = (editor) => {
13914
13914
  return isHeadless(editor);
13915
13915
  };
13916
- const summaryVersion = "1.0.0-beta.32";
13916
+ const summaryVersion = "1.0.0-beta.33";
13917
13917
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
13918
13918
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
13919
13919
  function mapAttributes(attrs) {
@@ -14705,7 +14705,7 @@ const _Editor = class _Editor extends EventEmitter {
14705
14705
  { default: remarkStringify },
14706
14706
  { default: remarkGfm }
14707
14707
  ] = await Promise.all([
14708
- import("./index-SGV4U12y.js"),
14708
+ import("./index-hX4H5xPH.js"),
14709
14709
  import("./index-DRCvimau.js"),
14710
14710
  import("./index-C_x_N6Uh.js"),
14711
14711
  import("./index-D_sWOSiG.js"),
@@ -14910,7 +14910,7 @@ const _Editor = class _Editor extends EventEmitter {
14910
14910
  * Process collaboration migrations
14911
14911
  */
14912
14912
  processCollaborationMigrations() {
14913
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.32");
14913
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.33");
14914
14914
  if (!this.options.ydoc) return;
14915
14915
  const metaMap = this.options.ydoc.getMap("meta");
14916
14916
  let docVersion = metaMap.get("version");
@@ -27795,7 +27795,7 @@ function hitTestFragment(layout, pageHit, blocks, measures, point) {
27795
27795
  });
27796
27796
  for (const fragment of fragments) {
27797
27797
  if (fragment.kind !== "para") continue;
27798
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
27798
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
27799
27799
  if (blockIndex === -1) continue;
27800
27800
  const block = blocks[blockIndex];
27801
27801
  const measure = measures[blockIndex];
@@ -27822,7 +27822,7 @@ const hitTestAtomicFragment = (pageHit, blocks, measures, point) => {
27822
27822
  const withinX = point.x >= fragment.x && point.x <= fragment.x + fragment.width;
27823
27823
  const withinY = point.y >= fragment.y && point.y <= fragment.y + fragment.height;
27824
27824
  if (!withinX || !withinY) continue;
27825
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
27825
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
27826
27826
  if (blockIndex === -1) continue;
27827
27827
  const block = blocks[blockIndex];
27828
27828
  const measure = measures[blockIndex];
@@ -27961,7 +27961,7 @@ function clickToPosition(layout, blocks, measures, containerPoint, domContainer,
27961
27961
  blockId = fragment.blockId;
27962
27962
  pageIndex = pi;
27963
27963
  column = determineColumn(layout, fragment.x);
27964
- const blockIndex = blocks.findIndex((b) => b.id === fragment.blockId);
27964
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
27965
27965
  if (blockIndex !== -1) {
27966
27966
  const measure = measures[blockIndex];
27967
27967
  if (measure && measure.kind === "paragraph") {
@@ -28111,6 +28111,44 @@ function clickToPosition(layout, blocks, measures, containerPoint, domContainer,
28111
28111
  });
28112
28112
  return null;
28113
28113
  }
28114
+ function findBlockIndexByFragmentId(blocks, fragmentBlockId, targetPmRange) {
28115
+ const index2 = blocks.findIndex(
28116
+ (block) => block.id === fragmentBlockId && block.kind !== "pageBreak" && block.kind !== "sectionBreak"
28117
+ );
28118
+ if (index2 !== -1) {
28119
+ return index2;
28120
+ }
28121
+ const baseBlockId = fragmentBlockId.replace(/-\d+$/, "");
28122
+ if (baseBlockId === fragmentBlockId) {
28123
+ return -1;
28124
+ }
28125
+ const matchingIndices = [];
28126
+ blocks.forEach((block, idx) => {
28127
+ if (block.id === baseBlockId && block.kind === "paragraph") {
28128
+ matchingIndices.push(idx);
28129
+ }
28130
+ });
28131
+ if (matchingIndices.length === 0) {
28132
+ return -1;
28133
+ }
28134
+ if (matchingIndices.length === 1) {
28135
+ return matchingIndices[0];
28136
+ }
28137
+ if (targetPmRange) {
28138
+ for (const idx of matchingIndices) {
28139
+ const block = blocks[idx];
28140
+ if (block.kind !== "paragraph") continue;
28141
+ const hasOverlap = block.runs.some((run) => {
28142
+ if (run.pmStart == null || run.pmEnd == null) return false;
28143
+ return run.pmEnd > targetPmRange.from && run.pmStart < targetPmRange.to;
28144
+ });
28145
+ if (hasOverlap) {
28146
+ return idx;
28147
+ }
28148
+ }
28149
+ }
28150
+ return matchingIndices[0];
28151
+ }
28114
28152
  function selectionToRects(layout, blocks, measures, from2, to) {
28115
28153
  if (from2 === to) {
28116
28154
  return [];
@@ -28119,8 +28157,10 @@ function selectionToRects(layout, blocks, measures, from2, to) {
28119
28157
  layout.pages.forEach((page, pageIndex) => {
28120
28158
  page.fragments.forEach((fragment) => {
28121
28159
  if (fragment.kind === "para") {
28122
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
28123
- if (blockIndex === -1) return;
28160
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId, { from: from2, to });
28161
+ if (blockIndex === -1) {
28162
+ return;
28163
+ }
28124
28164
  const block = blocks[blockIndex];
28125
28165
  const measure = measures[blockIndex];
28126
28166
  if (!block || block.kind !== "paragraph" || measure?.kind !== "paragraph") {
@@ -28156,7 +28196,7 @@ function selectionToRects(layout, blocks, measures, from2, to) {
28156
28196
  return;
28157
28197
  }
28158
28198
  if (isAtomicFragment(fragment)) {
28159
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
28199
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId, { from: from2, to });
28160
28200
  if (blockIndex === -1) return;
28161
28201
  const block = blocks[blockIndex];
28162
28202
  const pmRange = getAtomicPmRange(fragment, block);
@@ -28177,7 +28217,7 @@ function getFragmentAtPosition(layout, blocks, measures, pos) {
28177
28217
  for (let pageIndex = 0; pageIndex < layout.pages.length; pageIndex += 1) {
28178
28218
  const page = layout.pages[pageIndex];
28179
28219
  for (const fragment of page.fragments) {
28180
- const blockIndex = blocks.findIndex((block2) => block2.id === fragment.blockId);
28220
+ const blockIndex = findBlockIndexByFragmentId(blocks, fragment.blockId);
28181
28221
  if (blockIndex === -1) {
28182
28222
  continue;
28183
28223
  }
@@ -37764,6 +37804,10 @@ function isInRegisteredSurface(event) {
37764
37804
  }
37765
37805
  return false;
37766
37806
  }
37807
+ const CommentMarkName = "commentMark";
37808
+ const TrackInsertMarkName = "trackInsert";
37809
+ const TrackDeleteMarkName = "trackDelete";
37810
+ const TrackFormatMarkName = "trackFormat";
37767
37811
  function isValidFieldAnnotationAttributes(attrs) {
37768
37812
  if (!attrs || typeof attrs !== "object") return false;
37769
37813
  const a = attrs;
@@ -39307,6 +39351,44 @@ _scrollCleanup = new WeakMap();
39307
39351
  _remoteCursorRafHandle = new WeakMap();
39308
39352
  _scrollTimeout = new WeakMap();
39309
39353
  _PresentationEditor_instances = new WeakSet();
39354
+ /**
39355
+ * Collect all comment and tracked change positions from the PM document.
39356
+ *
39357
+ * This is the authoritative source for PM positions - called after every
39358
+ * layout update to ensure positions are always fresh from the current document.
39359
+ *
39360
+ * The returned positions contain PM offsets (start, end) which can be passed
39361
+ * to getCommentBounds() to compute visual layout coordinates.
39362
+ *
39363
+ * @returns Map of threadId -> { threadId, start, end }
39364
+ */
39365
+ collectCommentPositions_fn = function() {
39366
+ const editorState = __privateGet(this, _editor3)?.state;
39367
+ if (!editorState) return {};
39368
+ const doc2 = editorState.doc;
39369
+ const trackChangeMarks = [TrackInsertMarkName, TrackDeleteMarkName, TrackFormatMarkName];
39370
+ const pmPositions = {};
39371
+ doc2.descendants((node, pos) => {
39372
+ const marks = node.marks || [];
39373
+ for (const mark of marks) {
39374
+ let threadId;
39375
+ if (mark.type.name === CommentMarkName) {
39376
+ threadId = mark.attrs.commentId || mark.attrs.importedId;
39377
+ } else if (trackChangeMarks.includes(mark.type.name)) {
39378
+ threadId = mark.attrs.id;
39379
+ }
39380
+ if (!threadId) continue;
39381
+ const nodeEnd = pos + node.nodeSize;
39382
+ if (!pmPositions[threadId]) {
39383
+ pmPositions[threadId] = { threadId, start: pos, end: nodeEnd };
39384
+ } else {
39385
+ pmPositions[threadId].start = Math.min(pmPositions[threadId].start, pos);
39386
+ pmPositions[threadId].end = Math.max(pmPositions[threadId].end, nodeEnd);
39387
+ }
39388
+ }
39389
+ });
39390
+ return pmPositions;
39391
+ };
39310
39392
  /**
39311
39393
  * Aggregate an array of rects into a single bounding box.
39312
39394
  */
@@ -40320,6 +40402,11 @@ rerender_fn = async function() {
40320
40402
  const payload = { layout, blocks, measures, metrics };
40321
40403
  this.emit("layoutUpdated", payload);
40322
40404
  this.emit("paginationUpdate", payload);
40405
+ const commentPositions = __privateMethod(this, _PresentationEditor_instances, collectCommentPositions_fn).call(this);
40406
+ const positionKeys = Object.keys(commentPositions);
40407
+ if (positionKeys.length > 0) {
40408
+ this.emit("commentPositions", { positions: commentPositions });
40409
+ }
40323
40410
  if (__privateGet(this, _telemetryEmitter) && metrics) {
40324
40411
  __privateGet(this, _telemetryEmitter).call(this, { type: "layout", data: { layout, blocks, measures, metrics } });
40325
40412
  }
@@ -45974,6 +46061,7 @@ const Paragraph = OxmlNode.create({
45974
46061
  return ["p", Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes), 0];
45975
46062
  },
45976
46063
  addNodeView() {
46064
+ if (this.editor.options?.mode !== "docx" || !this.editor.converter) return null;
45977
46065
  if (shouldSkipNodeView(this.editor)) return null;
45978
46066
  return ({ node, editor, getPos, decorations, extensionAttrs }) => {
45979
46067
  return new ParagraphNodeView(node, editor, getPos, decorations, extensionAttrs);
@@ -46216,7 +46304,7 @@ const CommentReference = Node$1.create({
46216
46304
  }
46217
46305
  });
46218
46306
  const CommentsMark = Mark.create({
46219
- name: CommentMarkName,
46307
+ name: CommentMarkName$1,
46220
46308
  group: "comments",
46221
46309
  excludes: "",
46222
46310
  addOptions() {
@@ -46235,10 +46323,10 @@ const CommentsMark = Mark.create({
46235
46323
  };
46236
46324
  },
46237
46325
  parseDOM() {
46238
- return [{ tag: CommentMarkName }];
46326
+ return [{ tag: CommentMarkName$1 }];
46239
46327
  },
46240
46328
  renderDOM({ htmlAttributes }) {
46241
- return [CommentMarkName, Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
46329
+ return [CommentMarkName$1, Attribute.mergeAttributes(this.options.htmlAttributes, htmlAttributes)];
46242
46330
  }
46243
46331
  });
46244
46332
  let cache = /* @__PURE__ */ new WeakMap();
@@ -56450,7 +56538,7 @@ function addLinkRelationship({ editor, href }) {
56450
56538
  }
56451
56539
  const trackInsertClass = "track-insert";
56452
56540
  const TrackInsert = Mark.create({
56453
- name: TrackInsertMarkName,
56541
+ name: TrackInsertMarkName$1,
56454
56542
  group: "track",
56455
56543
  inclusive: false,
56456
56544
  addOptions() {
@@ -56527,7 +56615,7 @@ const TrackInsert = Mark.create({
56527
56615
  });
56528
56616
  const trackDeleteClass = "track-delete";
56529
56617
  const TrackDelete = Mark.create({
56530
- name: TrackDeleteMarkName,
56618
+ name: TrackDeleteMarkName$1,
56531
56619
  group: "track",
56532
56620
  inclusive: false,
56533
56621
  addOptions() {
@@ -56636,7 +56724,7 @@ const index = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePropert
56636
56724
  }, Symbol.toStringTag, { value: "Module" }));
56637
56725
  const trackFormatClass = "track-format";
56638
56726
  const TrackFormat = Mark.create({
56639
- name: TrackFormatMarkName,
56727
+ name: TrackFormatMarkName$1,
56640
56728
  group: "track",
56641
56729
  inclusive: false,
56642
56730
  addOptions() {
@@ -56850,7 +56938,7 @@ const TrackChanges = Extension.create({
56850
56938
  tr.setMeta("inputType", "acceptReject");
56851
56939
  const map2 = new Mapping();
56852
56940
  doc2.nodesBetween(from2, to, (node, pos) => {
56853
- if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
56941
+ if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
56854
56942
  const deletionStep = new ReplaceStep(
56855
56943
  map2.map(Math.max(pos, from2)),
56856
56944
  map2.map(Math.min(pos + node.nodeSize, to)),
@@ -56858,8 +56946,8 @@ const TrackChanges = Extension.create({
56858
56946
  );
56859
56947
  tr.step(deletionStep);
56860
56948
  map2.appendMap(deletionStep.getMap());
56861
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName)) {
56862
- const insertionMark = node.marks.find((mark) => mark.type.name === TrackInsertMarkName);
56949
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1)) {
56950
+ const insertionMark = node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1);
56863
56951
  tr.step(
56864
56952
  new RemoveMarkStep(
56865
56953
  map2.map(Math.max(pos, from2)),
@@ -56867,8 +56955,8 @@ const TrackChanges = Extension.create({
56867
56955
  insertionMark
56868
56956
  )
56869
56957
  );
56870
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName)) {
56871
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
56958
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1)) {
56959
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
56872
56960
  tr.step(
56873
56961
  new RemoveMarkStep(
56874
56962
  map2.map(Math.max(pos, from2)),
@@ -56890,8 +56978,8 @@ const TrackChanges = Extension.create({
56890
56978
  tr.setMeta("inputType", "acceptReject");
56891
56979
  const map2 = new Mapping();
56892
56980
  doc2.nodesBetween(from2, to, (node, pos) => {
56893
- if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName)) {
56894
- const deletionMark = node.marks.find((mark) => mark.type.name === TrackDeleteMarkName);
56981
+ if (node.marks && node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1)) {
56982
+ const deletionMark = node.marks.find((mark) => mark.type.name === TrackDeleteMarkName$1);
56895
56983
  tr.step(
56896
56984
  new RemoveMarkStep(
56897
56985
  map2.map(Math.max(pos, from2)),
@@ -56899,7 +56987,7 @@ const TrackChanges = Extension.create({
56899
56987
  deletionMark
56900
56988
  )
56901
56989
  );
56902
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName)) {
56990
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackInsertMarkName$1)) {
56903
56991
  const deletionStep = new ReplaceStep(
56904
56992
  map2.map(Math.max(pos, from2)),
56905
56993
  map2.map(Math.min(pos + node.nodeSize, to)),
@@ -56907,8 +56995,8 @@ const TrackChanges = Extension.create({
56907
56995
  );
56908
56996
  tr.step(deletionStep);
56909
56997
  map2.appendMap(deletionStep.getMap());
56910
- } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName)) {
56911
- const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName);
56998
+ } else if (node.marks && node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1)) {
56999
+ const formatChangeMark = node.marks.find((mark) => mark.type.name === TrackFormatMarkName$1);
56912
57000
  formatChangeMark.attrs.before.forEach((oldMark) => {
56913
57001
  tr.step(
56914
57002
  new AddMarkStep(
@@ -57084,7 +57172,7 @@ const getChangesByIdToResolve = (state, id) => {
57084
57172
  const hasContentBetween = state.doc.textBetween(left2.from, right2.to, "\n").length > getSegmentSize(left2) + getSegmentSize(right2);
57085
57173
  return !hasContentBetween;
57086
57174
  };
57087
- const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName && secondType === TrackInsertMarkName || firstType === TrackInsertMarkName && secondType === TrackDeleteMarkName;
57175
+ const isComplementaryPair = (firstType, secondType) => firstType === TrackDeleteMarkName$1 && secondType === TrackInsertMarkName$1 || firstType === TrackInsertMarkName$1 && secondType === TrackDeleteMarkName$1;
57088
57176
  const linkedBefore = [];
57089
57177
  const linkedAfter = [];
57090
57178
  const collectDirection = (direction, collection) => {