superdoc 1.0.0-beta.22 → 1.0.0-beta.23

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 (27) hide show
  1. package/dist/chunks/{PdfViewer-CswYWp1h.cjs → PdfViewer-C9mryfp4.cjs} +1 -1
  2. package/dist/chunks/{PdfViewer-B42JCeYb.es.js → PdfViewer-umOKwA1g.es.js} +1 -1
  3. package/dist/chunks/{index-895wSAjT-CWlZl8zz.cjs → index-DYBG7Xab-CoI6fike.cjs} +1 -1
  4. package/dist/chunks/{index-895wSAjT-C4ksiI6n.es.js → index-DYBG7Xab-mIeLdlWI.es.js} +1 -1
  5. package/dist/chunks/{index-DBmh710D.es.js → index-DyY842H4.es.js} +3 -3
  6. package/dist/chunks/{index-CK4eX_iu.cjs → index-Q-l_lwcU.cjs} +3 -3
  7. package/dist/chunks/{super-editor.es-BkRizaIE.cjs → super-editor.es-49DW4_-r.cjs} +243 -62
  8. package/dist/chunks/{super-editor.es-V792hb-6.es.js → super-editor.es-Cj9Sb-Qv.es.js} +243 -62
  9. package/dist/super-editor/ai-writer.es.js +2 -2
  10. package/dist/super-editor/chunks/{converter-DhkZt4Pv.js → converter-DJyfDFNm.js} +33 -29
  11. package/dist/super-editor/chunks/{docx-zipper-Bajmc-RM.js → docx-zipper-C-9Tqy8I.js} +1 -1
  12. package/dist/super-editor/chunks/{editor-oZjoYNA0.js → editor-f37DOCIX.js} +212 -35
  13. package/dist/super-editor/chunks/{index-895wSAjT.js → index-DYBG7Xab.js} +1 -1
  14. package/dist/super-editor/chunks/{toolbar-Bn5LTbq9.js → toolbar-Devgq8w3.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/toolbar.es.js +2 -2
  21. package/dist/super-editor.cjs +1 -1
  22. package/dist/super-editor.es.js +1 -1
  23. package/dist/superdoc.cjs +2 -2
  24. package/dist/superdoc.es.js +2 -2
  25. package/dist/superdoc.umd.js +245 -64
  26. package/dist/superdoc.umd.js.map +1 -1
  27. package/package.json +1 -1
@@ -12,8 +12,8 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
12
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, _EditorOverlayManager_instances, findDecorationContainer_fn, ensureEditorHost_fn, positionEditorHost_fn, showHeaderFooterBorder_fn, hideHeaderFooterBorder_fn, _instances, _options, _editor3, _visibleHost, _viewportHost, _painterHost, _selectionOverlay2, _hiddenHost, _layoutOptions, _layoutState, _domPainter, _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, _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, setupInputBridge_fn, initHeaderFooterRegistry_fn, _handlePointerDown, getFirstTextPosition_fn, registerPointerClick_fn, selectWordAt_fn, selectParagraphAt_fn, isWordCharacter_fn, _handlePointerMove, _handlePointerLeave, _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-DhkZt4Pv.js";
16
- import { D as DocxZipper } from "./docx-zipper-Bajmc-RM.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, $ 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-DJyfDFNm.js";
16
+ import { D as DocxZipper } from "./docx-zipper-C-9Tqy8I.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() {
@@ -13905,7 +13905,7 @@ const isHeadless = (editor) => {
13905
13905
  const shouldSkipNodeView = (editor) => {
13906
13906
  return isHeadless(editor);
13907
13907
  };
13908
- const summaryVersion = "1.0.0-beta.22";
13908
+ const summaryVersion = "1.0.0-beta.23";
13909
13909
  const nodeKeys = ["group", "content", "marks", "inline", "atom", "defining", "code", "tableRole", "summary"];
13910
13910
  const markKeys = ["group", "inclusive", "excludes", "spanning", "code"];
13911
13911
  function mapAttributes(attrs) {
@@ -14697,7 +14697,7 @@ const _Editor = class _Editor extends EventEmitter {
14697
14697
  { default: remarkStringify },
14698
14698
  { default: remarkGfm }
14699
14699
  ] = await Promise.all([
14700
- import("./index-895wSAjT.js"),
14700
+ import("./index-DYBG7Xab.js"),
14701
14701
  import("./index-DRCvimau.js"),
14702
14702
  import("./index-C_x_N6Uh.js"),
14703
14703
  import("./index-D_sWOSiG.js"),
@@ -14902,7 +14902,7 @@ const _Editor = class _Editor extends EventEmitter {
14902
14902
  * Process collaboration migrations
14903
14903
  */
14904
14904
  processCollaborationMigrations() {
14905
- console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.22");
14905
+ console.debug("[checkVersionMigrations] Current editor version", "1.0.0-beta.23");
14906
14906
  if (!this.options.ydoc) return;
14907
14907
  const metaMap = this.options.ydoc.getMap("meta");
14908
14908
  let docVersion = metaMap.get("version");
@@ -17442,6 +17442,11 @@ const normalizeAlignment = (value) => {
17442
17442
  case "right":
17443
17443
  case "justify":
17444
17444
  return value;
17445
+ case "both":
17446
+ case "distribute":
17447
+ case "numTab":
17448
+ case "thaiDistribute":
17449
+ return "justify";
17445
17450
  case "end":
17446
17451
  return "right";
17447
17452
  case "start":
@@ -19656,6 +19661,11 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
19656
19661
  } else if (computed2.paragraph.alignment) {
19657
19662
  paragraphAttrs.alignment = computed2.paragraph.alignment;
19658
19663
  }
19664
+ const isJustified = paragraphAttrs.alignment === "justify" || paragraphAttrs.alignment === "both";
19665
+ const hasFirstLineIndent = normalizedIndent?.firstLine && normalizedIndent.firstLine > 0;
19666
+ if (isJustified && hasFirstLineIndent) {
19667
+ paragraphAttrs.suppressFirstLineIndent = true;
19668
+ }
19659
19669
  const spacingPx = spacingPtToPx(spacing, normalizedSpacing);
19660
19670
  if (spacingPx) paragraphAttrs.spacing = spacingPx;
19661
19671
  if (normalizedSpacing?.beforeAutospacing != null || normalizedSpacing?.afterAutospacing != null) {
@@ -19873,7 +19883,7 @@ const computeParagraphAttrs = (para, styleContext, listCounterContext, converter
19873
19883
  }
19874
19884
  }
19875
19885
  paragraphAttrs.wordLayout = wordLayout;
19876
- if (enrichedNumberingProps.resolvedLevelIndent) {
19886
+ if (enrichedNumberingProps.resolvedLevelIndent && !hasExplicitIndent) {
19877
19887
  const resolvedIndentPx = convertIndentTwipsToPx(enrichedNumberingProps.resolvedLevelIndent);
19878
19888
  paragraphAttrs.indent = {
19879
19889
  ...paragraphAttrs.indent,
@@ -23239,8 +23249,14 @@ function computeNextSectionPropsAtBreak(blocks) {
23239
23249
  });
23240
23250
  return nextSectionPropsAtBreak;
23241
23251
  }
23242
- function scheduleSectionBreak(block, state, baseMargins) {
23252
+ function scheduleSectionBreak(block, state, baseMargins, maxHeaderContentHeight = 0) {
23243
23253
  const next = { ...state };
23254
+ const calcRequiredTopMargin = (headerDistance, baseTop) => {
23255
+ if (maxHeaderContentHeight > 0) {
23256
+ return Math.max(baseTop, headerDistance + maxHeaderContentHeight);
23257
+ }
23258
+ return Math.max(baseTop, headerDistance);
23259
+ };
23244
23260
  if (block.attrs?.isFirstSection && !next.hasAnyPages) {
23245
23261
  if (block.pageSize) {
23246
23262
  next.activePageSize = { w: block.pageSize.w, h: block.pageSize.h };
@@ -23254,7 +23270,7 @@ function scheduleSectionBreak(block, state, baseMargins) {
23254
23270
  const headerDistance = Math.max(0, block.margins.header);
23255
23271
  next.activeHeaderDistance = headerDistance;
23256
23272
  next.pendingHeaderDistance = headerDistance;
23257
- next.activeTopMargin = Math.max(baseMargins.top, headerDistance);
23273
+ next.activeTopMargin = calcRequiredTopMargin(headerDistance, baseMargins.top);
23258
23274
  next.pendingTopMargin = next.activeTopMargin;
23259
23275
  }
23260
23276
  if (block.margins?.footer !== void 0) {
@@ -23276,9 +23292,15 @@ function scheduleSectionBreak(block, state, baseMargins) {
23276
23292
  const nextBottom = next.pendingBottomMargin ?? next.activeBottomMargin;
23277
23293
  const nextHeader = next.pendingHeaderDistance ?? next.activeHeaderDistance;
23278
23294
  const nextFooter = next.pendingFooterDistance ?? next.activeFooterDistance;
23279
- next.pendingTopMargin = typeof headerPx === "number" ? Math.max(baseMargins.top, headerPx) : nextTop;
23295
+ if (typeof headerPx === "number") {
23296
+ const newHeaderDist = Math.max(0, headerPx);
23297
+ next.pendingHeaderDistance = newHeaderDist;
23298
+ next.pendingTopMargin = calcRequiredTopMargin(newHeaderDist, baseMargins.top);
23299
+ } else {
23300
+ next.pendingTopMargin = nextTop;
23301
+ next.pendingHeaderDistance = nextHeader;
23302
+ }
23280
23303
  next.pendingBottomMargin = typeof footerPx === "number" ? Math.max(baseMargins.bottom, footerPx) : nextBottom;
23281
- next.pendingHeaderDistance = typeof headerPx === "number" ? Math.max(0, headerPx) : nextHeader;
23282
23304
  next.pendingFooterDistance = typeof footerPx === "number" ? Math.max(0, footerPx) : nextFooter;
23283
23305
  if (block.pageSize) {
23284
23306
  next.pendingPageSize = { w: block.pageSize.w, h: block.pageSize.h };
@@ -24743,7 +24765,22 @@ function layoutDocument(blocks, measures, options = {}) {
24743
24765
  if (contentWidth <= 0) {
24744
24766
  throw new Error("layoutDocument: pageSize and margins yield non-positive content area");
24745
24767
  }
24746
- let activeTopMargin = margins.top;
24768
+ const validateHeaderHeight = (height) => {
24769
+ if (height === void 0) return 0;
24770
+ if (!Number.isFinite(height) || height < 0) return 0;
24771
+ return height;
24772
+ };
24773
+ const headerContentHeights = options.headerContentHeights;
24774
+ const maxHeaderContentHeight = headerContentHeights ? Math.max(
24775
+ 0,
24776
+ validateHeaderHeight(headerContentHeights.default),
24777
+ validateHeaderHeight(headerContentHeights.first),
24778
+ validateHeaderHeight(headerContentHeights.even),
24779
+ validateHeaderHeight(headerContentHeights.odd)
24780
+ ) : 0;
24781
+ const headerDistance = margins.header ?? margins.top;
24782
+ const effectiveTopMargin = maxHeaderContentHeight > 0 ? Math.max(margins.top, headerDistance + maxHeaderContentHeight) : margins.top;
24783
+ let activeTopMargin = effectiveTopMargin;
24747
24784
  let activeBottomMargin = margins.bottom;
24748
24785
  let pendingTopMargin = null;
24749
24786
  let pendingBottomMargin = null;
@@ -24767,7 +24804,7 @@ function layoutDocument(blocks, measures, options = {}) {
24767
24804
  const nextSectionPropsAtBreak = computeNextSectionPropsAtBreak(blocks);
24768
24805
  const scheduleSectionBreakCompat = (block, state, baseMargins) => {
24769
24806
  if (typeof scheduleSectionBreak === "function") {
24770
- return scheduleSectionBreak(block, state, baseMargins);
24807
+ return scheduleSectionBreak(block, state, baseMargins, maxHeaderContentHeight);
24771
24808
  }
24772
24809
  const next = { ...state };
24773
24810
  if (block.attrs?.isFirstSection && !next.hasAnyPages) {
@@ -24780,10 +24817,11 @@ function layoutDocument(blocks, measures, options = {}) {
24780
24817
  next.pendingOrientation = null;
24781
24818
  }
24782
24819
  if (block.margins?.header !== void 0) {
24783
- const headerDistance = Math.max(0, block.margins.header);
24784
- next.activeHeaderDistance = headerDistance;
24785
- next.pendingHeaderDistance = headerDistance;
24786
- next.activeTopMargin = Math.max(baseMargins.top, headerDistance);
24820
+ const headerDist = Math.max(0, block.margins.header);
24821
+ next.activeHeaderDistance = headerDist;
24822
+ next.pendingHeaderDistance = headerDist;
24823
+ const requiredTop = maxHeaderContentHeight > 0 ? headerDist + maxHeaderContentHeight : headerDist;
24824
+ next.activeTopMargin = Math.max(baseMargins.top, requiredTop);
24787
24825
  next.pendingTopMargin = next.activeTopMargin;
24788
24826
  }
24789
24827
  if (block.margins?.footer !== void 0) {
@@ -24820,14 +24858,22 @@ function layoutDocument(blocks, measures, options = {}) {
24820
24858
  }
24821
24859
  const headerPx = block.margins?.header;
24822
24860
  const footerPx = block.margins?.footer;
24861
+ const topPx = block.margins?.top;
24823
24862
  const nextTop = next.pendingTopMargin ?? next.activeTopMargin;
24824
24863
  const nextBottom = next.pendingBottomMargin ?? next.activeBottomMargin;
24825
24864
  const nextHeader = next.pendingHeaderDistance ?? next.activeHeaderDistance;
24826
24865
  const nextFooter = next.pendingFooterDistance ?? next.activeFooterDistance;
24827
- next.pendingTopMargin = typeof headerPx === "number" ? Math.max(baseMargins.top, headerPx) : nextTop;
24828
- next.pendingBottomMargin = typeof footerPx === "number" ? Math.max(baseMargins.bottom, footerPx) : nextBottom;
24829
24866
  next.pendingHeaderDistance = typeof headerPx === "number" ? Math.max(0, headerPx) : nextHeader;
24830
24867
  next.pendingFooterDistance = typeof footerPx === "number" ? Math.max(0, footerPx) : nextFooter;
24868
+ if (typeof headerPx === "number" || typeof topPx === "number") {
24869
+ const sectionTop = topPx ?? baseMargins.top;
24870
+ const sectionHeader = next.pendingHeaderDistance;
24871
+ const requiredTop = maxHeaderContentHeight > 0 ? sectionHeader + maxHeaderContentHeight : sectionHeader;
24872
+ next.pendingTopMargin = Math.max(sectionTop, requiredTop);
24873
+ } else {
24874
+ next.pendingTopMargin = nextTop;
24875
+ }
24876
+ next.pendingBottomMargin = typeof footerPx === "number" ? Math.max(baseMargins.bottom, footerPx) : nextBottom;
24831
24877
  if (block.pageSize) next.pendingPageSize = { w: block.pageSize.w, h: block.pageSize.h };
24832
24878
  if (block.orientation) next.pendingOrientation = block.orientation;
24833
24879
  const sectionType = block.type ?? "continuous";
@@ -25578,7 +25624,7 @@ const resolveTrackedChangesEnabled = (attrs, defaultEnabled = true) => {
25578
25624
  }
25579
25625
  return attrs.trackedChangesEnabled !== false;
25580
25626
  };
25581
- const MAX_CACHE_SIZE = 1e4;
25627
+ const MAX_CACHE_SIZE$1 = 1e4;
25582
25628
  const BYTES_PER_ENTRY_ESTIMATE = 5e3;
25583
25629
  const NORMALIZED_WHITESPACE = /\s+/g;
25584
25630
  const normalizeText = (text) => text.replace(NORMALIZED_WHITESPACE, " ");
@@ -25678,7 +25724,7 @@ class MeasureCache {
25678
25724
  if (this.cache.has(key2)) {
25679
25725
  this.cache.delete(key2);
25680
25726
  }
25681
- if (this.cache.size >= MAX_CACHE_SIZE) {
25727
+ if (this.cache.size >= MAX_CACHE_SIZE$1) {
25682
25728
  const oldestKey = this.cache.keys().next().value;
25683
25729
  if (oldestKey !== void 0) {
25684
25730
  this.cache.delete(oldestKey);
@@ -25752,13 +25798,13 @@ class MeasureCache {
25752
25798
  * Get maximum cache size
25753
25799
  */
25754
25800
  getMaxSize() {
25755
- return MAX_CACHE_SIZE;
25801
+ return MAX_CACHE_SIZE$1;
25756
25802
  }
25757
25803
  /**
25758
25804
  * Check if cache is near capacity
25759
25805
  */
25760
25806
  isNearCapacity(threshold = 0.9) {
25761
- return this.cache.size >= MAX_CACHE_SIZE * threshold;
25807
+ return this.cache.size >= MAX_CACHE_SIZE$1 * threshold;
25762
25808
  }
25763
25809
  /**
25764
25810
  * Update size statistics
@@ -26770,9 +26816,46 @@ async function incrementalLayout(previousBlocks, _previousLayout, nextBlocks, op
26770
26816
  perfLog(
26771
26817
  `[Perf] 4.1 Measure all blocks: ${(measureEnd - measureStart).toFixed(2)}ms (${cacheMisses} measured, ${cacheHits} cached)`
26772
26818
  );
26819
+ let headerContentHeights;
26820
+ if (headerFooter?.constraints && headerFooter.headerBlocks) {
26821
+ const hfPreStart = performance.now();
26822
+ const measureFn = headerFooter.measure ?? measureBlock2;
26823
+ invalidateHeaderFooterCache(
26824
+ headerMeasureCache,
26825
+ headerFooterCacheState,
26826
+ headerFooter.headerBlocks,
26827
+ headerFooter.footerBlocks,
26828
+ headerFooter.constraints,
26829
+ options.sectionMetadata
26830
+ );
26831
+ const HEADER_PRELAYOUT_PLACEHOLDER_PAGE_COUNT = 1;
26832
+ const preHeaderLayouts = await layoutHeaderFooterWithCache(
26833
+ headerFooter.headerBlocks,
26834
+ headerFooter.constraints,
26835
+ measureFn,
26836
+ headerMeasureCache,
26837
+ HEADER_PRELAYOUT_PLACEHOLDER_PAGE_COUNT,
26838
+ void 0
26839
+ // No page resolver needed for height calculation
26840
+ );
26841
+ const isValidHeaderType = (key2) => {
26842
+ return ["default", "first", "even", "odd"].includes(key2);
26843
+ };
26844
+ headerContentHeights = {};
26845
+ for (const [type, value] of Object.entries(preHeaderLayouts)) {
26846
+ if (!isValidHeaderType(type)) continue;
26847
+ if (value?.layout && typeof value.layout.height === "number") {
26848
+ headerContentHeights[type] = value.layout.height;
26849
+ }
26850
+ }
26851
+ const hfPreEnd = performance.now();
26852
+ perfLog(`[Perf] 4.1.5 Pre-layout headers for height: ${(hfPreEnd - hfPreStart).toFixed(2)}ms`);
26853
+ }
26773
26854
  const layoutStart = performance.now();
26774
26855
  let layout = layoutDocument(nextBlocks, measures, {
26775
26856
  ...options,
26857
+ headerContentHeights,
26858
+ // Pass header heights to prevent overlap
26776
26859
  remeasureParagraph: (block, maxWidth) => remeasureParagraph(block, maxWidth)
26777
26860
  });
26778
26861
  const layoutEnd = performance.now();
@@ -26819,6 +26902,8 @@ async function incrementalLayout(previousBlocks, _previousLayout, nextBlocks, op
26819
26902
  const relayoutStart = performance.now();
26820
26903
  layout = layoutDocument(currentBlocks, currentMeasures, {
26821
26904
  ...options,
26905
+ headerContentHeights,
26906
+ // Pass header heights to prevent overlap
26822
26907
  remeasureParagraph: (block, maxWidth) => remeasureParagraph(block, maxWidth)
26823
26908
  });
26824
26909
  const relayoutEnd = performance.now();
@@ -29868,7 +29953,12 @@ const lineStyles = (lineHeight) => ({
29868
29953
  height: `${lineHeight}px`,
29869
29954
  position: "relative",
29870
29955
  display: "block",
29871
- whiteSpace: "pre"
29956
+ whiteSpace: "pre",
29957
+ // Allow text to overflow the line container as a safety net.
29958
+ // The primary fix uses accurate font metrics from Canvas API, but this
29959
+ // provides defense-in-depth against any remaining sub-pixel rendering
29960
+ // differences between measurement and display.
29961
+ overflow: "visible"
29872
29962
  });
29873
29963
  const PRINT_STYLES = `
29874
29964
  @media print {
@@ -31434,7 +31524,8 @@ const _DomPainter = class _DomPainter {
31434
31524
  const paraIndent = block.attrs?.indent;
31435
31525
  const paraIndentLeft = paraIndent?.left ?? 0;
31436
31526
  const paraIndentRight = paraIndent?.right ?? 0;
31437
- const firstLineOffset = (paraIndent?.firstLine ?? 0) - (paraIndent?.hanging ?? 0);
31527
+ const suppressFirstLineIndent = block.attrs?.suppressFirstLineIndent === true;
31528
+ const firstLineOffset = suppressFirstLineIndent ? 0 : (paraIndent?.firstLine ?? 0) - (paraIndent?.hanging ?? 0);
31438
31529
  lines.forEach((line, index2) => {
31439
31530
  const lineEl = this.renderLine(block, line, context);
31440
31531
  const isListFirstLine = index2 === 0 && !fragment.continuesFromPrev && fragment.markerWidth && wordLayout?.marker;
@@ -33623,6 +33714,61 @@ function evictIfNeeded() {
33623
33714
  cache$1.delete(oldestKey);
33624
33715
  }
33625
33716
  }
33717
+ const fontMetricsCache = /* @__PURE__ */ new Map();
33718
+ const MAX_CACHE_SIZE = 1e3;
33719
+ const METRICS_TEST_STRING = "MHgypbdlÁÉÍ";
33720
+ function getFontKey(fontInfo) {
33721
+ return `${fontInfo.fontFamily}|${fontInfo.fontSize}|${fontInfo.bold ?? false}|${fontInfo.italic ?? false}`;
33722
+ }
33723
+ function buildFontStringForMetrics(fontInfo, mode, fonts) {
33724
+ const parts = [];
33725
+ if (fontInfo.italic) parts.push("italic");
33726
+ if (fontInfo.bold) parts.push("bold");
33727
+ parts.push(`${fontInfo.fontSize}px`);
33728
+ {
33729
+ parts.push(fontInfo.fontFamily);
33730
+ }
33731
+ return parts.join(" ");
33732
+ }
33733
+ function getFontMetrics(ctx2, fontInfo, mode, fonts) {
33734
+ if (!ctx2 || typeof ctx2 !== "object") {
33735
+ throw new TypeError("Canvas context must be a valid CanvasRenderingContext2D object");
33736
+ }
33737
+ if (typeof fontInfo.fontSize !== "number" || !Number.isFinite(fontInfo.fontSize) || fontInfo.fontSize <= 0) {
33738
+ throw new TypeError(
33739
+ `Font size must be a positive finite number, got: ${typeof fontInfo.fontSize === "number" ? fontInfo.fontSize : typeof fontInfo.fontSize}`
33740
+ );
33741
+ }
33742
+ if (typeof fontInfo.fontFamily !== "string" || fontInfo.fontFamily.trim().length === 0) {
33743
+ throw new TypeError("Font family must be a non-empty string");
33744
+ }
33745
+ const key2 = getFontKey(fontInfo);
33746
+ const cached = fontMetricsCache.get(key2);
33747
+ if (cached) {
33748
+ return cached;
33749
+ }
33750
+ const font = buildFontStringForMetrics(fontInfo);
33751
+ ctx2.font = font;
33752
+ const textMetrics = ctx2.measureText(METRICS_TEST_STRING);
33753
+ let ascent;
33754
+ let descent;
33755
+ if (typeof textMetrics.actualBoundingBoxAscent === "number" && typeof textMetrics.actualBoundingBoxDescent === "number" && textMetrics.actualBoundingBoxAscent > 0) {
33756
+ ascent = textMetrics.actualBoundingBoxAscent;
33757
+ descent = textMetrics.actualBoundingBoxDescent;
33758
+ } else {
33759
+ ascent = fontInfo.fontSize * 0.8;
33760
+ descent = fontInfo.fontSize * 0.2;
33761
+ }
33762
+ const result = { ascent, descent };
33763
+ if (fontMetricsCache.size >= MAX_CACHE_SIZE) {
33764
+ const firstKey = fontMetricsCache.keys().next().value;
33765
+ if (firstKey) {
33766
+ fontMetricsCache.delete(firstKey);
33767
+ }
33768
+ }
33769
+ fontMetricsCache.set(key2, result);
33770
+ return result;
33771
+ }
33626
33772
  const { computeTabStops } = Engines;
33627
33773
  let canvasContext = null;
33628
33774
  const DEFAULT_TAB_INTERVAL_TWIPS = 720;
@@ -33670,10 +33816,20 @@ function measureText(text, font, ctx2, _fontFamily, _letterSpacing) {
33670
33816
  return Math.max(advanceWidth, paintedWidth);
33671
33817
  }
33672
33818
  const MIN_SINGLE_LINE_PX = 12 * 96 / 72;
33673
- function calculateTypographyMetrics(fontSize, spacing) {
33674
- const ascent = roundValue(fontSize * 0.8);
33675
- const descent = roundValue(fontSize * 0.2);
33676
- const baseLineHeight = Math.max(fontSize, MIN_SINGLE_LINE_PX);
33819
+ const LINE_HEIGHT_SAFETY_MARGIN_PX = 1;
33820
+ function calculateTypographyMetrics(fontSize, spacing, fontInfo) {
33821
+ let ascent;
33822
+ let descent;
33823
+ if (fontInfo) {
33824
+ const ctx2 = getCanvasContext();
33825
+ const metrics = getFontMetrics(ctx2, fontInfo);
33826
+ ascent = roundValue(metrics.ascent);
33827
+ descent = roundValue(metrics.descent);
33828
+ } else {
33829
+ ascent = roundValue(fontSize * 0.8);
33830
+ descent = roundValue(fontSize * 0.2);
33831
+ }
33832
+ const baseLineHeight = Math.max(ascent + descent + LINE_HEIGHT_SAFETY_MARGIN_PX, MIN_SINGLE_LINE_PX);
33677
33833
  const lineHeight = roundValue(resolveLineHeight(spacing, baseLineHeight));
33678
33834
  return {
33679
33835
  ascent,
@@ -33681,6 +33837,20 @@ function calculateTypographyMetrics(fontSize, spacing) {
33681
33837
  lineHeight
33682
33838
  };
33683
33839
  }
33840
+ function getFontInfoFromRun(run) {
33841
+ return {
33842
+ fontFamily: run.fontFamily,
33843
+ fontSize: run.fontSize,
33844
+ bold: run.bold,
33845
+ italic: run.italic
33846
+ };
33847
+ }
33848
+ function updateMaxFontInfo(currentMaxSize, currentMaxInfo, newRun) {
33849
+ if (newRun.fontSize >= currentMaxSize) {
33850
+ return getFontInfoFromRun(newRun);
33851
+ }
33852
+ return currentMaxInfo;
33853
+ }
33684
33854
  function isTabRun(run) {
33685
33855
  return run.kind === "tab";
33686
33856
  }
@@ -33726,7 +33896,8 @@ async function measureParagraphBlock(block, maxWidth) {
33726
33896
  const indentRight = sanitizePositive(indent?.right);
33727
33897
  const firstLine = indent?.firstLine ?? 0;
33728
33898
  const hanging = indent?.hanging ?? 0;
33729
- const firstLineOffset = firstLine - hanging;
33899
+ const suppressFirstLine = block.attrs?.suppressFirstLineIndent === true;
33900
+ const firstLineOffset = suppressFirstLine ? 0 : firstLine - hanging;
33730
33901
  const contentWidth = Math.max(1, maxWidth - indentLeft - indentRight);
33731
33902
  const initialAvailableWidth = Math.max(1, contentWidth - firstLineOffset);
33732
33903
  const tabStops = buildTabStopsPx(
@@ -33862,7 +34033,7 @@ async function measureParagraphBlock(block, maxWidth) {
33862
34033
  const run = runsToProcess[runIndex];
33863
34034
  if (run.kind === "break") {
33864
34035
  if (currentLine) {
33865
- const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing);
34036
+ const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
33866
34037
  const completedLine = { ...currentLine, ...metrics };
33867
34038
  addBarTabsToLine(completedLine);
33868
34039
  lines.push(completedLine);
@@ -33892,7 +34063,7 @@ async function measureParagraphBlock(block, maxWidth) {
33892
34063
  }
33893
34064
  if (isLineBreakRun(run)) {
33894
34065
  if (currentLine) {
33895
- const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing);
34066
+ const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
33896
34067
  const completedLine = {
33897
34068
  ...currentLine,
33898
34069
  ...metrics
@@ -34005,7 +34176,7 @@ async function measureParagraphBlock(block, maxWidth) {
34005
34176
  }
34006
34177
  const appliedTabAlign = lastAppliedTabAlign;
34007
34178
  if (currentLine.width + imageWidth > currentLine.maxWidth && currentLine.width > 0) {
34008
- const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing);
34179
+ const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
34009
34180
  const completedLine = {
34010
34181
  ...currentLine,
34011
34182
  ...metrics
@@ -34093,6 +34264,7 @@ async function measureParagraphBlock(block, maxWidth) {
34093
34264
  toChar: wordEndNoSpace,
34094
34265
  width: wordOnlyWidth,
34095
34266
  maxFontSize: run.fontSize,
34267
+ maxFontInfo: getFontInfoFromRun(run),
34096
34268
  maxWidth: getEffectiveWidth(initialAvailableWidth),
34097
34269
  segments: [{ runIndex, fromChar: wordStartChar, toChar: wordEndNoSpace, width: wordOnlyWidth }]
34098
34270
  };
@@ -34109,7 +34281,7 @@ async function measureParagraphBlock(block, maxWidth) {
34109
34281
  const isTocEntry = block.attrs?.isTocEntry;
34110
34282
  const boundarySpacing = currentLine.width > 0 ? run.letterSpacing ?? 0 : 0;
34111
34283
  if (currentLine.width + boundarySpacing + wordOnlyWidth > currentLine.maxWidth - WIDTH_FUDGE_PX && currentLine.width > 0 && !isTocEntry) {
34112
- const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing);
34284
+ const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
34113
34285
  const completedLine = {
34114
34286
  ...currentLine,
34115
34287
  ...metrics
@@ -34125,6 +34297,7 @@ async function measureParagraphBlock(block, maxWidth) {
34125
34297
  toChar: wordEndNoSpace,
34126
34298
  width: wordOnlyWidth,
34127
34299
  maxFontSize: run.fontSize,
34300
+ maxFontInfo: getFontInfoFromRun(run),
34128
34301
  maxWidth: getEffectiveWidth(contentWidth),
34129
34302
  segments: [{ runIndex, fromChar: wordStartChar, toChar: wordEndNoSpace, width: wordOnlyWidth }]
34130
34303
  };
@@ -34140,9 +34313,10 @@ async function measureParagraphBlock(block, maxWidth) {
34140
34313
  if (!isLastWord && currentLine.width + boundarySpacing + wordOnlyWidth + spaceWidth > currentLine.maxWidth - WIDTH_FUDGE_PX) {
34141
34314
  currentLine.toChar = wordEndNoSpace;
34142
34315
  currentLine.width = roundValue(currentLine.width + boundarySpacing + wordOnlyWidth);
34316
+ currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run);
34143
34317
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run.fontSize);
34144
34318
  appendSegment(currentLine.segments, runIndex, wordStartChar, wordEndNoSpace, wordOnlyWidth, segmentStartX);
34145
- const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing);
34319
+ const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
34146
34320
  const completedLine = { ...currentLine, ...metrics };
34147
34321
  addBarTabsToLine(completedLine);
34148
34322
  lines.push(completedLine);
@@ -34159,6 +34333,7 @@ async function measureParagraphBlock(block, maxWidth) {
34159
34333
  currentLine.width = roundValue(
34160
34334
  currentLine.width + boundarySpacing + wordCommitWidth + (isLastWord ? 0 : run.letterSpacing ?? 0)
34161
34335
  );
34336
+ currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run);
34162
34337
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run.fontSize);
34163
34338
  appendSegment(currentLine.segments, runIndex, wordStartChar, newToChar, wordCommitWidth, explicitX);
34164
34339
  }
@@ -34181,6 +34356,7 @@ async function measureParagraphBlock(block, maxWidth) {
34181
34356
  toChar: charPosInRun,
34182
34357
  width: 0,
34183
34358
  maxFontSize: run.fontSize,
34359
+ maxFontInfo: getFontInfoFromRun(run),
34184
34360
  maxWidth: getEffectiveWidth(initialAvailableWidth),
34185
34361
  segments: []
34186
34362
  };
@@ -34190,6 +34366,7 @@ async function measureParagraphBlock(block, maxWidth) {
34190
34366
  tabStopCursor = nextIndex;
34191
34367
  const tabAdvance = Math.max(0, target - currentLine.width);
34192
34368
  currentLine.width = roundValue(currentLine.width + tabAdvance);
34369
+ currentLine.maxFontInfo = updateMaxFontInfo(currentLine.maxFontSize, currentLine.maxFontInfo, run);
34193
34370
  currentLine.maxFontSize = Math.max(currentLine.maxFontSize, run.fontSize);
34194
34371
  currentLine.toRun = runIndex;
34195
34372
  currentLine.toChar = charPosInRun;
@@ -34226,7 +34403,7 @@ async function measureParagraphBlock(block, maxWidth) {
34226
34403
  lines.push(fallbackLine);
34227
34404
  }
34228
34405
  if (currentLine) {
34229
- const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing);
34406
+ const metrics = calculateTypographyMetrics(currentLine.maxFontSize, spacing, currentLine.maxFontInfo);
34230
34407
  const finalLine = {
34231
34408
  ...currentLine,
34232
34409
  ...metrics
@@ -1,4 +1,4 @@
1
- import { aK as getDefaultExportFromCjs } from "./converter-DhkZt4Pv.js";
1
+ import { aK as getDefaultExportFromCjs } from "./converter-DJyfDFNm.js";
2
2
  import { V as VFile } from "./index-CvBqQJbG.js";
3
3
  function bail(error) {
4
4
  if (error) {
@@ -1,6 +1,6 @@
1
1
  import { computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, normalizeClass, normalizeStyle, ref, withKeys, unref, withModifiers, createBlock, toDisplayString, withDirectives, vModelText, nextTick, getCurrentInstance, onMounted, onBeforeUnmount, createVNode, readonly, watch, reactive, onBeforeMount, inject, onActivated, onDeactivated, createTextVNode, Fragment, Comment, defineComponent, provide, h, Teleport, toRef, renderSlot, isVNode, shallowRef, watchEffect, mergeProps, Transition, vShow, cloneVNode, Text, renderList, withCtx } from "vue";
2
- import { p as process$1 } from "./converter-DhkZt4Pv.js";
3
- import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-oZjoYNA0.js";
2
+ import { p as process$1 } from "./converter-DJyfDFNm.js";
3
+ import { _ as _export_sfc, u as useHighContrastMode, g as global$1 } from "./editor-f37DOCIX.js";
4
4
  const sanitizeNumber = (value, defaultNumber) => {
5
5
  let sanitized = value.replace(/[^0-9.]/g, "");
6
6
  sanitized = parseFloat(sanitized);
@@ -1,4 +1,4 @@
1
- import { ac } from "./chunks/converter-DhkZt4Pv.js";
1
+ import { ac } from "./chunks/converter-DJyfDFNm.js";
2
2
  export {
3
3
  ac as SuperConverter
4
4
  };
@@ -1,5 +1,5 @@
1
- import "./chunks/converter-DhkZt4Pv.js";
2
- import { D } from "./chunks/docx-zipper-Bajmc-RM.js";
1
+ import "./chunks/converter-DJyfDFNm.js";
2
+ import { D } from "./chunks/docx-zipper-C-9Tqy8I.js";
3
3
  export {
4
4
  D as default
5
5
  };
@@ -1,6 +1,6 @@
1
- import { E } from "./chunks/editor-oZjoYNA0.js";
2
- import "./chunks/converter-DhkZt4Pv.js";
3
- import "./chunks/docx-zipper-Bajmc-RM.js";
1
+ import { E } from "./chunks/editor-f37DOCIX.js";
2
+ import "./chunks/converter-DJyfDFNm.js";
3
+ import "./chunks/docx-zipper-C-9Tqy8I.js";
4
4
  export {
5
5
  E as Editor
6
6
  };
@@ -1,4 +1,4 @@
1
- import { J as JSZip } from "./chunks/docx-zipper-Bajmc-RM.js";
1
+ import { J as JSZip } from "./chunks/docx-zipper-C-9Tqy8I.js";
2
2
  async function createZip(blobs, fileNames) {
3
3
  const zip = new JSZip();
4
4
  blobs.forEach((blob, index) => {
@@ -9,14 +9,14 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
11
11
  var _MARK_TOGGLE_NAMES, _SuperToolbar_instances, initToolbarGroups_fn, _interceptedCommands, makeToolbarItems_fn, initDefaultFonts_fn, updateHighlightColors_fn, deactivateAll_fn, updateToolbarHistory_fn, enrichTrackedChanges_fn, runCommandWithArgumentOnly_fn, syncStickyMarksFromState_fn, restoreStickyMarksIfNeeded_fn, ensureStoredMarksForMarkToggle_fn;
12
- import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-DhkZt4Pv.js";
13
- import { ac, i, a9, aQ } from "./chunks/converter-DhkZt4Pv.js";
14
- import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-oZjoYNA0.js";
15
- import { z, F, B, T, w, C, x } from "./chunks/editor-oZjoYNA0.js";
12
+ import { aK as getDefaultExportFromCjs, a0 as v4, T as TextSelection$1, v as getMarkRange, aN as vClickOutside, aO as getActiveFormatting, aD as isInTable, O as findParentNode, ar as calculateResolvedParagraphProperties, a7 as twipsToLines, Q as isList, al as parseSizeUnit, a8 as pixelsToTwips, aP as getFileObject, P as PluginKey, a as Plugin } from "./chunks/converter-DJyfDFNm.js";
13
+ import { ac, i, a9, aQ } from "./chunks/converter-DJyfDFNm.js";
14
+ import { _ as _export_sfc, u as useHighContrastMode, a as getQuickFormatList, b as generateLinkedStyleString, c as getFileOpener, d as checkAndProcessImage, r as replaceSelectionWithImagePlaceholder, e as uploadAndInsertImage, f as collectTrackedChanges, i as isTrackedChangeActionAllowed, y as yUndoPluginKey, h as undoDepth, j as redoDepth, k as getEditorSurfaceElement, l as collectTrackedChangesForContext, s as shouldBypassContextMenu, S as SlashMenuPluginKey, m as measureCache, n as isHeadless, E as Editor, o as getStarterExtensions, P as PresentationEditor, p as Placeholder, q as getRichTextExtensions, D as DecorationSet, t as Decoration, M as Mark, v as Extension, A as Attribute, N as Node } from "./chunks/editor-f37DOCIX.js";
15
+ import { z, F, B, T, w, C, x } from "./chunks/editor-f37DOCIX.js";
16
16
  import { ref, onMounted, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, createElementVNode, withModifiers, toDisplayString, createCommentVNode, normalizeStyle, computed, watch, withDirectives, withKeys, vModelText, createTextVNode, createVNode, h, createApp, markRaw, nextTick, onBeforeUnmount, defineComponent, reactive, onUnmounted, renderSlot, useCssVars, shallowRef, createBlock, withCtx, resolveDynamicComponent, normalizeProps, guardReactiveProps } from "vue";
17
- import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-Bn5LTbq9.js";
17
+ import { t as toolbarIcons, s as sanitizeNumber, T as Toolbar, p as plusIconSvg, a as trashIconSvg, b as borderNoneIconSvg, c as arrowsToDotIconSvg, d as arrowsLeftRightIconSvg, w as wrenchIconSvg, m as magicWandIcon, e as checkIconSvg$1, x as xMarkIconSvg, l as linkIconSvg, f as tableIconSvg, g as scissorsIconSvg, h as copyIconSvg, i as pasteIconSvg, u as useMessage, N as NSkeleton } from "./chunks/toolbar-Devgq8w3.js";
18
18
  import AIWriter from "./ai-writer.es.js";
19
- import { D } from "./chunks/docx-zipper-Bajmc-RM.js";
19
+ import { D } from "./chunks/docx-zipper-C-9Tqy8I.js";
20
20
  import { createZip } from "./file-zipper.es.js";
21
21
  var eventemitter3 = { exports: {} };
22
22
  var hasRequiredEventemitter3;
@@ -1,6 +1,6 @@
1
1
  import "vue";
2
- import { T } from "./chunks/toolbar-Bn5LTbq9.js";
3
- import "./chunks/editor-oZjoYNA0.js";
2
+ import { T } from "./chunks/toolbar-Devgq8w3.js";
3
+ import "./chunks/editor-f37DOCIX.js";
4
4
  export {
5
5
  T as default
6
6
  };
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BkRizaIE.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-49DW4_-r.cjs");
4
4
  require("./chunks/vue-jWLMl8Ts.cjs");
5
5
  exports.AIWriter = superEditor_es.AIWriter;
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
@@ -1,4 +1,4 @@
1
- import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-V792hb-6.es.js";
1
+ import { A, a, _, C, D, E, b, P, S, c, d, e, f, g, T, h, i, j, k, l, m, n, o, p, r, q } from "./chunks/super-editor.es-Cj9Sb-Qv.es.js";
2
2
  import "./chunks/vue-Dysv_7z5.es.js";
3
3
  export {
4
4
  A as AIWriter,
package/dist/superdoc.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const superEditor_es = require("./chunks/super-editor.es-BkRizaIE.cjs");
4
- const superdoc = require("./chunks/index-CK4eX_iu.cjs");
3
+ const superEditor_es = require("./chunks/super-editor.es-49DW4_-r.cjs");
4
+ const superdoc = require("./chunks/index-Q-l_lwcU.cjs");
5
5
  const blankDocx = require("./chunks/blank-docx-DfW3Eeh2.cjs");
6
6
  exports.AnnotatorHelpers = superEditor_es.AnnotatorHelpers;
7
7
  exports.Editor = superEditor_es.Editor;