@docx-editor.dev/core 2.12.0 → 2.13.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/README.md +18 -14
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.cts +5 -5
- package/dist/automation.d.ts +5 -5
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.cts +8 -8
- package/dist/binding.d.ts +8 -8
- package/dist/binding.js +1 -1
- package/dist/chunk-3AT4RUQ3.cjs +19 -0
- package/dist/chunk-4NAQLFXA.cjs +2 -0
- package/dist/{chunk-XCFM3G5L.cjs → chunk-67S7OHE6.cjs} +1 -1
- package/dist/chunk-BHAUFJO6.js +20 -0
- package/dist/{chunk-TKEGK4GQ.cjs → chunk-F7U4OLMS.cjs} +2 -2
- package/dist/chunk-FNMXRLGW.cjs +5 -0
- package/dist/{chunk-W77HJGYX.js → chunk-HWWHGREA.js} +1 -1
- package/dist/chunk-I36WS6XX.cjs +20 -0
- package/dist/chunk-IOTL2GGW.js +1 -0
- package/dist/chunk-OF2QZCTN.js +19 -0
- package/dist/chunk-PFSJVAWJ.cjs +1 -0
- package/dist/chunk-PRIBU3UH.js +2 -0
- package/dist/{chunk-WU7PUTVA.js → chunk-RIYSCEFQ.js} +1 -1
- package/dist/chunk-RO3HFCML.js +5 -0
- package/dist/chunk-SFOUCTKA.js +2 -0
- package/dist/{chunk-MHQNR2OU.js → chunk-VBEKERLJ.js} +2 -2
- package/dist/chunk-WANKXD34.cjs +2 -0
- package/dist/chunk-XETEMUIP.cjs +11 -0
- package/dist/chunk-YMW34EBA.js +11 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.cts +3 -3
- package/dist/collaboration/replication.d.ts +3 -3
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.cts +3 -3
- package/dist/collaboration.d.ts +3 -3
- package/dist/contracts/editor.d.cts +7 -7
- package/dist/contracts/editor.d.ts +7 -7
- package/dist/contracts/interaction.d.cts +7 -7
- package/dist/contracts/interaction.d.ts +7 -7
- package/dist/contracts/modules.d.cts +7 -7
- package/dist/contracts/modules.d.ts +7 -7
- package/dist/{custom-node-writes-D4rMJIES.d.cts → custom-node-writes-C46r3_5O.d.cts} +2 -2
- package/dist/{custom-node-writes-CcNeHH5C.d.ts → custom-node-writes-DntmaAVW.d.ts} +2 -2
- package/dist/{dist-YFULGVS3.js → dist-OSUJGKTK.js} +1 -1
- package/dist/{editor-B76SEMZw.d.cts → editor-DLrTueVe.d.cts} +21 -9
- package/dist/{editor-BcdsPdbY.d.ts → editor-KiB6JNvk.d.ts} +21 -9
- package/dist/editor.cjs +1 -1
- package/dist/editor.d.cts +22 -22
- package/dist/editor.d.ts +22 -22
- package/dist/editor.js +1 -1
- package/dist/{index-BYTvklN5.d.ts → index-D4Pxdo_p.d.ts} +168 -13
- package/dist/{index-CDGhPib1.d.cts → index-D_PA2Xv6.d.cts} +168 -13
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15 -15
- package/dist/index.d.ts +15 -15
- package/dist/index.js +1 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +179 -519
- package/dist/layout.d.ts +179 -519
- package/dist/layout.js +1 -1
- package/dist/{note-properties-Bx7rXruA.d.ts → note-properties-CDFiNXcD.d.ts} +1 -1
- package/dist/{note-properties-zQ8w04en.d.cts → note-properties-Y6qYh2Hv.d.cts} +1 -1
- package/dist/{omml-equation-69O1Pd8G.d.ts → omml-equation-BY49UOIF.d.ts} +1 -1
- package/dist/{omml-equation-BmV51rim.d.cts → omml-equation-DB8d-jCq.d.cts} +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/{protocol-FTXtrAIT.d.cts → protocol-C8L58j66.d.cts} +2 -2
- package/dist/{protocol-DC7ueVuo.d.ts → protocol-DjgYKCAy.d.ts} +2 -2
- package/dist/{review-items-B78OsJU2.d.ts → review-items-CCS1h93f.d.ts} +1 -1
- package/dist/{review-items-C-2WQdEb.d.cts → review-items-CaAkgi5s.d.cts} +1 -1
- package/dist/{review-reads-CbBQlb-n.d.cts → review-reads-BrTDmoYH.d.cts} +2 -2
- package/dist/{review-reads-UexYBp-m.d.ts → review-reads-DcGYCH0w.d.ts} +2 -2
- package/dist/{revision-projection-B2v9U3qx.d.ts → revision-projection-BmLtLPxH.d.ts} +1 -1
- package/dist/{revision-projection-6u8lae9J.d.cts → revision-projection-Dknlar93.d.cts} +1 -1
- package/dist/{semantic-cell-selection-DsYz2Vg3.d.ts → semantic-cell-selection-BZ50i-Fu.d.ts} +4 -4
- package/dist/{semantic-cell-selection-nEE7E3Z8.d.cts → semantic-cell-selection-COnfaOZO.d.cts} +4 -4
- package/dist/{semantic-interaction-C00BpIyC.d.ts → semantic-interaction-BDJ4TBjm.d.ts} +4 -2
- package/dist/{semantic-interaction-DiOX0FIH.d.cts → semantic-interaction-Bq3ixB0I.d.cts} +4 -2
- package/dist/{semantic-paint-Cc11nrDL.d.cts → semantic-paint-C5SMTO8Y.d.cts} +2 -2
- package/dist/{semantic-paint-ofuoBsYo.d.ts → semantic-paint-DuhhY5-R.d.ts} +2 -2
- package/dist/{semantic-records-CzI0ZEuR.d.ts → semantic-records-BI1jpft7.d.ts} +603 -8
- package/dist/{semantic-records-CRG1r6-a.d.cts → semantic-records-Btw3Ao4v.d.cts} +603 -8
- package/dist/{shaped-measurer-CneACGcP.d.cts → shaped-measurer-CqdYa0fa.d.cts} +9 -1
- package/dist/{shaped-measurer-CkOGZQn9.d.ts → shaped-measurer-qnBJziPx.d.ts} +9 -1
- package/dist/store.cjs +1 -1
- package/dist/store.d.cts +15 -12
- package/dist/store.d.ts +15 -12
- package/dist/store.js +1 -1
- package/dist/{tree-op-types-CA7qgAUF.d.cts → tree-op-types-BUulYD5y.d.cts} +15 -2
- package/dist/{tree-op-types-HKfUzt_-.d.ts → tree-op-types-D6HzlPR4.d.ts} +15 -2
- package/dist/{tree-package-fragment-oJZX_5iN.d.ts → tree-package-fragment-B1supBtE.d.ts} +2 -2
- package/dist/{tree-package-fragment-Cz-v-0B3.d.cts → tree-package-fragment-ByN5yzll.d.cts} +2 -2
- package/dist/{tree-session-contract-BPDLrEPX.d.ts → tree-session-contract-BasiwZgZ.d.ts} +28 -5
- package/dist/{tree-session-contract-Cbl87xa8.d.cts → tree-session-contract-DbeBenMR.d.cts} +28 -5
- package/dist/{tree-store-B7hd6cEa.d.ts → tree-store-APgWx6qn.d.ts} +1 -1
- package/dist/{tree-store-BenW0Mg_.d.cts → tree-store-DEEQ9wz_.d.cts} +1 -1
- package/package.json +5 -2
- package/dist/chunk-3JON7JMD.cjs +0 -1
- package/dist/chunk-5V6FNKBE.cjs +0 -2
- package/dist/chunk-BXRVGHTY.cjs +0 -18
- package/dist/chunk-BXTTPJSH.js +0 -5
- package/dist/chunk-ILTZTY3K.cjs +0 -10
- package/dist/chunk-IUM7FZPA.js +0 -2
- package/dist/chunk-JWZG4QJ5.cjs +0 -2
- package/dist/chunk-JXZYDBKU.cjs +0 -19
- package/dist/chunk-KBOOIC2Q.js +0 -19
- package/dist/chunk-L6XZTLPS.js +0 -10
- package/dist/chunk-L7OR5TJK.cjs +0 -5
- package/dist/chunk-MLGPISGH.js +0 -1
- package/dist/chunk-NJXQABQU.js +0 -18
- package/dist/chunk-VGFMPWND.js +0 -2
package/dist/layout.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
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 {
|
|
4
|
-
export {
|
|
5
|
-
import { a as OoxmlNode, s as OoxmlProperty,
|
|
6
|
-
export {
|
|
7
|
-
import { N as NoteKind, T as TreeModelChange, n as noteTypeOf } from './tree-store-
|
|
8
|
-
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties } from './note-properties-
|
|
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-qnBJziPx.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-qnBJziPx.js';
|
|
3
|
+
import { N as NumberingLevel, d as NumberingIndex, e as LayoutBox, D as DrawingPoint, f as DrawingInsets, a as StyleSpanRecord, I as InlineDrawingRecord, M as ModelRange, S as SemanticLayout, B as BlockFragmentRecord, A as AnchoredDrawingRecord, g as PageRecord, h as TableBorderSide, C as ContentControlBoundaryRecord$1, i as ContentControlLock, j as ParagraphFragmentRecord, L as LineRecord, T as TextMeasurer, k as InlineDrawingLayoutContext, l as StyleCascadeTable, H as HyperlinkProjector, F as FieldLinkProjector, m as RefFieldContext, n as StoryPageFieldNeeds, P as PageGeometry, o as ResolvedListItem, p as CellBorderBox, q as TableCellStyleFormatting, r as TableBorderBox } from './semantic-records-BI1jpft7.js';
|
|
4
|
+
export { s as AUTO_PARAGRAPH_SPACING_PT, t as AbstractNumDefinition, u as BorderGridGeometry, v as CascadedParagraphFormatting, w as ContentControlGeometryFragment, x as ContentControlLevel, y as ContentControlMappedType, z as DEFAULT_PAGE_GEOMETRY, E as DEFAULT_RUN_STYLE, G as DEFAULT_TAB_INTERVAL_PT, J as DEFAULT_TAB_INTERVAL_TWIPS, K as EMPTY_NUMBERING_INDEX, O as EMPTY_TAB_STOPS, Q as EquationFractionGeometry, U as EquationGeometry, V as EquationNaryGeometry, W as EquationRadicalGeometry, X as EquationRowGeometry, Y as EquationScriptGeometry, Z as EquationSpanRecord, _ as EquationTextGeometry, $ as FieldAtomMarker, a0 as HeaderFooterStoryRecord, a1 as HyperlinkFieldSpec, a2 as LevelOverride, a3 as LineSpacingRule, a4 as ListMarkerAlign, a5 as ListMarkerRecord, a6 as ListSuffix, a7 as MAX_BORDER_SPACE_PT, a8 as MAX_BORDER_WIDTH_PT, a9 as MAX_LVL_OVERRIDES, aa as MAX_NUMBERING_DEFINITIONS, ab as MAX_PARAGRAPH_SPACING_PT, ac as MAX_STYLE_BASED_ON_DEPTH, ad as MAX_STYLE_DEFINITIONS, ae as MAX_TABLE_BORDER_STROKES, af as MAX_TAB_POSITION_TWIPS, ag as MAX_TAB_STOPS, ah as NumDefinition, ai as NumberingLevelIndent, aj as PARAGRAPH_BORDER_SIDES, ak as PageRefCalibrationCell, al as PageRefFieldProjection, am as ParagraphAutoSpacingContext, an as ParagraphBorderEdge, ao as ParagraphBorderSide, ap as ParagraphBorderStrokeRecord, aq as ParagraphBorders, ar as ParagraphBottomBorderRecord, as as ParagraphIndent, at as ParagraphLayoutInputs, au as ParagraphLineSpacing, av as ParagraphSpacing, aw as RefFieldSpec, ax as RefNoteParts, ay as ResolvedCellBorders, R as ResolvedRunStyle, az as ResolvedTabStops, aA as ResolvedTableBorderEdge, aB as ResolvedTableBorderEdgeSegment, aC as ResolvedUnderline, aD as SINGLE_LINE_SPACING, aE as SourceRange, aF as SpanLinkRecord, aG as StyleDefinition, aH as TAB_LEADER_GLYPH, aI as TabAlignment, aJ as TabDestination, aK as TabLeader, aL as TabStop, aM as TableBorderSideName, aN as TableBorderStrokeRecord, c as TableCellFragmentRecord, aO as TableFragmentRecord, b as TableRowFragmentRecord, aP as VerticalAlign, aQ as appliedSpaceBefore, aR as applyLineSpacing, aS as baselineShiftPtOf, aT as borderExtentPt, aU as borderWeight, aV as bottomBorderExtentPt, aW as buildNumberingIndex, aX as buildStyleCascadeTable, aY as cascadeParagraphFormatting, aZ as cascadeRunProperties, a_ as cascadedBottomBorder, a$ as cascadedParagraphBorders, b0 as cascadedTabStops, b1 as collapsedSpaceBefore, b2 as defaultTabIntervalFromSettings, b3 as displayText, b4 as isValidStyleId, b5 as layoutEquation, b6 as listMarkerBox, b7 as measureDisplayText, b8 as mergeListIndent, b9 as nextTabDestination, ba as paragraphBorderExtentPt, bb as paragraphBorderStrokeWidthPt, bc as paragraphBorders, bd as paragraphBordersFingerprint, be as paragraphBreaksBefore, bf as paragraphContextualSpacing, bg as paragraphLineSpacing, bh as paragraphSpacing, bi as paragraphTabStops, bj as parseRefInstruction, bk as readBorderSide, bl as readCellBorders, bm as readNumPr, bn as readTableBorders, bo as resolveBorderConflict, bp as resolveNumberingLevel, bq as resolveParagraphLayoutInputs, br as resolveRunStyle, bs as resolveStoryListItems, bt as resolveStoryRefFields, bu as resolveTableCellBorderGrid, bv as runStylesEqual, bw as tabAdvanceWidth, bx as tabStopsFingerprint, by as walkStoryParagraphs, bz as withDefaultTabInterval, bA as withNumberingStyleLinks, bB as withResolvedListItems } from './semantic-records-BI1jpft7.js';
|
|
5
|
+
import { a as OoxmlNode, s as OoxmlProperty, I as ImpactClass, g as OoxmlElement, O as OoxmlPart, T as TreeDocOp, b as OoxmlPackage, $ as ContentControlKind, a0 as ContentControlLevel, a1 as ContentControlLock$1, a2 as ContentControlDataBinding } from './tree-op-types-D6HzlPR4.js';
|
|
6
|
+
export { _ as TableBorderStyle } from './tree-op-types-D6HzlPR4.js';
|
|
7
|
+
import { N as NoteKind, T as TreeModelChange, n as noteTypeOf } from './tree-store-APgWx6qn.js';
|
|
8
|
+
import { R as ResolvedFootnoteProperties, a as ResolvedEndnoteProperties } from './note-properties-CDFiNXcD.js';
|
|
9
9
|
import { D as DocumentProperties } from './document-properties-D6Ahr8D6.js';
|
|
10
|
-
import { a as RevisionAttribution, R as RevisionDisplayMode } from './revision-projection-
|
|
11
|
-
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-
|
|
12
|
-
import { a as SectionColumns } from './semantic-cell-selection-
|
|
13
|
-
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-
|
|
14
|
-
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-
|
|
15
|
-
import { a as ReviewItem } from './review-items-
|
|
16
|
-
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-
|
|
17
|
-
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-
|
|
18
|
-
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-
|
|
19
|
-
import './omml-equation-
|
|
10
|
+
import { a as RevisionAttribution, R as RevisionDisplayMode } from './revision-projection-BmLtLPxH.js';
|
|
11
|
+
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-BmLtLPxH.js';
|
|
12
|
+
import { a as SectionColumns } from './semantic-cell-selection-BZ50i-Fu.js';
|
|
13
|
+
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-BZ50i-Fu.js';
|
|
14
|
+
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-DcGYCH0w.js';
|
|
15
|
+
import { a as ReviewItem } from './review-items-CCS1h93f.js';
|
|
16
|
+
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-CCS1h93f.js';
|
|
17
|
+
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-BDJ4TBjm.js';
|
|
18
|
+
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-BDJ4TBjm.js';
|
|
19
|
+
import './omml-equation-BY49UOIF.js';
|
|
20
20
|
import './contracts/types.js';
|
|
21
21
|
|
|
22
22
|
/**
|
|
@@ -46,6 +46,45 @@ interface FieldPageContext {
|
|
|
46
46
|
*/
|
|
47
47
|
declare function formatPageNumber(value: number, format: string | undefined): string;
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* The result of counting ONE list paragraph: the level that applied, the counter vector after it,
|
|
51
|
+
* and the marker text a reader sees.
|
|
52
|
+
*
|
|
53
|
+
* Counters are a vector across all nine levels, not a single number, because a deeper level
|
|
54
|
+
* restarting resets the ones below it while leaving those above intact.
|
|
55
|
+
*/
|
|
56
|
+
interface ListCounterAdvance {
|
|
57
|
+
/** Effective abstract numbering template for this num instance. */
|
|
58
|
+
readonly abstractNumId: string;
|
|
59
|
+
readonly numId: string;
|
|
60
|
+
readonly ilvl: number;
|
|
61
|
+
readonly level: NumberingLevel;
|
|
62
|
+
/** Counter vector after this item was counted (indices 0..8). */
|
|
63
|
+
readonly counters: readonly number[];
|
|
64
|
+
/** Expanded marker text (empty when vanished / empty lvlText). */
|
|
65
|
+
readonly markerText: string;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The running counters for one layout pass over one story.
|
|
69
|
+
*
|
|
70
|
+
* Stateful and order-dependent by nature: a list number is a function of every numbered paragraph
|
|
71
|
+
* before it, which is why markers are computed during layout and cannot be read off a paragraph
|
|
72
|
+
* in isolation.
|
|
73
|
+
*/
|
|
74
|
+
interface ListCounterState {
|
|
75
|
+
/**
|
|
76
|
+
* Advance counters for one list paragraph.
|
|
77
|
+
*
|
|
78
|
+
* Returns null when the numbering definition cannot be resolved — callers treat the
|
|
79
|
+
* paragraph as non-list (inert fallback).
|
|
80
|
+
*/
|
|
81
|
+
advance(numId: string, ilvl: number): ListCounterAdvance | null;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Create a fresh counter bag for one story (body, or one header/footer part).
|
|
85
|
+
*/
|
|
86
|
+
declare function createListCounterState(index: NumberingIndex): ListCounterState;
|
|
87
|
+
|
|
49
88
|
/**
|
|
50
89
|
* Lookup of derived display marks keyed by {@link formatNoteScopeId}.
|
|
51
90
|
*
|
|
@@ -195,144 +234,6 @@ interface ParagraphLayoutCacheOptions {
|
|
|
195
234
|
*/
|
|
196
235
|
declare function createParagraphLayoutCache<T>(options?: ParagraphLayoutCacheOptions): ParagraphLayoutCache<T>;
|
|
197
236
|
|
|
198
|
-
/** Soft ceiling on abstractNum / num entries read from one part. */
|
|
199
|
-
declare const MAX_NUMBERING_DEFINITIONS = 512;
|
|
200
|
-
/** Soft ceiling on override entries per `w:num`. */
|
|
201
|
-
declare const MAX_LVL_OVERRIDES = 9;
|
|
202
|
-
/** `w:suff` — what separates a list marker from the text after it. */
|
|
203
|
-
type ListSuffix = 'tab' | 'space' | 'nothing';
|
|
204
|
-
/** `w:lvlJc` — how a list marker aligns within its own indent. */
|
|
205
|
-
type ListMarkerAlign = 'left' | 'center' | 'right';
|
|
206
|
-
/**
|
|
207
|
-
* One level's indent, plus which parts the level actually AUTHORED.
|
|
208
|
-
*
|
|
209
|
-
* The provenance matters: `w:ind` cascades per-attribute, so a level that authored only `left`
|
|
210
|
-
* must not overwrite an inherited `hanging` with a synthesized zero.
|
|
211
|
-
*/
|
|
212
|
-
interface NumberingLevelIndent {
|
|
213
|
-
readonly left: number;
|
|
214
|
-
readonly right: number;
|
|
215
|
-
readonly hanging: number;
|
|
216
|
-
readonly firstLine: number;
|
|
217
|
-
/**
|
|
218
|
-
* Which of these the LEVEL actually authored.
|
|
219
|
-
*
|
|
220
|
-
* A level's `w:pPr/w:ind` sits between the paragraph style and direct formatting, so the
|
|
221
|
-
* merge has to tell "the level says left = 0" from "the level says nothing about left and
|
|
222
|
-
* the style's value stands". Absent (the default) reads as "says nothing", which is what a
|
|
223
|
-
* hand-built level in a test means.
|
|
224
|
-
*/
|
|
225
|
-
readonly stated?: {
|
|
226
|
-
readonly left: boolean;
|
|
227
|
-
readonly right: boolean;
|
|
228
|
-
/** `w:hanging`/`w:firstLine` are one mutually exclusive slot (§17.3.1.10, §17.3.1.12). */
|
|
229
|
-
readonly firstLineOffset: boolean;
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
/** One `w:lvl`: how this depth numbers, what its marker looks like, and how it indents. */
|
|
233
|
-
interface NumberingLevel {
|
|
234
|
-
readonly ilvl: number;
|
|
235
|
-
readonly start: number;
|
|
236
|
-
readonly numFmt: string;
|
|
237
|
-
readonly lvlText: string;
|
|
238
|
-
readonly lvlJc: ListMarkerAlign;
|
|
239
|
-
readonly suff: ListSuffix;
|
|
240
|
-
readonly indent: NumberingLevelIndent;
|
|
241
|
-
/**
|
|
242
|
-
* `w:lvlRestart` one-based trigger level, or `0` when the level never restarts.
|
|
243
|
-
* Omitted in XML → restart when the previous level (or any earlier level) is used.
|
|
244
|
-
*/
|
|
245
|
-
readonly lvlRestart?: number;
|
|
246
|
-
/**
|
|
247
|
-
* `w:isLgl` (§17.9.9): render EVERY level referenced by this level's `w:lvlText` in
|
|
248
|
-
* decimal, whatever number format those levels declare for themselves.
|
|
249
|
-
*/
|
|
250
|
-
readonly isLgl: boolean;
|
|
251
|
-
/** Level `w:rPr` as flat properties (for marker face / vanish). */
|
|
252
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
253
|
-
/** True when level run props request vanish — marker must not paint. */
|
|
254
|
-
readonly vanish: boolean;
|
|
255
|
-
}
|
|
256
|
-
/**
|
|
257
|
-
* One `w:lvlOverride` on a `w:num`: a restart value, a replacement level, or both.
|
|
258
|
-
*
|
|
259
|
-
* How two lists share an abstract definition while numbering independently.
|
|
260
|
-
*/
|
|
261
|
-
interface LevelOverride {
|
|
262
|
-
readonly startOverride?: number;
|
|
263
|
-
/** Full level replacement when `w:lvl` is present under the override. */
|
|
264
|
-
readonly level?: NumberingLevel;
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* One `w:abstractNum` — the shape of a list, without being a list.
|
|
268
|
-
*
|
|
269
|
-
* Never referenced by a paragraph directly. Paragraphs name a {@link NumDefinition}, which names
|
|
270
|
-
* one of these, so several lists can share a definition and still count separately.
|
|
271
|
-
*/
|
|
272
|
-
interface AbstractNumDefinition {
|
|
273
|
-
readonly abstractNumId: string;
|
|
274
|
-
readonly levels: ReadonlyMap<number, NumberingLevel>;
|
|
275
|
-
/**
|
|
276
|
-
* `w:numStyleLink` (§17.9.21): this definition carries no levels of its own — the numbering
|
|
277
|
-
* lives on the named style. Word follows the link; resolve it with
|
|
278
|
-
* {@link resolveNumberingStyleLinks} before reading levels, or every paragraph on this
|
|
279
|
-
* abstract renders with NO marker at all.
|
|
280
|
-
*/
|
|
281
|
-
readonly numStyleLink?: string;
|
|
282
|
-
/**
|
|
283
|
-
* `w:styleLink` (§17.9.23): the definition side of the same pair — this abstract IS the
|
|
284
|
-
* numbering of the named style. Kept so a link can be verified rather than assumed.
|
|
285
|
-
*/
|
|
286
|
-
readonly styleLink?: string;
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* One `w:num` — the thing a paragraph's `w:numId` actually names.
|
|
290
|
-
*
|
|
291
|
-
* Points at an {@link AbstractNumDefinition} and may override any of its levels.
|
|
292
|
-
*/
|
|
293
|
-
interface NumDefinition {
|
|
294
|
-
readonly numId: string;
|
|
295
|
-
readonly abstractNumId: string;
|
|
296
|
-
readonly overrides: ReadonlyMap<number, LevelOverride>;
|
|
297
|
-
}
|
|
298
|
-
/**
|
|
299
|
-
* The bounded projection of `numbering.xml` that list layout resolves against.
|
|
300
|
-
*
|
|
301
|
-
* Projection ONLY — never a mutation or serialization authority. Hostile values are dropped or
|
|
302
|
-
* clamped, and a missing definition resolves to "no list" rather than a guess.
|
|
303
|
-
*/
|
|
304
|
-
interface NumberingIndex {
|
|
305
|
-
readonly abstractNums: ReadonlyMap<string, AbstractNumDefinition>;
|
|
306
|
-
readonly nums: ReadonlyMap<string, NumDefinition>;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Build a numbering index from the root of a numbering part (`w:numbering`).
|
|
310
|
-
*
|
|
311
|
-
* Empty / missing roots yield an empty index. Duplicate ids keep the first definition.
|
|
312
|
-
*/
|
|
313
|
-
/**
|
|
314
|
-
* Project `numbering.xml` into the bounded index.
|
|
315
|
-
*
|
|
316
|
-
* Every ceiling here exists because the input is file-derived: definition counts, override
|
|
317
|
-
* counts, indent magnitudes and style-link hop depth are all capped, and nothing from the file
|
|
318
|
-
* becomes a loop bound or an allocation size.
|
|
319
|
-
*/
|
|
320
|
-
declare function buildNumberingIndex(root: OoxmlElement | null | undefined): NumberingIndex;
|
|
321
|
-
/** Resolve the effective level for a `numId` + `ilvl`, applying overrides. */
|
|
322
|
-
/**
|
|
323
|
-
* The effective level for one paragraph's numbering reference, after overrides and style links.
|
|
324
|
-
*
|
|
325
|
-
* Answers null for a reference the index cannot resolve — a paragraph naming a definition the
|
|
326
|
-
* file never declared is an unnumbered paragraph, not an error.
|
|
327
|
-
*/
|
|
328
|
-
declare function resolveNumberingLevel(index: NumberingIndex, numId: string, ilvl: number): {
|
|
329
|
-
readonly abstractNumId: string;
|
|
330
|
-
readonly level: NumberingLevel;
|
|
331
|
-
readonly startOverride?: number;
|
|
332
|
-
} | null;
|
|
333
|
-
/** Empty index for tests / documents without numbering. */
|
|
334
|
-
declare const EMPTY_NUMBERING_INDEX: NumberingIndex;
|
|
335
|
-
|
|
336
237
|
type WrapTextSide = 'bothSides' | 'left' | 'right' | 'largest';
|
|
337
238
|
interface WrapExclusionInput {
|
|
338
239
|
readonly mode: 'square' | 'tight' | 'through' | 'topAndBottom';
|
|
@@ -400,234 +301,6 @@ interface PendingLine {
|
|
|
400
301
|
anchorRevisions?: readonly RevisionAttribution[];
|
|
401
302
|
}
|
|
402
303
|
|
|
403
|
-
/** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
|
|
404
|
-
type Alignment = 'left' | 'center' | 'right' | 'both';
|
|
405
|
-
|
|
406
|
-
/** Soft ceiling on `basedOn` chain length — enough for real templates, refuses hostile graphs. */
|
|
407
|
-
declare const MAX_STYLE_BASED_ON_DEPTH = 32;
|
|
408
|
-
/** Soft ceiling on style definitions read from one styles part. */
|
|
409
|
-
declare const MAX_STYLE_DEFINITIONS = 4096;
|
|
410
|
-
/** One `w:style` as the cascade reads it: its properties, and the style it is based on. */
|
|
411
|
-
interface StyleDefinition {
|
|
412
|
-
readonly styleId: string;
|
|
413
|
-
readonly type: string;
|
|
414
|
-
readonly basedOn: string | null;
|
|
415
|
-
/**
|
|
416
|
-
* `w:next` — the style Word gives the paragraph that FOLLOWS one in this style.
|
|
417
|
-
*
|
|
418
|
-
* Nothing in layout reads it: it is a rule about authoring, not about painting. It is
|
|
419
|
-
* read here because this is the one place `styles.xml` is parsed, and a second reader
|
|
420
|
-
* would be a second answer to what a style id means.
|
|
421
|
-
*/
|
|
422
|
-
readonly next: string | null;
|
|
423
|
-
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
424
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
425
|
-
/** The style's `w:pPr` node, when present — needed for nested `w:pBdr`. */
|
|
426
|
-
readonly paragraphPropertiesNode: OoxmlElement | undefined;
|
|
427
|
-
/** The style's `w:tblPr`, for a `w:type="table"` style. */
|
|
428
|
-
readonly tablePropertiesNode: OoxmlElement | undefined;
|
|
429
|
-
/**
|
|
430
|
-
* `w:tblStylePr` conditional formats by `w:type` (`firstRow`, `band1Horz`, …).
|
|
431
|
-
*
|
|
432
|
-
* Word puts a table's real appearance here: `Table Grid` carries its grid in the style's
|
|
433
|
-
* `w:tblBorders`, and the banded/header looks live in these. A document states only
|
|
434
|
-
* `<w:tblStyle w:val="TableGrid"/>`.
|
|
435
|
-
*/
|
|
436
|
-
readonly conditionalTableFormats: ReadonlyMap<string, OoxmlElement>;
|
|
437
|
-
}
|
|
438
|
-
/**
|
|
439
|
-
* The whole styles part, indexed and ready to resolve against.
|
|
440
|
-
*
|
|
441
|
-
* `cacheToken` is load-bearing: it folds into layout cache producers so breaks measured under one
|
|
442
|
-
* styles part are never reused under another.
|
|
443
|
-
*/
|
|
444
|
-
interface StyleCascadeTable {
|
|
445
|
-
/**
|
|
446
|
-
* Bounded fingerprint folded into layout cache producers so a different styles part cannot
|
|
447
|
-
* reuse breaks measured under another cascade. Computed once per table (FNV-1a hex).
|
|
448
|
-
*/
|
|
449
|
-
readonly cacheToken: string;
|
|
450
|
-
readonly docDefaultsRun: readonly OoxmlProperty[];
|
|
451
|
-
readonly docDefaultsParagraph: readonly OoxmlProperty[];
|
|
452
|
-
readonly docDefaultsParagraphNode: OoxmlElement | undefined;
|
|
453
|
-
/** `w:style[@w:default='1'][@w:type='paragraph']` — last wins among defaults of that type. */
|
|
454
|
-
readonly defaultParagraphStyleId: string | null;
|
|
455
|
-
/** `w:style[@w:default='1'][@w:type='character']` — last wins among defaults of that type. */
|
|
456
|
-
readonly defaultCharacterStyleId: string | null;
|
|
457
|
-
/**
|
|
458
|
-
* `w:style[@w:default='1'][@w:type='table']` — last wins among defaults of that type.
|
|
459
|
-
*
|
|
460
|
-
* A `w:tbl` with no `w:tblStyle` still resolves against this one. Word's own
|
|
461
|
-
* `TableNormal` is where the 0/108/0/108 twip cell margins live, so skipping it gives
|
|
462
|
-
* every unstyled table padding the document says it does not have.
|
|
463
|
-
*/
|
|
464
|
-
readonly defaultTableStyleId: string | null;
|
|
465
|
-
/**
|
|
466
|
-
* The theme part's Latin typefaces, for `w:rFonts` theme references.
|
|
467
|
-
*
|
|
468
|
-
* Lives on the cascade because it is document-level style material with the same
|
|
469
|
-
* lifetime, and because every site that resolves run properties already holds this table.
|
|
470
|
-
*/
|
|
471
|
-
readonly themeFonts: ThemeFonts;
|
|
472
|
-
readonly styles: ReadonlyMap<string, StyleDefinition>;
|
|
473
|
-
}
|
|
474
|
-
/**
|
|
475
|
-
* A paragraph's properties after the cascade, plus the same list WITHOUT its own `w:pPr`.
|
|
476
|
-
*
|
|
477
|
-
* Both, because a writer needs to know what a paragraph INHERITS to decide whether setting a
|
|
478
|
-
* value is a change or a no-op — and writing back an inherited value freezes it into the
|
|
479
|
-
* paragraph as though the author had chosen it.
|
|
480
|
-
*/
|
|
481
|
-
interface CascadedParagraphFormatting {
|
|
482
|
-
/** Flat paragraph properties in cascade order (defaults → bases → style → direct). */
|
|
483
|
-
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
484
|
-
/**
|
|
485
|
-
* The same list WITHOUT the paragraph's own `w:pPr` — everything it inherits.
|
|
486
|
-
*
|
|
487
|
-
* Numbering needs the two tiers apart: a level's `w:pPr/w:ind` outranks the style's and is
|
|
488
|
-
* outranked by the paragraph's own, and a flattened list cannot say which is which.
|
|
489
|
-
*/
|
|
490
|
-
readonly inheritedParagraphProperties: readonly OoxmlProperty[];
|
|
491
|
-
/** Matching `w:pPr` nodes for nested border resolution. */
|
|
492
|
-
readonly paragraphPropertyNodes: readonly OoxmlNode[];
|
|
493
|
-
/**
|
|
494
|
-
* Inherited run properties for CONTENT runs (before direct run `rPr`).
|
|
495
|
-
*
|
|
496
|
-
* Does NOT include direct `w:pPr/w:rPr` — that formats the paragraph MARK only
|
|
497
|
-
* (ECMA-376 §17.3.1.36). Folding mark `w:sz` into content made BodyText runs with no
|
|
498
|
-
* direct size paint at the mark's size (Selection Notice "or" alternative → 6.5pt).
|
|
499
|
-
*/
|
|
500
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
501
|
-
/**
|
|
502
|
-
* Content cascade plus direct `w:pPr/w:rPr` — empty-line metrics and last-line mark height.
|
|
503
|
-
*/
|
|
504
|
-
readonly markRunProperties: readonly OoxmlProperty[];
|
|
505
|
-
/**
|
|
506
|
-
* The style this paragraph resolved to, or null when it names none and there is no
|
|
507
|
-
* document default. `w:contextualSpacing` compares neighbours by exactly this.
|
|
508
|
-
*/
|
|
509
|
-
readonly styleId: string | null;
|
|
510
|
-
}
|
|
511
|
-
/** Accepted style ids only — over-long, control-bearing, or dangerous keys are dropped. */
|
|
512
|
-
declare function isValidStyleId(raw: string | undefined): raw is string;
|
|
513
|
-
/**
|
|
514
|
-
* What a table style contributes to the paragraphs of ONE cell: the style's whole-table
|
|
515
|
-
* `w:pPr`/`w:rPr` followed by every `w:tblStylePr` the cell is under (17.7.6.6), weakest
|
|
516
|
-
* first in the caller's condition order (banding, column, row, corner).
|
|
517
|
-
*
|
|
518
|
-
* This is how Word makes a header row bold and centred while the document states nothing
|
|
519
|
-
* but `<w:tblStyle w:val="…"/>` on the table and plain runs in the cells.
|
|
520
|
-
*/
|
|
521
|
-
interface TableCellStyleFormatting {
|
|
522
|
-
readonly paragraphProperties: readonly OoxmlProperty[];
|
|
523
|
-
/** Matching `w:pPr` nodes, for nested `w:pBdr` / `w:tabs` resolution. */
|
|
524
|
-
readonly paragraphPropertyNodes: readonly OoxmlElement[];
|
|
525
|
-
/** Inherited run properties for every run in the cell, before the paragraph style. */
|
|
526
|
-
readonly runProperties: readonly OoxmlProperty[];
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* Build a cascade table from a styles part root.
|
|
530
|
-
*
|
|
531
|
-
* Only direct `w:style` children of the root participate (bounded count). Duplicate
|
|
532
|
-
* `styleId` values keep the last definition, matching Word's reader for this fixture class.
|
|
533
|
-
* Default paragraph/character style ids track `w:default="1"` with the same last-wins rule.
|
|
534
|
-
*/
|
|
535
|
-
declare function buildStyleCascadeTable(stylesRoot: OoxmlElement | null, themeFonts?: ThemeFonts): StyleCascadeTable;
|
|
536
|
-
/**
|
|
537
|
-
* Cascade paragraph + inherited run properties for one paragraph's direct `w:pPr`.
|
|
538
|
-
*
|
|
539
|
-
* Order: `docDefaults` → table style → `basedOn` ancestors → paragraph style → direct
|
|
540
|
-
* formatting, which is the style hierarchy of 17.7.2: a table style sits above the document
|
|
541
|
-
* defaults and below the paragraph style a cell paragraph names for itself.
|
|
542
|
-
* When `w:pStyle` is absent, the document's default paragraph style (`w:default="1"`) is used.
|
|
543
|
-
* Direct formatting is last so it overrides inherited values inside the existing resolvers.
|
|
544
|
-
*/
|
|
545
|
-
declare function cascadeParagraphFormatting(table: StyleCascadeTable, directPPr: OoxmlNode | undefined, tableCellStyle?: TableCellStyleFormatting): CascadedParagraphFormatting;
|
|
546
|
-
/**
|
|
547
|
-
* Bottom border after cascade: a later `w:pBdr` replaces an earlier one; absence inherits.
|
|
548
|
-
* `nil`/`none` clear the edge via `paragraphBorders`.
|
|
549
|
-
*/
|
|
550
|
-
declare function cascadedBottomBorder(paragraphPropertyNodes: readonly OoxmlNode[]): ParagraphBorderEdge | undefined;
|
|
551
|
-
/**
|
|
552
|
-
* Merge inherited paragraph-style run props with a run's direct `rPr` (direct last).
|
|
553
|
-
*
|
|
554
|
-
* When a cascade table is supplied, also resolves `w:rStyle` character styles (basedOn chain,
|
|
555
|
-
* cycle/depth capped). Runs without an explicit `rStyle` pick up the default character style
|
|
556
|
-
* (`w:default="1"`). Precedence: inherited → character style chain → direct formatting.
|
|
557
|
-
*
|
|
558
|
-
* PASS `inheritedRunProperties` BY IDENTITY. It must be an array
|
|
559
|
-
* {@link cascadeParagraphFormatting} returned — `runProperties` or `markRunProperties` — and
|
|
560
|
-
* not a copy of one. A toggle property (ECMA-376 §17.7.3) resolves per level of the style
|
|
561
|
-
* hierarchy, and the levels below the character style resolve to more than a true or a false:
|
|
562
|
-
* whether the document defaults' short circuit is still standing decides what the character
|
|
563
|
-
* style's own toggle does next, and no single `w:b` element can spell that. The paragraph
|
|
564
|
-
* cascade attaches that state to the array it returns, so spreading, filtering or sorting the
|
|
565
|
-
* list drops it. (`Object.freeze` returns the same object, so that one is safe.) A list
|
|
566
|
-
* without it is read as one ordinary level, which is the most a bare property list can say
|
|
567
|
-
* and is what a caller assembling its own list gets.
|
|
568
|
-
*/
|
|
569
|
-
declare function cascadeRunProperties(inheritedRunProperties: readonly OoxmlProperty[], directRunProperties: readonly OoxmlProperty[], table?: StyleCascadeTable): readonly OoxmlProperty[];
|
|
570
|
-
/** Everything the line breaker needs about one paragraph, already cascaded and converted. */
|
|
571
|
-
interface ParagraphLayoutInputs {
|
|
572
|
-
readonly props: OoxmlProperty[];
|
|
573
|
-
readonly indent: {
|
|
574
|
-
left: number;
|
|
575
|
-
right: number;
|
|
576
|
-
hanging: number;
|
|
577
|
-
firstLine: number;
|
|
578
|
-
};
|
|
579
|
-
readonly available: number;
|
|
580
|
-
readonly alignment: Alignment;
|
|
581
|
-
readonly spacing: ParagraphSpacing;
|
|
582
|
-
/** Resolved `w:line` / `w:lineRule`; single spacing where the cascade says nothing. */
|
|
583
|
-
readonly lineSpacing: ParagraphLineSpacing;
|
|
584
|
-
/** `w:contextualSpacing`: drop before/after between same-style neighbours. */
|
|
585
|
-
readonly contextualSpacing: boolean;
|
|
586
|
-
/** Resolved paragraph style id, for the `w:contextualSpacing` neighbour comparison. */
|
|
587
|
-
readonly styleId: string | null;
|
|
588
|
-
readonly bottomBorder: ParagraphBorderEdge | undefined;
|
|
589
|
-
/**
|
|
590
|
-
* Every `CT_PBdr` edge after cascade, not just the bottom one.
|
|
591
|
-
*
|
|
592
|
-
* `bottomBorder` stays alongside it because the fragment signature and the table flow
|
|
593
|
-
* read that field by name; this is the whole box, so a cell paragraph gets the same
|
|
594
|
-
* frame a body paragraph does.
|
|
595
|
-
*/
|
|
596
|
-
readonly borders: ParagraphBorders;
|
|
597
|
-
/** Validated 6-hex paragraph shading fill from cascaded `w:pPr/w:shd`, absent for none. */
|
|
598
|
-
readonly shading: string | undefined;
|
|
599
|
-
readonly inheritedRunProperties: readonly OoxmlProperty[];
|
|
600
|
-
/**
|
|
601
|
-
* Paragraph-mark cascade (`inheritedRunProperties` + direct `w:pPr/w:rPr`).
|
|
602
|
-
* Empty-line sizing and last-line mark height — never content-run face.
|
|
603
|
-
*/
|
|
604
|
-
readonly markRunProperties: readonly OoxmlProperty[];
|
|
605
|
-
/** Cascaded custom tab stops + default interval for paragraph-flow breaking. */
|
|
606
|
-
readonly tabStops: ResolvedTabStops;
|
|
607
|
-
/**
|
|
608
|
-
* Fingerprint folded into the paragraph layout cache key — nested `w:tabs` are absent
|
|
609
|
-
* from flat property bags, so style-inherited stops must be named explicitly.
|
|
610
|
-
*/
|
|
611
|
-
readonly tabStopsCacheToken: string;
|
|
612
|
-
/** Resolved list marker inputs when the paragraph participates in numbering. */
|
|
613
|
-
readonly listItem?: ResolvedListItem;
|
|
614
|
-
}
|
|
615
|
-
/**
|
|
616
|
-
* Resolve every paragraph input semantic layout / table cells share: cascaded props when a
|
|
617
|
-
* style table is present, otherwise direct formatting only.
|
|
618
|
-
*
|
|
619
|
-
* When `listItem` is provided, its merged level indent becomes the paragraph indent (list
|
|
620
|
-
* hanging / left from `numbering.xml`), which is what Word uses for fixture list paragraphs
|
|
621
|
-
* that author no direct `w:ind`.
|
|
622
|
-
*
|
|
623
|
-
* `tableCellStyle` carries what the enclosing table's style says about this cell's
|
|
624
|
-
* paragraphs; body paragraphs pass nothing.
|
|
625
|
-
*
|
|
626
|
-
* `inTableCell` is asked for separately because a cell paragraph may have no table style to
|
|
627
|
-
* inherit at all, and `w:beforeAutospacing` still needs to know it is in a cell.
|
|
628
|
-
*/
|
|
629
|
-
declare function resolveParagraphLayoutInputs(paragraph: OoxmlElement, contentWidth: number, styleCascade: StyleCascadeTable | undefined, listItem?: ResolvedListItem, tableCellStyle?: TableCellStyleFormatting, inTableCell?: boolean): ParagraphLayoutInputs;
|
|
630
|
-
|
|
631
304
|
/**
|
|
632
305
|
* What a batch of commits can affect.
|
|
633
306
|
*
|
|
@@ -793,6 +466,12 @@ interface MultiSectionLayoutState {
|
|
|
793
466
|
previousRemapped: readonly PageRecord[];
|
|
794
467
|
previousFinalized: SemanticLayout | null;
|
|
795
468
|
previousPageCount: number;
|
|
469
|
+
/**
|
|
470
|
+
* The PAGEREF assignment token of the pages behind `previousFinalized`. A target can move
|
|
471
|
+
* sheets while the TOC page's own remapped record stays identity-unchanged, so the finalized
|
|
472
|
+
* restore must compare this before handing back a previously substituted sheet.
|
|
473
|
+
*/
|
|
474
|
+
previousPageRefToken: string;
|
|
796
475
|
}
|
|
797
476
|
/**
|
|
798
477
|
* Carried-over state that makes layout incremental.
|
|
@@ -891,99 +570,21 @@ interface LayoutSession {
|
|
|
891
570
|
*/
|
|
892
571
|
declare function createLayoutSession(): LayoutSession;
|
|
893
572
|
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
readonly
|
|
902
|
-
readonly ilvl: number;
|
|
903
|
-
readonly abstractNumId: string;
|
|
904
|
-
/** `w:numFmt` of the resolved level — `bullet` or a numbering format. */
|
|
905
|
-
readonly numFmt: string;
|
|
906
|
-
readonly markerText: string;
|
|
907
|
-
readonly markerAlign: ListMarkerAlign;
|
|
908
|
-
readonly suffix: ListSuffix;
|
|
909
|
-
/** Effective indent after merging level + paragraph indents, in points. */
|
|
910
|
-
readonly indent: NumberingLevelIndent;
|
|
911
|
-
readonly markerStyle: ResolvedRunStyle;
|
|
912
|
-
/** Fingerprint for layout cache keys (indent, marker text, marker face). */
|
|
913
|
-
readonly cacheToken: string;
|
|
573
|
+
type AutonumFieldKind = 'AUTONUM' | 'AUTONUMLGL' | 'AUTONUMOUT';
|
|
574
|
+
/** One recognized AUTONUM-family instruction: the kind and its supported switches. */
|
|
575
|
+
interface AutonumFieldSpec {
|
|
576
|
+
readonly kind: AutonumFieldKind;
|
|
577
|
+
/** ST_NumberFormat resolved from the `\*` switch; null paints decimal. */
|
|
578
|
+
readonly numFmt: string | null;
|
|
579
|
+
/** `\e`: display the number without its trailing period. */
|
|
580
|
+
readonly suppressPeriod: boolean;
|
|
914
581
|
}
|
|
915
582
|
/**
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
*
|
|
919
|
-
* the same way borders and tabs do.
|
|
920
|
-
*/
|
|
921
|
-
declare function readNumPr(paragraphPropertyNodes: readonly OoxmlNode[]): {
|
|
922
|
-
numId: string;
|
|
923
|
-
ilvl: number;
|
|
924
|
-
} | null;
|
|
925
|
-
/**
|
|
926
|
-
* Resolve `w:numStyleLink` delegation using the document's styles (§17.9.21).
|
|
927
|
-
*
|
|
928
|
-
* Without a style table there is nothing to follow, so the index is returned unchanged —
|
|
929
|
-
* and so it is when nothing delegates, which keeps layout cache identity.
|
|
930
|
-
*/
|
|
931
|
-
declare function withNumberingStyleLinks(index: NumberingIndex, styleCascade: StyleCascadeTable | undefined): NumberingIndex;
|
|
932
|
-
/**
|
|
933
|
-
* The effective indent of a list paragraph: STYLE, then the numbering LEVEL, then DIRECT.
|
|
934
|
-
*
|
|
935
|
-
* Word applies a level's `w:pPr/w:ind` between the paragraph style and the paragraph's own
|
|
936
|
-
* formatting, per attribute — and the ordering matters on real documents. A converted
|
|
937
|
-
* agreement numbers its `(a)` items with a level stating `left=1512 hanging=738` under a
|
|
938
|
-
* `ListParagraph` style stating `left=775 hanging=624`, and states only `hanging="737"` on
|
|
939
|
-
* the paragraph itself. Reading the flattened cascade as "the paragraph's indent" gave the
|
|
940
|
-
* STYLE's 775 to a level that had overridden it, so every lettered sub-item hung a full
|
|
941
|
-
* indent step to the left of where Word puts it.
|
|
942
|
-
*
|
|
943
|
-
* `inherited` is the cascade WITHOUT the paragraph's own `w:pPr` (defaults, table cell style,
|
|
944
|
-
* style chain); `direct` is that `w:pPr` alone.
|
|
945
|
-
*/
|
|
946
|
-
declare function mergeListIndent(levelIndent: NumberingLevelIndent, inherited: readonly OoxmlProperty[], direct?: readonly OoxmlProperty[]): NumberingLevelIndent;
|
|
947
|
-
/**
|
|
948
|
-
* Collect paragraphs of a block list in document order, descending into tables.
|
|
949
|
-
*
|
|
950
|
-
* Caps nesting so a hostile nested-table document cannot recurse without bound.
|
|
583
|
+
* Recognize `AUTONUM | AUTONUMLGL | AUTONUMOUT [\* <format>] [\e] [\* MERGEFORMAT]`, or null
|
|
584
|
+
* for anything else. Any unrecognized switch fails the parse so the field stays inert (paints
|
|
585
|
+
* nothing — its historical rendering), never the raw instruction, never a guessed number.
|
|
951
586
|
*/
|
|
952
|
-
declare function
|
|
953
|
-
/**
|
|
954
|
-
* Resolve every list paragraph in a story to a {@link ResolvedListItem}, keyed by node id.
|
|
955
|
-
*
|
|
956
|
-
* Non-list paragraphs are absent from the map. Hostile / missing numbering resolves inertly
|
|
957
|
-
* (paragraph omitted — laid out as ordinary text).
|
|
958
|
-
*/
|
|
959
|
-
declare function resolveStoryListItems(blocks: readonly OoxmlElement[], index: NumberingIndex, styleCascade: StyleCascadeTable | undefined, isFontAvailable?: (family: string) => boolean): ReadonlyMap<string, ResolvedListItem>;
|
|
960
|
-
/**
|
|
961
|
-
* Attach a full-story list-item map to layout options.
|
|
962
|
-
*
|
|
963
|
-
* Resolves once over `blocks` (body story including table cells) so counters continue across
|
|
964
|
-
* section boundaries. No-ops when numbering is absent.
|
|
965
|
-
*/
|
|
966
|
-
declare function withResolvedListItems<T extends {
|
|
967
|
-
readonly numberingIndex?: NumberingIndex;
|
|
968
|
-
readonly listItems?: ReadonlyMap<string, ResolvedListItem>;
|
|
969
|
-
readonly styleCascade?: StyleCascadeTable;
|
|
970
|
-
readonly isFontAvailable?: (family: string) => boolean;
|
|
971
|
-
}>(options: T, blocks: readonly OoxmlElement[]): T & {
|
|
972
|
-
readonly numberingIndex: NumberingIndex;
|
|
973
|
-
readonly listItems?: ReadonlyMap<string, ResolvedListItem>;
|
|
974
|
-
};
|
|
975
|
-
/**
|
|
976
|
-
* Horizontal marker box inside the hanging indent slot.
|
|
977
|
-
*
|
|
978
|
-
* Coordinates are relative to the same origin as paragraph content (`indent.left` is the
|
|
979
|
-
* text start). Returns null when there is nothing to paint.
|
|
980
|
-
*/
|
|
981
|
-
declare function listMarkerBox(item: ResolvedListItem, markerWidth: number, lineY: number, lineHeight: number): {
|
|
982
|
-
x: number;
|
|
983
|
-
y: number;
|
|
984
|
-
width: number;
|
|
985
|
-
height: number;
|
|
986
|
-
} | null;
|
|
587
|
+
declare function parseAutonumInstruction(raw: string): AutonumFieldSpec | null;
|
|
987
588
|
|
|
988
589
|
/**
|
|
989
590
|
* What one cell side is before any ADJACENT cell has its say.
|
|
@@ -1092,7 +693,13 @@ declare function selectionRects(layout: SemanticLayout, selection: SemanticSelec
|
|
|
1092
693
|
* it is wrong for every caret outside that story. A caller with no story in hand passes
|
|
1093
694
|
* {@link everyStoryOrder}.
|
|
1094
695
|
*/
|
|
1095
|
-
order: readonly string[]
|
|
696
|
+
order: readonly string[],
|
|
697
|
+
/**
|
|
698
|
+
* For EXACT edge x positions inside a span. Layout no longer publishes eager per-character
|
|
699
|
+
* caret edges, so without a measurer an intra-span boundary interpolates across the span's
|
|
700
|
+
* advance — visibly wrong in a proportional face. Pass the layout's measurer.
|
|
701
|
+
*/
|
|
702
|
+
measurer?: TextMeasurer): SelectionRect[];
|
|
1096
703
|
/** A model range to highlight, and the key the caller knows it by. */
|
|
1097
704
|
interface KeyedRange {
|
|
1098
705
|
readonly key: string;
|
|
@@ -1116,7 +723,9 @@ declare function keyedRangeRects(layout: SemanticLayout, ranges: readonly KeyedR
|
|
|
1116
723
|
* materialized pages is what keeps typing in a heavily reviewed document as fast as
|
|
1117
724
|
* typing in a clean one.
|
|
1118
725
|
*/
|
|
1119
|
-
pages?: ReadonlySet<number
|
|
726
|
+
pages?: ReadonlySet<number>,
|
|
727
|
+
/** For exact intra-span edge positions (see {@link selectionRects}). */
|
|
728
|
+
measurer?: TextMeasurer): Map<string, SelectionRect[]>;
|
|
1120
729
|
|
|
1121
730
|
/**
|
|
1122
731
|
* The next word boundary from `offset`, in `direction`.
|
|
@@ -1674,9 +1283,25 @@ interface LayoutNoteStoryOptions {
|
|
|
1674
1283
|
* paint to anchor and navigation to activate.
|
|
1675
1284
|
*/
|
|
1676
1285
|
readonly projectLink?: HyperlinkProjector;
|
|
1286
|
+
/**
|
|
1287
|
+
* Per-part projector, preferred over `projectLink` when `ownerPartName` names the part.
|
|
1288
|
+
*
|
|
1289
|
+
* A `w:hyperlink` in `/word/footnotes.xml` declares its `r:id` in `footnotes.xml.rels`,
|
|
1290
|
+
* so it must resolve there — the body projector answers from the body part's
|
|
1291
|
+
* relationships, and when the two parts assign one id to different targets the footnote
|
|
1292
|
+
* link navigated to the body's target. Same per-part rule pictures follow through
|
|
1293
|
+
* {@link drawingsForPart}.
|
|
1294
|
+
*/
|
|
1295
|
+
readonly projectLinkForPart?: (ownerPartName: string) => HyperlinkProjector | undefined;
|
|
1677
1296
|
readonly projectFieldLink?: FieldLinkProjector;
|
|
1678
1297
|
/** Document properties for a document-property field inside a note story. */
|
|
1679
1298
|
readonly documentProperties?: DocumentProperties;
|
|
1299
|
+
/**
|
|
1300
|
+
* The document's resolved REF inputs, so a footnote's cross-reference paints the live
|
|
1301
|
+
* value the body paints. The flow folds each paragraph's resolved values into its break
|
|
1302
|
+
* key, which is what repaints a note after a renumbering edit it cannot otherwise see.
|
|
1303
|
+
*/
|
|
1304
|
+
readonly refFields?: RefFieldContext;
|
|
1680
1305
|
/** Derived display marks for noteRef projection inside the note body. */
|
|
1681
1306
|
readonly noteMarks?: NoteMarkContext;
|
|
1682
1307
|
/**
|
|
@@ -1742,8 +1367,16 @@ declare function syntheticSeparatorBox(contentWidth: number, flowHeight: number)
|
|
|
1742
1367
|
/** Absolute separator box: short rule for marker/synthetic, full width for authored stories. */
|
|
1743
1368
|
declare function noteSeparatorAreaBox(separator: NoteSeparatorLayout, contentX: number, contentWidth: number, areaTop: number): LayoutBox;
|
|
1744
1369
|
|
|
1745
|
-
/**
|
|
1746
|
-
|
|
1370
|
+
/**
|
|
1371
|
+
* Bound on reflow attempts for an UNSEEDED document layout pass (cold open).
|
|
1372
|
+
*
|
|
1373
|
+
* Sized for a cold open of a reference-dense document: adoption is a forward fixed-point
|
|
1374
|
+
* iteration whose settled prefix extends a few pages per round, so a legal document with a
|
|
1375
|
+
* hundred footnotes converges in tens of rounds (a 53-page/108-note fixture took 24).
|
|
1376
|
+
* Orbits exit earlier through the fingerprint/envelope checks below, so the cap is a
|
|
1377
|
+
* safety bound, not the expected cost.
|
|
1378
|
+
*/
|
|
1379
|
+
declare const MAX_NOTE_REFLOW_ATTEMPTS = 64;
|
|
1747
1380
|
/** Cap on empty pages created solely to drain footnote/endnote overflow. */
|
|
1748
1381
|
declare const MAX_NOTE_OVERFLOW_PAGES = 256;
|
|
1749
1382
|
/**
|
|
@@ -1798,9 +1431,32 @@ interface NotesLayoutInput {
|
|
|
1798
1431
|
* sanitized record a body one does instead of painting dead text.
|
|
1799
1432
|
*/
|
|
1800
1433
|
readonly projectLink?: HyperlinkProjector;
|
|
1434
|
+
/**
|
|
1435
|
+
* Per notes-part link projector, preferred over `projectLink`: a `w:hyperlink` inside
|
|
1436
|
+
* `/word/footnotes.xml` or `/word/endnotes.xml` declares its `r:id` in that part's own
|
|
1437
|
+
* `.rels`, not the body part's. The surface supplies this; the inherited body projector
|
|
1438
|
+
* remains only a fallback for callers without per-part resolution.
|
|
1439
|
+
*/
|
|
1440
|
+
readonly projectLinkForPart?: (ownerPartName: string) => HyperlinkProjector | undefined;
|
|
1441
|
+
/**
|
|
1442
|
+
* Content token over the notes parts' relationship records, standing in for
|
|
1443
|
+
* {@link projectLinkForPart}'s closure in the notes-pass memo. The projector reads
|
|
1444
|
+
* relationship state the pinned part identity cannot see move: a replicated rels-only
|
|
1445
|
+
* change lands without splicing the notes part, so only a content token catches it.
|
|
1446
|
+
* Required whenever `projectLinkForPart` is supplied — without it the memo is disabled,
|
|
1447
|
+
* the same fail-closed rule `drawingsForPart` follows through `drawingLayoutEpoch`.
|
|
1448
|
+
*/
|
|
1449
|
+
readonly linkRelsEpoch?: string;
|
|
1801
1450
|
readonly projectFieldLink?: FieldLinkProjector;
|
|
1802
1451
|
/** Document properties for a document-property field inside a note story. */
|
|
1803
1452
|
readonly documentProperties?: DocumentProperties;
|
|
1453
|
+
/**
|
|
1454
|
+
* The document's resolved REF inputs, so a footnote's cross-reference paints the live
|
|
1455
|
+
* value the body paints. Normally injected by `semantic-layout` from the context it built
|
|
1456
|
+
* over the body and note stories; its values token joins the notes-pass fingerprint so a
|
|
1457
|
+
* renumbering edit repaints the notes that cite the renumbered target.
|
|
1458
|
+
*/
|
|
1459
|
+
readonly refFields?: RefFieldContext;
|
|
1804
1460
|
/**
|
|
1805
1461
|
* Inline drawing support per notes part. Absent means note paragraphs flow without
|
|
1806
1462
|
* drawing records, which is what a headless caller with no image port wants.
|
|
@@ -1867,7 +1523,14 @@ declare function filterRefsOnPage(page: PageRecord, allRefs: readonly PageRefHit
|
|
|
1867
1523
|
*/
|
|
1868
1524
|
declare function computeFootnoteReserves(layout: SemanticLayout, allRefs: readonly PageRefHit[], input: NotesLayoutInput, noteMarks: NoteMarkContext,
|
|
1869
1525
|
/** Session-carried notes memo (opaque; owned by this module). */
|
|
1870
|
-
passMemo?: unknown
|
|
1526
|
+
passMemo?: unknown,
|
|
1527
|
+
/**
|
|
1528
|
+
* The reserve map `layout` was laid under. Feeds the hold-out's observed-refusal test
|
|
1529
|
+
* (a block the body pass declined to split under a known budget only moves whole);
|
|
1530
|
+
* absent, the hold-out releases the ambiguous cases — a caller outside the reflow loop
|
|
1531
|
+
* must not manufacture holds the loop never observed.
|
|
1532
|
+
*/
|
|
1533
|
+
previousReserves?: ReadonlyMap<number, number>): {
|
|
1871
1534
|
readonly reserves: ReadonlyMap<number, number>;
|
|
1872
1535
|
readonly stable: boolean;
|
|
1873
1536
|
readonly reasons: readonly NotePaginationFallbackReason[];
|
|
@@ -2256,45 +1919,6 @@ declare function formatNumFmt(numFmt: string, value: number): string;
|
|
|
2256
1919
|
*/
|
|
2257
1920
|
declare function expandLvlText(lvlText: string, counters: readonly number[], formats: readonly string[]): string;
|
|
2258
1921
|
|
|
2259
|
-
/**
|
|
2260
|
-
* The result of counting ONE list paragraph: the level that applied, the counter vector after it,
|
|
2261
|
-
* and the marker text a reader sees.
|
|
2262
|
-
*
|
|
2263
|
-
* Counters are a vector across all nine levels, not a single number, because a deeper level
|
|
2264
|
-
* restarting resets the ones below it while leaving those above intact.
|
|
2265
|
-
*/
|
|
2266
|
-
interface ListCounterAdvance {
|
|
2267
|
-
/** Effective abstract numbering template for this num instance. */
|
|
2268
|
-
readonly abstractNumId: string;
|
|
2269
|
-
readonly numId: string;
|
|
2270
|
-
readonly ilvl: number;
|
|
2271
|
-
readonly level: NumberingLevel;
|
|
2272
|
-
/** Counter vector after this item was counted (indices 0..8). */
|
|
2273
|
-
readonly counters: readonly number[];
|
|
2274
|
-
/** Expanded marker text (empty when vanished / empty lvlText). */
|
|
2275
|
-
readonly markerText: string;
|
|
2276
|
-
}
|
|
2277
|
-
/**
|
|
2278
|
-
* The running counters for one layout pass over one story.
|
|
2279
|
-
*
|
|
2280
|
-
* Stateful and order-dependent by nature: a list number is a function of every numbered paragraph
|
|
2281
|
-
* before it, which is why markers are computed during layout and cannot be read off a paragraph
|
|
2282
|
-
* in isolation.
|
|
2283
|
-
*/
|
|
2284
|
-
interface ListCounterState {
|
|
2285
|
-
/**
|
|
2286
|
-
* Advance counters for one list paragraph.
|
|
2287
|
-
*
|
|
2288
|
-
* Returns null when the numbering definition cannot be resolved — callers treat the
|
|
2289
|
-
* paragraph as non-list (inert fallback).
|
|
2290
|
-
*/
|
|
2291
|
-
advance(numId: string, ilvl: number): ListCounterAdvance | null;
|
|
2292
|
-
}
|
|
2293
|
-
/**
|
|
2294
|
-
* Create a fresh counter bag for one story (body, or one header/footer part).
|
|
2295
|
-
*/
|
|
2296
|
-
declare function createListCounterState(index: NumberingIndex): ListCounterState;
|
|
2297
|
-
|
|
2298
1922
|
/**
|
|
2299
1923
|
* The stack used when a run names no font (or names one the sink refuses).
|
|
2300
1924
|
*
|
|
@@ -2405,6 +2029,42 @@ declare function tryCreateCanvasMeasurer(options?: CanvasMeasurerOptions): TextM
|
|
|
2405
2029
|
*/
|
|
2406
2030
|
declare function resolveDefaultSurfaceMeasurer(scale?: number, options?: CanvasMeasurerOptions): ResolvedSurfaceMeasurer;
|
|
2407
2031
|
|
|
2032
|
+
type RefreshFieldResultsOp = Extract<TreeDocOp, {
|
|
2033
|
+
op: 'refreshFieldResults';
|
|
2034
|
+
}>;
|
|
2035
|
+
|
|
2036
|
+
interface RefFieldRefreshOptions {
|
|
2037
|
+
/**
|
|
2038
|
+
* The package the part belongs to, for the note-part half of the resolution context —
|
|
2039
|
+
* the same context paint uses, so a body REF that targets a footnote bookmark computes
|
|
2040
|
+
* the same value both places. Absent narrows resolution to body-declared bookmarks.
|
|
2041
|
+
*/
|
|
2042
|
+
readonly package?: OoxmlPackage;
|
|
2043
|
+
readonly styleCascade?: StyleCascadeTable;
|
|
2044
|
+
readonly numberingIndex?: NumberingIndex;
|
|
2045
|
+
/** The mode the surface painted under, so the saved values match the painted ones. */
|
|
2046
|
+
readonly displayMode?: RevisionDisplayMode;
|
|
2047
|
+
/**
|
|
2048
|
+
* The DISPLAYED page number of one paragraph in the current finalized layout, or null when
|
|
2049
|
+
* it is not placed. PAGEREF results ride the plan through this: the value is pagination's,
|
|
2050
|
+
* so only a caller holding the laid-out pages can answer, and a plan without it keeps every
|
|
2051
|
+
* PAGEREF result as loaded. The same calibration verdict paint took gates each rewrite.
|
|
2052
|
+
*/
|
|
2053
|
+
readonly pageRefPageNumberOf?: (targetParagraphId: string) => string | null;
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* A {@link RefFieldRefreshOptions.pageRefPageNumberOf} source over one finalized layout.
|
|
2057
|
+
*
|
|
2058
|
+
* Builds the target → host-page index once, on first demand, and answers every field from
|
|
2059
|
+
* it — the same walk finalize substitution takes, so the saved number is the painted one.
|
|
2060
|
+
*/
|
|
2061
|
+
declare function pageRefPageNumbersFromLayout(layout: SemanticLayout): (targetParagraphId: string) => string | null;
|
|
2062
|
+
/**
|
|
2063
|
+
* Plan the refresh for one body part, or null when every supported REF result is already
|
|
2064
|
+
* fresh (the no-op save path — no transaction, no revision bump, no undo entry).
|
|
2065
|
+
*/
|
|
2066
|
+
declare function planRefFieldResultRefresh(part: OoxmlPart, options: RefFieldRefreshOptions): RefreshFieldResultsOp | null;
|
|
2067
|
+
|
|
2408
2068
|
/**
|
|
2409
2069
|
* The story's blocks — paragraphs and tables — in document order, flattening through
|
|
2410
2070
|
* block-level content-control wrappers under the shared nesting budget.
|
|
@@ -2873,4 +2533,4 @@ declare class TablePaginationError extends Error {
|
|
|
2873
2533
|
constructor(code: TablePaginationErrorCode, message: string);
|
|
2874
2534
|
}
|
|
2875
2535
|
|
|
2876
|
-
export { AUTO_PREFERRED_WIDTH, type
|
|
2536
|
+
export { AUTO_PREFERRED_WIDTH, type AutonumFieldKind, type AutonumFieldSpec, type BidiEmbeddingLevels, BlockFragmentRecord, CELL_PAD, COMPOUND_BORDER_MIN_GAP_PT, COMPOUND_BORDER_MIN_STROKE_PT, type CanvasMeasurerOptions, type CanvasTextContext, type CanvasTextMetrics, CellBorderBox, type CellMarginsPt, type CellVerticalAlign, type CompoundBorderMetrics, ContentControlBoundaryRecord$1 as ContentControlBoundaryRecord, type ContentControlFragmentRecord, ContentControlLock, DEFAULT_CANVAS_FONT_STACK, DEFAULT_CELL_MARGINS, 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, LineRecord, type ListCounterAdvance, type ListCounterState, MAX_EACH_PAGE_MARK_CANDIDATES, MAX_LVL_TEXT_LENGTH, MAX_MARKER_TEXT_LENGTH, MAX_NOTES_LAID_OUT, MAX_NOTE_FRAGMENTS, MAX_NOTE_OVERFLOW_PAGES, MAX_NOTE_REFLOW_ATTEMPTS, 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, NumberingIndex, NumberingLevel, type PageFurniture, PageGeometry, PageRecord, type PageRefIndex, ParagraphFragmentRecord, type ParagraphKeyInputs, type ParagraphLayoutCache, type ParagraphLayoutCacheOptions, type PreferredWidth, type PreferredWidthType, RefFieldContext, type RefFieldRefreshOptions, ResolvedListItem, type ResolvedSurfaceMeasurer, ReviewItem, type ReviewParagraphAnchor, RevisionAttribution, RevisionDisplayMode, type ScriptItem, SectionColumns, SelectionRect, SemanticLayout, type SemanticLayoutOptions, SemanticPosition, SemanticSelection, type SemanticTableCell, type SemanticTableRow, type SemanticTableStructure, ShapedRun, StyleCascadeTable, StyleSpanRecord, type TableAlignment, TableBorderBox, TableBorderSide, 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, buildPageRefIndex, 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, isWholeGraphemeHorizontalBoundary, itemizeScriptFontSlots, keyedRangeRects, layoutHeaderFooterStory, layoutNoteById, layoutNoteSeparator, layoutNoteStory, layoutSemanticDocument, lineAtPosition, linesOf, normalNotesOf, noteDisplayMarkMap, noteLineIdPrefix, noteMarkKey, noteSeparatorAreaBox, noteStoryBlocks, pageRefPageNumbersFromLayout, pagesToMaterialize, paragraphFragmentsOf, paragraphFragmentsOfBlocks, paragraphLayoutKey, paragraphMarkDeleted, paragraphShading, paragraphShadingBox, parseAutonumInstruction, planRefFieldResultRefresh, positionPastDeletion, projectedNoteMarkText, provisionalNoteMarks, readTableStructure, resetGraphemeBoundary, resolveDefaultSurfaceMeasurer, resolveDefaultWordBoundary, resolveOoxmlShadingFill, resolveStrictHexFill, reviewAnchorIndex, reviewItemGeometry, revisionRemovesParagraph, roundFontUnitToFixedPoint, segmentGraphemes, segmentWords, selectionRects, semanticHorizontalBoundaries, setGraphemeBoundary, setHarfBuzzWasmUrl, sha256FontBytes, shadingFillFromElement, shapedHorizontalBoundaries, storyBlocks, syntheticSeparatorBox, tableOriginX, tocFieldChromeParagraphIds, tryCreateCanvasMeasurer, unionLayoutBoxes, utf16OffsetToGrapheme, wordBoundary, wordSegmentsToGraphemeRecords };
|