@eigenpal/docx-editor-core 1.3.0 → 1.3.2

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 (107) hide show
  1. package/dist/chunk-2LEFMTNZ.mjs +1 -0
  2. package/dist/chunk-4MYKVWNF.js +1 -0
  3. package/dist/chunk-4PANZ3VU.js +1 -0
  4. package/dist/{chunk-Q5B5GKXD.mjs → chunk-55XWETY4.mjs} +1 -1
  5. package/dist/chunk-6WZW3NSJ.js +1 -0
  6. package/dist/chunk-HKN2NKOG.mjs +1 -0
  7. package/dist/chunk-HPJBZL37.mjs +1 -0
  8. package/dist/{chunk-TURYWKNS.js → chunk-J3YFJDZD.js} +1 -1
  9. package/dist/chunk-JHTURDPX.mjs +1 -0
  10. package/dist/chunk-KKXCBWVG.mjs +1 -0
  11. package/dist/chunk-LJE7HQEJ.mjs +1 -0
  12. package/dist/chunk-LX35TFGF.mjs +1 -0
  13. package/dist/chunk-NRWQ65NX.js +1 -0
  14. package/dist/chunk-PFMM7QON.js +1 -0
  15. package/dist/chunk-PMSGJXOE.mjs +1 -0
  16. package/dist/chunk-QVRNNRG5.js +1 -0
  17. package/dist/chunk-RSU4HTC6.js +1 -0
  18. package/dist/{chunk-L6YTCHOQ.mjs → chunk-UEPLDKKM.mjs} +1 -1
  19. package/dist/chunk-YPQACU4A.js +1 -0
  20. package/dist/{chunk-TJRROR6U.js → chunk-ZAZWHK4J.js} +1 -1
  21. package/dist/core.d.mts +2 -2
  22. package/dist/core.d.ts +2 -2
  23. package/dist/core.js +1 -1
  24. package/dist/core.mjs +1 -1
  25. package/dist/editor/index.d.mts +128 -0
  26. package/dist/editor/index.d.ts +128 -0
  27. package/dist/editor/index.js +1 -0
  28. package/dist/editor/index.mjs +1 -0
  29. package/dist/{footnotes-BtVc6VFl.d.mts → footnotes-BZ24OTAT.d.mts} +11 -1
  30. package/dist/{footnotes-DcUMWXul.d.ts → footnotes-DMsicPGd.d.ts} +11 -1
  31. package/dist/{headerFooterLayout-4E-S4Aay.d.ts → headerFooterLayout-AtAOhM8E.d.ts} +18 -2
  32. package/dist/{headerFooterLayout-DlJLWmpR.d.mts → headerFooterLayout-CU6hvszp.d.mts} +18 -2
  33. package/dist/layout-bridge/clickToPositionDom.js +1 -1
  34. package/dist/layout-bridge/clickToPositionDom.mjs +1 -1
  35. package/dist/layout-bridge/index.d.mts +109 -5
  36. package/dist/layout-bridge/index.d.ts +109 -5
  37. package/dist/layout-bridge/index.js +1 -1
  38. package/dist/layout-bridge/index.mjs +1 -1
  39. package/dist/layout-bridge/measuring/index.d.mts +5 -95
  40. package/dist/layout-bridge/measuring/index.d.ts +5 -95
  41. package/dist/layout-bridge/measuring/index.js +1 -1
  42. package/dist/layout-bridge/measuring/index.mjs +1 -1
  43. package/dist/layout-bridge/tableInsertHover.js +1 -1
  44. package/dist/layout-bridge/tableInsertHover.mjs +1 -1
  45. package/dist/layout-bridge/toFlowBlocks.js +1 -1
  46. package/dist/layout-bridge/toFlowBlocks.mjs +1 -1
  47. package/dist/layout-engine/index.js +1 -1
  48. package/dist/layout-engine/index.mjs +1 -1
  49. package/dist/layout-painter/index.d.mts +2 -2
  50. package/dist/layout-painter/index.d.ts +2 -2
  51. package/dist/layout-painter/index.js +1 -1
  52. package/dist/layout-painter/index.mjs +1 -1
  53. package/dist/layout-painter/renderPage.d.mts +8 -3
  54. package/dist/layout-painter/renderPage.d.ts +8 -3
  55. package/dist/layout-painter/renderPage.js +1 -1
  56. package/dist/layout-painter/renderPage.mjs +1 -1
  57. package/dist/measureBlocksPipeline-BMqbRFQB.d.mts +96 -0
  58. package/dist/measureBlocksPipeline-iYNzAH-o.d.ts +96 -0
  59. package/dist/prosemirror/applyFormatting.d.mts +67 -0
  60. package/dist/prosemirror/applyFormatting.d.ts +67 -0
  61. package/dist/prosemirror/applyFormatting.js +1 -0
  62. package/dist/prosemirror/applyFormatting.mjs +1 -0
  63. package/dist/prosemirror/commentIdAllocator.d.mts +50 -0
  64. package/dist/prosemirror/commentIdAllocator.d.ts +50 -0
  65. package/dist/prosemirror/commentIdAllocator.js +1 -0
  66. package/dist/prosemirror/commentIdAllocator.mjs +1 -0
  67. package/dist/prosemirror/commentOps.d.mts +46 -0
  68. package/dist/prosemirror/commentOps.d.ts +46 -0
  69. package/dist/prosemirror/commentOps.js +1 -0
  70. package/dist/prosemirror/commentOps.mjs +1 -0
  71. package/dist/prosemirror/conversion/index.js +1 -1
  72. package/dist/prosemirror/conversion/index.mjs +1 -1
  73. package/dist/prosemirror/imageCommit.d.mts +35 -0
  74. package/dist/prosemirror/imageCommit.d.ts +35 -0
  75. package/dist/prosemirror/imageCommit.js +1 -0
  76. package/dist/prosemirror/imageCommit.mjs +1 -0
  77. package/dist/prosemirror/index.js +2 -2
  78. package/dist/prosemirror/index.mjs +1 -1
  79. package/dist/prosemirror/paraText.d.mts +52 -0
  80. package/dist/prosemirror/paraText.d.ts +52 -0
  81. package/dist/prosemirror/paraText.js +1 -0
  82. package/dist/prosemirror/paraText.mjs +1 -0
  83. package/dist/prosemirror/queries.d.mts +65 -0
  84. package/dist/prosemirror/queries.d.ts +65 -0
  85. package/dist/prosemirror/queries.js +2 -0
  86. package/dist/prosemirror/queries.mjs +2 -0
  87. package/dist/prosemirror/tableResize.d.mts +58 -0
  88. package/dist/prosemirror/tableResize.d.ts +58 -0
  89. package/dist/prosemirror/tableResize.js +1 -0
  90. package/dist/prosemirror/tableResize.mjs +1 -0
  91. package/dist/utils/autoScroll.d.mts +24 -0
  92. package/dist/utils/autoScroll.d.ts +24 -0
  93. package/dist/utils/autoScroll.js +1 -0
  94. package/dist/utils/autoScroll.mjs +1 -0
  95. package/package.json +73 -1
  96. package/dist/chunk-72KLR6TJ.mjs +0 -1
  97. package/dist/chunk-7JQVKJRN.mjs +0 -1
  98. package/dist/chunk-7WGN2OBZ.js +0 -1
  99. package/dist/chunk-B46V5G46.mjs +0 -1
  100. package/dist/chunk-BUCOTKYY.js +0 -1
  101. package/dist/chunk-FQS436KN.js +0 -1
  102. package/dist/chunk-IUVQJ6PX.mjs +0 -1
  103. package/dist/chunk-JUMHC5Z6.mjs +0 -1
  104. package/dist/chunk-MEVZCB56.mjs +0 -1
  105. package/dist/chunk-T4RYVPAB.js +0 -1
  106. package/dist/chunk-WDBZ3QVB.js +0 -1
  107. package/dist/chunk-XWC67YLW.js +0 -1
@@ -9,11 +9,15 @@
9
9
  * @public
10
10
  */
11
11
  export { ToFlowBlocksOptions, convertBorderSpecToLayout, resetBlockIdCounter, resolveListTemplate, toFlowBlocks } from './toFlowBlocks.mjs';
12
- import { TableBlock, Fragment, FlowBlock, Measure, Page, TableFragment, TableMeasure, ParagraphBlock, ParagraphMeasure, Layout, PageMargins } from '../layout-engine/types.mjs';
13
- export { FloatPageGeometry, FloatingExclusionRect, FloatingImageZone, FloatingLineSegmentZone, FontMetrics, FontStyle, MeasureBlockFn, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureBlocksWithFloats, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.mjs';
12
+ import { TableBlock, Fragment, FlowBlock, Measure, Page, TableFragment, TableMeasure, ParagraphBlock, ParagraphMeasure, Layout, PageMargins, ColumnLayout } from '../layout-engine/types.mjs';
13
+ export { FontMetrics, FontStyle, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.mjs';
14
+ export { F as FloatPageGeometry, a as FloatingExclusionRect, b as FloatingImageZone, c as FloatingLineSegmentZone, M as MeasureBlockFn, g as getFloatingMargins, m as measureBlocksWithFloats, r as rectsToFloatingZones } from '../measureBlocksPipeline-BMqbRFQB.mjs';
14
15
  export { DomCaretPosition, DomSelectionRect, clickToPositionDom, clipRectToTableWindow, getCaretPositionFromDom, getSelectionRectsFromDom, clickToPositionDom as mouseToPosition } from './clickToPositionDom.mjs';
15
- export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_SEPARATOR_HEIGHT, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, b as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, c as StabilizeFootnoteLayoutResult, j as applyFootnotePresentation, d as buildFootnoteContentMap, e as buildFootnoteRenderItems, f as calculateFootnoteReservedHeights, k as calculateHeaderFooterVisualBounds, g as collectFootnoteRefs, l as computeHfCaretRectFromView, n as computeHfSelectionRectsFromView, o as convertFootnoteToContent, p as convertHeaderFooterPmDocToContent, h as convertHeaderFooterToContent, i as footnoteReservedHeightsEqual, q as invalidateHfDomCache, m as mapFootnotesToPages, r as normalizeHeaderFooterMeasureBlocks, t as resolveHeaderFooterVisualTop, s as stabilizeFootnoteLayout } from '../headerFooterLayout-DlJLWmpR.mjs';
16
+ import { EditorState } from 'prosemirror-state';
17
+ export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_SEPARATOR_HEIGHT, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, b as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, c as StabilizeFootnoteLayoutResult, j as applyFootnotePresentation, d as buildFootnoteContentMap, e as buildFootnoteRenderItems, f as calculateFootnoteReservedHeights, k as calculateHeaderFooterVisualBounds, g as collectFootnoteRefs, l as computeHfCaretRectFromView, n as computeHfSelectionRectsFromView, o as contributesToHeaderFooterFlowHeight, p as convertFootnoteToContent, q as convertHeaderFooterPmDocToContent, h as convertHeaderFooterToContent, i as footnoteReservedHeightsEqual, r as invalidateHfDomCache, m as mapFootnotesToPages, t as normalizeHeaderFooterMeasureBlocks, u as resolveHeaderFooterVisualTop, s as stabilizeFootnoteLayout } from '../headerFooterLayout-CU6hvszp.mjs';
18
+ import { H as HeaderFooterContent } from '../footnotes-BZ24OTAT.mjs';
16
19
  export { TABLE_INSERT_EDGE_PROXIMITY, TABLE_INSERT_HIDE_DELAY_MS, TableInsertHoverHit, TableInsertHoverInput, detectTableInsertHover } from './tableInsertHover.mjs';
20
+ import { SectionLayoutConfig } from '../layout-engine/index.mjs';
17
21
  import { Document } from '../types/document.mjs';
18
22
  import { S as SectionProperties, y as HeaderFooter } from '../content-3xF4WDE8.mjs';
19
23
  import 'prosemirror-model';
@@ -24,7 +28,6 @@ import '../docx/wrapTypes.mjs';
24
28
  import '../watermark-DAcnAs_J.mjs';
25
29
  import '../anchoredObjectPosition-KJEyF-wr.mjs';
26
30
  import 'prosemirror-view';
27
- import '../footnotes-BtVc6VFl.mjs';
28
31
 
29
32
  /**
30
33
  * @internal Helpers for resolving DOCX table-width metadata into pixel widths.
@@ -285,6 +288,29 @@ declare function getPositionRect(block: ParagraphBlock, measure: ParagraphMeasur
285
288
  height: number;
286
289
  } | null;
287
290
 
291
+ /**
292
+ * Apply the visual cell-selection highlight class onto rendered table cells.
293
+ *
294
+ * The layout painter renders pages as static DOM with `data-pm-start` on each
295
+ * table cell. This walk translates a ProseMirror `CellSelection` into the
296
+ * `.layout-table-cell-selected` class on the matching painted cells. Shared by
297
+ * the React and Vue adapters.
298
+ */
299
+
300
+ /**
301
+ * Apply the `.layout-table-cell-selected` class to painted layout cells
302
+ * matching a CellSelection in the PM state. Clears the class everywhere
303
+ * (within scope) first so toggling off (or moving to a TextSelection) erases
304
+ * prior highlights.
305
+ *
306
+ * Duck-types CellSelection via `$anchorCell` / `forEachCell` rather than
307
+ * `instanceof` to dodge bundling issues across `prosemirror-tables` copies
308
+ * (the same trick used inline in the selection-overlay update).
309
+ */
310
+ declare function applyCellSelectionHighlight(pagesContainer: HTMLElement, state: EditorState, options?: {
311
+ scope?: 'body' | 'header' | 'footer';
312
+ }): void;
313
+
288
314
  /**
289
315
  * Selection Rectangles
290
316
  *
@@ -359,6 +385,69 @@ declare function isMultiPageSelection(rects: SelectionRect[]): boolean;
359
385
  */
360
386
  declare function groupRectsByPage(rects: SelectionRect[]): Map<number, SelectionRect[]>;
361
387
 
388
+ /**
389
+ * Header/footer body-margin extension.
390
+ *
391
+ * Word grows the header (or footer) band when its in-flow content is taller
392
+ * than the authored top (or bottom) margin minus the header/footer distance,
393
+ * pushing the body text down (or up). This module owns that computation so the
394
+ * React and Vue adapters share one implementation instead of byte-identical
395
+ * inline copies (the layout pipelines were drifting candidates — see
396
+ * `docx-editor` engine-unification work, issue #696).
397
+ *
398
+ * Two correctness rules live here:
399
+ *
400
+ * 1. The band height is driven by `HeaderFooterContent.flowHeight` (in-flow
401
+ * content only), NOT `height` / `visualBottom`. A page/margin-anchored
402
+ * float — e.g. a full-page letterhead anchored in a header — is positioned
403
+ * on the page and does not push the body in Word. Counting it inflated the
404
+ * effective top margin past the page on real-world templates, so the
405
+ * paginator hard-threw "page size and margins yield no content area" and
406
+ * the document rendered blank (issue #705).
407
+ *
408
+ * 2. A clamp guarantees `top + bottom` never consumes the whole page, so a
409
+ * pathological in-flow header degrades to a thin content band with a
410
+ * warning instead of aborting pagination.
411
+ */
412
+
413
+ /** @public */
414
+ interface ExtendMarginsForHeaderFooterInput {
415
+ pageSize: {
416
+ w: number;
417
+ h: number;
418
+ };
419
+ /** Body fallback margins. */
420
+ margins: PageMargins;
421
+ /** Final-section margins (last `sectPr`). */
422
+ finalMargins: PageMargins;
423
+ /**
424
+ * Body flow blocks. Each `sectionBreak` block's `margins` is extended IN
425
+ * PLACE so multi-section documents paginate with the same band growth (the
426
+ * layout engine prefers `sectionBreak.margins` over the body fallback).
427
+ */
428
+ bodyBlocks?: FlowBlock[];
429
+ /** Header variants in play this layout (e.g. default + first-page). */
430
+ headers?: Array<HeaderFooterContent | undefined>;
431
+ /** Footer variants in play this layout. */
432
+ footers?: Array<HeaderFooterContent | undefined>;
433
+ /** Optional diagnostic sink for the clamp (adapters pass `console.warn`). */
434
+ warn?: (message: string) => void;
435
+ }
436
+ /** @public */
437
+ interface ExtendMarginsForHeaderFooterResult {
438
+ margins: PageMargins;
439
+ finalMargins: PageMargins;
440
+ }
441
+ /**
442
+ * Extend body margins so the body clears the header/footer bands, mirroring
443
+ * Word. Returns new `margins` / `finalMargins`; mutates `sectionBreak.margins`
444
+ * in place. When no extension is needed the original objects are returned
445
+ * unchanged.
446
+ *
447
+ * @public
448
+ */
449
+ declare function extendMarginsForHeaderFooter(input: ExtendMarginsForHeaderFooterInput): ExtendMarginsForHeaderFooterResult;
450
+
362
451
  /**
363
452
  * Body-scoped DOM lookups for `data-pm-start` / `data-pm-end` markers.
364
453
  *
@@ -453,6 +542,8 @@ declare const DEFAULT_PAGE_HEIGHT_PX = 1056;
453
542
  declare const DEFAULT_BODY_MARGIN_PX = 96;
454
543
  /** Word's default `headerDistance` / `footerDistance` (0.5in = 48px). */
455
544
  declare const DEFAULT_HF_DISTANCE_PX = 48;
545
+ /** Convert twips to pixels (1 twip = 1/20 point, 96 pixels per inch). */
546
+ declare function twipsToPixels(twips: number): number;
456
547
  /** Convert SectionProperties page size (twips) → pixel `{ w, h }`. */
457
548
  declare function getPageSize(sp: SectionProperties | null | undefined): {
458
549
  w: number;
@@ -480,5 +571,18 @@ declare function resolveHeaderFooter(doc: Document | null, sp: SectionProperties
480
571
  firstHeader: HeaderFooter | null;
481
572
  firstFooter: HeaderFooter | null;
482
573
  };
574
+ /**
575
+ * Extract column layout from section properties.
576
+ * Returns undefined for single-column (default) to avoid unnecessary paginator overhead.
577
+ */
578
+ declare function getColumns(sectionProps: SectionProperties | null | undefined): ColumnLayout | undefined;
579
+ declare function columnWidthForSection(config: SectionLayoutConfig): number;
580
+ /**
581
+ * Compute per-block measurement widths by scanning for section breaks.
582
+ * Blocks must be measured with the page width/margins/columns of their own
583
+ * section so that the layout engine can paginate them against the right
584
+ * geometry without remeasuring.
585
+ */
586
+ declare function computePerBlockWidths(blocks: FlowBlock[], initialConfig: SectionLayoutConfig, finalConfig: SectionLayoutConfig): number[];
483
587
 
484
- export { type CaretPosition, DEFAULT_BODY_MARGIN_PX, DEFAULT_HF_DISTANCE_PX, DEFAULT_PAGE_HEIGHT_PX, DEFAULT_PAGE_WIDTH_PX, type FragmentHit, type HitTestResult, type PageHit, type Point, type PositionResult, type ResolvedGridCell, type SelectionRect, type TableCellHit, clickToPosition, clickToPositionInParagraph, clickToPositionInTableCell, countTableColumns, findBodyEmptyRuns, findBodyPmAnchor, findBodyPmAnchors, findBodyPmSpans, getCaretPosition, getMargins, getPageBounds, getPageIndexAtY, getPageSize, getPageTop, getPositionRect, getScrollYForPage, getTotalDocumentHeight, groupRectsByPage, hitTest, hitTestFragment, hitTestImageFragment, hitTestPage, hitTestTableCell, isMultiPageSelection, measureTableBlock, measureTableCellBlockVisualHeight, normalizeTableColumnWidths, positionToX, resolveCellGrid, resolveHeaderFooter, resolveTableWidthPx, selectionToRects };
588
+ export { type CaretPosition, DEFAULT_BODY_MARGIN_PX, DEFAULT_HF_DISTANCE_PX, DEFAULT_PAGE_HEIGHT_PX, DEFAULT_PAGE_WIDTH_PX, type ExtendMarginsForHeaderFooterInput, type ExtendMarginsForHeaderFooterResult, type FragmentHit, type HitTestResult, type PageHit, type Point, type PositionResult, type ResolvedGridCell, type SelectionRect, type TableCellHit, applyCellSelectionHighlight, clickToPosition, clickToPositionInParagraph, clickToPositionInTableCell, columnWidthForSection, computePerBlockWidths, countTableColumns, extendMarginsForHeaderFooter, findBodyEmptyRuns, findBodyPmAnchor, findBodyPmAnchors, findBodyPmSpans, getCaretPosition, getColumns, getMargins, getPageBounds, getPageIndexAtY, getPageSize, getPageTop, getPositionRect, getScrollYForPage, getTotalDocumentHeight, groupRectsByPage, hitTest, hitTestFragment, hitTestImageFragment, hitTestPage, hitTestTableCell, isMultiPageSelection, measureTableBlock, measureTableCellBlockVisualHeight, normalizeTableColumnWidths, positionToX, resolveCellGrid, resolveHeaderFooter, resolveTableWidthPx, selectionToRects, twipsToPixels };
@@ -9,11 +9,15 @@
9
9
  * @public
10
10
  */
11
11
  export { ToFlowBlocksOptions, convertBorderSpecToLayout, resetBlockIdCounter, resolveListTemplate, toFlowBlocks } from './toFlowBlocks.js';
12
- import { TableBlock, Fragment, FlowBlock, Measure, Page, TableFragment, TableMeasure, ParagraphBlock, ParagraphMeasure, Layout, PageMargins } from '../layout-engine/types.js';
13
- export { FloatPageGeometry, FloatingExclusionRect, FloatingImageZone, FloatingLineSegmentZone, FontMetrics, FontStyle, MeasureBlockFn, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureBlocksWithFloats, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.js';
12
+ import { TableBlock, Fragment, FlowBlock, Measure, Page, TableFragment, TableMeasure, ParagraphBlock, ParagraphMeasure, Layout, PageMargins, ColumnLayout } from '../layout-engine/types.js';
13
+ export { FontMetrics, FontStyle, MeasureParagraphOptions, RunMeasurement, TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx } from './measuring/index.js';
14
+ export { F as FloatPageGeometry, a as FloatingExclusionRect, b as FloatingImageZone, c as FloatingLineSegmentZone, M as MeasureBlockFn, g as getFloatingMargins, m as measureBlocksWithFloats, r as rectsToFloatingZones } from '../measureBlocksPipeline-iYNzAH-o.js';
14
15
  export { DomCaretPosition, DomSelectionRect, clickToPositionDom, clipRectToTableWindow, getCaretPositionFromDom, getSelectionRectsFromDom, clickToPositionDom as mouseToPosition } from './clickToPositionDom.js';
15
- export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_SEPARATOR_HEIGHT, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, b as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, c as StabilizeFootnoteLayoutResult, j as applyFootnotePresentation, d as buildFootnoteContentMap, e as buildFootnoteRenderItems, f as calculateFootnoteReservedHeights, k as calculateHeaderFooterVisualBounds, g as collectFootnoteRefs, l as computeHfCaretRectFromView, n as computeHfSelectionRectsFromView, o as convertFootnoteToContent, p as convertHeaderFooterPmDocToContent, h as convertHeaderFooterToContent, i as footnoteReservedHeightsEqual, q as invalidateHfDomCache, m as mapFootnotesToPages, r as normalizeHeaderFooterMeasureBlocks, t as resolveHeaderFooterVisualTop, s as stabilizeFootnoteLayout } from '../headerFooterLayout-4E-S4Aay.js';
16
+ import { EditorState } from 'prosemirror-state';
17
+ export { C as ConvertFootnoteOptions, a as ConvertHeaderFooterOptions, F as FOOTNOTE_SEPARATOR_HEIGHT, H as HeaderFooterMetrics, M as MAX_FOOTNOTE_LAYOUT_PASSES, b as MeasureBlocksFn, S as StabilizeFootnoteLayoutArgs, c as StabilizeFootnoteLayoutResult, j as applyFootnotePresentation, d as buildFootnoteContentMap, e as buildFootnoteRenderItems, f as calculateFootnoteReservedHeights, k as calculateHeaderFooterVisualBounds, g as collectFootnoteRefs, l as computeHfCaretRectFromView, n as computeHfSelectionRectsFromView, o as contributesToHeaderFooterFlowHeight, p as convertFootnoteToContent, q as convertHeaderFooterPmDocToContent, h as convertHeaderFooterToContent, i as footnoteReservedHeightsEqual, r as invalidateHfDomCache, m as mapFootnotesToPages, t as normalizeHeaderFooterMeasureBlocks, u as resolveHeaderFooterVisualTop, s as stabilizeFootnoteLayout } from '../headerFooterLayout-AtAOhM8E.js';
18
+ import { H as HeaderFooterContent } from '../footnotes-DMsicPGd.js';
16
19
  export { TABLE_INSERT_EDGE_PROXIMITY, TABLE_INSERT_HIDE_DELAY_MS, TableInsertHoverHit, TableInsertHoverInput, detectTableInsertHover } from './tableInsertHover.js';
20
+ import { SectionLayoutConfig } from '../layout-engine/index.js';
17
21
  import { Document } from '../types/document.js';
18
22
  import { S as SectionProperties, y as HeaderFooter } from '../content-C8fc_tL6.js';
19
23
  import 'prosemirror-model';
@@ -24,7 +28,6 @@ import '../docx/wrapTypes.js';
24
28
  import '../watermark-DAcnAs_J.js';
25
29
  import '../anchoredObjectPosition-CS-8BfhO.js';
26
30
  import 'prosemirror-view';
27
- import '../footnotes-DcUMWXul.js';
28
31
 
29
32
  /**
30
33
  * @internal Helpers for resolving DOCX table-width metadata into pixel widths.
@@ -285,6 +288,29 @@ declare function getPositionRect(block: ParagraphBlock, measure: ParagraphMeasur
285
288
  height: number;
286
289
  } | null;
287
290
 
291
+ /**
292
+ * Apply the visual cell-selection highlight class onto rendered table cells.
293
+ *
294
+ * The layout painter renders pages as static DOM with `data-pm-start` on each
295
+ * table cell. This walk translates a ProseMirror `CellSelection` into the
296
+ * `.layout-table-cell-selected` class on the matching painted cells. Shared by
297
+ * the React and Vue adapters.
298
+ */
299
+
300
+ /**
301
+ * Apply the `.layout-table-cell-selected` class to painted layout cells
302
+ * matching a CellSelection in the PM state. Clears the class everywhere
303
+ * (within scope) first so toggling off (or moving to a TextSelection) erases
304
+ * prior highlights.
305
+ *
306
+ * Duck-types CellSelection via `$anchorCell` / `forEachCell` rather than
307
+ * `instanceof` to dodge bundling issues across `prosemirror-tables` copies
308
+ * (the same trick used inline in the selection-overlay update).
309
+ */
310
+ declare function applyCellSelectionHighlight(pagesContainer: HTMLElement, state: EditorState, options?: {
311
+ scope?: 'body' | 'header' | 'footer';
312
+ }): void;
313
+
288
314
  /**
289
315
  * Selection Rectangles
290
316
  *
@@ -359,6 +385,69 @@ declare function isMultiPageSelection(rects: SelectionRect[]): boolean;
359
385
  */
360
386
  declare function groupRectsByPage(rects: SelectionRect[]): Map<number, SelectionRect[]>;
361
387
 
388
+ /**
389
+ * Header/footer body-margin extension.
390
+ *
391
+ * Word grows the header (or footer) band when its in-flow content is taller
392
+ * than the authored top (or bottom) margin minus the header/footer distance,
393
+ * pushing the body text down (or up). This module owns that computation so the
394
+ * React and Vue adapters share one implementation instead of byte-identical
395
+ * inline copies (the layout pipelines were drifting candidates — see
396
+ * `docx-editor` engine-unification work, issue #696).
397
+ *
398
+ * Two correctness rules live here:
399
+ *
400
+ * 1. The band height is driven by `HeaderFooterContent.flowHeight` (in-flow
401
+ * content only), NOT `height` / `visualBottom`. A page/margin-anchored
402
+ * float — e.g. a full-page letterhead anchored in a header — is positioned
403
+ * on the page and does not push the body in Word. Counting it inflated the
404
+ * effective top margin past the page on real-world templates, so the
405
+ * paginator hard-threw "page size and margins yield no content area" and
406
+ * the document rendered blank (issue #705).
407
+ *
408
+ * 2. A clamp guarantees `top + bottom` never consumes the whole page, so a
409
+ * pathological in-flow header degrades to a thin content band with a
410
+ * warning instead of aborting pagination.
411
+ */
412
+
413
+ /** @public */
414
+ interface ExtendMarginsForHeaderFooterInput {
415
+ pageSize: {
416
+ w: number;
417
+ h: number;
418
+ };
419
+ /** Body fallback margins. */
420
+ margins: PageMargins;
421
+ /** Final-section margins (last `sectPr`). */
422
+ finalMargins: PageMargins;
423
+ /**
424
+ * Body flow blocks. Each `sectionBreak` block's `margins` is extended IN
425
+ * PLACE so multi-section documents paginate with the same band growth (the
426
+ * layout engine prefers `sectionBreak.margins` over the body fallback).
427
+ */
428
+ bodyBlocks?: FlowBlock[];
429
+ /** Header variants in play this layout (e.g. default + first-page). */
430
+ headers?: Array<HeaderFooterContent | undefined>;
431
+ /** Footer variants in play this layout. */
432
+ footers?: Array<HeaderFooterContent | undefined>;
433
+ /** Optional diagnostic sink for the clamp (adapters pass `console.warn`). */
434
+ warn?: (message: string) => void;
435
+ }
436
+ /** @public */
437
+ interface ExtendMarginsForHeaderFooterResult {
438
+ margins: PageMargins;
439
+ finalMargins: PageMargins;
440
+ }
441
+ /**
442
+ * Extend body margins so the body clears the header/footer bands, mirroring
443
+ * Word. Returns new `margins` / `finalMargins`; mutates `sectionBreak.margins`
444
+ * in place. When no extension is needed the original objects are returned
445
+ * unchanged.
446
+ *
447
+ * @public
448
+ */
449
+ declare function extendMarginsForHeaderFooter(input: ExtendMarginsForHeaderFooterInput): ExtendMarginsForHeaderFooterResult;
450
+
362
451
  /**
363
452
  * Body-scoped DOM lookups for `data-pm-start` / `data-pm-end` markers.
364
453
  *
@@ -453,6 +542,8 @@ declare const DEFAULT_PAGE_HEIGHT_PX = 1056;
453
542
  declare const DEFAULT_BODY_MARGIN_PX = 96;
454
543
  /** Word's default `headerDistance` / `footerDistance` (0.5in = 48px). */
455
544
  declare const DEFAULT_HF_DISTANCE_PX = 48;
545
+ /** Convert twips to pixels (1 twip = 1/20 point, 96 pixels per inch). */
546
+ declare function twipsToPixels(twips: number): number;
456
547
  /** Convert SectionProperties page size (twips) → pixel `{ w, h }`. */
457
548
  declare function getPageSize(sp: SectionProperties | null | undefined): {
458
549
  w: number;
@@ -480,5 +571,18 @@ declare function resolveHeaderFooter(doc: Document | null, sp: SectionProperties
480
571
  firstHeader: HeaderFooter | null;
481
572
  firstFooter: HeaderFooter | null;
482
573
  };
574
+ /**
575
+ * Extract column layout from section properties.
576
+ * Returns undefined for single-column (default) to avoid unnecessary paginator overhead.
577
+ */
578
+ declare function getColumns(sectionProps: SectionProperties | null | undefined): ColumnLayout | undefined;
579
+ declare function columnWidthForSection(config: SectionLayoutConfig): number;
580
+ /**
581
+ * Compute per-block measurement widths by scanning for section breaks.
582
+ * Blocks must be measured with the page width/margins/columns of their own
583
+ * section so that the layout engine can paginate them against the right
584
+ * geometry without remeasuring.
585
+ */
586
+ declare function computePerBlockWidths(blocks: FlowBlock[], initialConfig: SectionLayoutConfig, finalConfig: SectionLayoutConfig): number[];
483
587
 
484
- export { type CaretPosition, DEFAULT_BODY_MARGIN_PX, DEFAULT_HF_DISTANCE_PX, DEFAULT_PAGE_HEIGHT_PX, DEFAULT_PAGE_WIDTH_PX, type FragmentHit, type HitTestResult, type PageHit, type Point, type PositionResult, type ResolvedGridCell, type SelectionRect, type TableCellHit, clickToPosition, clickToPositionInParagraph, clickToPositionInTableCell, countTableColumns, findBodyEmptyRuns, findBodyPmAnchor, findBodyPmAnchors, findBodyPmSpans, getCaretPosition, getMargins, getPageBounds, getPageIndexAtY, getPageSize, getPageTop, getPositionRect, getScrollYForPage, getTotalDocumentHeight, groupRectsByPage, hitTest, hitTestFragment, hitTestImageFragment, hitTestPage, hitTestTableCell, isMultiPageSelection, measureTableBlock, measureTableCellBlockVisualHeight, normalizeTableColumnWidths, positionToX, resolveCellGrid, resolveHeaderFooter, resolveTableWidthPx, selectionToRects };
588
+ export { type CaretPosition, DEFAULT_BODY_MARGIN_PX, DEFAULT_HF_DISTANCE_PX, DEFAULT_PAGE_HEIGHT_PX, DEFAULT_PAGE_WIDTH_PX, type ExtendMarginsForHeaderFooterInput, type ExtendMarginsForHeaderFooterResult, type FragmentHit, type HitTestResult, type PageHit, type Point, type PositionResult, type ResolvedGridCell, type SelectionRect, type TableCellHit, applyCellSelectionHighlight, clickToPosition, clickToPositionInParagraph, clickToPositionInTableCell, columnWidthForSection, computePerBlockWidths, countTableColumns, extendMarginsForHeaderFooter, findBodyEmptyRuns, findBodyPmAnchor, findBodyPmAnchors, findBodyPmSpans, getCaretPosition, getColumns, getMargins, getPageBounds, getPageIndexAtY, getPageSize, getPageTop, getPositionRect, getScrollYForPage, getTotalDocumentHeight, groupRectsByPage, hitTest, hitTestFragment, hitTestImageFragment, hitTestPage, hitTestTableCell, isMultiPageSelection, measureTableBlock, measureTableCellBlockVisualHeight, normalizeTableColumnWidths, positionToX, resolveCellGrid, resolveHeaderFooter, resolveTableWidthPx, selectionToRects, twipsToPixels };
@@ -1 +1 @@
1
- 'use strict';var chunkXWC67YLW_js=require('../chunk-XWC67YLW.js'),chunkTJRROR6U_js=require('../chunk-TJRROR6U.js'),chunkWDBZ3QVB_js=require('../chunk-WDBZ3QVB.js'),chunkFQS436KN_js=require('../chunk-FQS436KN.js'),chunk7WGN2OBZ_js=require('../chunk-7WGN2OBZ.js'),chunkTURYWKNS_js=require('../chunk-TURYWKNS.js'),chunkT4RYVPAB_js=require('../chunk-T4RYVPAB.js'),chunkIMKU4O3P_js=require('../chunk-IMKU4O3P.js');require('../chunk-DROCYKAR.js'),require('../chunk-LERLET2D.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-BUCOTKYY.js'),require('../chunk-C45EFOVP.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-RQVHKDXK.js'),require('../chunk-SCK6ZM5V.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-WWBNJ7KF.js'),require('../chunk-4RTVLMRZ.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-WVERBZZU.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"DEFAULT_BODY_MARGIN_PX",{enumerable:true,get:function(){return chunkXWC67YLW_js.D}});Object.defineProperty(exports,"DEFAULT_HF_DISTANCE_PX",{enumerable:true,get:function(){return chunkXWC67YLW_js.E}});Object.defineProperty(exports,"DEFAULT_PAGE_HEIGHT_PX",{enumerable:true,get:function(){return chunkXWC67YLW_js.C}});Object.defineProperty(exports,"DEFAULT_PAGE_WIDTH_PX",{enumerable:true,get:function(){return chunkXWC67YLW_js.B}});Object.defineProperty(exports,"calculateHeaderFooterVisualBounds",{enumerable:true,get:function(){return chunkXWC67YLW_js.v}});Object.defineProperty(exports,"clickToPosition",{enumerable:true,get:function(){return chunkXWC67YLW_js.m}});Object.defineProperty(exports,"clickToPositionInParagraph",{enumerable:true,get:function(){return chunkXWC67YLW_js.k}});Object.defineProperty(exports,"clickToPositionInTableCell",{enumerable:true,get:function(){return chunkXWC67YLW_js.l}});Object.defineProperty(exports,"computeHfCaretRectFromView",{enumerable:true,get:function(){return chunkXWC67YLW_js.z}});Object.defineProperty(exports,"computeHfSelectionRectsFromView",{enumerable:true,get:function(){return chunkXWC67YLW_js.A}});Object.defineProperty(exports,"convertHeaderFooterPmDocToContent",{enumerable:true,get:function(){return chunkXWC67YLW_js.x}});Object.defineProperty(exports,"convertHeaderFooterToContent",{enumerable:true,get:function(){return chunkXWC67YLW_js.w}});Object.defineProperty(exports,"getCaretPosition",{enumerable:true,get:function(){return chunkXWC67YLW_js.q}});Object.defineProperty(exports,"getMargins",{enumerable:true,get:function(){return chunkXWC67YLW_js.G}});Object.defineProperty(exports,"getPageBounds",{enumerable:true,get:function(){return chunkXWC67YLW_js.j}});Object.defineProperty(exports,"getPageIndexAtY",{enumerable:true,get:function(){return chunkXWC67YLW_js.c}});Object.defineProperty(exports,"getPageSize",{enumerable:true,get:function(){return chunkXWC67YLW_js.F}});Object.defineProperty(exports,"getPageTop",{enumerable:true,get:function(){return chunkXWC67YLW_js.b}});Object.defineProperty(exports,"getPositionRect",{enumerable:true,get:function(){return chunkXWC67YLW_js.o}});Object.defineProperty(exports,"getScrollYForPage",{enumerable:true,get:function(){return chunkXWC67YLW_js.i}});Object.defineProperty(exports,"getTotalDocumentHeight",{enumerable:true,get:function(){return chunkXWC67YLW_js.h}});Object.defineProperty(exports,"groupRectsByPage",{enumerable:true,get:function(){return chunkXWC67YLW_js.s}});Object.defineProperty(exports,"hitTest",{enumerable:true,get:function(){return chunkXWC67YLW_js.g}});Object.defineProperty(exports,"hitTestFragment",{enumerable:true,get:function(){return chunkXWC67YLW_js.d}});Object.defineProperty(exports,"hitTestImageFragment",{enumerable:true,get:function(){return chunkXWC67YLW_js.e}});Object.defineProperty(exports,"hitTestPage",{enumerable:true,get:function(){return chunkXWC67YLW_js.a}});Object.defineProperty(exports,"hitTestTableCell",{enumerable:true,get:function(){return chunkXWC67YLW_js.f}});Object.defineProperty(exports,"invalidateHfDomCache",{enumerable:true,get:function(){return chunkXWC67YLW_js.y}});Object.defineProperty(exports,"isMultiPageSelection",{enumerable:true,get:function(){return chunkXWC67YLW_js.r}});Object.defineProperty(exports,"normalizeHeaderFooterMeasureBlocks",{enumerable:true,get:function(){return chunkXWC67YLW_js.t}});Object.defineProperty(exports,"positionToX",{enumerable:true,get:function(){return chunkXWC67YLW_js.n}});Object.defineProperty(exports,"resolveHeaderFooter",{enumerable:true,get:function(){return chunkXWC67YLW_js.H}});Object.defineProperty(exports,"resolveHeaderFooterVisualTop",{enumerable:true,get:function(){return chunkXWC67YLW_js.u}});Object.defineProperty(exports,"selectionToRects",{enumerable:true,get:function(){return chunkXWC67YLW_js.p}});Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkTJRROR6U_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkTJRROR6U_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkTJRROR6U_js.c}});Object.defineProperty(exports,"FOOTNOTE_SEPARATOR_HEIGHT",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.a}});Object.defineProperty(exports,"MAX_FOOTNOTE_LAYOUT_PASSES",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.b}});Object.defineProperty(exports,"applyFootnotePresentation",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.f}});Object.defineProperty(exports,"buildFootnoteContentMap",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.h}});Object.defineProperty(exports,"buildFootnoteRenderItems",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.k}});Object.defineProperty(exports,"calculateFootnoteReservedHeights",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.i}});Object.defineProperty(exports,"collectFootnoteRefs",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.d}});Object.defineProperty(exports,"convertFootnoteToContent",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.g}});Object.defineProperty(exports,"footnoteReservedHeightsEqual",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.c}});Object.defineProperty(exports,"mapFootnotesToPages",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.e}});Object.defineProperty(exports,"stabilizeFootnoteLayout",{enumerable:true,get:function(){return chunkWDBZ3QVB_js.j}});Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkFQS436KN_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkFQS436KN_js.b}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkFQS436KN_js.c}});Object.defineProperty(exports,"clickToPositionDom",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.e}});Object.defineProperty(exports,"clipRectToTableWindow",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.f}});Object.defineProperty(exports,"findBodyEmptyRuns",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.b}});Object.defineProperty(exports,"findBodyPmAnchor",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.d}});Object.defineProperty(exports,"findBodyPmAnchors",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.c}});Object.defineProperty(exports,"findBodyPmSpans",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.a}});Object.defineProperty(exports,"getCaretPositionFromDom",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.h}});Object.defineProperty(exports,"getSelectionRectsFromDom",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.g}});Object.defineProperty(exports,"mouseToPosition",{enumerable:true,get:function(){return chunk7WGN2OBZ_js.e}});Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkTURYWKNS_js.B}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkTURYWKNS_js.s}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkTURYWKNS_js.y}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkTURYWKNS_js.n}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkTURYWKNS_js.q}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkTURYWKNS_js.w}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkTURYWKNS_js.l}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.u}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.A}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.p}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.C}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkTURYWKNS_js.v}});Object.defineProperty(exports,"measureBlocksWithFloats",{enumerable:true,get:function(){return chunkTURYWKNS_js.k}});Object.defineProperty(exports,"measureTableBlock",{enumerable:true,get:function(){return chunkTURYWKNS_js.j}});Object.defineProperty(exports,"measureTableCellBlockVisualHeight",{enumerable:true,get:function(){return chunkTURYWKNS_js.i}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkTURYWKNS_js.r}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkTURYWKNS_js.x}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkTURYWKNS_js.m}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.t}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.z}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkTURYWKNS_js.o}});Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkT4RYVPAB_js.g}});Object.defineProperty(exports,"clampFloatingWrapMargins",{enumerable:true,get:function(){return chunkT4RYVPAB_js.y}});Object.defineProperty(exports,"countTableColumns",{enumerable:true,get:function(){return chunkT4RYVPAB_js.c}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkT4RYVPAB_js.l}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkT4RYVPAB_js.e}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkT4RYVPAB_js.u}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkT4RYVPAB_js.h}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkT4RYVPAB_js.B}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkT4RYVPAB_js.m}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkT4RYVPAB_js.r}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkT4RYVPAB_js.z}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkT4RYVPAB_js.A}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkT4RYVPAB_js.k}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkT4RYVPAB_js.j}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkT4RYVPAB_js.i}});Object.defineProperty(exports,"normalizeTableColumnWidths",{enumerable:true,get:function(){return chunkT4RYVPAB_js.d}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkT4RYVPAB_js.p}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkT4RYVPAB_js.s}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkT4RYVPAB_js.q}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkT4RYVPAB_js.o}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkT4RYVPAB_js.t}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkT4RYVPAB_js.f}});Object.defineProperty(exports,"resolveCellGrid",{enumerable:true,get:function(){return chunkT4RYVPAB_js.b}});Object.defineProperty(exports,"resolveTableWidthPx",{enumerable:true,get:function(){return chunkT4RYVPAB_js.a}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkT4RYVPAB_js.n}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkIMKU4O3P_js.d}});
1
+ 'use strict';var chunk4PANZ3VU_js=require('../chunk-4PANZ3VU.js'),chunkZAZWHK4J_js=require('../chunk-ZAZWHK4J.js'),chunkPFMM7QON_js=require('../chunk-PFMM7QON.js'),chunkYPQACU4A_js=require('../chunk-YPQACU4A.js'),chunk4MYKVWNF_js=require('../chunk-4MYKVWNF.js'),chunkJ3YFJDZD_js=require('../chunk-J3YFJDZD.js'),chunkRSU4HTC6_js=require('../chunk-RSU4HTC6.js'),chunkIMKU4O3P_js=require('../chunk-IMKU4O3P.js');require('../chunk-DROCYKAR.js'),require('../chunk-LERLET2D.js'),require('../chunk-FIGLFSNR.js'),require('../chunk-QVRNNRG5.js'),require('../chunk-C45EFOVP.js'),require('../chunk-ISKTBM4L.js'),require('../chunk-JFZIXFRC.js'),require('../chunk-RQVHKDXK.js'),require('../chunk-SCK6ZM5V.js'),require('../chunk-Z3LGMBJC.js'),require('../chunk-3R7QHNI5.js'),require('../chunk-WWBNJ7KF.js'),require('../chunk-4RTVLMRZ.js'),require('../chunk-BHBOAP6Z.js'),require('../chunk-MZ7LW5CH.js'),require('../chunk-N3Y5BUKV.js'),require('../chunk-WVERBZZU.js'),require('../chunk-6LVPRTB6.js'),require('../chunk-LWH66Q7Q.js'),require('../chunk-TUIEV7Q7.js'),require('../chunk-7HANRHHL.js'),require('../chunk-MJ5FQX7Q.js'),require('../chunk-C2BAPYGJ.js'),require('../chunk-4Q2IP5FW.js'),require('../chunk-GSKMHXHG.js'),require('../chunk-DC7S76ZX.js');Object.defineProperty(exports,"DEFAULT_BODY_MARGIN_PX",{enumerable:true,get:function(){return chunk4PANZ3VU_js.G}});Object.defineProperty(exports,"DEFAULT_HF_DISTANCE_PX",{enumerable:true,get:function(){return chunk4PANZ3VU_js.H}});Object.defineProperty(exports,"DEFAULT_PAGE_HEIGHT_PX",{enumerable:true,get:function(){return chunk4PANZ3VU_js.F}});Object.defineProperty(exports,"DEFAULT_PAGE_WIDTH_PX",{enumerable:true,get:function(){return chunk4PANZ3VU_js.E}});Object.defineProperty(exports,"applyCellSelectionHighlight",{enumerable:true,get:function(){return chunk4PANZ3VU_js.p}});Object.defineProperty(exports,"calculateHeaderFooterVisualBounds",{enumerable:true,get:function(){return chunk4PANZ3VU_js.x}});Object.defineProperty(exports,"clickToPosition",{enumerable:true,get:function(){return chunk4PANZ3VU_js.m}});Object.defineProperty(exports,"clickToPositionInParagraph",{enumerable:true,get:function(){return chunk4PANZ3VU_js.k}});Object.defineProperty(exports,"clickToPositionInTableCell",{enumerable:true,get:function(){return chunk4PANZ3VU_js.l}});Object.defineProperty(exports,"columnWidthForSection",{enumerable:true,get:function(){return chunk4PANZ3VU_js.N}});Object.defineProperty(exports,"computeHfCaretRectFromView",{enumerable:true,get:function(){return chunk4PANZ3VU_js.B}});Object.defineProperty(exports,"computeHfSelectionRectsFromView",{enumerable:true,get:function(){return chunk4PANZ3VU_js.C}});Object.defineProperty(exports,"computePerBlockWidths",{enumerable:true,get:function(){return chunk4PANZ3VU_js.O}});Object.defineProperty(exports,"contributesToHeaderFooterFlowHeight",{enumerable:true,get:function(){return chunk4PANZ3VU_js.w}});Object.defineProperty(exports,"convertHeaderFooterPmDocToContent",{enumerable:true,get:function(){return chunk4PANZ3VU_js.z}});Object.defineProperty(exports,"convertHeaderFooterToContent",{enumerable:true,get:function(){return chunk4PANZ3VU_js.y}});Object.defineProperty(exports,"extendMarginsForHeaderFooter",{enumerable:true,get:function(){return chunk4PANZ3VU_js.D}});Object.defineProperty(exports,"getCaretPosition",{enumerable:true,get:function(){return chunk4PANZ3VU_js.r}});Object.defineProperty(exports,"getColumns",{enumerable:true,get:function(){return chunk4PANZ3VU_js.M}});Object.defineProperty(exports,"getMargins",{enumerable:true,get:function(){return chunk4PANZ3VU_js.K}});Object.defineProperty(exports,"getPageBounds",{enumerable:true,get:function(){return chunk4PANZ3VU_js.j}});Object.defineProperty(exports,"getPageIndexAtY",{enumerable:true,get:function(){return chunk4PANZ3VU_js.c}});Object.defineProperty(exports,"getPageSize",{enumerable:true,get:function(){return chunk4PANZ3VU_js.J}});Object.defineProperty(exports,"getPageTop",{enumerable:true,get:function(){return chunk4PANZ3VU_js.b}});Object.defineProperty(exports,"getPositionRect",{enumerable:true,get:function(){return chunk4PANZ3VU_js.o}});Object.defineProperty(exports,"getScrollYForPage",{enumerable:true,get:function(){return chunk4PANZ3VU_js.i}});Object.defineProperty(exports,"getTotalDocumentHeight",{enumerable:true,get:function(){return chunk4PANZ3VU_js.h}});Object.defineProperty(exports,"groupRectsByPage",{enumerable:true,get:function(){return chunk4PANZ3VU_js.t}});Object.defineProperty(exports,"hitTest",{enumerable:true,get:function(){return chunk4PANZ3VU_js.g}});Object.defineProperty(exports,"hitTestFragment",{enumerable:true,get:function(){return chunk4PANZ3VU_js.d}});Object.defineProperty(exports,"hitTestImageFragment",{enumerable:true,get:function(){return chunk4PANZ3VU_js.e}});Object.defineProperty(exports,"hitTestPage",{enumerable:true,get:function(){return chunk4PANZ3VU_js.a}});Object.defineProperty(exports,"hitTestTableCell",{enumerable:true,get:function(){return chunk4PANZ3VU_js.f}});Object.defineProperty(exports,"invalidateHfDomCache",{enumerable:true,get:function(){return chunk4PANZ3VU_js.A}});Object.defineProperty(exports,"isMultiPageSelection",{enumerable:true,get:function(){return chunk4PANZ3VU_js.s}});Object.defineProperty(exports,"normalizeHeaderFooterMeasureBlocks",{enumerable:true,get:function(){return chunk4PANZ3VU_js.u}});Object.defineProperty(exports,"positionToX",{enumerable:true,get:function(){return chunk4PANZ3VU_js.n}});Object.defineProperty(exports,"resolveHeaderFooter",{enumerable:true,get:function(){return chunk4PANZ3VU_js.L}});Object.defineProperty(exports,"resolveHeaderFooterVisualTop",{enumerable:true,get:function(){return chunk4PANZ3VU_js.v}});Object.defineProperty(exports,"selectionToRects",{enumerable:true,get:function(){return chunk4PANZ3VU_js.q}});Object.defineProperty(exports,"twipsToPixels",{enumerable:true,get:function(){return chunk4PANZ3VU_js.I}});Object.defineProperty(exports,"TABLE_INSERT_EDGE_PROXIMITY",{enumerable:true,get:function(){return chunkZAZWHK4J_js.a}});Object.defineProperty(exports,"TABLE_INSERT_HIDE_DELAY_MS",{enumerable:true,get:function(){return chunkZAZWHK4J_js.b}});Object.defineProperty(exports,"detectTableInsertHover",{enumerable:true,get:function(){return chunkZAZWHK4J_js.c}});Object.defineProperty(exports,"FOOTNOTE_SEPARATOR_HEIGHT",{enumerable:true,get:function(){return chunkPFMM7QON_js.a}});Object.defineProperty(exports,"MAX_FOOTNOTE_LAYOUT_PASSES",{enumerable:true,get:function(){return chunkPFMM7QON_js.b}});Object.defineProperty(exports,"applyFootnotePresentation",{enumerable:true,get:function(){return chunkPFMM7QON_js.f}});Object.defineProperty(exports,"buildFootnoteContentMap",{enumerable:true,get:function(){return chunkPFMM7QON_js.h}});Object.defineProperty(exports,"buildFootnoteRenderItems",{enumerable:true,get:function(){return chunkPFMM7QON_js.k}});Object.defineProperty(exports,"calculateFootnoteReservedHeights",{enumerable:true,get:function(){return chunkPFMM7QON_js.i}});Object.defineProperty(exports,"collectFootnoteRefs",{enumerable:true,get:function(){return chunkPFMM7QON_js.d}});Object.defineProperty(exports,"convertFootnoteToContent",{enumerable:true,get:function(){return chunkPFMM7QON_js.g}});Object.defineProperty(exports,"footnoteReservedHeightsEqual",{enumerable:true,get:function(){return chunkPFMM7QON_js.c}});Object.defineProperty(exports,"mapFootnotesToPages",{enumerable:true,get:function(){return chunkPFMM7QON_js.e}});Object.defineProperty(exports,"stabilizeFootnoteLayout",{enumerable:true,get:function(){return chunkPFMM7QON_js.j}});Object.defineProperty(exports,"convertBorderSpecToLayout",{enumerable:true,get:function(){return chunkYPQACU4A_js.a}});Object.defineProperty(exports,"resolveListTemplate",{enumerable:true,get:function(){return chunkYPQACU4A_js.b}});Object.defineProperty(exports,"toFlowBlocks",{enumerable:true,get:function(){return chunkYPQACU4A_js.c}});Object.defineProperty(exports,"clickToPositionDom",{enumerable:true,get:function(){return chunk4MYKVWNF_js.e}});Object.defineProperty(exports,"clipRectToTableWindow",{enumerable:true,get:function(){return chunk4MYKVWNF_js.f}});Object.defineProperty(exports,"findBodyEmptyRuns",{enumerable:true,get:function(){return chunk4MYKVWNF_js.b}});Object.defineProperty(exports,"findBodyPmAnchor",{enumerable:true,get:function(){return chunk4MYKVWNF_js.d}});Object.defineProperty(exports,"findBodyPmAnchors",{enumerable:true,get:function(){return chunk4MYKVWNF_js.c}});Object.defineProperty(exports,"findBodyPmSpans",{enumerable:true,get:function(){return chunk4MYKVWNF_js.a}});Object.defineProperty(exports,"getCaretPositionFromDom",{enumerable:true,get:function(){return chunk4MYKVWNF_js.h}});Object.defineProperty(exports,"getSelectionRectsFromDom",{enumerable:true,get:function(){return chunk4MYKVWNF_js.g}});Object.defineProperty(exports,"mouseToPosition",{enumerable:true,get:function(){return chunk4MYKVWNF_js.e}});Object.defineProperty(exports,"clearAllCaches",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.B}});Object.defineProperty(exports,"clearFontMetricsCache",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.s}});Object.defineProperty(exports,"clearParagraphMeasureCache",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.y}});Object.defineProperty(exports,"clearTextWidthCache",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.n}});Object.defineProperty(exports,"getCachedFontMetrics",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.q}});Object.defineProperty(exports,"getCachedParagraphMeasure",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.w}});Object.defineProperty(exports,"getCachedTextWidth",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.l}});Object.defineProperty(exports,"getFontCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.u}});Object.defineProperty(exports,"getParagraphCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.A}});Object.defineProperty(exports,"getTextCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.p}});Object.defineProperty(exports,"getTotalCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.C}});Object.defineProperty(exports,"hashParagraphBlock",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.v}});Object.defineProperty(exports,"measureBlocksWithFloats",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.k}});Object.defineProperty(exports,"measureTableBlock",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.j}});Object.defineProperty(exports,"measureTableCellBlockVisualHeight",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.i}});Object.defineProperty(exports,"setCachedFontMetrics",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.r}});Object.defineProperty(exports,"setCachedParagraphMeasure",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.x}});Object.defineProperty(exports,"setCachedTextWidth",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.m}});Object.defineProperty(exports,"setFontCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.t}});Object.defineProperty(exports,"setParagraphCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.z}});Object.defineProperty(exports,"setTextCacheSize",{enumerable:true,get:function(){return chunkJ3YFJDZD_js.o}});Object.defineProperty(exports,"buildFontString",{enumerable:true,get:function(){return chunkRSU4HTC6_js.g}});Object.defineProperty(exports,"clampFloatingWrapMargins",{enumerable:true,get:function(){return chunkRSU4HTC6_js.y}});Object.defineProperty(exports,"countTableColumns",{enumerable:true,get:function(){return chunkRSU4HTC6_js.c}});Object.defineProperty(exports,"findCharacterAtX",{enumerable:true,get:function(){return chunkRSU4HTC6_js.l}});Object.defineProperty(exports,"getCanvasContext",{enumerable:true,get:function(){return chunkRSU4HTC6_js.e}});Object.defineProperty(exports,"getFloatingMargins",{enumerable:true,get:function(){return chunkRSU4HTC6_js.u}});Object.defineProperty(exports,"getFontMetrics",{enumerable:true,get:function(){return chunkRSU4HTC6_js.h}});Object.defineProperty(exports,"getRunCharWidths",{enumerable:true,get:function(){return chunkRSU4HTC6_js.B}});Object.defineProperty(exports,"getXForCharacter",{enumerable:true,get:function(){return chunkRSU4HTC6_js.m}});Object.defineProperty(exports,"halfPtToPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.r}});Object.defineProperty(exports,"measureParagraph",{enumerable:true,get:function(){return chunkRSU4HTC6_js.z}});Object.defineProperty(exports,"measureParagraphs",{enumerable:true,get:function(){return chunkRSU4HTC6_js.A}});Object.defineProperty(exports,"measureRun",{enumerable:true,get:function(){return chunkRSU4HTC6_js.k}});Object.defineProperty(exports,"measureText",{enumerable:true,get:function(){return chunkRSU4HTC6_js.j}});Object.defineProperty(exports,"measureTextWidth",{enumerable:true,get:function(){return chunkRSU4HTC6_js.i}});Object.defineProperty(exports,"normalizeTableColumnWidths",{enumerable:true,get:function(){return chunkRSU4HTC6_js.d}});Object.defineProperty(exports,"ptToPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.p}});Object.defineProperty(exports,"pxToHalfPt",{enumerable:true,get:function(){return chunkRSU4HTC6_js.s}});Object.defineProperty(exports,"pxToPt",{enumerable:true,get:function(){return chunkRSU4HTC6_js.q}});Object.defineProperty(exports,"pxToTwips",{enumerable:true,get:function(){return chunkRSU4HTC6_js.o}});Object.defineProperty(exports,"rectsToFloatingZones",{enumerable:true,get:function(){return chunkRSU4HTC6_js.t}});Object.defineProperty(exports,"resetCanvasContext",{enumerable:true,get:function(){return chunkRSU4HTC6_js.f}});Object.defineProperty(exports,"resolveCellGrid",{enumerable:true,get:function(){return chunkRSU4HTC6_js.b}});Object.defineProperty(exports,"resolveTableWidthPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.a}});Object.defineProperty(exports,"twipsToPx",{enumerable:true,get:function(){return chunkRSU4HTC6_js.n}});Object.defineProperty(exports,"resetBlockIdCounter",{enumerable:true,get:function(){return chunkIMKU4O3P_js.d}});
@@ -1 +1 @@
1
- export{D as DEFAULT_BODY_MARGIN_PX,E as DEFAULT_HF_DISTANCE_PX,C as DEFAULT_PAGE_HEIGHT_PX,B as DEFAULT_PAGE_WIDTH_PX,v as calculateHeaderFooterVisualBounds,m as clickToPosition,k as clickToPositionInParagraph,l as clickToPositionInTableCell,z as computeHfCaretRectFromView,A as computeHfSelectionRectsFromView,x as convertHeaderFooterPmDocToContent,w as convertHeaderFooterToContent,q as getCaretPosition,G as getMargins,j as getPageBounds,c as getPageIndexAtY,F as getPageSize,b as getPageTop,o as getPositionRect,i as getScrollYForPage,h as getTotalDocumentHeight,s as groupRectsByPage,g as hitTest,d as hitTestFragment,e as hitTestImageFragment,a as hitTestPage,f as hitTestTableCell,y as invalidateHfDomCache,r as isMultiPageSelection,t as normalizeHeaderFooterMeasureBlocks,n as positionToX,H as resolveHeaderFooter,u as resolveHeaderFooterVisualTop,p as selectionToRects}from'../chunk-JUMHC5Z6.mjs';export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-L6YTCHOQ.mjs';export{a as FOOTNOTE_SEPARATOR_HEIGHT,b as MAX_FOOTNOTE_LAYOUT_PASSES,f as applyFootnotePresentation,h as buildFootnoteContentMap,k as buildFootnoteRenderItems,i as calculateFootnoteReservedHeights,d as collectFootnoteRefs,g as convertFootnoteToContent,c as footnoteReservedHeightsEqual,e as mapFootnotesToPages,j as stabilizeFootnoteLayout}from'../chunk-7JQVKJRN.mjs';export{a as convertBorderSpecToLayout,b as resolveListTemplate,c as toFlowBlocks}from'../chunk-B46V5G46.mjs';export{e as clickToPositionDom,f as clipRectToTableWindow,b as findBodyEmptyRuns,d as findBodyPmAnchor,c as findBodyPmAnchors,a as findBodyPmSpans,h as getCaretPositionFromDom,g as getSelectionRectsFromDom,e as mouseToPosition}from'../chunk-MEVZCB56.mjs';export{B as clearAllCaches,s as clearFontMetricsCache,y as clearParagraphMeasureCache,n as clearTextWidthCache,q as getCachedFontMetrics,w as getCachedParagraphMeasure,l as getCachedTextWidth,u as getFontCacheSize,A as getParagraphCacheSize,p as getTextCacheSize,C as getTotalCacheSize,v as hashParagraphBlock,k as measureBlocksWithFloats,j as measureTableBlock,i as measureTableCellBlockVisualHeight,r as setCachedFontMetrics,x as setCachedParagraphMeasure,m as setCachedTextWidth,t as setFontCacheSize,z as setParagraphCacheSize,o as setTextCacheSize}from'../chunk-Q5B5GKXD.mjs';export{g as buildFontString,y as clampFloatingWrapMargins,c as countTableColumns,l as findCharacterAtX,e as getCanvasContext,u as getFloatingMargins,h as getFontMetrics,B as getRunCharWidths,m as getXForCharacter,r as halfPtToPx,z as measureParagraph,A as measureParagraphs,k as measureRun,j as measureText,i as measureTextWidth,d as normalizeTableColumnWidths,p as ptToPx,s as pxToHalfPt,q as pxToPt,o as pxToTwips,t as rectsToFloatingZones,f as resetCanvasContext,b as resolveCellGrid,a as resolveTableWidthPx,n as twipsToPx}from'../chunk-72KLR6TJ.mjs';export{d as resetBlockIdCounter}from'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-IUVQJ6PX.mjs';import'../chunk-7OW3VCZE.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-GYWTUUXX.mjs';import'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-4GFTMGSV.mjs';import'../chunk-SWBLJF6R.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-U67MWOPZ.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';
1
+ export{G as DEFAULT_BODY_MARGIN_PX,H as DEFAULT_HF_DISTANCE_PX,F as DEFAULT_PAGE_HEIGHT_PX,E as DEFAULT_PAGE_WIDTH_PX,p as applyCellSelectionHighlight,x as calculateHeaderFooterVisualBounds,m as clickToPosition,k as clickToPositionInParagraph,l as clickToPositionInTableCell,N as columnWidthForSection,B as computeHfCaretRectFromView,C as computeHfSelectionRectsFromView,O as computePerBlockWidths,w as contributesToHeaderFooterFlowHeight,z as convertHeaderFooterPmDocToContent,y as convertHeaderFooterToContent,D as extendMarginsForHeaderFooter,r as getCaretPosition,M as getColumns,K as getMargins,j as getPageBounds,c as getPageIndexAtY,J as getPageSize,b as getPageTop,o as getPositionRect,i as getScrollYForPage,h as getTotalDocumentHeight,t as groupRectsByPage,g as hitTest,d as hitTestFragment,e as hitTestImageFragment,a as hitTestPage,f as hitTestTableCell,A as invalidateHfDomCache,s as isMultiPageSelection,u as normalizeHeaderFooterMeasureBlocks,n as positionToX,L as resolveHeaderFooter,v as resolveHeaderFooterVisualTop,q as selectionToRects,I as twipsToPixels}from'../chunk-2LEFMTNZ.mjs';export{a as TABLE_INSERT_EDGE_PROXIMITY,b as TABLE_INSERT_HIDE_DELAY_MS,c as detectTableInsertHover}from'../chunk-UEPLDKKM.mjs';export{a as FOOTNOTE_SEPARATOR_HEIGHT,b as MAX_FOOTNOTE_LAYOUT_PASSES,f as applyFootnotePresentation,h as buildFootnoteContentMap,k as buildFootnoteRenderItems,i as calculateFootnoteReservedHeights,d as collectFootnoteRefs,g as convertFootnoteToContent,c as footnoteReservedHeightsEqual,e as mapFootnotesToPages,j as stabilizeFootnoteLayout}from'../chunk-KKXCBWVG.mjs';export{a as convertBorderSpecToLayout,b as resolveListTemplate,c as toFlowBlocks}from'../chunk-HKN2NKOG.mjs';export{e as clickToPositionDom,f as clipRectToTableWindow,b as findBodyEmptyRuns,d as findBodyPmAnchor,c as findBodyPmAnchors,a as findBodyPmSpans,h as getCaretPositionFromDom,g as getSelectionRectsFromDom,e as mouseToPosition}from'../chunk-LX35TFGF.mjs';export{B as clearAllCaches,s as clearFontMetricsCache,y as clearParagraphMeasureCache,n as clearTextWidthCache,q as getCachedFontMetrics,w as getCachedParagraphMeasure,l as getCachedTextWidth,u as getFontCacheSize,A as getParagraphCacheSize,p as getTextCacheSize,C as getTotalCacheSize,v as hashParagraphBlock,k as measureBlocksWithFloats,j as measureTableBlock,i as measureTableCellBlockVisualHeight,r as setCachedFontMetrics,x as setCachedParagraphMeasure,m as setCachedTextWidth,t as setFontCacheSize,z as setParagraphCacheSize,o as setTextCacheSize}from'../chunk-55XWETY4.mjs';export{g as buildFontString,y as clampFloatingWrapMargins,c as countTableColumns,l as findCharacterAtX,e as getCanvasContext,u as getFloatingMargins,h as getFontMetrics,B as getRunCharWidths,m as getXForCharacter,r as halfPtToPx,z as measureParagraph,A as measureParagraphs,k as measureRun,j as measureText,i as measureTextWidth,d as normalizeTableColumnWidths,p as ptToPx,s as pxToHalfPt,q as pxToPt,o as pxToTwips,t as rectsToFloatingZones,f as resetCanvasContext,b as resolveCellGrid,a as resolveTableWidthPx,n as twipsToPx}from'../chunk-JHTURDPX.mjs';export{d as resetBlockIdCounter}from'../chunk-FCJWLEKT.mjs';import'../chunk-7E5VBRDL.mjs';import'../chunk-3G44SFHX.mjs';import'../chunk-MOCGHQ4A.mjs';import'../chunk-LJE7HQEJ.mjs';import'../chunk-7OW3VCZE.mjs';import'../chunk-LK6I3HMH.mjs';import'../chunk-QPFJJPIC.mjs';import'../chunk-GYWTUUXX.mjs';import'../chunk-7CZEZ3UL.mjs';import'../chunk-W77JXDEV.mjs';import'../chunk-3ANZ3252.mjs';import'../chunk-4GFTMGSV.mjs';import'../chunk-SWBLJF6R.mjs';import'../chunk-MOKKS75W.mjs';import'../chunk-OZMNIX6U.mjs';import'../chunk-AMENZY5F.mjs';import'../chunk-U67MWOPZ.mjs';import'../chunk-BGY3CB37.mjs';import'../chunk-2XP6GLA4.mjs';import'../chunk-ZX26QZJ5.mjs';import'../chunk-MJ6XZFVD.mjs';import'../chunk-67LVRQIR.mjs';import'../chunk-LE67NTCN.mjs';import'../chunk-VW22RZ6C.mjs';import'../chunk-DI6CRWSW.mjs';import'../chunk-QYUPLKLP.mjs';
@@ -6,13 +6,15 @@
6
6
  * @packageDocumentation
7
7
  * @public
8
8
  */
9
- import { WrapTextDirection, TextRun, ParagraphBlock, ParagraphMeasure, FlowBlock, Measure } from '../../layout-engine/types.mjs';
10
- import { P as PageGeometry } from '../../anchoredObjectPosition-KJEyF-wr.mjs';
9
+ import { TextRun, ParagraphBlock, ParagraphMeasure } from '../../layout-engine/types.mjs';
10
+ import { b as FloatingImageZone } from '../../measureBlocksPipeline-BMqbRFQB.mjs';
11
+ export { F as FloatPageGeometry, a as FloatingExclusionRect, c as FloatingLineSegmentZone, M as MeasureBlockFn, g as getFloatingMargins, m as measureBlocksWithFloats, r as rectsToFloatingZones } from '../../measureBlocksPipeline-BMqbRFQB.mjs';
11
12
  import '../../content-3xF4WDE8.mjs';
12
13
  import '../../formatting-BH4hcZiq.mjs';
13
14
  import '../../colors-C3vA7HUU.mjs';
14
15
  import '../../docx/wrapTypes.mjs';
15
16
  import '../../watermark-DAcnAs_J.mjs';
17
+ import '../../anchoredObjectPosition-KJEyF-wr.mjs';
16
18
 
17
19
  /**
18
20
  * Measurement container for text layout
@@ -157,46 +159,6 @@ declare function halfPtToPx(halfPt: number): number;
157
159
  */
158
160
  declare function pxToHalfPt(px: number): number;
159
161
 
160
- interface FloatingExclusionRect {
161
- /** Which side the object is on for simple one-sided wrapping. */
162
- side: 'left' | 'right';
163
- /** X position relative to the content area. */
164
- x: number;
165
- /** Y position relative to the content area. */
166
- y: number;
167
- width: number;
168
- height: number;
169
- distTop: number;
170
- distBottom: number;
171
- distLeft: number;
172
- distRight: number;
173
- wrapText?: WrapTextDirection;
174
- wrapType?: string;
175
- }
176
- interface FloatingImageZone {
177
- leftMargin: number;
178
- rightMargin: number;
179
- topY: number;
180
- bottomY: number;
181
- segments?: FloatingLineSegmentZone[];
182
- /**
183
- * Full-width vertical band (OOXML `topAndBottom` wrap): no text fits beside
184
- * it, so any line overlapping `[topY, bottomY]` is pushed below the band.
185
- */
186
- fullWidthBlock?: boolean;
187
- }
188
- interface FloatingLineSegmentZone {
189
- leftOffset: number;
190
- availableWidth: number;
191
- }
192
- interface FloatingLineMargins {
193
- leftMargin: number;
194
- rightMargin: number;
195
- segments?: FloatingLineSegmentZone[];
196
- }
197
- declare function rectsToFloatingZones(rects: FloatingExclusionRect[], contentWidth: number): FloatingImageZone[];
198
- declare function getFloatingMargins(lineY: number, lineHeight: number, zones: FloatingImageZone[] | undefined, paragraphYOffset: number): FloatingLineMargins;
199
-
200
162
  /**
201
163
  * Paragraph measurement module
202
164
  *
@@ -254,58 +216,6 @@ declare function measureParagraphs(blocks: ParagraphBlock[], maxWidth: number):
254
216
  */
255
217
  declare function getRunCharWidths(run: TextRun): number[];
256
218
 
257
- /**
258
- * Floating-aware block measurement pipeline.
259
- *
260
- * Pre-scans a block list to extract exclusion zones from anchored images,
261
- * floating tables, and floating text boxes; groups co-located floats so
262
- * their combined exclusion applies starting from the earliest anchor; then
263
- * walks the blocks calling the caller-supplied `measureBlock` with the
264
- * active zones and cumulative Y at each step.
265
- *
266
- * Adapters (React, Vue) provide their own `measureBlock` so they can
267
- * decide e.g. whether to cache paragraph measures. The orchestration,
268
- * extraction, and grouping live here so both adapters stay in lockstep.
269
- *
270
- * @packageDocumentation
271
- * @public
272
- */
273
-
274
- /**
275
- * Block-measurement callback shape passed to {@link measureBlocksWithFloats}.
276
- * Adapters (React, Vue) supply this so they can decide platform-specific
277
- * concerns (e.g. paragraph-measure caching, per-section width) while
278
- * sharing the floating-zone orchestration. This is adapter-author API,
279
- * not end-consumer API.
280
- *
281
- * @public
282
- */
283
- type MeasureBlockFn = (block: FlowBlock, contentWidth: number, floatingZones?: FloatingImageZone[], cumulativeY?: number) => Measure;
284
- /**
285
- * Page geometry (CSS px) used to resolve page/margin-relative anchored objects
286
- * into content-area coordinates — currently the vertical anchor of a top-pinned
287
- * `topAndBottom` band. Same shape the painter uses (see `pageGeometryFromPage`),
288
- * so both paths resolve to identical positions.
289
- *
290
- * @public
291
- */
292
- type FloatPageGeometry = PageGeometry;
293
- /**
294
- * Walk `blocks` and produce one `Measure` per block. Before measuring, this
295
- * extracts floating exclusion zones (images / floating tables / floating
296
- * textboxes), groups overlapping co-located floats, and threads the active
297
- * zones plus cumulative Y into each `measureBlock` call.
298
- *
299
- * Pass `pageGeometry` whenever the document may contain page/margin-anchored
300
- * `topAndBottom` text boxes (e.g. a title banner pinned to the page top):
301
- * without it their reserved band falls back to flow-relative Y and the band
302
- * won't line up with where the painter places the box. Build it with the
303
- * shared `pageGeometryFromPage` helper.
304
- *
305
- * @public
306
- */
307
- declare function measureBlocksWithFloats(blocks: FlowBlock[], contentWidth: number | number[], measureBlock: MeasureBlockFn, pageGeometry?: FloatPageGeometry): Measure[];
308
-
309
219
  /**
310
220
  * Measurement Cache
311
221
  *
@@ -396,4 +306,4 @@ declare function clearAllCaches(): void;
396
306
  */
397
307
  declare function getTotalCacheSize(): number;
398
308
 
399
- export { type FloatPageGeometry, type FloatingExclusionRect, type FloatingImageZone, type FloatingLineSegmentZone, type FontMetrics, type FontStyle, type MeasureBlockFn, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFloatingMargins, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureBlocksWithFloats, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, rectsToFloatingZones, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };
309
+ export { FloatingImageZone, type FontMetrics, type FontStyle, type MeasureParagraphOptions, type RunMeasurement, type TextMeasurement, buildFontString, clampFloatingWrapMargins, clearAllCaches, clearFontMetricsCache, clearParagraphMeasureCache, clearTextWidthCache, findCharacterAtX, getCachedFontMetrics, getCachedParagraphMeasure, getCachedTextWidth, getCanvasContext, getFontCacheSize, getFontMetrics, getParagraphCacheSize, getRunCharWidths, getTextCacheSize, getTotalCacheSize, getXForCharacter, halfPtToPx, hashParagraphBlock, measureParagraph, measureParagraphs, measureRun, measureText, measureTextWidth, ptToPx, pxToHalfPt, pxToPt, pxToTwips, resetCanvasContext, setCachedFontMetrics, setCachedParagraphMeasure, setCachedTextWidth, setFontCacheSize, setParagraphCacheSize, setTextCacheSize, twipsToPx };