@docx-editor.dev/core 2.9.1 → 2.10.0
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.
- package/dist/automation.cjs +1 -1
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +74 -10
- package/dist/binding.d.ts +74 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-27APDXY2.js +2 -0
- package/dist/chunk-35MI6K7M.cjs +10 -0
- package/dist/chunk-4XL7SOWQ.cjs +2 -0
- package/dist/chunk-6K6QQVAZ.cjs +18 -0
- package/dist/chunk-7ZJL5AEY.cjs +1 -0
- package/dist/chunk-C6LK2BYA.cjs +2 -0
- package/dist/chunk-HBEBUCRM.cjs +5 -0
- package/dist/chunk-LG5K46OM.js +2 -0
- package/dist/chunk-LWADHMVV.js +5 -0
- package/dist/chunk-N725IUO7.js +18 -0
- package/dist/chunk-N7DBENH4.js +10 -0
- package/dist/chunk-NVGFWMCO.js +1 -0
- package/dist/chunk-SYTWKJPJ.cjs +18 -0
- package/dist/chunk-YI6JXF7U.js +18 -0
- package/dist/contracts/document.d.cts +6 -1
- package/dist/contracts/document.d.ts +6 -1
- package/dist/contracts/editor.d.cts +6 -6
- package/dist/contracts/editor.d.ts +6 -6
- package/dist/contracts/interaction.d.cts +6 -6
- package/dist/contracts/interaction.d.ts +6 -6
- package/dist/contracts/modules.d.cts +3 -4
- package/dist/contracts/modules.d.ts +3 -4
- package/dist/{custom-node-writes-QyVZdTUA.d.ts → custom-node-writes-BvpWCnW8.d.ts} +52 -5
- package/dist/{custom-node-writes-7ERv0f_X.d.cts → custom-node-writes-Db8H6Z3n.d.cts} +52 -5
- package/dist/{editor-PUlv5Pp7.d.ts → editor-C0my6Uta.d.ts} +35 -14
- package/dist/{editor-CojjwMmF.d.cts → editor-CwzY2Hcg.d.cts} +35 -14
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +66 -461
- package/dist/editor.d.cts +20 -20
- package/dist/editor.d.ts +20 -20
- package/dist/editor.js +1 -1
- package/dist/{index-oN-v8DQ5.d.ts → index-kID8Ymkp.d.ts} +126 -20
- package/dist/{index-DGPSeLI0.d.cts → index-nLFwo_17.d.cts} +126 -20
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +13 -13
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +357 -310
- package/dist/layout.d.ts +357 -310
- package/dist/layout.js +1 -1
- package/dist/output.cjs +1 -1
- package/dist/output.d.cts +6 -6
- package/dist/output.d.ts +6 -6
- package/dist/output.js +1 -1
- package/dist/{review-items-DpsqTHio.d.cts → review-items-CwixiHNe.d.cts} +1 -1
- package/dist/{review-items-D5SPFtsO.d.ts → review-items-Dw-8a6Ie.d.ts} +1 -1
- package/dist/{review-reads-CP106AHp.d.cts → review-reads-BqkiJTeR.d.cts} +1 -1
- package/dist/{review-reads-B2Ji3fVU.d.ts → review-reads-C0u-IKEA.d.ts} +1 -1
- package/dist/{semantic-cell-selection-DJPjBWzf.d.cts → semantic-cell-selection-DT9x9WLf.d.cts} +2 -2
- package/dist/{semantic-cell-selection-BWhVAk5B.d.ts → semantic-cell-selection-Utrf0lz7.d.ts} +2 -2
- package/dist/{semantic-interaction-BjOcDB06.d.cts → semantic-interaction-B6hFRQLy.d.ts} +21 -2
- package/dist/{semantic-interaction-Cca1-X_a.d.ts → semantic-interaction-Z0xKQcB4.d.cts} +21 -2
- package/dist/{semantic-paint-CufpIQFw.d.ts → semantic-paint-CQEOC0Od.d.cts} +2 -2
- package/dist/{semantic-paint-Ur7pAINj.d.cts → semantic-paint-quke354p.d.ts} +2 -2
- package/dist/{semantic-records-C3Z76KeN.d.cts → semantic-records-CMakzQ1X.d.cts} +36 -4
- package/dist/{semantic-records-Cc1MJrhM.d.ts → semantic-records-Do3-i5oB.d.ts} +36 -4
- package/dist/{shaped-measurer-CwlTPDJO.d.ts → shaped-measurer-BxwTUluj.d.ts} +1 -1
- package/dist/{shaped-measurer-CYSK20E2.d.cts → shaped-measurer-DzRwWrL5.d.cts} +1 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +250 -134
- package/dist/store.d.ts +250 -134
- package/dist/store.js +1 -1
- package/dist/tree-op-revision-attribution-CN06Xshv.d.cts +24 -0
- package/dist/tree-op-revision-attribution-CN06Xshv.d.ts +24 -0
- package/dist/{tree-op-types-XMVsJSpe.d.ts → tree-op-types-BuOfCrkp.d.ts} +280 -32
- package/dist/{tree-op-types-B0-sCtw-.d.cts → tree-op-types-DSJYmf5b.d.cts} +280 -32
- package/dist/{tree-session-D945D43B.d.cts → tree-session-contract-ByWx8eew.d.cts} +44 -104
- package/dist/{tree-session-DBJgmdmc.d.ts → tree-session-contract-C1dfE9hy.d.ts} +44 -104
- package/dist/{tree-store-ClA-qng4.d.ts → tree-store-ASBtz7UB.d.ts} +1 -1
- package/dist/{tree-store-C6vc8E_2.d.cts → tree-store-CWOUMGN8.d.cts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-5VC5HGJA.js +0 -2
- package/dist/chunk-A2JIBG75.js +0 -1
- package/dist/chunk-DKMKH77K.cjs +0 -5
- package/dist/chunk-FWUI7EXG.cjs +0 -15
- package/dist/chunk-GZWMLQJO.js +0 -18
- package/dist/chunk-IEXDXWTA.cjs +0 -1
- package/dist/chunk-IMMAG4QP.cjs +0 -10
- package/dist/chunk-JTSNJQFO.js +0 -15
- package/dist/chunk-KBCC66CI.js +0 -5
- package/dist/chunk-LJ6BY6IU.cjs +0 -18
- package/dist/chunk-QDBAXFIK.js +0 -2
- package/dist/chunk-RD266XSK.cjs +0 -2
- package/dist/chunk-VUJGPCPU.js +0 -10
- package/dist/chunk-XMHWBL3K.cjs +0 -2
- package/dist/image-resources-DQOiwOuE.d.cts +0 -203
- package/dist/image-resources-eZqD_-vC.d.ts +0 -203
package/dist/layout.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { V as VersionedShapingLibrary, T as TextShaper, F as FontByteValidator, a as FixedPointRoundingMode, b as FixedPoint, c as TextDirection, S as ShapedRun } from './shaped-measurer-
|
|
2
|
-
export { C as CacheLookup, d as CacheMiss, e as CacheProvenance, D as DeclaredFontSubstitution, f as FontFingerprintInputs, g as FontRequest, h as FontResolutionError, i as FontResolutionErrorCode, j as FontResourceDefinition, k as FontResourceInstrumentation, l as FontResourceSnapshot, m as FontResourceSnapshotOptions, n as FontSubstitution, o as FontValidationResult, G as GlyphOutline, H as HARD_MAX_AGGREGATE_FONT_BYTES, p as HARD_MAX_FONT_BYTES, q as HARD_MAX_FONT_SOURCES, L as LayoutShapingOptions, N as NormalizationPolicy, O as OperationSnapshot, r as OperationSnapshotField, s as OperationSnapshotGuard, R as ResolvedCache, t as ResolvedFont, u as ResourceDependencyProvenance, v as ShapeInput, w as ShapedCluster, x as ShapedFontSpan, y as ShapedGlyph, z as ShapedMeasurerOptions, A as ShapedRunComparatorInputs, B as ShapedVerticalMetrics, E as ShapingEnvironment, I as ShapingEnvironmentFingerprintInputs, J as ShapingEnvironmentInput, K as boundedStructuralFontValidator, M as captureOperationSnapshot, P as createFontResourceSnapshot, Q as createShapedMeasurer, U as createShapedRun, W as createShapingEnvironment, X as fixedPoint, Y as fontRequestKey, Z as guardOperationSnapshot, _ as shapedRunComparatorInputs, $ as shapingEnvironmentFingerprint, a0 as shapingEnvironmentFingerprintInputs } from './shaped-measurer-
|
|
3
|
-
import { d as LayoutBox, D as DrawingPoint, e as DrawingInsets, a as StyleSpanRecord, I as InlineDrawingRecord, M as ModelRange,
|
|
4
|
-
export { t as AUTO_PARAGRAPH_SPACING_PT, u as BorderGridGeometry, v as ContentControlGeometryFragment, w as ContentControlLevel, x as ContentControlMappedType, y as DEFAULT_PAGE_GEOMETRY, z as DEFAULT_RUN_STYLE, E as DEFAULT_TAB_INTERVAL_PT, G as DEFAULT_TAB_INTERVAL_TWIPS, J as EMPTY_TAB_STOPS, K as EquationFractionGeometry, N as EquationGeometry, O as EquationNaryGeometry, Q as EquationRadicalGeometry, U as EquationRowGeometry, V as EquationScriptGeometry, W as EquationSpanRecord, X as EquationTextGeometry, Y as FieldAtomMarker, Z as HeaderFooterStoryRecord, _ as HyperlinkFieldSpec, $ as LineSpacingRule, a0 as ListMarkerRecord, a1 as MAX_BORDER_SPACE_PT, a2 as MAX_BORDER_WIDTH_PT, a3 as MAX_PARAGRAPH_SPACING_PT, a4 as MAX_TABLE_BORDER_STROKES, a5 as MAX_TAB_POSITION_TWIPS, a6 as MAX_TAB_STOPS, a7 as PARAGRAPH_BORDER_SIDES, a8 as ParagraphAutoSpacingContext, a9 as ParagraphBorderSide, aa as ParagraphBorderStrokeRecord, ab as ParagraphBottomBorderRecord, ac as ParagraphIndent, ad as ResolvedCellBorders, ae as ResolvedTableBorderEdge, af as ResolvedTableBorderEdgeSegment, ag as ResolvedUnderline, ah as SINGLE_LINE_SPACING, ai as SourceRange, aj as SpanLinkRecord, ak as TAB_LEADER_GLYPH, al as TabAlignment, am as TabDestination, an as TabLeader, ao as TabStop, ap as TableBorderSideName, aq as TableBorderStrokeRecord, c as TableCellFragmentRecord, ar as TableFragmentRecord, b as TableRowFragmentRecord, as as VerticalAlign, at as appliedSpaceBefore, au as applyLineSpacing, av as baselineShiftPtOf, aw as borderExtentPt, ax as borderWeight, ay as bottomBorderExtentPt, az as cascadedParagraphBorders, aA as cascadedTabStops, aB as collapsedSpaceBefore, aC as defaultTabIntervalFromSettings, aD as displayText, aE as layoutEquation, aF as measureDisplayText, aG as nextTabDestination, aH as paragraphBorderExtentPt, aI as paragraphBorderStrokeWidthPt, aJ as paragraphBorders, aK as paragraphBordersFingerprint, aL as paragraphBreaksBefore, aM as paragraphContextualSpacing, aN as paragraphLineSpacing, aO as paragraphSpacing, aP as paragraphTabStops, aQ as readBorderSide, aR as readCellBorders, aS as readTableBorders, aT as resolveBorderConflict, aU as resolveRunStyle, aV as resolveTableCellBorderGrid, aW as runStylesEqual, aX as tabAdvanceWidth, aY as tabStopsFingerprint, aZ as withDefaultTabInterval } from './semantic-records-
|
|
1
|
+
import { V as VersionedShapingLibrary, T as TextShaper, F as FontByteValidator, a as FixedPointRoundingMode, b as FixedPoint, c as TextDirection, S as ShapedRun } from './shaped-measurer-BxwTUluj.js';
|
|
2
|
+
export { C as CacheLookup, d as CacheMiss, e as CacheProvenance, D as DeclaredFontSubstitution, f as FontFingerprintInputs, g as FontRequest, h as FontResolutionError, i as FontResolutionErrorCode, j as FontResourceDefinition, k as FontResourceInstrumentation, l as FontResourceSnapshot, m as FontResourceSnapshotOptions, n as FontSubstitution, o as FontValidationResult, G as GlyphOutline, H as HARD_MAX_AGGREGATE_FONT_BYTES, p as HARD_MAX_FONT_BYTES, q as HARD_MAX_FONT_SOURCES, L as LayoutShapingOptions, N as NormalizationPolicy, O as OperationSnapshot, r as OperationSnapshotField, s as OperationSnapshotGuard, R as ResolvedCache, t as ResolvedFont, u as ResourceDependencyProvenance, v as ShapeInput, w as ShapedCluster, x as ShapedFontSpan, y as ShapedGlyph, z as ShapedMeasurerOptions, A as ShapedRunComparatorInputs, B as ShapedVerticalMetrics, E as ShapingEnvironment, I as ShapingEnvironmentFingerprintInputs, J as ShapingEnvironmentInput, K as boundedStructuralFontValidator, M as captureOperationSnapshot, P as createFontResourceSnapshot, Q as createShapedMeasurer, U as createShapedRun, W as createShapingEnvironment, X as fixedPoint, Y as fontRequestKey, Z as guardOperationSnapshot, _ as shapedRunComparatorInputs, $ as shapingEnvironmentFingerprint, a0 as shapingEnvironmentFingerprintInputs } from './shaped-measurer-BxwTUluj.js';
|
|
3
|
+
import { d as LayoutBox, D as DrawingPoint, e as DrawingInsets, a as StyleSpanRecord, I as InlineDrawingRecord, M as ModelRange, f as ThemeFonts, g as ParagraphSpacing, h as ParagraphLineSpacing, i as ParagraphBorderEdge, j as ParagraphBorders, k as ResolvedTabStops, S as SemanticLayout, B as BlockFragmentRecord, A as AnchoredDrawingRecord, l as PageRecord, R as ResolvedRunStyle, m as TableBorderSide, C as ContentControlBoundaryRecord$1, n as ContentControlLock, o as ParagraphFragmentRecord, L as LineRecord, p as InlineDrawingLayoutContext, T as TextMeasurer, H as HyperlinkProjector, F as FieldLinkProjector, q as StoryPageFieldNeeds, P as PageGeometry, r as CellBorderBox, s as TableBorderBox } from './semantic-records-Do3-i5oB.js';
|
|
4
|
+
export { t as AUTO_PARAGRAPH_SPACING_PT, u as BorderGridGeometry, v as ContentControlGeometryFragment, w as ContentControlLevel, x as ContentControlMappedType, y as DEFAULT_PAGE_GEOMETRY, z as DEFAULT_RUN_STYLE, E as DEFAULT_TAB_INTERVAL_PT, G as DEFAULT_TAB_INTERVAL_TWIPS, J as EMPTY_TAB_STOPS, K as EquationFractionGeometry, N as EquationGeometry, O as EquationNaryGeometry, Q as EquationRadicalGeometry, U as EquationRowGeometry, V as EquationScriptGeometry, W as EquationSpanRecord, X as EquationTextGeometry, Y as FieldAtomMarker, Z as HeaderFooterStoryRecord, _ as HyperlinkFieldSpec, $ as LineSpacingRule, a0 as ListMarkerRecord, a1 as MAX_BORDER_SPACE_PT, a2 as MAX_BORDER_WIDTH_PT, a3 as MAX_PARAGRAPH_SPACING_PT, a4 as MAX_TABLE_BORDER_STROKES, a5 as MAX_TAB_POSITION_TWIPS, a6 as MAX_TAB_STOPS, a7 as PARAGRAPH_BORDER_SIDES, a8 as ParagraphAutoSpacingContext, a9 as ParagraphBorderSide, aa as ParagraphBorderStrokeRecord, ab as ParagraphBottomBorderRecord, ac as ParagraphIndent, ad as ResolvedCellBorders, ae as ResolvedTableBorderEdge, af as ResolvedTableBorderEdgeSegment, ag as ResolvedUnderline, ah as SINGLE_LINE_SPACING, ai as SourceRange, aj as SpanLinkRecord, ak as TAB_LEADER_GLYPH, al as TabAlignment, am as TabDestination, an as TabLeader, ao as TabStop, ap as TableBorderSideName, aq as TableBorderStrokeRecord, c as TableCellFragmentRecord, ar as TableFragmentRecord, b as TableRowFragmentRecord, as as VerticalAlign, at as appliedSpaceBefore, au as applyLineSpacing, av as baselineShiftPtOf, aw as borderExtentPt, ax as borderWeight, ay as bottomBorderExtentPt, az as cascadedParagraphBorders, aA as cascadedTabStops, aB as collapsedSpaceBefore, aC as defaultTabIntervalFromSettings, aD as displayText, aE as layoutEquation, aF as measureDisplayText, aG as nextTabDestination, aH as paragraphBorderExtentPt, aI as paragraphBorderStrokeWidthPt, aJ as paragraphBorders, aK as paragraphBordersFingerprint, aL as paragraphBreaksBefore, aM as paragraphContextualSpacing, aN as paragraphLineSpacing, aO as paragraphSpacing, aP as paragraphTabStops, aQ as readBorderSide, aR as readCellBorders, aS as readTableBorders, aT as resolveBorderConflict, aU as resolveRunStyle, aV as resolveTableCellBorderGrid, aW as runStylesEqual, aX as tabAdvanceWidth, aY as tabStopsFingerprint, aZ as withDefaultTabInterval } from './semantic-records-Do3-i5oB.js';
|
|
5
5
|
import { a as OoxmlNode, b as OoxmlElement, O as OoxmlPart } from './ooxml-package-CdEy9ufK.js';
|
|
6
|
-
import { O as OoxmlProperty, I as ImpactClass, C as ContentControlKind,
|
|
7
|
-
export {
|
|
6
|
+
import { O as OoxmlProperty, I as ImpactClass, C as ContentControlKind, y as ContentControlLevel, z as ContentControlLock$1, A as ContentControlDataBinding } from './tree-op-types-BuOfCrkp.js';
|
|
7
|
+
export { x as TableBorderStyle } from './tree-op-types-BuOfCrkp.js';
|
|
8
8
|
import { N as NoteKind, n as noteTypeOf } from './note-nodes-BNCANoGN.js';
|
|
9
9
|
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties } from './note-properties-jvnw_DGG.js';
|
|
10
|
-
import { T as TreeModelChange, D as DocumentProperties } from './tree-store-
|
|
11
|
-
import { R as RevisionDisplayMode } from './revision-projection-CILpvv4M.js';
|
|
12
|
-
export { D as DEFAULT_REVISION_DISPLAY_MODE,
|
|
13
|
-
import { a as SectionColumns } from './semantic-cell-selection-
|
|
14
|
-
export { C as CellSelection, D as DEFAULT_SECTION_PROPERTIES, b as DEFAULT_VERTICAL_WEIGHT, c as DocumentSection, d as DocumentSectionsEnumeration, e as DrawingOverlayFrame, H as HitPoint, f as HitTestOptions, M as MAX_DOCUMENT_SECTIONS, P as PlacedCell, g as SectionBreakType, h as SectionColumnDefinition, i as SectionMargins, j as SectionPageNumbering, S as SectionProperties, k as SemanticHit, l as SemanticHitDrawing, T as TableCellAddress, m as TableCellContext, n as caretBoxOnLine, o as cellSelectionBetween, p as cellSelectionRects, q as cellSelectionText, r as contentControlAtPoint, s as enumerateDocumentSections, t as enumerateDocumentSectionsBounded, u as findDrawingOverlayFrameInLayout, v as geometryOfSection, w as hitTestPage, x as hitTestSheet, y as isFurniturePoint, z as lineEndOffset, A as pageAtY, B as paragraphSectionNode, E as paragraphsInCells, F as parsePageNumbering, G as parseSectionProperties, I as readSectionProperties, J as spanOffsetX, K as spansInCells, L as tableContextAt } from './semantic-cell-selection-
|
|
15
|
-
export { M as MAX_SDT_NESTING, c as collectFlowBlocks, a as commentBodyText, b as commentInitials, d as contentControlContentChildren, i as isContentControl, e as isContentControlContent, p as paragraphOrderOfPart } from './review-reads-
|
|
16
|
-
import { a as ReviewItem } from './review-items-
|
|
17
|
-
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, k as activeReviewItem, l as firstReviewRange, r as reviewItemKey, m as reviewItemPositionRank, n as reviewItemRanges, o as reviewItemsAt, p as reviewThreadRootOf } from './review-items-
|
|
18
|
-
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-
|
|
19
|
-
export { c as CaretAtOptions, C as CaretGeometry, M as MoveCaretOptions, N as NavigationCommand, d as caretAt, e as caretStops, f as caretStopsForBlocks, g as compositionAnchor, h as contentControlAtSemantic, i as contentControlsInLayout, j as hitTestSemantic, m as moveCaret, p as paragraphTextFromLayout, s as spansInSelection } from './semantic-interaction-
|
|
20
|
-
import './image-resources-eZqD_-vC.js';
|
|
10
|
+
import { T as TreeModelChange, D as DocumentProperties } from './tree-store-ASBtz7UB.js';
|
|
11
|
+
import { a as RevisionAttribution, R as RevisionDisplayMode } from './revision-projection-CILpvv4M.js';
|
|
12
|
+
export { D as DEFAULT_REVISION_DISPLAY_MODE, b as RevisionKind, f as formatRevisionOf, m as markRevisionRemovesMark, p as paragraphMarkFormatRevisionOf, c as paragraphMarkRevisionOf, d as paragraphMarkRevisionsOf, r as revisionsAreDeletion, e as revisionsVisible, s as shownMarkRevision } from './revision-projection-CILpvv4M.js';
|
|
13
|
+
import { a as SectionColumns } from './semantic-cell-selection-Utrf0lz7.js';
|
|
14
|
+
export { C as CellSelection, D as DEFAULT_SECTION_PROPERTIES, b as DEFAULT_VERTICAL_WEIGHT, c as DocumentSection, d as DocumentSectionsEnumeration, e as DrawingOverlayFrame, H as HitPoint, f as HitTestOptions, M as MAX_DOCUMENT_SECTIONS, P as PlacedCell, g as SectionBreakType, h as SectionColumnDefinition, i as SectionMargins, j as SectionPageNumbering, S as SectionProperties, k as SemanticHit, l as SemanticHitDrawing, T as TableCellAddress, m as TableCellContext, n as caretBoxOnLine, o as cellSelectionBetween, p as cellSelectionRects, q as cellSelectionText, r as contentControlAtPoint, s as enumerateDocumentSections, t as enumerateDocumentSectionsBounded, u as findDrawingOverlayFrameInLayout, v as geometryOfSection, w as hitTestPage, x as hitTestSheet, y as isFurniturePoint, z as lineEndOffset, A as pageAtY, B as paragraphSectionNode, E as paragraphsInCells, F as parsePageNumbering, G as parseSectionProperties, I as readSectionProperties, J as spanOffsetX, K as spansInCells, L as tableContextAt } from './semantic-cell-selection-Utrf0lz7.js';
|
|
15
|
+
export { M as MAX_SDT_NESTING, c as collectFlowBlocks, a as commentBodyText, b as commentInitials, d as contentControlContentChildren, i as isContentControl, e as isContentControlContent, p as paragraphOrderOfPart } from './review-reads-C0u-IKEA.js';
|
|
16
|
+
import { a as ReviewItem } from './review-items-Dw-8a6Ie.js';
|
|
17
|
+
export { i as CommentAnchor, j as CommentPosition, C as CommentRecord, h as CommentThreadState, c as ReviewCommentItem, d as ReviewCustomItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, W as W15_NAMESPACE_URI, k as activeReviewItem, l as firstReviewRange, r as reviewItemKey, m as reviewItemPositionRank, n as reviewItemRanges, o as reviewItemsAt, p as reviewThreadRootOf } from './review-items-Dw-8a6Ie.js';
|
|
18
|
+
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-B6hFRQLy.js';
|
|
19
|
+
export { c as CaretAtOptions, C as CaretGeometry, M as MoveCaretOptions, N as NavigationCommand, d as caretAt, e as caretStops, f as caretStopsForBlocks, g as compositionAnchor, h as contentControlAtSemantic, i as contentControlsInLayout, j as deletedTextBoundaries, k as hitTestSemantic, m as moveCaret, p as paragraphTextFromLayout, s as spansInSelection } from './semantic-interaction-B6hFRQLy.js';
|
|
21
20
|
import './omml-equation-Dd3mBep-.js';
|
|
22
21
|
import './contracts/types.js';
|
|
22
|
+
import './tree-op-revision-attribution-CN06Xshv.js';
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Page-field evaluation context for furniture projection.
|
|
@@ -27,6 +27,9 @@ import './contracts/types.js';
|
|
|
27
27
|
* `pageNumber` is the displayed PAGE value after section `w:pgNumType/@w:start` (1-based).
|
|
28
28
|
* `pageCount` is document NUMPAGES. `sectionPageCount` is SECTIONPAGES for the attached
|
|
29
29
|
* section. `format` is the authored `w:pgNumType/@w:fmt` applied only to PAGE.
|
|
30
|
+
*
|
|
31
|
+
* A new field here must also join `sameFieldPageContext` below, or finalize compares two
|
|
32
|
+
* contexts that differ in it as equal and keeps a reused story's stale text.
|
|
30
33
|
*/
|
|
31
34
|
interface FieldPageContext {
|
|
32
35
|
readonly pageNumber: number;
|
|
@@ -194,73 +197,6 @@ interface ParagraphLayoutCacheOptions {
|
|
|
194
197
|
*/
|
|
195
198
|
declare function createParagraphLayoutCache<T>(options?: ParagraphLayoutCacheOptions): ParagraphLayoutCache<T>;
|
|
196
199
|
|
|
197
|
-
type WrapTextSide = 'bothSides' | 'left' | 'right' | 'largest';
|
|
198
|
-
interface WrapExclusionInput {
|
|
199
|
-
readonly mode: 'square' | 'tight' | 'through' | 'topAndBottom';
|
|
200
|
-
readonly contentBounds: LayoutBox;
|
|
201
|
-
readonly polygon: readonly DrawingPoint[] | null;
|
|
202
|
-
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
203
|
-
readonly wrapDistances: DrawingInsets;
|
|
204
|
-
readonly effectInsets: DrawingInsets;
|
|
205
|
-
readonly textSide: WrapTextSide;
|
|
206
|
-
readonly contentLeft: number;
|
|
207
|
-
readonly contentRight: number;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/** Paint layer relative to body text — not the OOXML wrap element. */
|
|
211
|
-
type DrawingPaintLayer = 'behind' | 'inFront';
|
|
212
|
-
interface ExclusionZone {
|
|
213
|
-
readonly drawingNodeId: string;
|
|
214
|
-
readonly anchorParagraphId: string;
|
|
215
|
-
/** UTF-16 model offset of the anchor atom — exclusions apply at/after this point in the paragraph. */
|
|
216
|
-
readonly anchorModelStart: number;
|
|
217
|
-
readonly sourceOrder: number;
|
|
218
|
-
readonly paintLayer: DrawingPaintLayer;
|
|
219
|
-
readonly relativeHeight: number;
|
|
220
|
-
readonly allowOverlap: boolean;
|
|
221
|
-
/** Owning column index in a multi-column section — 0 for single-column and HF stories. */
|
|
222
|
-
readonly columnIndex: number;
|
|
223
|
-
/** Resolved top edge in page-content coordinates after overlap displacement. */
|
|
224
|
-
readonly y: number;
|
|
225
|
-
readonly verticalBand: LayoutBox;
|
|
226
|
-
readonly input: WrapExclusionInput;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
interface PendingLine {
|
|
230
|
-
readonly spans: StyleSpanRecord[];
|
|
231
|
-
readonly drawings: InlineDrawingRecord[];
|
|
232
|
-
readonly start: number;
|
|
233
|
-
end: number;
|
|
234
|
-
width: number;
|
|
235
|
-
height: number;
|
|
236
|
-
baseline: number;
|
|
237
|
-
/**
|
|
238
|
-
* Space ABOVE the glyph band inside {@link height}.
|
|
239
|
-
*
|
|
240
|
-
* Exact spacing can center the glyphs and move the baseline. Auto/atLeast spacing leaves
|
|
241
|
-
* this at zero and puts its extra depth below instead.
|
|
242
|
-
*/
|
|
243
|
-
leading: number;
|
|
244
|
-
/**
|
|
245
|
-
* Auto/atLeast line-spacing depth below the painted glyph band.
|
|
246
|
-
*
|
|
247
|
-
* Word lets this external depth cross the bottom text margin when the glyphs themselves
|
|
248
|
-
* still fit. Pagination therefore budgets {@link height} minus this amount at a page
|
|
249
|
-
* bottom, while paint keeps the full box and padding.
|
|
250
|
-
*/
|
|
251
|
-
trailingSpacing: number;
|
|
252
|
-
/** When true, layout must start a new page after this line is placed. */
|
|
253
|
-
pageBreakAfter?: boolean;
|
|
254
|
-
/** When true, layout must advance to the next authored section column. */
|
|
255
|
-
columnBreakAfter?: boolean;
|
|
256
|
-
/** Model ranges on this line covering deleted content; see {@link LineRecord.deletedRanges}. */
|
|
257
|
-
deletedRanges?: readonly ModelRange[];
|
|
258
|
-
/** Vertical gap inserted before this line to clear a topAndBottom exclusion band. */
|
|
259
|
-
exclusionSkipBefore?: number;
|
|
260
|
-
}
|
|
261
|
-
/** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
|
|
262
|
-
type Alignment = 'left' | 'center' | 'right' | 'both';
|
|
263
|
-
|
|
264
200
|
/** Soft ceiling on abstractNum / num entries read from one part. */
|
|
265
201
|
declare const MAX_NUMBERING_DEFINITIONS = 512;
|
|
266
202
|
/** Soft ceiling on override entries per `w:num`. */
|
|
@@ -372,32 +308,308 @@ interface NumberingIndex {
|
|
|
372
308
|
readonly nums: ReadonlyMap<string, NumDefinition>;
|
|
373
309
|
}
|
|
374
310
|
/**
|
|
375
|
-
* Build a numbering index from the root of a numbering part (`w:numbering`).
|
|
311
|
+
* Build a numbering index from the root of a numbering part (`w:numbering`).
|
|
312
|
+
*
|
|
313
|
+
* Empty / missing roots yield an empty index. Duplicate ids keep the first definition.
|
|
314
|
+
*/
|
|
315
|
+
/**
|
|
316
|
+
* Project `numbering.xml` into the bounded index.
|
|
317
|
+
*
|
|
318
|
+
* Every ceiling here exists because the input is file-derived: definition counts, override
|
|
319
|
+
* counts, indent magnitudes and style-link hop depth are all capped, and nothing from the file
|
|
320
|
+
* becomes a loop bound or an allocation size.
|
|
321
|
+
*/
|
|
322
|
+
declare function buildNumberingIndex(root: OoxmlElement | null | undefined): NumberingIndex;
|
|
323
|
+
/** Resolve the effective level for a `numId` + `ilvl`, applying overrides. */
|
|
324
|
+
/**
|
|
325
|
+
* The effective level for one paragraph's numbering reference, after overrides and style links.
|
|
326
|
+
*
|
|
327
|
+
* Answers null for a reference the index cannot resolve — a paragraph naming a definition the
|
|
328
|
+
* file never declared is an unnumbered paragraph, not an error.
|
|
329
|
+
*/
|
|
330
|
+
declare function resolveNumberingLevel(index: NumberingIndex, numId: string, ilvl: number): {
|
|
331
|
+
readonly abstractNumId: string;
|
|
332
|
+
readonly level: NumberingLevel;
|
|
333
|
+
readonly startOverride?: number;
|
|
334
|
+
} | null;
|
|
335
|
+
/** Empty index for tests / documents without numbering. */
|
|
336
|
+
declare const EMPTY_NUMBERING_INDEX: NumberingIndex;
|
|
337
|
+
|
|
338
|
+
type WrapTextSide = 'bothSides' | 'left' | 'right' | 'largest';
|
|
339
|
+
interface WrapExclusionInput {
|
|
340
|
+
readonly mode: 'square' | 'tight' | 'through' | 'topAndBottom';
|
|
341
|
+
readonly contentBounds: LayoutBox;
|
|
342
|
+
readonly polygon: readonly DrawingPoint[] | null;
|
|
343
|
+
readonly clipPolygon: readonly DrawingPoint[] | null;
|
|
344
|
+
readonly wrapDistances: DrawingInsets;
|
|
345
|
+
readonly effectInsets: DrawingInsets;
|
|
346
|
+
readonly textSide: WrapTextSide;
|
|
347
|
+
readonly contentLeft: number;
|
|
348
|
+
readonly contentRight: number;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/** Paint layer relative to body text — not the OOXML wrap element. */
|
|
352
|
+
type DrawingPaintLayer = 'behind' | 'inFront';
|
|
353
|
+
interface ExclusionZone {
|
|
354
|
+
readonly drawingNodeId: string;
|
|
355
|
+
readonly anchorParagraphId: string;
|
|
356
|
+
/** UTF-16 model offset of the anchor atom — exclusions apply at/after this point in the paragraph. */
|
|
357
|
+
readonly anchorModelStart: number;
|
|
358
|
+
readonly sourceOrder: number;
|
|
359
|
+
readonly paintLayer: DrawingPaintLayer;
|
|
360
|
+
readonly relativeHeight: number;
|
|
361
|
+
readonly allowOverlap: boolean;
|
|
362
|
+
/** Owning column index in a multi-column section — 0 for single-column and HF stories. */
|
|
363
|
+
readonly columnIndex: number;
|
|
364
|
+
/** Resolved top edge in page-content coordinates after overlap displacement. */
|
|
365
|
+
readonly y: number;
|
|
366
|
+
readonly verticalBand: LayoutBox;
|
|
367
|
+
readonly input: WrapExclusionInput;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
interface PendingLine {
|
|
371
|
+
readonly spans: StyleSpanRecord[];
|
|
372
|
+
readonly drawings: InlineDrawingRecord[];
|
|
373
|
+
readonly start: number;
|
|
374
|
+
end: number;
|
|
375
|
+
width: number;
|
|
376
|
+
height: number;
|
|
377
|
+
baseline: number;
|
|
378
|
+
/**
|
|
379
|
+
* Space ABOVE the glyph band inside {@link height}.
|
|
380
|
+
*
|
|
381
|
+
* Exact spacing can center the glyphs and move the baseline. Auto/atLeast spacing leaves
|
|
382
|
+
* this at zero and puts its extra depth below instead.
|
|
383
|
+
*/
|
|
384
|
+
leading: number;
|
|
385
|
+
/**
|
|
386
|
+
* Auto/atLeast line-spacing depth below the painted glyph band.
|
|
387
|
+
*
|
|
388
|
+
* Word lets this external depth cross the bottom text margin when the glyphs themselves
|
|
389
|
+
* still fit. Pagination therefore budgets {@link height} minus this amount at a page
|
|
390
|
+
* bottom, while paint keeps the full box and padding.
|
|
391
|
+
*/
|
|
392
|
+
trailingSpacing: number;
|
|
393
|
+
/** When true, layout must start a new page after this line is placed. */
|
|
394
|
+
pageBreakAfter?: boolean;
|
|
395
|
+
/** When true, layout must advance to the next authored section column. */
|
|
396
|
+
columnBreakAfter?: boolean;
|
|
397
|
+
/** Model ranges on this line covering deleted content; see {@link LineRecord.deletedRanges}. */
|
|
398
|
+
deletedRanges?: readonly ModelRange[];
|
|
399
|
+
/** Vertical gap inserted before this line to clear a topAndBottom exclusion band. */
|
|
400
|
+
exclusionSkipBefore?: number;
|
|
401
|
+
/** Tracked anchored-drawing attributions on this line; see {@link LineRecord.anchorRevisions}. */
|
|
402
|
+
anchorRevisions?: readonly RevisionAttribution[];
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
|
|
406
|
+
type Alignment = 'left' | 'center' | 'right' | 'both';
|
|
407
|
+
|
|
408
|
+
/** Soft ceiling on `basedOn` chain length — enough for real templates, refuses hostile graphs. */
|
|
409
|
+
declare const MAX_STYLE_BASED_ON_DEPTH = 32;
|
|
410
|
+
/** Soft ceiling on style definitions read from one styles part. */
|
|
411
|
+
declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
412
|
+
/** One `w:style` as the cascade reads it: its properties, and the style it is based on. */
|
|
413
|
+
interface StyleDefinition {
|
|
414
|
+
readonly styleId: string;
|
|
415
|
+
readonly type: string;
|
|
416
|
+
readonly basedOn: string | null;
|
|
417
|
+
/**
|
|
418
|
+
* `w:next` — the style Word gives the paragraph that FOLLOWS one in this style.
|
|
419
|
+
*
|
|
420
|
+
* Nothing in layout reads it: it is a rule about authoring, not about painting. It is
|
|
421
|
+
* read here because this is the one place `styles.xml` is parsed, and a second reader
|
|
422
|
+
* would be a second answer to what a style id means.
|
|
423
|
+
*/
|
|
424
|
+
readonly next: string | null;
|
|
425
|
+
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
426
|
+
readonly runProperties: readonly OoxmlProperty[];
|
|
427
|
+
/** The style's `w:pPr` node, when present — needed for nested `w:pBdr`. */
|
|
428
|
+
readonly paragraphPropertiesNode: OoxmlElement | undefined;
|
|
429
|
+
/** The style's `w:tblPr`, for a `w:type="table"` style. */
|
|
430
|
+
readonly tablePropertiesNode: OoxmlElement | undefined;
|
|
431
|
+
/**
|
|
432
|
+
* `w:tblStylePr` conditional formats by `w:type` (`firstRow`, `band1Horz`, …).
|
|
433
|
+
*
|
|
434
|
+
* Word puts a table's real appearance here: `Table Grid` carries its grid in the style's
|
|
435
|
+
* `w:tblBorders`, and the banded/header looks live in these. A document states only
|
|
436
|
+
* `<w:tblStyle w:val="TableGrid"/>`.
|
|
437
|
+
*/
|
|
438
|
+
readonly conditionalTableFormats: ReadonlyMap<string, OoxmlElement>;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* The whole styles part, indexed and ready to resolve against.
|
|
442
|
+
*
|
|
443
|
+
* `cacheToken` is load-bearing: it folds into layout cache producers so breaks measured under one
|
|
444
|
+
* styles part are never reused under another.
|
|
445
|
+
*/
|
|
446
|
+
interface StyleCascadeTable {
|
|
447
|
+
/**
|
|
448
|
+
* Bounded fingerprint folded into layout cache producers so a different styles part cannot
|
|
449
|
+
* reuse breaks measured under another cascade. Computed once per table (FNV-1a hex).
|
|
450
|
+
*/
|
|
451
|
+
readonly cacheToken: string;
|
|
452
|
+
readonly docDefaultsRun: readonly OoxmlProperty[];
|
|
453
|
+
readonly docDefaultsParagraph: readonly OoxmlProperty[];
|
|
454
|
+
readonly docDefaultsParagraphNode: OoxmlElement | undefined;
|
|
455
|
+
/** `w:style[@w:default='1'][@w:type='paragraph']` — last wins among defaults of that type. */
|
|
456
|
+
readonly defaultParagraphStyleId: string | null;
|
|
457
|
+
/** `w:style[@w:default='1'][@w:type='character']` — last wins among defaults of that type. */
|
|
458
|
+
readonly defaultCharacterStyleId: string | null;
|
|
459
|
+
/**
|
|
460
|
+
* The theme part's Latin typefaces, for `w:rFonts` theme references.
|
|
461
|
+
*
|
|
462
|
+
* Lives on the cascade because it is document-level style material with the same
|
|
463
|
+
* lifetime, and because every site that resolves run properties already holds this table.
|
|
464
|
+
*/
|
|
465
|
+
readonly themeFonts: ThemeFonts;
|
|
466
|
+
readonly styles: ReadonlyMap<string, StyleDefinition>;
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* A paragraph's properties after the cascade, plus the same list WITHOUT its own `w:pPr`.
|
|
470
|
+
*
|
|
471
|
+
* Both, because a writer needs to know what a paragraph INHERITS to decide whether setting a
|
|
472
|
+
* value is a change or a no-op — and writing back an inherited value freezes it into the
|
|
473
|
+
* paragraph as though the author had chosen it.
|
|
474
|
+
*/
|
|
475
|
+
interface CascadedParagraphFormatting {
|
|
476
|
+
/** Flat paragraph properties in cascade order (defaults → bases → style → direct). */
|
|
477
|
+
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
478
|
+
/**
|
|
479
|
+
* The same list WITHOUT the paragraph's own `w:pPr` — everything it inherits.
|
|
480
|
+
*
|
|
481
|
+
* Numbering needs the two tiers apart: a level's `w:pPr/w:ind` outranks the style's and is
|
|
482
|
+
* outranked by the paragraph's own, and a flattened list cannot say which is which.
|
|
483
|
+
*/
|
|
484
|
+
readonly inheritedParagraphProperties: readonly OoxmlProperty[];
|
|
485
|
+
/** Matching `w:pPr` nodes for nested border resolution. */
|
|
486
|
+
readonly paragraphPropertyNodes: readonly OoxmlNode[];
|
|
487
|
+
/**
|
|
488
|
+
* Inherited run properties for CONTENT runs (before direct run `rPr`).
|
|
489
|
+
*
|
|
490
|
+
* Does NOT include direct `w:pPr/w:rPr` — that formats the paragraph MARK only
|
|
491
|
+
* (ECMA-376 §17.3.1.36). Folding mark `w:sz` into content made BodyText runs with no
|
|
492
|
+
* direct size paint at the mark's size (Selection Notice "or" alternative → 6.5pt).
|
|
493
|
+
*/
|
|
494
|
+
readonly runProperties: readonly OoxmlProperty[];
|
|
495
|
+
/**
|
|
496
|
+
* Content cascade plus direct `w:pPr/w:rPr` — empty-line metrics and last-line mark height.
|
|
497
|
+
*/
|
|
498
|
+
readonly markRunProperties: readonly OoxmlProperty[];
|
|
499
|
+
/**
|
|
500
|
+
* The style this paragraph resolved to, or null when it names none and there is no
|
|
501
|
+
* document default. `w:contextualSpacing` compares neighbours by exactly this.
|
|
502
|
+
*/
|
|
503
|
+
readonly styleId: string | null;
|
|
504
|
+
}
|
|
505
|
+
/** Accepted style ids only — over-long, control-bearing, or dangerous keys are dropped. */
|
|
506
|
+
declare function isValidStyleId(raw: string | undefined): raw is string;
|
|
507
|
+
/**
|
|
508
|
+
* What a table style contributes to the paragraphs of ONE cell: the style's whole-table
|
|
509
|
+
* `w:pPr`/`w:rPr` followed by every `w:tblStylePr` the cell is under (17.7.6.6), weakest
|
|
510
|
+
* first in the caller's condition order (banding, column, row, corner).
|
|
511
|
+
*
|
|
512
|
+
* This is how Word makes a header row bold and centred while the document states nothing
|
|
513
|
+
* but `<w:tblStyle w:val="…"/>` on the table and plain runs in the cells.
|
|
514
|
+
*/
|
|
515
|
+
interface TableCellStyleFormatting {
|
|
516
|
+
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
517
|
+
/** Matching `w:pPr` nodes, for nested `w:pBdr` / `w:tabs` resolution. */
|
|
518
|
+
readonly paragraphPropertyNodes: readonly OoxmlElement[];
|
|
519
|
+
/** Inherited run properties for every run in the cell, before the paragraph style. */
|
|
520
|
+
readonly runProperties: readonly OoxmlProperty[];
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Build a cascade table from a styles part root.
|
|
524
|
+
*
|
|
525
|
+
* Only direct `w:style` children of the root participate (bounded count). Duplicate
|
|
526
|
+
* `styleId` values keep the last definition, matching Word's reader for this fixture class.
|
|
527
|
+
* Default paragraph/character style ids track `w:default="1"` with the same last-wins rule.
|
|
528
|
+
*/
|
|
529
|
+
declare function buildStyleCascadeTable(stylesRoot: OoxmlElement | null, themeFonts?: ThemeFonts): StyleCascadeTable;
|
|
530
|
+
/**
|
|
531
|
+
* Cascade paragraph + inherited run properties for one paragraph's direct `w:pPr`.
|
|
532
|
+
*
|
|
533
|
+
* Order: `docDefaults` → table style → `basedOn` ancestors → paragraph style → direct
|
|
534
|
+
* formatting, which is the style hierarchy of 17.7.2: a table style sits above the document
|
|
535
|
+
* defaults and below the paragraph style a cell paragraph names for itself.
|
|
536
|
+
* When `w:pStyle` is absent, the document's default paragraph style (`w:default="1"`) is used.
|
|
537
|
+
* Direct formatting is last so it overrides inherited values inside the existing resolvers.
|
|
538
|
+
*/
|
|
539
|
+
declare function cascadeParagraphFormatting(table: StyleCascadeTable, directPPr: OoxmlNode | undefined, tableCellStyle?: TableCellStyleFormatting): CascadedParagraphFormatting;
|
|
540
|
+
/**
|
|
541
|
+
* Bottom border after cascade: a later `w:pBdr` replaces an earlier one; absence inherits.
|
|
542
|
+
* `nil`/`none` clear the edge via `paragraphBorders`.
|
|
543
|
+
*/
|
|
544
|
+
declare function cascadedBottomBorder(paragraphPropertyNodes: readonly OoxmlNode[]): ParagraphBorderEdge | undefined;
|
|
545
|
+
/**
|
|
546
|
+
* Merge inherited paragraph-style run props with a run's direct `rPr` (direct last).
|
|
547
|
+
*
|
|
548
|
+
* When a cascade table is supplied, also resolves `w:rStyle` character styles (basedOn chain,
|
|
549
|
+
* cycle/depth capped). Runs without an explicit `rStyle` pick up the default character style
|
|
550
|
+
* (`w:default="1"`). Precedence: inherited → character style chain → direct formatting.
|
|
551
|
+
*/
|
|
552
|
+
declare function cascadeRunProperties(inheritedRunProperties: readonly OoxmlProperty[], directRunProperties: readonly OoxmlProperty[], table?: StyleCascadeTable): readonly OoxmlProperty[];
|
|
553
|
+
/** Everything the line breaker needs about one paragraph, already cascaded and converted. */
|
|
554
|
+
interface ParagraphLayoutInputs {
|
|
555
|
+
readonly props: OoxmlProperty[];
|
|
556
|
+
readonly indent: {
|
|
557
|
+
left: number;
|
|
558
|
+
right: number;
|
|
559
|
+
hanging: number;
|
|
560
|
+
firstLine: number;
|
|
561
|
+
};
|
|
562
|
+
readonly available: number;
|
|
563
|
+
readonly alignment: Alignment;
|
|
564
|
+
readonly spacing: ParagraphSpacing;
|
|
565
|
+
/** Resolved `w:line` / `w:lineRule`; single spacing where the cascade says nothing. */
|
|
566
|
+
readonly lineSpacing: ParagraphLineSpacing;
|
|
567
|
+
/** `w:contextualSpacing`: drop before/after between same-style neighbours. */
|
|
568
|
+
readonly contextualSpacing: boolean;
|
|
569
|
+
/** Resolved paragraph style id, for the `w:contextualSpacing` neighbour comparison. */
|
|
570
|
+
readonly styleId: string | null;
|
|
571
|
+
readonly bottomBorder: ParagraphBorderEdge | undefined;
|
|
572
|
+
/**
|
|
573
|
+
* Every `CT_PBdr` edge after cascade, not just the bottom one.
|
|
574
|
+
*
|
|
575
|
+
* `bottomBorder` stays alongside it because the fragment signature and the table flow
|
|
576
|
+
* read that field by name; this is the whole box, so a cell paragraph gets the same
|
|
577
|
+
* frame a body paragraph does.
|
|
578
|
+
*/
|
|
579
|
+
readonly borders: ParagraphBorders;
|
|
580
|
+
/** Validated 6-hex paragraph shading fill from cascaded `w:pPr/w:shd`, absent for none. */
|
|
581
|
+
readonly shading: string | undefined;
|
|
582
|
+
readonly inheritedRunProperties: readonly OoxmlProperty[];
|
|
583
|
+
/**
|
|
584
|
+
* Paragraph-mark cascade (`inheritedRunProperties` + direct `w:pPr/w:rPr`).
|
|
585
|
+
* Empty-line sizing and last-line mark height — never content-run face.
|
|
586
|
+
*/
|
|
587
|
+
readonly markRunProperties: readonly OoxmlProperty[];
|
|
588
|
+
/** Cascaded custom tab stops + default interval for paragraph-flow breaking. */
|
|
589
|
+
readonly tabStops: ResolvedTabStops;
|
|
590
|
+
/**
|
|
591
|
+
* Fingerprint folded into the paragraph layout cache key — nested `w:tabs` are absent
|
|
592
|
+
* from flat property bags, so style-inherited stops must be named explicitly.
|
|
593
|
+
*/
|
|
594
|
+
readonly tabStopsCacheToken: string;
|
|
595
|
+
/** Resolved list marker inputs when the paragraph participates in numbering. */
|
|
596
|
+
readonly listItem?: ResolvedListItem;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Resolve every paragraph input semantic layout / table cells share: cascaded props when a
|
|
600
|
+
* style table is present, otherwise direct formatting only.
|
|
376
601
|
*
|
|
377
|
-
*
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
* Project `numbering.xml` into the bounded index.
|
|
602
|
+
* When `listItem` is provided, its merged level indent becomes the paragraph indent (list
|
|
603
|
+
* hanging / left from `numbering.xml`), which is what Word uses for fixture list paragraphs
|
|
604
|
+
* that author no direct `w:ind`.
|
|
381
605
|
*
|
|
382
|
-
*
|
|
383
|
-
*
|
|
384
|
-
* becomes a loop bound or an allocation size.
|
|
385
|
-
*/
|
|
386
|
-
declare function buildNumberingIndex(root: OoxmlElement | null | undefined): NumberingIndex;
|
|
387
|
-
/** Resolve the effective level for a `numId` + `ilvl`, applying overrides. */
|
|
388
|
-
/**
|
|
389
|
-
* The effective level for one paragraph's numbering reference, after overrides and style links.
|
|
606
|
+
* `tableCellStyle` carries what the enclosing table's style says about this cell's
|
|
607
|
+
* paragraphs; body paragraphs pass nothing.
|
|
390
608
|
*
|
|
391
|
-
*
|
|
392
|
-
*
|
|
609
|
+
* `inTableCell` is asked for separately because a cell paragraph may have no table style to
|
|
610
|
+
* inherit at all, and `w:beforeAutospacing` still needs to know it is in a cell.
|
|
393
611
|
*/
|
|
394
|
-
declare function
|
|
395
|
-
readonly abstractNumId: string;
|
|
396
|
-
readonly level: NumberingLevel;
|
|
397
|
-
readonly startOverride?: number;
|
|
398
|
-
} | null;
|
|
399
|
-
/** Empty index for tests / documents without numbering. */
|
|
400
|
-
declare const EMPTY_NUMBERING_INDEX: NumberingIndex;
|
|
612
|
+
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean): ParagraphLayoutInputs;
|
|
401
613
|
|
|
402
614
|
/**
|
|
403
615
|
* What a batch of commits can affect.
|
|
@@ -543,6 +755,18 @@ interface SectionStackSpan {
|
|
|
543
755
|
readonly sheetY: number;
|
|
544
756
|
/** Remapped pages (projectors intact) from the last pass for this section. */
|
|
545
757
|
readonly remappedPages: readonly PageRecord[];
|
|
758
|
+
/**
|
|
759
|
+
* The section-local pages this span's pass returned — identity evidence for reuse. (On a
|
|
760
|
+
* continuous section the host tail merges instead of remapping, so `remappedPages` covers
|
|
761
|
+
* only the overflow sheets while this list still holds every returned page.)
|
|
762
|
+
*
|
|
763
|
+
* A section can lay out more than once inside one document pass (a reserve re-run, a
|
|
764
|
+
* balancing probe), and the last run then reports "nothing placed" against its OWN session
|
|
765
|
+
* even though an earlier run this pass rebuilt the pages. Counts and stats cannot tell
|
|
766
|
+
* those apart; only these object identities can say the span still describes the pages the
|
|
767
|
+
* section just returned.
|
|
768
|
+
*/
|
|
769
|
+
readonly sourcePages: readonly PageRecord[];
|
|
546
770
|
}
|
|
547
771
|
/** Orchestrator state for multi-section incremental layout. */
|
|
548
772
|
interface MultiSectionLayoutState {
|
|
@@ -565,8 +789,19 @@ interface LayoutSession {
|
|
|
565
789
|
previous: SemanticLayout | null;
|
|
566
790
|
checkpoints: FlowCheckpoint[];
|
|
567
791
|
keys: string[];
|
|
568
|
-
/** Geometry and
|
|
792
|
+
/** Geometry and flow context of the previous pass; a change forces a full pass. */
|
|
569
793
|
context: string;
|
|
794
|
+
/**
|
|
795
|
+
* Producer of the previous pass, compared beside {@link context} rather than embedded in
|
|
796
|
+
* it: the producer carries the content-control token, which runs to kilobytes on a
|
|
797
|
+
* control-heavy document, and embedding it copied that token into every section's context
|
|
798
|
+
* string on every pass. Identity-stable when unchanged, so the comparison is a pointer
|
|
799
|
+
* check.
|
|
800
|
+
*
|
|
801
|
+
* Optional so a session literal built before this field existed still type-checks; an
|
|
802
|
+
* absent producer never matches and forces a conservative full pass.
|
|
803
|
+
*/
|
|
804
|
+
producer?: string;
|
|
570
805
|
/**
|
|
571
806
|
* Whether the previous pass read page PARITY: even/odd header variants, or an anchored
|
|
572
807
|
* drawing positioned against an inside/outside frame or alignment.
|
|
@@ -733,204 +968,6 @@ declare function listMarkerBox(item: ResolvedListItem, markerWidth: number, line
|
|
|
733
968
|
height: number;
|
|
734
969
|
} | null;
|
|
735
970
|
|
|
736
|
-
/** Soft ceiling on `basedOn` chain length — enough for real templates, refuses hostile graphs. */
|
|
737
|
-
declare const MAX_STYLE_BASED_ON_DEPTH = 32;
|
|
738
|
-
/** Soft ceiling on style definitions read from one styles part. */
|
|
739
|
-
declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
740
|
-
/** One `w:style` as the cascade reads it: its properties, and the style it is based on. */
|
|
741
|
-
interface StyleDefinition {
|
|
742
|
-
readonly styleId: string;
|
|
743
|
-
readonly type: string;
|
|
744
|
-
readonly basedOn: string | null;
|
|
745
|
-
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
746
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
747
|
-
/** The style's `w:pPr` node, when present — needed for nested `w:pBdr`. */
|
|
748
|
-
readonly paragraphPropertiesNode: OoxmlElement | undefined;
|
|
749
|
-
/** The style's `w:tblPr`, for a `w:type="table"` style. */
|
|
750
|
-
readonly tablePropertiesNode: OoxmlElement | undefined;
|
|
751
|
-
/**
|
|
752
|
-
* `w:tblStylePr` conditional formats by `w:type` (`firstRow`, `band1Horz`, …).
|
|
753
|
-
*
|
|
754
|
-
* Word puts a table's real appearance here: `Table Grid` carries its grid in the style's
|
|
755
|
-
* `w:tblBorders`, and the banded/header looks live in these. A document states only
|
|
756
|
-
* `<w:tblStyle w:val="TableGrid"/>`.
|
|
757
|
-
*/
|
|
758
|
-
readonly conditionalTableFormats: ReadonlyMap<string, OoxmlElement>;
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* The whole styles part, indexed and ready to resolve against.
|
|
762
|
-
*
|
|
763
|
-
* `cacheToken` is load-bearing: it folds into layout cache producers so breaks measured under one
|
|
764
|
-
* styles part are never reused under another.
|
|
765
|
-
*/
|
|
766
|
-
interface StyleCascadeTable {
|
|
767
|
-
/**
|
|
768
|
-
* Bounded fingerprint folded into layout cache producers so a different styles part cannot
|
|
769
|
-
* reuse breaks measured under another cascade. Computed once per table (FNV-1a hex).
|
|
770
|
-
*/
|
|
771
|
-
readonly cacheToken: string;
|
|
772
|
-
readonly docDefaultsRun: readonly OoxmlProperty[];
|
|
773
|
-
readonly docDefaultsParagraph: readonly OoxmlProperty[];
|
|
774
|
-
readonly docDefaultsParagraphNode: OoxmlElement | undefined;
|
|
775
|
-
/** `w:style[@w:default='1'][@w:type='paragraph']` — last wins among defaults of that type. */
|
|
776
|
-
readonly defaultParagraphStyleId: string | null;
|
|
777
|
-
/** `w:style[@w:default='1'][@w:type='character']` — last wins among defaults of that type. */
|
|
778
|
-
readonly defaultCharacterStyleId: string | null;
|
|
779
|
-
/**
|
|
780
|
-
* The theme part's Latin typefaces, for `w:rFonts` theme references.
|
|
781
|
-
*
|
|
782
|
-
* Lives on the cascade because it is document-level style material with the same
|
|
783
|
-
* lifetime, and because every site that resolves run properties already holds this table.
|
|
784
|
-
*/
|
|
785
|
-
readonly themeFonts: ThemeFonts;
|
|
786
|
-
readonly styles: ReadonlyMap<string, StyleDefinition>;
|
|
787
|
-
}
|
|
788
|
-
/**
|
|
789
|
-
* A paragraph's properties after the cascade, plus the same list WITHOUT its own `w:pPr`.
|
|
790
|
-
*
|
|
791
|
-
* Both, because a writer needs to know what a paragraph INHERITS to decide whether setting a
|
|
792
|
-
* value is a change or a no-op — and writing back an inherited value freezes it into the
|
|
793
|
-
* paragraph as though the author had chosen it.
|
|
794
|
-
*/
|
|
795
|
-
interface CascadedParagraphFormatting {
|
|
796
|
-
/** Flat paragraph properties in cascade order (defaults → bases → style → direct). */
|
|
797
|
-
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
798
|
-
/**
|
|
799
|
-
* The same list WITHOUT the paragraph's own `w:pPr` — everything it inherits.
|
|
800
|
-
*
|
|
801
|
-
* Numbering needs the two tiers apart: a level's `w:pPr/w:ind` outranks the style's and is
|
|
802
|
-
* outranked by the paragraph's own, and a flattened list cannot say which is which.
|
|
803
|
-
*/
|
|
804
|
-
readonly inheritedParagraphProperties: readonly OoxmlProperty[];
|
|
805
|
-
/** Matching `w:pPr` nodes for nested border resolution. */
|
|
806
|
-
readonly paragraphPropertyNodes: readonly OoxmlNode[];
|
|
807
|
-
/**
|
|
808
|
-
* Inherited run properties for CONTENT runs (before direct run `rPr`).
|
|
809
|
-
*
|
|
810
|
-
* Does NOT include direct `w:pPr/w:rPr` — that formats the paragraph MARK only
|
|
811
|
-
* (ECMA-376 §17.3.1.36). Folding mark `w:sz` into content made BodyText runs with no
|
|
812
|
-
* direct size paint at the mark's size (Selection Notice "or" alternative → 6.5pt).
|
|
813
|
-
*/
|
|
814
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
815
|
-
/**
|
|
816
|
-
* Content cascade plus direct `w:pPr/w:rPr` — empty-line metrics and last-line mark height.
|
|
817
|
-
*/
|
|
818
|
-
readonly markRunProperties: readonly OoxmlProperty[];
|
|
819
|
-
/**
|
|
820
|
-
* The style this paragraph resolved to, or null when it names none and there is no
|
|
821
|
-
* document default. `w:contextualSpacing` compares neighbours by exactly this.
|
|
822
|
-
*/
|
|
823
|
-
readonly styleId: string | null;
|
|
824
|
-
}
|
|
825
|
-
/** Accepted style ids only — over-long, control-bearing, or dangerous keys are dropped. */
|
|
826
|
-
declare function isValidStyleId(raw: string | undefined): raw is string;
|
|
827
|
-
/**
|
|
828
|
-
* What a table style contributes to the paragraphs of ONE cell: the style's whole-table
|
|
829
|
-
* `w:pPr`/`w:rPr` followed by every `w:tblStylePr` the cell is under (17.7.6.6), weakest
|
|
830
|
-
* first in the caller's condition order (banding, column, row, corner).
|
|
831
|
-
*
|
|
832
|
-
* This is how Word makes a header row bold and centred while the document states nothing
|
|
833
|
-
* but `<w:tblStyle w:val="…"/>` on the table and plain runs in the cells.
|
|
834
|
-
*/
|
|
835
|
-
interface TableCellStyleFormatting {
|
|
836
|
-
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
837
|
-
/** Matching `w:pPr` nodes, for nested `w:pBdr` / `w:tabs` resolution. */
|
|
838
|
-
readonly paragraphPropertyNodes: readonly OoxmlElement[];
|
|
839
|
-
/** Inherited run properties for every run in the cell, before the paragraph style. */
|
|
840
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Build a cascade table from a styles part root.
|
|
844
|
-
*
|
|
845
|
-
* Only direct `w:style` children of the root participate (bounded count). Duplicate
|
|
846
|
-
* `styleId` values keep the last definition, matching Word's reader for this fixture class.
|
|
847
|
-
* Default paragraph/character style ids track `w:default="1"` with the same last-wins rule.
|
|
848
|
-
*/
|
|
849
|
-
declare function buildStyleCascadeTable(stylesRoot: OoxmlElement | null, themeFonts?: ThemeFonts): StyleCascadeTable;
|
|
850
|
-
/**
|
|
851
|
-
* Cascade paragraph + inherited run properties for one paragraph's direct `w:pPr`.
|
|
852
|
-
*
|
|
853
|
-
* Order: `docDefaults` → table style → `basedOn` ancestors → paragraph style → direct
|
|
854
|
-
* formatting, which is the style hierarchy of 17.7.2: a table style sits above the document
|
|
855
|
-
* defaults and below the paragraph style a cell paragraph names for itself.
|
|
856
|
-
* When `w:pStyle` is absent, the document's default paragraph style (`w:default="1"`) is used.
|
|
857
|
-
* Direct formatting is last so it overrides inherited values inside the existing resolvers.
|
|
858
|
-
*/
|
|
859
|
-
declare function cascadeParagraphFormatting(table: StyleCascadeTable, directPPr: OoxmlNode | undefined, tableCellStyle?: TableCellStyleFormatting): CascadedParagraphFormatting;
|
|
860
|
-
/**
|
|
861
|
-
* Bottom border after cascade: a later `w:pBdr` replaces an earlier one; absence inherits.
|
|
862
|
-
* `nil`/`none` clear the edge via `paragraphBorders`.
|
|
863
|
-
*/
|
|
864
|
-
declare function cascadedBottomBorder(paragraphPropertyNodes: readonly OoxmlNode[]): ParagraphBorderEdge | undefined;
|
|
865
|
-
/**
|
|
866
|
-
* Merge inherited paragraph-style run props with a run's direct `rPr` (direct last).
|
|
867
|
-
*
|
|
868
|
-
* When a cascade table is supplied, also resolves `w:rStyle` character styles (basedOn chain,
|
|
869
|
-
* cycle/depth capped). Runs without an explicit `rStyle` pick up the default character style
|
|
870
|
-
* (`w:default="1"`). Precedence: inherited → character style chain → direct formatting.
|
|
871
|
-
*/
|
|
872
|
-
declare function cascadeRunProperties(inheritedRunProperties: readonly OoxmlProperty[], directRunProperties: readonly OoxmlProperty[], table?: StyleCascadeTable): readonly OoxmlProperty[];
|
|
873
|
-
/** Everything the line breaker needs about one paragraph, already cascaded and converted. */
|
|
874
|
-
interface ParagraphLayoutInputs {
|
|
875
|
-
readonly props: OoxmlProperty[];
|
|
876
|
-
readonly indent: {
|
|
877
|
-
left: number;
|
|
878
|
-
right: number;
|
|
879
|
-
hanging: number;
|
|
880
|
-
firstLine: number;
|
|
881
|
-
};
|
|
882
|
-
readonly available: number;
|
|
883
|
-
readonly alignment: Alignment;
|
|
884
|
-
readonly spacing: ParagraphSpacing;
|
|
885
|
-
/** Resolved `w:line` / `w:lineRule`; single spacing where the cascade says nothing. */
|
|
886
|
-
readonly lineSpacing: ParagraphLineSpacing;
|
|
887
|
-
/** `w:contextualSpacing`: drop before/after between same-style neighbours. */
|
|
888
|
-
readonly contextualSpacing: boolean;
|
|
889
|
-
/** Resolved paragraph style id, for the `w:contextualSpacing` neighbour comparison. */
|
|
890
|
-
readonly styleId: string | null;
|
|
891
|
-
readonly bottomBorder: ParagraphBorderEdge | undefined;
|
|
892
|
-
/**
|
|
893
|
-
* Every `CT_PBdr` edge after cascade, not just the bottom one.
|
|
894
|
-
*
|
|
895
|
-
* `bottomBorder` stays alongside it because the fragment signature and the table flow
|
|
896
|
-
* read that field by name; this is the whole box, so a cell paragraph gets the same
|
|
897
|
-
* frame a body paragraph does.
|
|
898
|
-
*/
|
|
899
|
-
readonly borders: ParagraphBorders;
|
|
900
|
-
/** Validated 6-hex paragraph shading fill from cascaded `w:pPr/w:shd`, absent for none. */
|
|
901
|
-
readonly shading: string | undefined;
|
|
902
|
-
readonly inheritedRunProperties: readonly OoxmlProperty[];
|
|
903
|
-
/**
|
|
904
|
-
* Paragraph-mark cascade (`inheritedRunProperties` + direct `w:pPr/w:rPr`).
|
|
905
|
-
* Empty-line sizing and last-line mark height — never content-run face.
|
|
906
|
-
*/
|
|
907
|
-
readonly markRunProperties: readonly OoxmlProperty[];
|
|
908
|
-
/** Cascaded custom tab stops + default interval for paragraph-flow breaking. */
|
|
909
|
-
readonly tabStops: ResolvedTabStops;
|
|
910
|
-
/**
|
|
911
|
-
* Fingerprint folded into the paragraph layout cache key — nested `w:tabs` are absent
|
|
912
|
-
* from flat property bags, so style-inherited stops must be named explicitly.
|
|
913
|
-
*/
|
|
914
|
-
readonly tabStopsCacheToken: string;
|
|
915
|
-
/** Resolved list marker inputs when the paragraph participates in numbering. */
|
|
916
|
-
readonly listItem?: ResolvedListItem;
|
|
917
|
-
}
|
|
918
|
-
/**
|
|
919
|
-
* Resolve every paragraph input semantic layout / table cells share: cascaded props when a
|
|
920
|
-
* style table is present, otherwise direct formatting only.
|
|
921
|
-
*
|
|
922
|
-
* When `listItem` is provided, its merged level indent becomes the paragraph indent (list
|
|
923
|
-
* hanging / left from `numbering.xml`), which is what Word uses for fixture list paragraphs
|
|
924
|
-
* that author no direct `w:ind`.
|
|
925
|
-
*
|
|
926
|
-
* `tableCellStyle` carries what the enclosing table's style says about this cell's
|
|
927
|
-
* paragraphs; body paragraphs pass nothing.
|
|
928
|
-
*
|
|
929
|
-
* `inTableCell` is asked for separately because a cell paragraph may have no table style to
|
|
930
|
-
* inherit at all, and `w:beforeAutospacing` still needs to know it is in a cell.
|
|
931
|
-
*/
|
|
932
|
-
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean): ParagraphLayoutInputs;
|
|
933
|
-
|
|
934
971
|
/**
|
|
935
972
|
* What one cell side is before any ADJACENT cell has its say.
|
|
936
973
|
*
|
|
@@ -1069,8 +1106,16 @@ pages?: ReadonlySet<number>): Map<string, SelectionRect[]>;
|
|
|
1069
1106
|
*
|
|
1070
1107
|
* Word-LEFT skips any whitespace immediately behind the caret and then the word behind that,
|
|
1071
1108
|
* which makes repeated presses walk words rather than alternate with the preceding space.
|
|
1109
|
+
*
|
|
1110
|
+
* `stops` are offsets a word may not run THROUGH even when the characters either side are
|
|
1111
|
+
* word characters. They exist because the text this walks is what the VIEW is showing, and a
|
|
1112
|
+
* view can show two versions of the document side by side: struck text and the text proposed
|
|
1113
|
+
* to replace it abut with no separator, so `ALL CAPS` deleted and `fsdfsd` inserted read as
|
|
1114
|
+
* the single word `CAPSfsdfsd`. Those characters are never adjacent in any one version, and a
|
|
1115
|
+
* double-click that took both selected across a decision the reader had not made. See
|
|
1116
|
+
* `deletedTextBoundaries`.
|
|
1072
1117
|
*/
|
|
1073
|
-
declare function wordBoundary(text: string, offset: number, direction: -1 | 1): number;
|
|
1118
|
+
declare function wordBoundary(text: string, offset: number, direction: -1 | 1, stops?: ReadonlySet<number>): number;
|
|
1074
1119
|
|
|
1075
1120
|
/**
|
|
1076
1121
|
* Where an INSERT aimed at this position actually lands: past any deletion it sits inside.
|
|
@@ -1891,7 +1936,8 @@ interface HeaderFooterStoryLayout {
|
|
|
1891
1936
|
*/
|
|
1892
1937
|
interface HeaderFooterStoryInputs {
|
|
1893
1938
|
/**
|
|
1894
|
-
* `numbering.xml`, so a `w:numPr` paragraph in this story resolves a marker
|
|
1939
|
+
* `numbering.xml`, so a `w:numPr` paragraph in this story resolves a marker — directly or
|
|
1940
|
+
* inside an anchored text box, which lays out with its own per-box counters.
|
|
1895
1941
|
*
|
|
1896
1942
|
* Absent, the story lays out exactly as before: no marker record, and no numbering indent
|
|
1897
1943
|
* merged into the paragraph's own.
|
|
@@ -2097,8 +2143,9 @@ interface SemanticLayoutOptions {
|
|
|
2097
2143
|
*/
|
|
2098
2144
|
readonly notes?: NotesLayoutInput;
|
|
2099
2145
|
/**
|
|
2100
|
-
* Per-page bottom reserves (points) subtracted from content height before line placement
|
|
2101
|
-
*
|
|
2146
|
+
* Per-page bottom reserves (points) subtracted from content height before line placement,
|
|
2147
|
+
* keyed by DOCUMENT page index. A section's pass reads its own slice through
|
|
2148
|
+
* `pageIndexStart`. Produced by the note reflow loop; absent means full content column.
|
|
2102
2149
|
*/
|
|
2103
2150
|
readonly pageBottomReserves?: ReadonlyMap<number, number>;
|
|
2104
2151
|
/** Derived note marks for body/note projection (provisional or final). */
|
|
@@ -2797,4 +2844,4 @@ declare class TablePaginationError extends Error {
|
|
|
2797
2844
|
constructor(code: TablePaginationErrorCode, message: string);
|
|
2798
2845
|
}
|
|
2799
2846
|
|
|
2800
|
-
export { AUTO_PREFERRED_WIDTH, type AbstractNumDefinition, type BidiEmbeddingLevels, BlockFragmentRecord, CELL_PAD, COMPOUND_BORDER_MIN_GAP_PT, COMPOUND_BORDER_MIN_STROKE_PT, type CanvasMeasurerOptions, type CanvasTextContext, type CanvasTextMetrics, type CascadedParagraphFormatting, CellBorderBox, type CellMarginsPt, type CellVerticalAlign, type CompoundBorderMetrics, ContentControlBoundaryRecord$1 as ContentControlBoundaryRecord, type ContentControlFragmentRecord, ContentControlLock, DEFAULT_CANVAS_FONT_STACK, DEFAULT_CELL_MARGINS, EMPTY_NUMBERING_INDEX, FieldLinkProjector, FixedPoint, FixedPointRoundingMode, FontByteValidator, type FontSlot, GRAPHEME_SEGMENTER_LOCALE, type GraphemeBoundary, type GraphemeSegment, type GraphemeWordSegmentRecord, HARFBUZZ_SHAPING_LIBRARY, type HarfBuzzFaceCacheEvent, type HarfBuzzOutlineCacheEvent, type HarfBuzzShapeCacheEvent, HarfBuzzShapingError, type HarfBuzzShapingErrorCode, type HarfBuzzTextShaper, type HarfBuzzTextShaperInstrumentation, type HarfBuzzTextShaperOptions, type HeaderFooterVariantName, HyperlinkProjector, type KeyedRange, LayoutBox, type LayoutCacheStats, type LayoutScheduler, type LayoutSchedulerOptions, type LayoutScope, type LayoutSession, type LayoutSessionStats, type LevelOverride, LineRecord, type ListCounterAdvance, type ListCounterState, type ListMarkerAlign, type ListSuffix, MAX_EACH_PAGE_MARK_CANDIDATES, MAX_LVL_OVERRIDES, MAX_LVL_TEXT_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_NOTES_LAID_OUT, MAX_NOTE_FRAGMENTS, MAX_NOTE_OVERFLOW_PAGES, MAX_NOTE_REFLOW_ATTEMPTS, MAX_NUMBERING_DEFINITIONS, MAX_STYLE_BASED_ON_DEPTH, MAX_STYLE_DEFINITIONS, MAX_TABLE_COLUMNS, MAX_TABLE_NESTING, MAX_TABLE_ROW_FRAGMENTS, MAX_TABLE_ROW_HEIGHT_PT, type MaterializationInput, type NoteDisplayMark, type NoteLayoutFallbackReason, type NoteMarkContext, type NotePaginationFallbackReason, type NoteReferenceSite, type NoteSeparatorLayout, type NoteSeparatorRuleStyle, type NoteStoryDrawings, type NoteStoryLayout, type NotesAttachResult, type NotesLayoutInput, type NumDefinition, type NumberingIndex, type NumberingLevel, type NumberingLevelIndent, type PageFurniture, PageGeometry, PageRecord, type PageRefIndex, ParagraphBorderEdge, ParagraphBorders, ParagraphFragmentRecord, type ParagraphKeyInputs, type ParagraphLayoutCache, type ParagraphLayoutCacheOptions, type ParagraphLayoutInputs, ParagraphLineSpacing, ParagraphSpacing, type PreferredWidth, type PreferredWidthType, type ResolvedListItem, ResolvedRunStyle, type ResolvedSurfaceMeasurer, ResolvedTabStops, ReviewItem, type ReviewParagraphAnchor, RevisionDisplayMode, type ScriptItem, SectionColumns, SelectionRect, SemanticLayout, type SemanticLayoutOptions, SemanticPosition, SemanticSelection, type SemanticTableCell, type SemanticTableRow, type SemanticTableStructure, ShapedRun, type StyleCascadeTable, type StyleDefinition, StyleSpanRecord, type TableAlignment, TableBorderBox, TableBorderSide, type TableCellStyleFormatting, TablePaginationError, type TablePaginationErrorCode, type TableRowHeight, type TableRowHeightRule, TextDirection, TextMeasurer, TextShaper, UnsupportedScriptError, VersionedShapingLibrary, type ViewportWindow, WORD_SEGMENTER_LOCALE, type WordBoundary, type WordBoundaryResolverDeps, type WordSegment, anchorLineY, attachNotesToLayout, boundedFallbackWordSegments, buildNumberingIndex, buildPageRefIndex, buildStyleCascadeTable, cascadeParagraphFormatting, cascadeRunProperties, cascadedBottomBorder, clampListValue, computeDoubleBorderMetricsPt, computeFootnoteReserves, contentControlBoundaries, contentControlHoldingParagraph, contentControlRecordsInPart, contentControlsOfLayout, createBoundedFallbackWordBoundary, createDefaultWordBoundary, createFixedMeasurer, createHarfBuzzTextShaper, createIntlWordBoundary, createLayoutScheduler, createLayoutSession, createListCounterState, createParagraphLayoutCache, defaultNoteSeparatorRuleStyle, deriveNoteDisplayMarks, deriveNoteDisplayMarksResolved, documentOrder, effectiveBorderSide, effectiveContentControlLock, emptyTocPlaceholderParagraphIds, emptyTocSuppressedResultParagraphIds, everyStoryOrder, expandLvlText, filterRefsOnPage, findSeparatorNote, formatDecimal, formatDecimalZero, formatLowerLetter, formatLowerRoman, formatNumFmt, formatPageNumber, formatUpperLetter, formatUpperRoman, fragmentOwnsAtomOffset, fragmentsOfParagraph, graphemeBoundaryEpoch, graphemeCount, graphemeOffsetToUtf16, harfBuzzFontValidator, initializeHarfBuzz, intlGraphemeBoundary, isCanvasMeasurementAvailable, isCumulativeGeometryTrustedFromLineOrigin, isGeometryTrustedCaretOffset, isHarfBuzzInitialized, isIntlSegmenterAvailable, isIntlWordSegmenterAvailable, isMarkerOnlySeparatorNote, isValidStyleId, isWholeGraphemeHorizontalBoundary, itemizeScriptFontSlots, keyedRangeRects, layoutHeaderFooterStory, layoutNoteById, layoutNoteSeparator, layoutNoteStory, layoutSemanticDocument, lineAtPosition, linesOf, listMarkerBox, mergeListIndent, normalNotesOf, noteDisplayMarkMap, noteLineIdPrefix, noteMarkKey, noteSeparatorAreaBox, noteStoryBlocks, pagesToMaterialize, paragraphFragmentsOf, paragraphFragmentsOfBlocks, paragraphLayoutKey, paragraphMarkDeleted, paragraphShading, paragraphShadingBox, positionPastDeletion, projectedNoteMarkText, provisionalNoteMarks, readNumPr, readTableStructure, resetGraphemeBoundary, resolveDefaultSurfaceMeasurer, resolveDefaultWordBoundary, resolveNumberingLevel, resolveOoxmlShadingFill, resolveParagraphLayoutInputs, resolveStoryListItems, resolveStrictHexFill, reviewAnchorIndex, reviewItemGeometry, revisionRemovesParagraph, roundFontUnitToFixedPoint, segmentGraphemes, segmentWords, selectionRects, semanticHorizontalBoundaries, setGraphemeBoundary, setHarfBuzzWasmUrl, sha256FontBytes, shadingFillFromElement, shapedHorizontalBoundaries, storyBlocks, syntheticSeparatorBox, tableOriginX, tocFieldChromeParagraphIds, tryCreateCanvasMeasurer, unionLayoutBoxes, utf16OffsetToGrapheme, walkStoryParagraphs, withNumberingStyleLinks, withResolvedListItems, wordBoundary, wordSegmentsToGraphemeRecords };
|
|
2847
|
+
export { AUTO_PREFERRED_WIDTH, type AbstractNumDefinition, type BidiEmbeddingLevels, BlockFragmentRecord, CELL_PAD, COMPOUND_BORDER_MIN_GAP_PT, COMPOUND_BORDER_MIN_STROKE_PT, type CanvasMeasurerOptions, type CanvasTextContext, type CanvasTextMetrics, type CascadedParagraphFormatting, CellBorderBox, type CellMarginsPt, type CellVerticalAlign, type CompoundBorderMetrics, ContentControlBoundaryRecord$1 as ContentControlBoundaryRecord, type ContentControlFragmentRecord, ContentControlLock, DEFAULT_CANVAS_FONT_STACK, DEFAULT_CELL_MARGINS, EMPTY_NUMBERING_INDEX, FieldLinkProjector, FixedPoint, FixedPointRoundingMode, FontByteValidator, type FontSlot, GRAPHEME_SEGMENTER_LOCALE, type GraphemeBoundary, type GraphemeSegment, type GraphemeWordSegmentRecord, HARFBUZZ_SHAPING_LIBRARY, type HarfBuzzFaceCacheEvent, type HarfBuzzOutlineCacheEvent, type HarfBuzzShapeCacheEvent, HarfBuzzShapingError, type HarfBuzzShapingErrorCode, type HarfBuzzTextShaper, type HarfBuzzTextShaperInstrumentation, type HarfBuzzTextShaperOptions, type HeaderFooterVariantName, HyperlinkProjector, type KeyedRange, LayoutBox, type LayoutCacheStats, type LayoutScheduler, type LayoutSchedulerOptions, type LayoutScope, type LayoutSession, type LayoutSessionStats, type LevelOverride, LineRecord, type ListCounterAdvance, type ListCounterState, type ListMarkerAlign, type ListSuffix, MAX_EACH_PAGE_MARK_CANDIDATES, MAX_LVL_OVERRIDES, MAX_LVL_TEXT_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_NOTES_LAID_OUT, MAX_NOTE_FRAGMENTS, MAX_NOTE_OVERFLOW_PAGES, MAX_NOTE_REFLOW_ATTEMPTS, MAX_NUMBERING_DEFINITIONS, MAX_STYLE_BASED_ON_DEPTH, MAX_STYLE_DEFINITIONS, MAX_TABLE_COLUMNS, MAX_TABLE_NESTING, MAX_TABLE_ROW_FRAGMENTS, MAX_TABLE_ROW_HEIGHT_PT, type MaterializationInput, type NoteDisplayMark, type NoteLayoutFallbackReason, type NoteMarkContext, type NotePaginationFallbackReason, type NoteReferenceSite, type NoteSeparatorLayout, type NoteSeparatorRuleStyle, type NoteStoryDrawings, type NoteStoryLayout, type NotesAttachResult, type NotesLayoutInput, type NumDefinition, type NumberingIndex, type NumberingLevel, type NumberingLevelIndent, type PageFurniture, PageGeometry, PageRecord, type PageRefIndex, ParagraphBorderEdge, ParagraphBorders, ParagraphFragmentRecord, type ParagraphKeyInputs, type ParagraphLayoutCache, type ParagraphLayoutCacheOptions, type ParagraphLayoutInputs, ParagraphLineSpacing, ParagraphSpacing, type PreferredWidth, type PreferredWidthType, type ResolvedListItem, ResolvedRunStyle, type ResolvedSurfaceMeasurer, ResolvedTabStops, ReviewItem, type ReviewParagraphAnchor, RevisionAttribution, RevisionDisplayMode, type ScriptItem, SectionColumns, SelectionRect, SemanticLayout, type SemanticLayoutOptions, SemanticPosition, SemanticSelection, type SemanticTableCell, type SemanticTableRow, type SemanticTableStructure, ShapedRun, type StyleCascadeTable, type StyleDefinition, StyleSpanRecord, type TableAlignment, TableBorderBox, TableBorderSide, type TableCellStyleFormatting, TablePaginationError, type TablePaginationErrorCode, type TableRowHeight, type TableRowHeightRule, TextDirection, TextMeasurer, TextShaper, UnsupportedScriptError, VersionedShapingLibrary, type ViewportWindow, WORD_SEGMENTER_LOCALE, type WordBoundary, type WordBoundaryResolverDeps, type WordSegment, anchorLineY, attachNotesToLayout, boundedFallbackWordSegments, buildNumberingIndex, buildPageRefIndex, buildStyleCascadeTable, cascadeParagraphFormatting, cascadeRunProperties, cascadedBottomBorder, clampListValue, computeDoubleBorderMetricsPt, computeFootnoteReserves, contentControlBoundaries, contentControlHoldingParagraph, contentControlRecordsInPart, contentControlsOfLayout, createBoundedFallbackWordBoundary, createDefaultWordBoundary, createFixedMeasurer, createHarfBuzzTextShaper, createIntlWordBoundary, createLayoutScheduler, createLayoutSession, createListCounterState, createParagraphLayoutCache, defaultNoteSeparatorRuleStyle, deriveNoteDisplayMarks, deriveNoteDisplayMarksResolved, documentOrder, effectiveBorderSide, effectiveContentControlLock, emptyTocPlaceholderParagraphIds, emptyTocSuppressedResultParagraphIds, everyStoryOrder, expandLvlText, filterRefsOnPage, findSeparatorNote, formatDecimal, formatDecimalZero, formatLowerLetter, formatLowerRoman, formatNumFmt, formatPageNumber, formatUpperLetter, formatUpperRoman, fragmentOwnsAtomOffset, fragmentsOfParagraph, graphemeBoundaryEpoch, graphemeCount, graphemeOffsetToUtf16, harfBuzzFontValidator, initializeHarfBuzz, intlGraphemeBoundary, isCanvasMeasurementAvailable, isCumulativeGeometryTrustedFromLineOrigin, isGeometryTrustedCaretOffset, isHarfBuzzInitialized, isIntlSegmenterAvailable, isIntlWordSegmenterAvailable, isMarkerOnlySeparatorNote, isValidStyleId, isWholeGraphemeHorizontalBoundary, itemizeScriptFontSlots, keyedRangeRects, layoutHeaderFooterStory, layoutNoteById, layoutNoteSeparator, layoutNoteStory, layoutSemanticDocument, lineAtPosition, linesOf, listMarkerBox, mergeListIndent, normalNotesOf, noteDisplayMarkMap, noteLineIdPrefix, noteMarkKey, noteSeparatorAreaBox, noteStoryBlocks, pagesToMaterialize, paragraphFragmentsOf, paragraphFragmentsOfBlocks, paragraphLayoutKey, paragraphMarkDeleted, paragraphShading, paragraphShadingBox, positionPastDeletion, projectedNoteMarkText, provisionalNoteMarks, readNumPr, readTableStructure, resetGraphemeBoundary, resolveDefaultSurfaceMeasurer, resolveDefaultWordBoundary, resolveNumberingLevel, resolveOoxmlShadingFill, resolveParagraphLayoutInputs, resolveStoryListItems, resolveStrictHexFill, reviewAnchorIndex, reviewItemGeometry, revisionRemovesParagraph, roundFontUnitToFixedPoint, segmentGraphemes, segmentWords, selectionRects, semanticHorizontalBoundaries, setGraphemeBoundary, setHarfBuzzWasmUrl, sha256FontBytes, shadingFillFromElement, shapedHorizontalBoundaries, storyBlocks, syntheticSeparatorBox, tableOriginX, tocFieldChromeParagraphIds, tryCreateCanvasMeasurer, unionLayoutBoxes, utf16OffsetToGrapheme, walkStoryParagraphs, withNumberingStyleLinks, withResolvedListItems, wordBoundary, wordSegmentsToGraphemeRecords };
|