@docx-editor.dev/core 2.21.1 → 2.23.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 +11 -5
- package/dist/automation.cjs +1 -1
- package/dist/automation.d.ts +13 -12
- package/dist/automation.js +1 -1
- package/dist/binding.cjs +1 -1
- package/dist/binding.d.ts +11 -10
- package/dist/binding.js +1 -1
- package/dist/chunk-4OAXZNBU.js +5 -0
- package/dist/chunk-6745I4XF.cjs +20 -0
- package/dist/chunk-6KA3L3FR.cjs +11 -0
- package/dist/chunk-6QS5WL63.js +1 -0
- package/dist/{chunk-E5OUYRNM.cjs → chunk-BUDXZ7T2.cjs} +5 -5
- package/dist/chunk-DYRXA5UJ.cjs +2 -0
- package/dist/chunk-DZOGUV7O.js +1 -0
- package/dist/chunk-EHT4LKKZ.cjs +1 -0
- package/dist/chunk-F5LAOPAD.js +20 -0
- package/dist/chunk-FWX535CS.cjs +1 -0
- package/dist/chunk-GRVRQBKU.js +1 -0
- package/dist/chunk-JN62FLHE.cjs +4 -0
- package/dist/{chunk-BF2TOG2V.js → chunk-KRBBWATQ.js} +1 -1
- package/dist/chunk-KV5HFE23.cjs +2 -0
- package/dist/{chunk-T5B4NMKF.cjs → chunk-PCPBDYEL.cjs} +1 -1
- package/dist/chunk-Q4RDWB3U.cjs +18 -0
- package/dist/{chunk-4TYA4RLP.cjs → chunk-QK23BSRK.cjs} +1 -1
- package/dist/chunk-QTFAXWVI.cjs +1 -0
- package/dist/chunk-RLO64PHP.cjs +1 -0
- package/dist/chunk-T7RGKBCE.cjs +5 -0
- package/dist/{chunk-FPDIJ4RF.js → chunk-UMBHUW6R.js} +1 -1
- package/dist/chunk-VE6H5EJA.js +5 -0
- package/dist/chunk-WHG23WNI.js +1 -0
- package/dist/chunk-XBYZTDF7.js +4 -0
- package/dist/chunk-XRBPZCNK.js +11 -0
- package/dist/chunk-Y5JCIWTF.js +2 -0
- package/dist/chunk-ZA6HEWUM.js +2 -0
- package/dist/chunk-ZCRSPN4Q.js +18 -0
- package/dist/collaboration/replication.cjs +1 -1
- package/dist/collaboration/replication.d.ts +6 -5
- package/dist/collaboration/replication.js +1 -1
- package/dist/collaboration.d.ts +7 -6
- package/dist/contracts/document.d.ts +4 -3
- package/dist/contracts/editor.d.ts +9 -9
- package/dist/contracts/interaction.d.ts +2 -1
- package/dist/contracts/modules.d.ts +9 -8
- package/dist/contracts/types.d.ts +1 -1
- package/dist/{custom-node-writes-CncR6KfC.d.ts → custom-node-writes-77rvPW2-.d.ts} +4 -3
- package/dist/{document-protection-DM6mA8Rf.d.ts → document-protection-CYIjO-li.d.ts} +3 -2
- package/dist/{editor-BRh7GuZF.d.ts → editor-DhUQsWWH.d.ts} +179 -52
- package/dist/editor.cjs +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.d.ts +181 -28
- package/dist/editor.js +1 -1
- package/dist/export.cjs +2 -2
- package/dist/export.d.ts +36 -18
- package/dist/export.js +2 -2
- package/dist/{failure-DNNmwsgD.d.ts → failure-BIPVQbRm.d.ts} +2 -1
- package/dist/{font-resolver-DwuQYj3P.d.ts → font-resolver-BwoHFBlr.d.ts} +3 -2
- package/dist/{headless-document-view-C3fc_jV0.d.ts → headless-document-view-Cc3fFWhv.d.ts} +4 -3
- package/dist/{image-resources-DxF-SN_8.d.ts → image-resources-DkuzBnTM.d.ts} +3 -2
- package/dist/{index-3pNnG4z4.d.ts → index-BYaCkGKO.d.ts} +179 -26
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +18 -18
- package/dist/index.js +1 -1
- package/dist/{layout-shaping-_GGjhhVc.d.ts → layout-shaping-DpWQG26a.d.ts} +7 -3
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +473 -64
- package/dist/layout.js +1 -1
- package/dist/{note-properties-CjT31AuP.d.ts → note-properties-DMfKK3QU.d.ts} +3 -2
- package/dist/{omml-equation-Bk3OP1fv.d.ts → omml-equation-BY7OdfGY.d.ts} +3 -2
- package/dist/output.cjs +1 -1
- package/dist/output.d.ts +9 -8
- package/dist/output.js +1 -1
- package/dist/{protocol-CrbTIW2Z.d.ts → protocol-CPAakntQ.d.ts} +4 -3
- package/dist/{review-paragraph-order-D3KZohIL.d.ts → review-paragraph-order-B0BP_wJP.d.ts} +1 -1
- package/dist/{revision-projection-kVd7p6Wd.d.ts → revision-projection-CVJeA2jp.d.ts} +3 -2
- package/dist/{semantic-cell-selection-CkSsZHDL.d.ts → semantic-cell-selection-B8GF_H2e.d.ts} +10 -6
- package/dist/{semantic-interaction-Z2Xa68U5.d.ts → semantic-interaction-DQjtIruQ.d.ts} +3 -2
- package/dist/{semantic-paint-BHKprI9P.d.ts → semantic-paint-DoPl85nR.d.ts} +4 -3
- package/dist/{semantic-records-StH-AnHK.d.ts → semantic-records-DB0VgWsr.d.ts} +1125 -1039
- package/dist/store.cjs +1 -1
- package/dist/store.d.ts +17 -16
- package/dist/store.js +1 -1
- package/dist/{tree-package-fragment-CpEV1gl3.d.ts → tree-package-fragment-BIyGh6L8.d.ts} +4 -3
- package/dist/{tree-session-contract-CTT9nM7Z.d.ts → tree-session-contract-CHcCnz3W.d.ts} +7 -6
- package/dist/{types-barrel-PwcfEkaX.d.ts → types-barrel-DN_-gaRX.d.ts} +72 -5
- package/package.json +3 -3
- package/dist/chunk-25OQBAKA.js +0 -2
- package/dist/chunk-3B3DQMSL.js +0 -11
- package/dist/chunk-3P3DNJYM.js +0 -5
- package/dist/chunk-3PA64KPK.js +0 -5
- package/dist/chunk-7N77EN2Z.cjs +0 -2
- package/dist/chunk-AGWWNVIJ.cjs +0 -1
- package/dist/chunk-DFTVN25X.cjs +0 -5
- package/dist/chunk-DGONGMAV.js +0 -2
- package/dist/chunk-DZYKU2HG.js +0 -1
- package/dist/chunk-F4H3LC6M.cjs +0 -2
- package/dist/chunk-FGBADUSK.cjs +0 -1
- package/dist/chunk-IUTTOBQW.cjs +0 -20
- package/dist/chunk-IYCXQAFT.cjs +0 -4
- package/dist/chunk-JL3SI5SZ.js +0 -18
- package/dist/chunk-OFWUHH52.js +0 -20
- package/dist/chunk-OKY6JRJL.js +0 -4
- package/dist/chunk-P24FHMQW.cjs +0 -1
- package/dist/chunk-QBKAOSVF.cjs +0 -18
- package/dist/chunk-RA2TDTEQ.cjs +0 -1
- package/dist/chunk-U5GUJKTS.js +0 -1
- package/dist/chunk-VP7SDFCM.js +0 -1
- package/dist/chunk-XRYSPKKC.js +0 -1
- package/dist/chunk-ZZRCVDQU.cjs +0 -11
package/dist/layout.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
export { C as CacheLookup, b as CacheMiss, c as CacheProvenance, e as LayoutEnvironmentShapedMeasurerOptions, f as LayoutFontConfiguration, g as LayoutFontSource, h as LayoutFontSubstitution, i as LayoutShapingConfigurationError, j as LayoutShapingEnvironment, L as LayoutShapingInstrumentation, a as LayoutShapingOptions, O as OperationSnapshot, k as OperationSnapshotField, l as OperationSnapshotGuard, P as PreparedLayoutFontConfiguration, R as ResolvedCache, m as ResourceDependencyProvenance, S as ShapedMeasurerOptions, n as captureOperationSnapshot, o as createLayoutShapedMeasurer, p as createLayoutShaping, q as createShapedMeasurer, d as disposeLayoutShaping, r as guardOperationSnapshot, s as layoutFontConfigurationFingerprint, t as prepareLayoutFontConfiguration } from './layout-shaping-
|
|
4
|
-
import { aC as ImpactClass,
|
|
5
|
-
export { a_ as CommentAnchor, a$ as CommentPosition, C as CommentRecord, aV as CommentThreadState, aH as DrawingAccessibility,
|
|
6
|
-
import { H as HeadlessDocumentView, D as DocumentProperties, r as relationshipTargetIn } from './headless-document-view-
|
|
7
|
-
import { c as RevisionAttribution, a as RevisionDisplayMode, b as RevisionAuthorFilter } from './revision-projection-
|
|
8
|
-
export { D as DEFAULT_REVISION_DISPLAY_MODE, d as RevisionFilter, e as RevisionKind, f as formatRevisionOf, m as markRevisionRemovesMark, p as paragraphMarkFormatRevisionOf, g as paragraphMarkRevisionOf, h as paragraphMarkRevisionsOf, r as revisionAuthorFilter, i as revisionsAreDeletion, j as revisionsVisible, s as shownMarkRevision } from './revision-projection-
|
|
9
|
-
import { b as ResolvedFootnoteProperties, R as ResolvedEndnoteProperties } from './note-properties-
|
|
10
|
-
import { c as TreeModelChange, N as NoteKind, az as noteTypeOf } from './tree-package-fragment-
|
|
11
|
-
import { a as SectionColumns } from './semantic-cell-selection-
|
|
12
|
-
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 projectedSectionSourceIndexes, J as readSectionProperties, K as spanOffsetX, L as spansInCells, N as tableContextAt } from './semantic-cell-selection-
|
|
13
|
-
export { M as MAX_SDT_NESTING, c as collectFlowBlocks, a as commentBodyText, b as commentInitials, j as contentControlContentChildren, i as isContentControl, f as isContentControlContent, p as paragraphOrderOfPart } from './review-paragraph-order-
|
|
14
|
-
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-
|
|
15
|
-
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-
|
|
16
|
-
import './image-resources-
|
|
17
|
-
import './omml-equation-
|
|
1
|
+
import { n as NumberingLevel, o as NumberingIndex, S as SemanticLayout, p as ParagraphFragmentRecord, q as LayoutBox, D as DrawingPoint, r as DrawingInsets, a as StyleSpanRecord, I as InlineDrawingRecord, M as ModelRange, s as TableBorderSide, B as BlockFragmentRecord, A as AnchoredDrawingRecord, t as PageRecord, u as ResolvedListItem, v as CellBorderBox, w as TableCellStyleFormatting, x as TableFloatPosition, y as TableBorderBox, z as StyleCascadeTable, L as LineRecord, E as NoteAreaRecord, H as HeaderFooterStoryRecord, G as NoteStoryRecord, C as ContentControlBoundaryRecord$1, J as ContentControlLock, T as TextMeasurer, V as VersionedShapingLibrary, f as TextShaper, K as FontByteValidator, h as FixedPointRoundingMode, O as FixedPoint, m as ShapedRun, Q as SourceRange, U as HyperlinkProjector, W as InlineDrawingLayoutContext, X as FieldLinkProjector, Y as StoryPageFieldNeeds, Z as RefFieldContext, _ as HyperlinkFieldSpec, $ as SpanLinkRecord, P as PageGeometry, b as SectionPageBorders, a0 as PageBorderFrameRecord, a1 as ParagraphBorderStrokeRecord, a2 as StrikeoutStrokePt } from './semantic-records-DB0VgWsr.js';
|
|
2
|
+
export { a3 as AUTO_PARAGRAPH_SPACING_PT, a4 as AbstractNumDefinition, a5 as AnchoredDrawingLayoutFallback, a6 as BidiEmbeddingLevels, a7 as BorderGridGeometry, a8 as CascadedParagraphFormatting, a9 as CjkTypographySettings, aa as ContentControlGeometryFragment, ab as ContentControlLevel, ac as ContentControlMappedType, ad as DEFAULT_PAGE_GEOMETRY, ae as DEFAULT_RUN_STYLE, af as DEFAULT_TAB_INTERVAL_PT, ag as DEFAULT_TAB_INTERVAL_TWIPS, ah as DeclaredFontSubstitution, ai as DrawingClipFallback, aj as DrawingGeometry, ak as DrawingGroupPictureRecord, al as EMPTY_NUMBERING_INDEX, am as EMPTY_TAB_STOPS, an as EquationFractionGeometry, ao as EquationGeometry, ap as EquationNaryGeometry, aq as EquationRadicalGeometry, ar as EquationRowGeometry, as as EquationScriptGeometry, at as EquationSpanRecord, au as EquationTextGeometry, av as FieldAtomMarker, aw as FontFingerprintInputs, i as FontRequest, ax as FontResolutionError, ay as FontResolutionErrorCode, az as FontResourceDefinition, aA as FontResourceInstrumentation, F as FontResourceSnapshot, aB as FontResourceSnapshotOptions, aC as FontSlot, l as FontSubstitution, aD as FontValidationResult, aE as GlyphOutline, aF as HARD_MAX_AGGREGATE_FONT_BYTES, aG as HARD_MAX_FONT_BYTES, aH as HARD_MAX_FONT_SOURCES, aI as LevelOverride, aJ as LineSpacingRule, aK as ListMarkerAlign, k as ListMarkerPictureRecord, aL as ListMarkerRecord, aM as ListSuffix, aN as MAX_BORDER_SPACE_PT, aO as MAX_BORDER_WIDTH_PT, aP as MAX_LVL_OVERRIDES, aQ as MAX_NUMBERING_DEFINITIONS, aR as MAX_PARAGRAPH_SPACING_PT, aS as MAX_SHAPING_CONTEXT, aT as MAX_STYLE_DEFINITIONS, aU as MAX_TABLE_BORDER_STROKES, aV as MAX_TAB_POSITION_TWIPS, aW as MAX_TAB_STOPS, N as NormalizationPolicy, aX as NumDefinition, aY as NumberingLevelIndent, aZ as NumberingPictureBullet, a_ as PAGE_BORDER_SIDES, a$ as PARAGRAPH_BORDER_SIDES, b0 as PageBorderDisplay, b1 as PageBorderOffsetFrom, b2 as PageBorderSide, b3 as PageBorderStrokeRecord, b4 as PageBorderZOrder, b5 as PageRefCalibrationCell, b6 as PageRefFieldProjection, b7 as ParagraphAutoSpacingContext, b8 as ParagraphBorderEdge, b9 as ParagraphBorderSide, ba as ParagraphBorders, bb as ParagraphBottomBorderRecord, bc as ParagraphIndent, bd as ParagraphLayoutInputs, be as ParagraphLineSpacing, bf as ParagraphSpacing, bg as RefFieldSpec, bh as RefNoteParts, bi as ResolvedCellBorders, g as ResolvedFont, bj as ResolvedPictureBullet, R as ResolvedRunStyle, bk as ResolvedTabStops, bl as ResolvedTableBorderEdge, bm as ResolvedTableBorderEdgeSegment, bn as ResolvedUnderline, bo as SINGLE_LINE_SPACING, bp as ScriptItem, bq as SemanticArtifactRootStoryKind, br as SemanticArtifactStoryKind, bs as SemanticCommentArtifactRecord, bt as SemanticReviewArtifactOccurrence, bu as SemanticReviewArtifactOccurrenceGeometry, bv as SemanticReviewArtifactPosition, j as SemanticReviewArtifactRecord, bw as SemanticReviewArtifactSource, bx as SemanticTrackedChangeArtifactRecord, by as ShapeInput, bz as ShapedCluster, bA as ShapedFontSpan, bB as ShapedGlyph, bC as ShapedRunComparatorInputs, bD as ShapedVerticalMetrics, bE as ShapingContext, bF as ShapingEnvironment, bG as ShapingEnvironmentFingerprintInputs, e as ShapingEnvironmentInput, bH as StyleDefinition, bI as TAB_LEADER_GLYPH, bJ as TabAlignment, bK as TabDestination, bL as TabLeader, bM as TabStop, bN as TableBorderSideName, bO as TableBorderStrokeRecord, d as TableCellFragmentRecord, bP as TableFragmentRecord, c as TableRowFragmentRecord, bQ as TextDirection, bR as TextboxStoryFallbackReason, bS as TextboxStoryLayout, bT as UnsupportedScriptError, bU as VerticalAlign, bV as appliedSpaceBefore, bW as applyLineSpacing, bX as baselineShiftPtOf, bY as borderExtentPt, bZ as borderWeight, b_ as bottomBorderExtentPt, b$ as boundedStructuralFontValidator, c0 as buildNumberingIndex, c1 as buildStyleCascadeTable, c2 as cascadeParagraphFormatting, c3 as cascadeRunProperties, c4 as cascadedBottomBorder, c5 as cascadedParagraphBorders, c6 as cascadedTabStops, c7 as collapsedSpaceBefore, c8 as createFontResourceSnapshot, c9 as createShapedRun, ca as createShapingEnvironment, cb as defaultTabIntervalFromSettings, cc as displayText, cd as fixedPoint, ce as fontRequestKey, cf as glyphSizeFactorOf, cg as isValidStyleId, ch as itemizeScriptFontSlots, ci as layoutEquation, cj as measureDisplayText, ck as mergeListIndent, cl as nextTabDestination, cm as pageBordersFingerprint, cn as paragraphBorderExtentPt, co as paragraphBorderStrokeWidthPt, cp as paragraphBorders, cq as paragraphBordersFingerprint, cr as paragraphBreaksBefore, cs as paragraphContextualSpacing, ct as paragraphLineSpacing, cu as paragraphSpacing, cv as paragraphTabStops, cw as parsePageBorders, cx as parseRefInstruction, cy as readBorderSide, cz as readCellBorders, cA as readNumPr, cB as readTableBorders, cC as resolveBorderConflict, cD as resolveNumberingLevel, cE as resolveParagraphLayoutInputs, cF as resolveRunStyle, cG as resolveStoryListItems, cH as resolveStoryRefFields, cI as resolveTableCellBorderGrid, cJ as runStylesEqual, cK as shapedRunComparatorInputs, cL as shapingEnvironmentFingerprint, cM as shapingEnvironmentFingerprintInputs, cN as styleForFontSlot, cO as tabAdvanceWidth, cP as tabStopsFingerprint, cQ as walkStoryParagraphs, cR as withDefaultTabInterval, cS as withNumberingStyleLinks, cT as withResolvedListItems } from './semantic-records-DB0VgWsr.js';
|
|
3
|
+
export { C as CacheLookup, b as CacheMiss, c as CacheProvenance, e as LayoutEnvironmentShapedMeasurerOptions, f as LayoutFontConfiguration, g as LayoutFontSource, h as LayoutFontSubstitution, i as LayoutShapingConfigurationError, j as LayoutShapingEnvironment, L as LayoutShapingInstrumentation, a as LayoutShapingOptions, O as OperationSnapshot, k as OperationSnapshotField, l as OperationSnapshotGuard, P as PreparedLayoutFontConfiguration, R as ResolvedCache, m as ResourceDependencyProvenance, S as ShapedMeasurerOptions, n as captureOperationSnapshot, o as createLayoutShapedMeasurer, p as createLayoutShaping, q as createShapedMeasurer, d as disposeLayoutShaping, r as guardOperationSnapshot, s as layoutFontConfigurationFingerprint, t as prepareLayoutFontConfiguration } from './layout-shaping-DpWQG26a.js';
|
|
4
|
+
import { aC as ImpactClass, N as OoxmlNode, a0 as OoxmlProperty, a1 as OoxmlElement, O as OoxmlPart, W as TreeDocOp, Q as OoxmlPackage, b6 as ContentControlKind, b7 as ContentControlLevel, b9 as ContentControlLock$1, b3 as ContentControlDataBinding, a as ReviewItem } from './types-barrel-DN_-gaRX.js';
|
|
5
|
+
export { a_ as CommentAnchor, a$ as CommentPosition, C as CommentRecord, aV as CommentThreadState, aH as DrawingAccessibility, aj as DrawingHorizontalReferenceFrame, aI as DrawingImageEffects, aJ as DrawingTransform, ak as DrawingVerticalReferenceFrame, aa as ImageWrapTarget, c as ReviewCommentItem, d as ReviewCustomItem, R as ReviewModelInput, e as ReviewPosition, f as ReviewRange, b as ReviewRevisionItem, g as ReviewRevisionKind, a8 as SourceCrop, aG as TableBorderStyle, dx as VectorShapeComponent, aK as VectorShapeProjection, cp as W15_NAMESPACE_URI, dy as activeReviewItem, cT as firstReviewRange, dn as reviewItemKey, dz as reviewItemPositionRank, dp as reviewItemRanges, dA as reviewItemsAt, dB as reviewThreadRootOf } from './types-barrel-DN_-gaRX.js';
|
|
6
|
+
import { H as HeadlessDocumentView, D as DocumentProperties, r as relationshipTargetIn } from './headless-document-view-Cc3fFWhv.js';
|
|
7
|
+
import { c as RevisionAttribution, a as RevisionDisplayMode, b as RevisionAuthorFilter } from './revision-projection-CVJeA2jp.js';
|
|
8
|
+
export { D as DEFAULT_REVISION_DISPLAY_MODE, d as RevisionFilter, e as RevisionKind, f as formatRevisionOf, m as markRevisionRemovesMark, p as paragraphMarkFormatRevisionOf, g as paragraphMarkRevisionOf, h as paragraphMarkRevisionsOf, r as revisionAuthorFilter, i as revisionsAreDeletion, j as revisionsVisible, s as shownMarkRevision } from './revision-projection-CVJeA2jp.js';
|
|
9
|
+
import { b as ResolvedFootnoteProperties, R as ResolvedEndnoteProperties } from './note-properties-DMfKK3QU.js';
|
|
10
|
+
import { c as TreeModelChange, N as NoteKind, az as noteTypeOf } from './tree-package-fragment-BIyGh6L8.js';
|
|
11
|
+
import { a as SectionColumns } from './semantic-cell-selection-B8GF_H2e.js';
|
|
12
|
+
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 projectedSectionSourceIndexes, J as readSectionProperties, K as spanOffsetX, L as spansInCells, N as tableContextAt } from './semantic-cell-selection-B8GF_H2e.js';
|
|
13
|
+
export { M as MAX_SDT_NESTING, c as collectFlowBlocks, a as commentBodyText, b as commentInitials, j as contentControlContentChildren, i as isContentControl, f as isContentControlContent, p as paragraphOrderOfPart } from './review-paragraph-order-B0BP_wJP.js';
|
|
14
|
+
import { S as SemanticPosition, b as SelectionRect, a as SemanticSelection } from './semantic-interaction-DQjtIruQ.js';
|
|
15
|
+
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-DQjtIruQ.js';
|
|
16
|
+
import './image-resources-DkuzBnTM.js';
|
|
17
|
+
import './omml-equation-BY7OdfGY.js';
|
|
18
18
|
import './editor-scope-OHPwVQ5l.js';
|
|
19
19
|
|
|
20
20
|
/**
|
|
@@ -56,6 +56,9 @@ interface ListCounterState {
|
|
|
56
56
|
*/
|
|
57
57
|
declare function createListCounterState(index: NumberingIndex): ListCounterState;
|
|
58
58
|
|
|
59
|
+
/** Synchronous platform-neutral SHA-256 used before font bytes cross into a shaping implementation. */
|
|
60
|
+
declare const sha256FontBytes: (bytes: Uint8Array) => string;
|
|
61
|
+
|
|
59
62
|
/**
|
|
60
63
|
* What a batch of commits can affect.
|
|
61
64
|
*
|
|
@@ -165,6 +168,8 @@ interface PendingPositionedTableTokens {
|
|
|
165
168
|
|
|
166
169
|
/** Numeric, auto-height text frames. Other frame variants retain ordinary flow. */
|
|
167
170
|
interface ParagraphFrame {
|
|
171
|
+
/** Explicit-size drop cap aligned against this many lines of its anchor paragraph. */
|
|
172
|
+
readonly dropCapLines?: number;
|
|
168
173
|
readonly x: number;
|
|
169
174
|
readonly y: number;
|
|
170
175
|
readonly width: number;
|
|
@@ -191,42 +196,29 @@ interface PendingParagraphFrames {
|
|
|
191
196
|
readonly signature: string;
|
|
192
197
|
}
|
|
193
198
|
|
|
194
|
-
/** Synchronous platform-neutral SHA-256 used before font bytes cross into a shaping implementation. */
|
|
195
|
-
declare const sha256FontBytes: (bytes: Uint8Array) => string;
|
|
196
|
-
|
|
197
|
-
type AutonumFieldKind = 'AUTONUM' | 'AUTONUMLGL' | 'AUTONUMOUT';
|
|
198
|
-
/** One recognized AUTONUM-family instruction: the kind and its supported switches. */
|
|
199
|
-
interface AutonumFieldSpec {
|
|
200
|
-
readonly kind: AutonumFieldKind;
|
|
201
|
-
/** ST_NumberFormat resolved from the `\*` switch; null paints decimal. */
|
|
202
|
-
readonly numFmt: string | null;
|
|
203
|
-
/** `\e`: display the number without its trailing period. */
|
|
204
|
-
readonly suppressPeriod: boolean;
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Recognize `AUTONUM | AUTONUMLGL | AUTONUMOUT [\* <format>] [\e] [\* MERGEFORMAT]`, or null
|
|
208
|
-
* for anything else. Any unrecognized switch fails the parse so the field stays inert (paints
|
|
209
|
-
* nothing — its historical rendering), never the raw instruction, never a guessed number.
|
|
210
|
-
*/
|
|
211
|
-
declare function parseAutonumInstruction(raw: string): AutonumFieldSpec | null;
|
|
212
|
-
|
|
213
199
|
/**
|
|
214
200
|
* Page-field evaluation context for furniture projection.
|
|
215
201
|
*
|
|
216
202
|
* `pageNumber` is the displayed PAGE value after section `w:pgNumType/@w:start` (1-based).
|
|
217
203
|
* `pageCount` is document NUMPAGES. `sectionPageCount` is SECTIONPAGES for the attached
|
|
218
|
-
* section. `format` is the authored `w:pgNumType/@w:fmt` applied only to PAGE.
|
|
204
|
+
* section. `format` is the authored `w:pgNumType/@w:fmt` applied only to PAGE. `sheetNumber` is
|
|
205
|
+
* the 1-based physical sheet, which a restart does not renumber: it decides which margin an
|
|
206
|
+
* `inside` or `outside` header frame takes.
|
|
219
207
|
*
|
|
220
208
|
* A new field here must also join `sameFieldPageContext` below, or finalize compares two
|
|
221
209
|
* contexts that differ in it as equal and keeps a reused story's stale text.
|
|
222
210
|
*/
|
|
223
211
|
interface FieldPageContext {
|
|
212
|
+
/** Local character-style results for one physical page. @internal */
|
|
213
|
+
readonly characterStyleValues?: ReadonlyMap<string, string>;
|
|
224
214
|
readonly pageNumber: number;
|
|
225
215
|
readonly pageCount: number;
|
|
226
216
|
/** SECTIONPAGES; defaults to `pageCount` when omitted (single-section callers). */
|
|
227
217
|
readonly sectionPageCount?: number;
|
|
228
218
|
/** Authored ST_NumberFormat for PAGE; absent → decimal. */
|
|
229
219
|
readonly format?: string;
|
|
220
|
+
/** 1-based physical sheet; absent → `pageNumber` (single-section callers). */
|
|
221
|
+
readonly sheetNumber?: number;
|
|
230
222
|
}
|
|
231
223
|
/**
|
|
232
224
|
* Format a displayed PAGE value through the shared ST_NumberFormat resolver.
|
|
@@ -237,6 +229,22 @@ interface FieldPageContext {
|
|
|
237
229
|
*/
|
|
238
230
|
declare function formatPageNumber(value: number, format: string | undefined): string;
|
|
239
231
|
|
|
232
|
+
type AutonumFieldKind = 'AUTONUM' | 'AUTONUMLGL' | 'AUTONUMOUT';
|
|
233
|
+
/** One recognized AUTONUM-family instruction: the kind and its supported switches. */
|
|
234
|
+
interface AutonumFieldSpec {
|
|
235
|
+
readonly kind: AutonumFieldKind;
|
|
236
|
+
/** ST_NumberFormat resolved from the `\*` switch; null paints decimal. */
|
|
237
|
+
readonly numFmt: string | null;
|
|
238
|
+
/** `\e`: display the number without its trailing period. */
|
|
239
|
+
readonly suppressPeriod: boolean;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Recognize `AUTONUM | AUTONUMLGL | AUTONUMOUT [\* <format>] [\e] [\* MERGEFORMAT]`, or null
|
|
243
|
+
* for anything else. Any unrecognized switch fails the parse so the field stays inert (paints
|
|
244
|
+
* nothing — its historical rendering), never the raw instruction, never a guessed number.
|
|
245
|
+
*/
|
|
246
|
+
declare function parseAutonumInstruction(raw: string): AutonumFieldSpec | null;
|
|
247
|
+
|
|
240
248
|
/**
|
|
241
249
|
* Lookup of derived display marks keyed by {@link formatNoteScopeId}.
|
|
242
250
|
*
|
|
@@ -267,6 +275,8 @@ interface NoteMarkContext {
|
|
|
267
275
|
* inherit identity from the enclosing note via this key.
|
|
268
276
|
*/
|
|
269
277
|
readonly activeNoteKey?: string;
|
|
278
|
+
/** Project separator markers as inline rules inside their authored stories. */
|
|
279
|
+
readonly measureSeparatorMarkers?: true;
|
|
270
280
|
}
|
|
271
281
|
/**
|
|
272
282
|
* The key one note's mark is stored under — `footnote:N` / `endnote:N`.
|
|
@@ -282,6 +292,7 @@ declare function noteMarkKey(noteKind: NoteKind, noteId: number): string;
|
|
|
282
292
|
*/
|
|
283
293
|
type NoteNavDirection = 'to-note' | 'to-body';
|
|
284
294
|
interface ProjectedNoteMark {
|
|
295
|
+
readonly noteSeparator?: 'separator' | 'continuationSeparator';
|
|
285
296
|
readonly text: string;
|
|
286
297
|
readonly measureText?: string;
|
|
287
298
|
readonly projected: boolean;
|
|
@@ -437,12 +448,22 @@ interface WrapExclusionInput {
|
|
|
437
448
|
/** Paint layer relative to body text — not the OOXML wrap element. */
|
|
438
449
|
type DrawingPaintLayer = 'behind' | 'inFront';
|
|
439
450
|
interface ExclusionZone {
|
|
440
|
-
/**
|
|
441
|
-
readonly sourceKind?: 'table' | 'frame';
|
|
451
|
+
/** Objects outside body drawing flow publish their exclusion directly instead of synthesizing it. */
|
|
452
|
+
readonly sourceKind?: 'table' | 'frame' | 'furniture';
|
|
442
453
|
readonly drawingNodeId: string;
|
|
443
454
|
readonly anchorParagraphId: string;
|
|
444
455
|
/** UTF-16 model offset of the anchor atom — exclusions apply at/after this point in the paragraph. */
|
|
445
456
|
readonly anchorModelStart: number;
|
|
457
|
+
/**
|
|
458
|
+
* The band's vertical position is resolved against the page or a margin, not against the
|
|
459
|
+
* anchor's own flow position, so it cannot move when the text beside it reflows.
|
|
460
|
+
*
|
|
461
|
+
* Such a band excludes every line it crosses on its page, including lines that PRECEDE the
|
|
462
|
+
* anchor — a picture pinned to the top of the margin wraps the paragraphs above its anchor
|
|
463
|
+
* exactly as it wraps the ones below. Flow-relative bands (`paragraph`, `line`) stay
|
|
464
|
+
* forward-only: reaching back would move the anchor that positions them.
|
|
465
|
+
*/
|
|
466
|
+
readonly pageFramedBand?: boolean;
|
|
446
467
|
readonly sourceOrder: number;
|
|
447
468
|
readonly paintLayer: DrawingPaintLayer;
|
|
448
469
|
readonly relativeHeight: number;
|
|
@@ -484,10 +505,36 @@ interface PendingLine {
|
|
|
484
505
|
columnBreakAfter?: boolean;
|
|
485
506
|
/** An authored line break (`w:br` textWrapping or `w:cr`), never an automatic wrap. */
|
|
486
507
|
manualBreakAfter?: true;
|
|
508
|
+
/**
|
|
509
|
+
* The flow kept the paragraph's last word on this line by borrowing inter-word space.
|
|
510
|
+
* Alignment compresses a paragraph's last line only when this is set, never for another
|
|
511
|
+
* overflow such as hanging punctuation.
|
|
512
|
+
*/
|
|
513
|
+
spaceShrink?: true;
|
|
487
514
|
/** Model ranges on this line covering deleted content; see {@link LineRecord.deletedRanges}. */
|
|
488
515
|
deletedRanges?: readonly ModelRange[];
|
|
489
516
|
/** Vertical gap inserted before this line to clear a drawing exclusion band. */
|
|
490
517
|
exclusionSkipBefore?: number;
|
|
518
|
+
/**
|
|
519
|
+
* The first-line offset this line was broken with: the paragraph's first line, and the
|
|
520
|
+
* first line after page breaks that open it ({@link holdsOnlyPageBreak}). Absent when zero.
|
|
521
|
+
*/
|
|
522
|
+
firstLineOffset?: number;
|
|
523
|
+
/**
|
|
524
|
+
* The horizontal passage a float left this line, when that passage is narrower than the
|
|
525
|
+
* paragraph's measure and holds the whole line.
|
|
526
|
+
*
|
|
527
|
+
* `start` is where the line's content begins (after any first-line indent) and `end` is the
|
|
528
|
+
* passage's right edge, both in paragraph-local coordinates. Centring, right alignment and
|
|
529
|
+
* justification align INSIDE this passage: Word centres a heading between the two pictures
|
|
530
|
+
* beside it, not between the page margins, and stretches a justified line to the float's
|
|
531
|
+
* near edge rather than through it. Absent when no float shortens the line, when the line
|
|
532
|
+
* steps over a float into a later passage, or when the passage is the whole measure.
|
|
533
|
+
*/
|
|
534
|
+
wrapSegment?: {
|
|
535
|
+
readonly start: number;
|
|
536
|
+
readonly end: number;
|
|
537
|
+
};
|
|
491
538
|
/** Tracked anchored-drawing attributions on this line; see {@link LineRecord.anchorRevisions}. */
|
|
492
539
|
anchorRevisions?: readonly RevisionAttribution[];
|
|
493
540
|
/** Revisions a resolved view answered on this line; see {@link LineRecord.changeSites}. */
|
|
@@ -508,14 +555,14 @@ declare function effectiveBorderSide(authored: TableBorderSide, tableSide: Table
|
|
|
508
555
|
}): TableBorderSide;
|
|
509
556
|
|
|
510
557
|
/** Minimum stroke width for a compound (double/triple) band, in points. */
|
|
511
|
-
declare const COMPOUND_BORDER_MIN_STROKE_PT =
|
|
558
|
+
declare const COMPOUND_BORDER_MIN_STROKE_PT = 0.25;
|
|
512
559
|
/** Minimum gap between compound strokes, in points. */
|
|
513
|
-
declare const COMPOUND_BORDER_MIN_GAP_PT =
|
|
560
|
+
declare const COMPOUND_BORDER_MIN_GAP_PT = 0.25;
|
|
514
561
|
/**
|
|
515
562
|
* How a multi-line border style (double, triple) is drawn: stroke width, gap, and total extent.
|
|
516
563
|
*
|
|
517
|
-
*
|
|
518
|
-
*
|
|
564
|
+
* Table stroke coordinates centre the painted band on the authored edge box.
|
|
565
|
+
* Content insets must also account for the portion that extends inward.
|
|
519
566
|
*/
|
|
520
567
|
interface CompoundBorderMetrics {
|
|
521
568
|
readonly strokePt: number;
|
|
@@ -525,10 +572,9 @@ interface CompoundBorderMetrics {
|
|
|
525
572
|
readonly insetPt: number;
|
|
526
573
|
}
|
|
527
574
|
/**
|
|
528
|
-
*
|
|
529
|
-
*
|
|
530
|
-
*
|
|
531
|
-
* visible at paint scale 1 — matching Word's hairline-double floor.
|
|
575
|
+
* Double strokes use the authored width, with a quarter-point minimum.
|
|
576
|
+
* The complete band is centred on the authored edge box. Device pixel rounding
|
|
577
|
+
* belongs to rendering; these layout metrics remain in continuous points.
|
|
532
578
|
*/
|
|
533
579
|
declare function computeDoubleBorderMetricsPt(widthPt: number): CompoundBorderMetrics;
|
|
534
580
|
|
|
@@ -617,6 +663,8 @@ interface SectionStackSpan {
|
|
|
617
663
|
* section just returned.
|
|
618
664
|
*/
|
|
619
665
|
readonly sourcePages: readonly PageRecord[];
|
|
666
|
+
/** The blank parity sheet published in front of the section, kept for identity reuse. */
|
|
667
|
+
readonly paritySheet?: PageRecord;
|
|
620
668
|
}
|
|
621
669
|
/** Orchestrator state for multi-section incremental layout. */
|
|
622
670
|
interface MultiSectionLayoutState {
|
|
@@ -730,18 +778,284 @@ interface LayoutSession {
|
|
|
730
778
|
*/
|
|
731
779
|
declare function createLayoutSession(): LayoutSession;
|
|
732
780
|
|
|
781
|
+
/**
|
|
782
|
+
* Horizontal marker box inside the first-line indent slot.
|
|
783
|
+
*
|
|
784
|
+
* Coordinates are relative to the same origin as paragraph content (`indent.left` is the
|
|
785
|
+
* text start). Returns null when there is nothing to paint.
|
|
786
|
+
*
|
|
787
|
+
* `w:hanging` and a positive `w:firstLine` are one mutually exclusive slot
|
|
788
|
+
* (§17.3.1.10, §17.3.1.12), so the marker has two placements, not an interaction:
|
|
789
|
+
* a hanging level puts the marker BEFORE the text start (`left - hanging`); a
|
|
790
|
+
* positive-firstLine level puts it AFTER (`left + firstLine`) — the standard legal
|
|
791
|
+
* shape `w:ind w:left="0" w:firstLine="720"` numbers at 0.5" while continuation
|
|
792
|
+
* lines return to the margin. Reading only the hanging model painted every such
|
|
793
|
+
* marker at the left margin.
|
|
794
|
+
*/
|
|
795
|
+
declare function listMarkerBox(item: ResolvedListItem, markerWidth: number, lineY: number, lineHeight: number): {
|
|
796
|
+
x: number;
|
|
797
|
+
y: number;
|
|
798
|
+
width: number;
|
|
799
|
+
height: number;
|
|
800
|
+
} | null;
|
|
801
|
+
|
|
802
|
+
/** Soft ceiling on `basedOn` chain length — enough for real templates, refuses hostile graphs. */
|
|
803
|
+
declare const MAX_STYLE_BASED_ON_DEPTH = 32;
|
|
804
|
+
|
|
733
805
|
/** Far above anything Word authors (its UI caps at 63) while keeping allocation bounded. */
|
|
734
806
|
declare const MAX_TABLE_COLUMNS = 1024;
|
|
735
807
|
|
|
808
|
+
/**
|
|
809
|
+
* `w:tblW` / `w:tcW` / `w:wBefore` (CT_TblWidth, 17.4.63 / 17.4.71 / 17.4.86): a PREFERRED
|
|
810
|
+
* width plus the unit it is stated in. Preferred is the operative word — it is what the
|
|
811
|
+
* producer asked for, not what the table resolved to.
|
|
812
|
+
*
|
|
813
|
+
* `pct` is stated in fiftieths of a percent (5000 = 100%) by Word, and in the `"50%"`
|
|
814
|
+
* string form of `ST_Percentage` by others; both are read. `auto` and `nil` carry no width.
|
|
815
|
+
*/
|
|
816
|
+
type PreferredWidthType = 'dxa' | 'pct' | 'auto' | 'nil';
|
|
817
|
+
/**
|
|
818
|
+
* `w:tblW` / `w:tcW` — a requested width, whose UNIT depends on its type.
|
|
819
|
+
*
|
|
820
|
+
* Points for `dxa`, percent for `pct`, and zero for `auto`/`nil`. Reading `value` without `type`
|
|
821
|
+
* is always wrong.
|
|
822
|
+
*/
|
|
823
|
+
interface PreferredWidth {
|
|
824
|
+
readonly type: PreferredWidthType;
|
|
825
|
+
/** POINTS for `dxa`, PERCENT (0–100) for `pct`, 0 for `auto`/`nil`. */
|
|
826
|
+
readonly value: number;
|
|
827
|
+
}
|
|
828
|
+
/** The frozen "no preferred width" value — what a table or cell that declares none resolves to. */
|
|
829
|
+
declare const AUTO_PREFERRED_WIDTH: PreferredWidth;
|
|
830
|
+
|
|
831
|
+
/**
|
|
832
|
+
* The uniform 3 pt (60 twip) inset this lane used to apply on every side.
|
|
833
|
+
*
|
|
834
|
+
* Word's defaults are not uniform — see {@link DEFAULT_CELL_MARGINS} — so nothing resolves
|
|
835
|
+
* against this any more. Kept because it is published.
|
|
836
|
+
*/
|
|
837
|
+
declare const CELL_PAD = 3;
|
|
838
|
+
/** Resolved cell padding in points, after the table default and any per-cell override. */
|
|
839
|
+
interface CellMarginsPt {
|
|
840
|
+
readonly top: number;
|
|
841
|
+
readonly right: number;
|
|
842
|
+
readonly bottom: number;
|
|
843
|
+
readonly left: number;
|
|
844
|
+
}
|
|
845
|
+
/**
|
|
846
|
+
* Traditional default table-style padding: 0 vertical, 108 twips horizontal.
|
|
847
|
+
*
|
|
848
|
+
* Kept as a published constant. Authored styles can supply these values; omitted
|
|
849
|
+
* margins instead resolve to a 10-twip horizontal application fallback.
|
|
850
|
+
*/
|
|
851
|
+
declare const DEFAULT_CELL_MARGINS: CellMarginsPt;
|
|
852
|
+
|
|
853
|
+
/** `w:vAlign` — where a cell's content sits when the row is taller than the content. */
|
|
854
|
+
type CellVerticalAlign = 'top' | 'center' | 'bottom';
|
|
855
|
+
|
|
736
856
|
/**
|
|
737
857
|
* Where a table's left edge sits inside the box that contains it.
|
|
738
858
|
*
|
|
739
|
-
* Ordinary left-aligned tables start at their indent
|
|
740
|
-
*
|
|
741
|
-
*
|
|
859
|
+
* Ordinary left-aligned tables start at their indent, which may be negative and is not
|
|
860
|
+
* limited to the remaining width. Centered and right-aligned left-to-right tables use the
|
|
861
|
+
* remaining width and ignore the indent. `outerRuleOffsetPt` then moves the grid inward by
|
|
862
|
+
* half the outer side rule where the table puts that rule's outer edge on the aligned edge.
|
|
863
|
+
* For a supported mode-14 fixed table, that offset instead aligns the first cell's content.
|
|
864
|
+
* A verified legacy content-aligned table instead aligns the leading cell's content edge
|
|
865
|
+
* with the text column, without changing its indent.
|
|
742
866
|
*/
|
|
743
867
|
declare function tableOriginX(structure: SemanticTableStructure, containerWidthPt: number): number;
|
|
744
868
|
|
|
869
|
+
/**
|
|
870
|
+
* Layout-time nesting ceiling. Parse-time depth (MAX_DEPTH = 256 XML levels) alone still
|
|
871
|
+
* admits ~80 levels of `w:tbl` recursion into the layout walk; deeper tables render as an
|
|
872
|
+
* empty cell box rather than recursing.
|
|
873
|
+
*/
|
|
874
|
+
declare const MAX_TABLE_NESTING = 16;
|
|
875
|
+
/**
|
|
876
|
+
* Soft ceiling on an authored `w:trHeight` (~22"). Hostile `w:val` otherwise becomes a
|
|
877
|
+
* multi-page row that every pagination preflight and cell box inherits.
|
|
878
|
+
*/
|
|
879
|
+
declare const MAX_TABLE_ROW_HEIGHT_PT: number;
|
|
880
|
+
/**
|
|
881
|
+
* `w:trPr/w:trHeight` (17.4.81) resolved for layout. Points leave the reader already —
|
|
882
|
+
* twips convert once here, matching every other table geometry boundary.
|
|
883
|
+
*
|
|
884
|
+
* Word quirk (matches Form025U and Word's UI export): a present `@w:val` with an omitted
|
|
885
|
+
* `@w:hRule` is treated as `atLeast`, not ECMA's `auto`. Explicit `auto` still ignores val.
|
|
886
|
+
*/
|
|
887
|
+
type TableRowHeightRule = 'auto' | 'atLeast' | 'exact';
|
|
888
|
+
/**
|
|
889
|
+
* `w:trHeight` — a row's height rule and its value.
|
|
890
|
+
*
|
|
891
|
+
* `auto` carries no value at all, which is why this is a union rather than a rule plus an
|
|
892
|
+
* optional number.
|
|
893
|
+
*/
|
|
894
|
+
type TableRowHeight = {
|
|
895
|
+
readonly rule: 'auto';
|
|
896
|
+
} | {
|
|
897
|
+
readonly rule: 'atLeast' | 'exact';
|
|
898
|
+
readonly valuePt: number;
|
|
899
|
+
};
|
|
900
|
+
/** `w:tblPr/w:jc` (17.4.29, ST_JcTable): where the table sits within the text column. */
|
|
901
|
+
type TableAlignment = 'left' | 'center' | 'right';
|
|
902
|
+
/**
|
|
903
|
+
* One cell in the resolved table structure.
|
|
904
|
+
*
|
|
905
|
+
* `gridSpan` is clamped at READ time and layout never re-derives it — the value comes from a file
|
|
906
|
+
* and would otherwise be a loop bound an attacker controls.
|
|
907
|
+
*/
|
|
908
|
+
interface SemanticTableCell {
|
|
909
|
+
readonly id: string;
|
|
910
|
+
/** Derived content-edge geometry for a verified legacy percentage-width parent table. */
|
|
911
|
+
readonly legacyContentAlignment?: true;
|
|
912
|
+
/** Resolved simple side rules centered on a legacy absolute-width table grid. */
|
|
913
|
+
readonly centeredSideRules?: true;
|
|
914
|
+
/** Simple side rules painted centered on the grid line, without moving the content edge. */
|
|
915
|
+
readonly centeredSidePaint?: true;
|
|
916
|
+
/** Clamped to [1, MAX_TABLE_COLUMNS] at read time; layout never re-derives it. */
|
|
917
|
+
readonly gridSpan: number;
|
|
918
|
+
/** Physical grid column after width/style resolution and the bidiVisual projection. */
|
|
919
|
+
readonly gridColumn: number;
|
|
920
|
+
/** Stored grid index when bidiVisual maps this cell into a physical RTL grid. */
|
|
921
|
+
readonly logicalGridColumn?: number;
|
|
922
|
+
/** Canonical `w:gridCol` node id for this cell's start column, when the grid is authored. */
|
|
923
|
+
readonly gridColumnId?: string;
|
|
924
|
+
/** A vMerge cell that is not the restart continues the cell above: box, no content. */
|
|
925
|
+
readonly vMergeContinue: boolean;
|
|
926
|
+
/** `w:hideMark` excludes the end-of-cell glyph from row sizing. */
|
|
927
|
+
readonly hideEndMark?: boolean;
|
|
928
|
+
/** `w:vAlign` — defaults to top when omitted/unrecognised. */
|
|
929
|
+
readonly vAlign: CellVerticalAlign;
|
|
930
|
+
/** `w:textDirection`; unsupported values keep horizontal layout. */
|
|
931
|
+
readonly textDirection: 'horizontal' | 'btLr';
|
|
932
|
+
/** Resolved per-side margins (tcMar over tblCellMar over the table style over Word's default). */
|
|
933
|
+
readonly margins: CellMarginsPt;
|
|
934
|
+
/** Three-state authored `tcBorders` (omitted / none / edge). */
|
|
935
|
+
readonly borders: CellBorderBox;
|
|
936
|
+
/** Resolved incident edges used for content clearance, preserving authored border provenance. */
|
|
937
|
+
readonly contentBorders?: CellBorderBox;
|
|
938
|
+
/** The resolved cell (including a vertical merge) ends at the authored table bottom. */
|
|
939
|
+
readonly contentBottomIsOuter?: boolean;
|
|
940
|
+
/** Clearance this AUTHORED ROW reserves above its content for its own top rule, in points. */
|
|
941
|
+
readonly topBandClearancePt?: number;
|
|
942
|
+
/** The CELL declares `w:tcBorders/w:top` as `nil`, rather than a table style doing so. */
|
|
943
|
+
readonly suppressesTopBand?: true;
|
|
944
|
+
/** Row-local clearance in points for authored minima, before vMerge combines content boxes. */
|
|
945
|
+
readonly minimumContentInsets?: {
|
|
946
|
+
readonly top: number;
|
|
947
|
+
readonly bottom: number;
|
|
948
|
+
};
|
|
949
|
+
/** Validated 6-hex shading fill, absent for none/auto. */
|
|
950
|
+
readonly shading?: string;
|
|
951
|
+
/**
|
|
952
|
+
* `w:tcW` — the width this cell asked for, as authored.
|
|
953
|
+
*
|
|
954
|
+
* Published for consumers that need the cell's own statement (a column-resize handle has
|
|
955
|
+
* to write back to it). Column geometry is NOT derived from this field: the resolver works
|
|
956
|
+
* from a flat claim list built in the same pass, because resolving a column means looking
|
|
957
|
+
* at every cell that covers it across every row, not at one cell at a time. Read
|
|
958
|
+
* `columnWidthsPt` for what the table actually laid out.
|
|
959
|
+
*/
|
|
960
|
+
readonly preferredWidth: PreferredWidth;
|
|
961
|
+
/**
|
|
962
|
+
* What the table style says about this cell's paragraphs and runs (17.7.6.6) — a header
|
|
963
|
+
* row's bold and centring live here, not in the cell's own properties.
|
|
964
|
+
*/
|
|
965
|
+
readonly styleFormatting: TableCellStyleFormatting;
|
|
966
|
+
/** Block children in reading order, with content-control wrappers flattened. */
|
|
967
|
+
readonly blocks: readonly OoxmlElement[];
|
|
968
|
+
}
|
|
969
|
+
/** One row in the resolved structure: its cells, its height rule, and any row-level revision. */
|
|
970
|
+
interface SemanticTableRow {
|
|
971
|
+
readonly id: string;
|
|
972
|
+
/** Pending Word row insertion/deletion authored in `w:trPr`. */
|
|
973
|
+
readonly revisionKind?: 'insert' | 'delete';
|
|
974
|
+
/**
|
|
975
|
+
* The `w:trPr/w:ins|w:del` attribution, carried with the kind so a painted row can say
|
|
976
|
+
* WHOSE pending decision it is — the review model addresses the decision by exactly this
|
|
977
|
+
* `(id, author, date)` triple, and a surface with only the kind could highlight the row
|
|
978
|
+
* but never open its card.
|
|
979
|
+
*/
|
|
980
|
+
readonly revisionId?: string;
|
|
981
|
+
readonly revisionAuthor?: string;
|
|
982
|
+
readonly revisionDate?: string;
|
|
983
|
+
/** The row insertion a resolved view kept the row through; see the fragment record. */
|
|
984
|
+
readonly changeSites?: readonly RevisionAttribution[];
|
|
985
|
+
/** `w:trPr/w:tblHeader` — the row repeats atop each page the table continues onto. */
|
|
986
|
+
readonly isHeader: boolean;
|
|
987
|
+
/**
|
|
988
|
+
* `w:trPr/w:cantSplit` — the row must stay on one page. When no page can hold it, the
|
|
989
|
+
* row starts on a fresh page and splits there, so its content is kept.
|
|
990
|
+
*/
|
|
991
|
+
readonly cantSplit: boolean;
|
|
992
|
+
/** `w:trPr/w:trHeight` — auto / atLeast floor / exact (clipped) row height. */
|
|
993
|
+
readonly height: TableRowHeight;
|
|
994
|
+
readonly cells: readonly SemanticTableCell[];
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* A table resolved into a rectangular grid: column widths, rows, and the widths it asked for.
|
|
998
|
+
*
|
|
999
|
+
* The grid is normalized here so layout never has to reconcile `w:gridCol` against actual cell
|
|
1000
|
+
* spans — vertical merges and column spans are already accounted for.
|
|
1001
|
+
*/
|
|
1002
|
+
interface SemanticTableStructure {
|
|
1003
|
+
/** Whether stored columns and horizontal table properties display right to left. */
|
|
1004
|
+
readonly bidiVisual?: true;
|
|
1005
|
+
readonly columnWidthsPt: readonly number[];
|
|
1006
|
+
readonly rows: readonly SemanticTableRow[];
|
|
1007
|
+
/** Verified pre-2013 percentage-width inline table; derived, never serialized. */
|
|
1008
|
+
readonly legacyContentAlignment?: true;
|
|
1009
|
+
/**
|
|
1010
|
+
* Derived, never serialized: how far the grid moves from the aligned table edge, in points.
|
|
1011
|
+
* A supported mode-14 fixed table shifts by its leading cell margin in the other direction.
|
|
1012
|
+
* A compatibility-mode-15 left- or right-aligned table puts the outer edge of its side rule
|
|
1013
|
+
* on that edge, so its first grid line sits half a rule inward. Positive moves right.
|
|
1014
|
+
*/
|
|
1015
|
+
readonly outerRuleOffsetPt?: number;
|
|
1016
|
+
/** `w:tblPr/w:tblW` — the width the table asked for. */
|
|
1017
|
+
readonly tableWidth: PreferredWidth;
|
|
1018
|
+
/**
|
|
1019
|
+
* `w:tblInd` (17.4.50) in points — "this indentation should shift the table into the text
|
|
1020
|
+
* margin by the specified amount". Applies to a left-aligned table; `w:jc` decides the
|
|
1021
|
+
* placement outright for the other two. Negative on a top-level table, which the indent
|
|
1022
|
+
* pulls into the leading margin; never negative on a nested table.
|
|
1023
|
+
*/
|
|
1024
|
+
readonly indentPt: number;
|
|
1025
|
+
/** `w:tblPr/w:jc` (17.4.29) — where the table sits in the text column. */
|
|
1026
|
+
readonly alignment: TableAlignment;
|
|
1027
|
+
/**
|
|
1028
|
+
* `w:tblPr/w:tblpPr` (17.4.57) — present when the table is positioned against an anchor
|
|
1029
|
+
* box. Placement then comes from {@link tableFloatOriginX} rather than `w:jc`/`w:tblInd`.
|
|
1030
|
+
*/
|
|
1031
|
+
readonly float?: TableFloatPosition;
|
|
1032
|
+
/**
|
|
1033
|
+
* `w:tblCellSpacing` (17.4.45) in points: the gap between adjacent cell edges. Applied as
|
|
1034
|
+
* a half-gap inset on each side of every cell, so cells separate visually without the grid
|
|
1035
|
+
* itself moving. Word ALSO grows the table's overall width by the spacing it adds around
|
|
1036
|
+
* the outside; that part is not modelled, so a spaced table is laid out on the same grid
|
|
1037
|
+
* its file states rather than a wider one.
|
|
1038
|
+
*/
|
|
1039
|
+
readonly cellSpacingPt: number;
|
|
1040
|
+
/**
|
|
1041
|
+
* `w:tblPr/w:tblLayout/@w:type="fixed"` (17.4.52 — 17.4.53 is the `w:tblPrEx` exception
|
|
1042
|
+
* variant, not this element). Fixed layout takes the grid as final;
|
|
1043
|
+
* anything else is autofit, which in Word never renders wider than the text column.
|
|
1044
|
+
*/
|
|
1045
|
+
readonly layoutFixed: boolean;
|
|
1046
|
+
/** Table-level `tblBorders` (three-state, including insideH/insideV). */
|
|
1047
|
+
readonly tableBorders: TableBorderBox;
|
|
1048
|
+
/** Table-level `tblCellMar` defaults (per-side, Word's own default when a side is omitted). */
|
|
1049
|
+
readonly defaultMargins: CellMarginsPt;
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Read one typed table node into a bounded structure, or null when the node is not a
|
|
1053
|
+
* typed table or sits beyond the nesting ceiling.
|
|
1054
|
+
*/
|
|
1055
|
+
declare function readTableStructure(table: OoxmlNode, contentWidthPt: number, depth: number, styleCascade?: StyleCascadeTable,
|
|
1056
|
+
/** Which revisions the view resolves away; only the proposed result performs the join. */
|
|
1057
|
+
displayMode?: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter, compatibilityMode?: number): SemanticTableStructure | null;
|
|
1058
|
+
|
|
745
1059
|
/**
|
|
746
1060
|
* Depth-first paragraph fragments of one page, in reading order.
|
|
747
1061
|
*
|
|
@@ -1020,6 +1334,28 @@ declare function wordBoundary(text: string, offset: number, direction: -1 | 1, s
|
|
|
1020
1334
|
*/
|
|
1021
1335
|
declare function positionPastDeletion(layout: SemanticLayout, position: SemanticPosition): SemanticPosition;
|
|
1022
1336
|
|
|
1337
|
+
/**
|
|
1338
|
+
* Rewrite private-use symbol-font codepoints to their Unicode equivalents.
|
|
1339
|
+
*
|
|
1340
|
+
* Applies only to a known symbol-encoded family, only to the U+F020–U+F0FF range, and only
|
|
1341
|
+
* to codepoints with an exact Unicode counterpart — anything else is returned untouched, so
|
|
1342
|
+
* an unrecognised glyph is never replaced by a wrong one. Returns the input string by
|
|
1343
|
+
* identity when nothing changes.
|
|
1344
|
+
*
|
|
1345
|
+
* `isFamilyAvailable` is the escape hatch: a host that KNOWS the authored font is present
|
|
1346
|
+
* should return true, and the file's own codepoint is kept so the real typeface draws it.
|
|
1347
|
+
* Absent, the fallback applies, because an unmapped PUA codepoint renders as a tofu box in
|
|
1348
|
+
* every font that is not the symbol-encoded original.
|
|
1349
|
+
*
|
|
1350
|
+
* Called without the oracle it is also the EXTRACTION answer: the text a symbol glyph should
|
|
1351
|
+
* read as when the drawn glyph stays the authored one. A PDF exporter maps the drawn private
|
|
1352
|
+
* codepoint back through this for its `ToUnicode` table, so copying a Word bullet out of the
|
|
1353
|
+
* page yields a bullet rather than a private-use character.
|
|
1354
|
+
*
|
|
1355
|
+
* @public
|
|
1356
|
+
*/
|
|
1357
|
+
declare function mapSymbolPuaText(text: string, fontFamily: string | null | undefined, isFamilyAvailable?: (family: string) => boolean): string;
|
|
1358
|
+
|
|
1023
1359
|
/**
|
|
1024
1360
|
* The exact HarfBuzz build this engine shapes against.
|
|
1025
1361
|
*
|
|
@@ -1072,6 +1408,8 @@ interface HarfBuzzTextShaperOptions {
|
|
|
1072
1408
|
readonly maxCodepoints?: number;
|
|
1073
1409
|
readonly maxGlyphs?: number;
|
|
1074
1410
|
readonly maxCachedFaces?: number;
|
|
1411
|
+
/** Aggregate retained native font bytes; oversized faces are shaped without retention. */
|
|
1412
|
+
readonly maxCachedFontBytes?: number;
|
|
1075
1413
|
readonly maxCachedShapes?: number;
|
|
1076
1414
|
readonly maxOutlineBytes?: number;
|
|
1077
1415
|
readonly maxCachedOutlineBytes?: number;
|
|
@@ -1367,6 +1705,29 @@ interface LineSegment {
|
|
|
1367
1705
|
/** Every paragraph a line carries, in visual order. One entry for an ordinary line. */
|
|
1368
1706
|
declare function lineSegments(line: LineRecord): readonly LineSegment[];
|
|
1369
1707
|
|
|
1708
|
+
/**
|
|
1709
|
+
* The box a painter clips a vector shape to: `bounds` grown on each side where a stroked
|
|
1710
|
+
* outline reaches past the drawing extent.
|
|
1711
|
+
*
|
|
1712
|
+
* An outline is centred on its geometry and is not cut at the extent, a text column, or a cell
|
|
1713
|
+
* edge that meets the extent: a rule at x=0 of a group with `wp:effectExtent l="0"` keeps
|
|
1714
|
+
* its full width. The reach comes from butt-capped segments and miter joins, measured
|
|
1715
|
+
* only on the part of each segment inside the extent, so geometry outside the extent stays
|
|
1716
|
+
* clipped and a side grows by at most the miter reach. A line-end triangle on a line that
|
|
1717
|
+
* ends inside the extent grows it too. A side stays as it is when a layout region or a
|
|
1718
|
+
* negative effect extent cut into the shape itself, and a drawing clipped to nothing stays
|
|
1719
|
+
* empty.
|
|
1720
|
+
*
|
|
1721
|
+
* Only the paint clip grows. Collisions, hit testing, and pointer targets keep `paintBounds`,
|
|
1722
|
+
* so a painter clips with this box without making it clickable.
|
|
1723
|
+
*
|
|
1724
|
+
* `bounds` is the drawing's `paintBounds` in any translation: the record's own, or the
|
|
1725
|
+
* absolute paint bounds of an export visit.
|
|
1726
|
+
*
|
|
1727
|
+
* @public
|
|
1728
|
+
*/
|
|
1729
|
+
declare function vectorShapeInkClip(drawing: InlineDrawingRecord | AnchoredDrawingRecord, bounds: LayoutBox): LayoutBox;
|
|
1730
|
+
|
|
1370
1731
|
/** Memoized style inputs shared by every story in one document view. @public */
|
|
1371
1732
|
interface DocumentStyleDependencies {
|
|
1372
1733
|
readonly styleCascade: () => StyleCascadeTable | undefined;
|
|
@@ -1409,6 +1770,8 @@ interface HeaderFooterPageContext {
|
|
|
1409
1770
|
readonly marginRight: number;
|
|
1410
1771
|
readonly marginTop: number;
|
|
1411
1772
|
readonly marginBottom: number;
|
|
1773
|
+
/** `w:pgMar/@w:header` for a header, `@w:footer` for a footer: the story edge's distance. */
|
|
1774
|
+
readonly storyDistance?: number;
|
|
1412
1775
|
}
|
|
1413
1776
|
/** Per-sheet geometry needed to resolve header/footer anchors before wrap and clipping. */
|
|
1414
1777
|
interface HeaderFooterLayoutPageContext extends FieldPageContext {
|
|
@@ -1624,7 +1987,7 @@ declare const MAX_NOTE_FRAGMENTS = 512;
|
|
|
1624
1987
|
*/
|
|
1625
1988
|
type NoteLayoutFallbackReason = 'note-count-limit' | 'note-fragment-limit' | 'note-reflow-exhausted' | 'note-height-cap'
|
|
1626
1989
|
/** Authored separator/continuationSeparator taller than the content column. */
|
|
1627
|
-
| 'note-separator-height-cap' | 'missing-note-body' | 'dangling-note-reference';
|
|
1990
|
+
| 'note-separator-height-cap' | 'note-continuation-notice-height-cap' | 'missing-note-body' | 'dangling-note-reference';
|
|
1628
1991
|
/**
|
|
1629
1992
|
* One note's body laid out as its own story, in story-relative coordinates.
|
|
1630
1993
|
*
|
|
@@ -1664,6 +2027,10 @@ interface NoteSeparatorLayout {
|
|
|
1664
2027
|
* story has real paragraph/run/border content that paint should render as fragments.
|
|
1665
2028
|
*/
|
|
1666
2029
|
readonly ruleStyle?: NoteSeparatorRuleStyle;
|
|
2030
|
+
/** Marker rule geometry inside the measured separator story. */
|
|
2031
|
+
readonly ruleBox?: LayoutBox;
|
|
2032
|
+
/** Resolved marker-run color; null/absent uses automatic black. */
|
|
2033
|
+
readonly ruleColor?: string | null;
|
|
1667
2034
|
/** Set when an oversize authored separator was replaced with a synthetic rule. */
|
|
1668
2035
|
readonly fallbackReason?: NoteLayoutFallbackReason;
|
|
1669
2036
|
}
|
|
@@ -1782,9 +2149,10 @@ declare function isMarkerOnlySeparatorNote(note: OoxmlNode, displayMode?: Revisi
|
|
|
1782
2149
|
/**
|
|
1783
2150
|
* Layout the document's separator note, or synthesize a short horizontal rule.
|
|
1784
2151
|
*
|
|
1785
|
-
*
|
|
2152
|
+
* Single-marker / missing separators emit no paragraph fragments — paint draws the rule
|
|
1786
2153
|
* from {@link NoteSeparatorLayout.ruleStyle} + box geometry. Authored separators with
|
|
1787
2154
|
* real paragraph/run/border content keep their fragment story (including `w:pBdr`).
|
|
2155
|
+
* Explicitly empty stories and hidden markers do not acquire a default rule.
|
|
1788
2156
|
*
|
|
1789
2157
|
* When `maxFlowHeightPt` is set and an authored separator exceeds it, the engine fails
|
|
1790
2158
|
* closed to a short synthetic rule ({@link note-separator-height-cap}) so note pagination
|
|
@@ -1792,7 +2160,7 @@ declare function isMarkerOnlySeparatorNote(note: OoxmlNode, displayMode?: Revisi
|
|
|
1792
2160
|
*/
|
|
1793
2161
|
declare function layoutNoteSeparator(part: OoxmlPart | null | undefined, kind: 'separator' | 'continuationSeparator', contentWidth: number, options: LayoutNoteStoryOptions, noteKind: NoteKind, maxFlowHeightPt?: number): NoteSeparatorLayout;
|
|
1794
2162
|
/** Default rule geometry for a synthetic / marker-only separator, story-relative. */
|
|
1795
|
-
declare function syntheticSeparatorBox(contentWidth: number, flowHeight: number): LayoutBox;
|
|
2163
|
+
declare function syntheticSeparatorBox(contentWidth: number, flowHeight: number, kind?: 'separator' | 'continuationSeparator'): LayoutBox;
|
|
1796
2164
|
/** Absolute separator box: short rule for marker/synthetic, full width for authored stories. */
|
|
1797
2165
|
declare function noteSeparatorAreaBox(separator: NoteSeparatorLayout, contentX: number, contentWidth: number, areaTop: number): LayoutBox;
|
|
1798
2166
|
|
|
@@ -1960,6 +2328,11 @@ declare function filterRefsOnPage(page: PageRecord, allRefs: readonly PageRefHit
|
|
|
1960
2328
|
* from slack makes `stable` true on the first pass and never shrinks the body — references and
|
|
1961
2329
|
* notes then compete for the same band. Oversized notes still split/continue within the budget;
|
|
1962
2330
|
* {@link MIN_FOOTNOTE_BODY_BAND_PT} keeps a body band so reflow cannot chase blank sheets.
|
|
2331
|
+
*
|
|
2332
|
+
* Answers under the STRICT co-location policy: every footnote starts on the page that
|
|
2333
|
+
* references it. The bounded orphan-pair refinement is a second phase of the internal
|
|
2334
|
+
* reflow loop, which owns the strict fixed point the refinement needs as its starting
|
|
2335
|
+
* point and as its fallback, so a single call from outside that loop cannot reach it.
|
|
1963
2336
|
*/
|
|
1964
2337
|
declare function computeFootnoteReserves(layout: SemanticLayout, allRefs: readonly PageRefHit[], input: NotesLayoutInput, noteMarks: NoteMarkContext,
|
|
1965
2338
|
/** Session-carried notes memo (opaque; owned by this module). */
|
|
@@ -2154,9 +2527,15 @@ interface SemanticLayoutOptions {
|
|
|
2154
2527
|
* OOXML inheritance). `furniture` remains the single-section / last-section fallback.
|
|
2155
2528
|
*/
|
|
2156
2529
|
readonly sectionFurniture?: readonly (PageFurniture | undefined)[];
|
|
2530
|
+
/**
|
|
2531
|
+
* `w:evenAndOddHeaders` from settings.xml. A section that restarts its page numbering then
|
|
2532
|
+
* starts on a sheet whose position has the parity of the restarted number. When absent,
|
|
2533
|
+
* layout reads the flag from the section furniture.
|
|
2534
|
+
*/
|
|
2535
|
+
readonly evenAndOddHeaders?: boolean;
|
|
2157
2536
|
/** Authored column count/gap for anchored `relativeFrom="column"` frame resolution. */
|
|
2158
2537
|
readonly sectionColumns?: SectionColumns;
|
|
2159
|
-
/**
|
|
2538
|
+
/** Active section line-grid pitch: line-unit margins and line snapping. Absent: no grid. */
|
|
2160
2539
|
readonly paragraphLineUnitPt?: number;
|
|
2161
2540
|
/**
|
|
2162
2541
|
* This section's resolved `w:pgBorders`, for the frame each of its sheets publishes.
|
|
@@ -2255,8 +2634,9 @@ interface SemanticLayoutOptions {
|
|
|
2255
2634
|
/** Canonical drawing traversal order within the owner story part. */
|
|
2256
2635
|
readonly drawingSourceOrder?: ReadonlyMap<string, number>;
|
|
2257
2636
|
/**
|
|
2258
|
-
*
|
|
2259
|
-
*
|
|
2637
|
+
* TOC instruction-only opening and ending chrome paragraph ids. Empty chrome suppresses
|
|
2638
|
+
* its placeholder line; opening paragraph marks after a separator remain visible result lines.
|
|
2639
|
+
* Tree nodes stay intact for refresh/save.
|
|
2260
2640
|
*/
|
|
2261
2641
|
readonly tocFieldChromeParagraphIds?: ReadonlySet<string>;
|
|
2262
2642
|
/**
|
|
@@ -2349,7 +2729,7 @@ declare function formatLowerLetter(value: number): string;
|
|
|
2349
2729
|
* literal text, and formatting it as decimal invents a number the document never had.
|
|
2350
2730
|
* `bullet` is not formatted here — callers use the literal `lvlText`.
|
|
2351
2731
|
*
|
|
2352
|
-
* The remaining enumerants (`japaneseCounting`, `
|
|
2732
|
+
* The remaining enumerants (`japaneseCounting`, `thaiNumbers`, `ganada`, …) are
|
|
2353
2733
|
* per-script numeral sequences we do not carry glyph tables for. They fall back to decimal
|
|
2354
2734
|
* deliberately: the ORDINAL is still the authored one, only the script differs, which reads
|
|
2355
2735
|
* as a number in the wrong alphabet rather than as a missing or wrong marker.
|
|
@@ -2392,6 +2772,8 @@ interface CanvasTextMetrics {
|
|
|
2392
2772
|
*/
|
|
2393
2773
|
interface CanvasTextContext {
|
|
2394
2774
|
font: string;
|
|
2775
|
+
/** Optional browser kerning control; older contexts retain their native behavior. */
|
|
2776
|
+
fontKerning?: 'auto' | 'normal' | 'none';
|
|
2395
2777
|
textAlign?: 'left' | 'right' | 'center' | 'start' | 'end';
|
|
2396
2778
|
direction?: 'ltr' | 'rtl' | 'inherit';
|
|
2397
2779
|
measureText(text: string): CanvasTextMetrics;
|
|
@@ -2514,13 +2896,13 @@ declare function pageRefPageNumbersFromLayout(layout: SemanticLayout): (targetPa
|
|
|
2514
2896
|
declare function planRefFieldResultRefresh(part: OoxmlPart, options: RefFieldRefreshOptions): RefreshFieldResultsOp | null;
|
|
2515
2897
|
|
|
2516
2898
|
/**
|
|
2517
|
-
*
|
|
2518
|
-
*
|
|
2899
|
+
* Return story blocks in document order, flattening block-level content controls.
|
|
2900
|
+
* Compatible hidden paragraph marks join in body stories using the supplied styles and numbering.
|
|
2901
|
+
* Repeated calls with the same part and projection inputs share one array. Treat it as read-only.
|
|
2519
2902
|
*
|
|
2520
|
-
*
|
|
2521
|
-
* shared by every caller — treat it as read-only; mutating it corrupts later callers.
|
|
2903
|
+
* @public
|
|
2522
2904
|
*/
|
|
2523
|
-
declare function storyBlocks(part: OoxmlPart, displayMode?: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter): OoxmlElement[];
|
|
2905
|
+
declare function storyBlocks(part: OoxmlPart, displayMode?: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter, styles?: StyleCascadeTable, numberingIndex?: NumberingIndex): OoxmlElement[];
|
|
2524
2906
|
/**
|
|
2525
2907
|
* Blocks of one typed footnote/endnote node — a separate semantic story root.
|
|
2526
2908
|
*
|
|
@@ -2529,7 +2911,7 @@ declare function storyBlocks(part: OoxmlPart, displayMode?: RevisionDisplayMode,
|
|
|
2529
2911
|
*/
|
|
2530
2912
|
declare function noteStoryBlocks(note: OoxmlNode, displayMode?: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter): OoxmlElement[];
|
|
2531
2913
|
|
|
2532
|
-
/**
|
|
2914
|
+
/** TOC boundary paragraphs whose empty instruction/chrome lines are suppressed. */
|
|
2533
2915
|
declare function tocFieldChromeParagraphIds(part: OoxmlPart): ReadonlySet<string>;
|
|
2534
2916
|
/**
|
|
2535
2917
|
* Begin-paragraph ids of TOCs that have no visible cached result rows.
|
|
@@ -2715,6 +3097,9 @@ interface MaterializationInput {
|
|
|
2715
3097
|
*/
|
|
2716
3098
|
declare function pagesToMaterialize(input: MaterializationInput): Set<number>;
|
|
2717
3099
|
|
|
3100
|
+
/** Character border geometry from placed spans, shared by screen and export painters. */
|
|
3101
|
+
declare function runBorderStrokesForLine(line: LineRecord): readonly ParagraphBorderStrokeRecord[];
|
|
3102
|
+
|
|
2718
3103
|
/**
|
|
2719
3104
|
* `w:pPr/w:rPr/w:del` or `w:moveFrom` — a tracked revision REMOVES the paragraph mark.
|
|
2720
3105
|
*
|
|
@@ -2730,4 +3115,28 @@ declare function paragraphMarkDeleted(paragraph: OoxmlNode): boolean;
|
|
|
2730
3115
|
*/
|
|
2731
3116
|
declare function revisionRemovesParagraph(paragraph: OoxmlNode, displayMode?: RevisionDisplayMode, authorFilter?: RevisionAuthorFilter): boolean;
|
|
2732
3117
|
|
|
2733
|
-
|
|
3118
|
+
/**
|
|
3119
|
+
* Fit complete leader advances to one shared horizontal grid.
|
|
3120
|
+
*
|
|
3121
|
+
* `startPt` is measured from the paper's left edge, or the local textbox frame.
|
|
3122
|
+
* Offsets remain relative to the supplied gap. No glyph is clipped at either end,
|
|
3123
|
+
* and lines in the same face share their dot columns regardless of preceding text.
|
|
3124
|
+
* @public
|
|
3125
|
+
*/
|
|
3126
|
+
declare function tabLeaderPattern(startPt: number, widthPt: number, advancePt: number): {
|
|
3127
|
+
readonly offsetPt: number;
|
|
3128
|
+
readonly count: number;
|
|
3129
|
+
};
|
|
3130
|
+
|
|
3131
|
+
/**
|
|
3132
|
+
* Story-relative rule box for a measured separator span.
|
|
3133
|
+
*
|
|
3134
|
+
* Word paints `w:separator` as a strikeout stroke, so `stroke` carries the face's `OS/2`
|
|
3135
|
+
* `yStrikeoutPosition` and `yStrikeoutSize` at the run's size. Without a resolved face the
|
|
3136
|
+
* box keeps the legacy quarter-em offset and hairline thickness.
|
|
3137
|
+
* @public
|
|
3138
|
+
*/
|
|
3139
|
+
declare function noteSeparatorRuleBox(span: StyleSpanRecord, line: LineRecord, stroke?: StrikeoutStrokePt): LayoutBox;
|
|
3140
|
+
|
|
3141
|
+
export { AUTO_PREFERRED_WIDTH, AnchoredDrawingRecord, BlockFragmentRecord, CELL_PAD, COMPOUND_BORDER_MIN_GAP_PT, COMPOUND_BORDER_MIN_STROKE_PT, CellBorderBox, ContentControlBoundaryRecord$1 as ContentControlBoundaryRecord, ContentControlLock, DEFAULT_CANVAS_FONT_STACK, DEFAULT_CELL_MARGINS, DrawingInsets, DrawingPoint, FieldLinkProjector, FixedPoint, FixedPointRoundingMode, FontByteValidator, GRAPHEME_SEGMENTER_LOCALE, HARFBUZZ_SHAPING_LIBRARY, HarfBuzzShapingError, HeaderFooterStoryRecord, HyperlinkFieldSpec, HyperlinkProjector, InlineDrawingRecord, LayoutBox, LineRecord, 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_STYLE_BASED_ON_DEPTH, MAX_TABLE_COLUMNS, MAX_TABLE_NESTING, MAX_TABLE_ROW_FRAGMENTS, MAX_TABLE_ROW_HEIGHT_PT, NoteAreaRecord, NoteStoryRecord, NumberingIndex, NumberingLevel, PageBorderFrameRecord, PageGeometry, PageRecord, ParagraphBorderStrokeRecord, ParagraphFragmentRecord, RefFieldContext, ResolvedListItem, ReviewItem, RevisionAttribution, RevisionAuthorFilter, RevisionDisplayMode, SectionColumns, SectionPageBorders, SelectionRect, SemanticLayout, SemanticPosition, SemanticSelection, ShapedRun, SourceRange, SpanLinkRecord, StrikeoutStrokePt, StyleCascadeTable, StyleSpanRecord, TableBorderBox, TableBorderSide, TableCellStyleFormatting, TablePaginationError, TextMeasurer, TextShaper, VersionedShapingLibrary, WORD_SEGMENTER_LOCALE, anchorLineY, attachNotesToLayout, boundedFallbackWordSegments, buildPageRefIndex, clampListValue, computeDoubleBorderMetricsPt, computeFootnoteReserves, contentControlBoundaries, contentControlHoldingParagraph, contentControlRecordsInPart, contentControlsOfLayout, createBoundedFallbackWordBoundary, createDefaultWordBoundary, createDocumentFurnitureSource, createDocumentLinkProjectors, createDocumentNotesInput, createDocumentStyleDependencies, createFieldLinkRegistry, createFixedMeasurer, createHarfBuzzTextShaper, createIntlWordBoundary, createLayoutScheduler, createLayoutSession, createListCounterState, createParagraphLayoutCache, defaultNoteSeparatorRuleStyle, deriveNoteDisplayMarks, deriveNoteDisplayMarksResolved, documentOrder, documentRelationshipTargetIn, effectiveBorderSide, effectiveContentControlLock, emptyTocPlaceholderParagraphIds, emptyTocSuppressedResultParagraphIds, everyStoryOrder, expandLvlText, exportSourceRangeOf, filterRefsOnPage, findSeparatorNote, forEachSemanticDrawing, forEachSemanticSpan, forEachSemanticStory, forEachStoryParagraphFragment, formatDecimal, formatDecimalZero, formatLowerLetter, formatLowerRoman, formatNumFmt, formatPageNumber, formatUpperLetter, formatUpperRoman, fragmentOwnsAtomOffset, fragmentsOfParagraph, graphemeBoundaryEpoch, graphemeCount, graphemeOffsetToUtf16, harfBuzzFontValidator, initializeHarfBuzz, intlGraphemeBoundary, isCanvasMeasurementAvailable, isCumulativeGeometryTrustedFromLineOrigin, isGeometryTrustedCaretOffset, isHarfBuzzInitialized, isIntlSegmenterAvailable, isIntlWordSegmenterAvailable, isMarkerOnlySeparatorNote, isWholeGraphemeHorizontalBoundary, keyedRangeRects, layoutHeaderFooterStory, layoutNoteById, layoutNoteSeparator, layoutNoteStory, layoutSemanticDocument, lineAtPosition, lineSegments, linesOf, listMarkerBox, mapSymbolPuaText, normalNotesOf, noteDisplayMarkMap, noteLineIdPrefix, noteMarkKey, noteSeparatorAreaBox, noteSeparatorRuleBox, noteStoryBlocks, pageBorderFrame, pageRefPageNumbersFromLayout, pagesToMaterialize, paragraphFragmentsOf, paragraphFragmentsOfBlocks, paragraphLayoutKey, paragraphMarkDeleted, paragraphShading, paragraphShadingBox, parseAutonumInstruction, planRefFieldResultRefresh, positionPastDeletion, projectedNoteMarkText, provisionalNoteMarks, readTableStructure, resetGraphemeBoundary, resolveDefaultSurfaceMeasurer, resolveDefaultWordBoundary, resolveOoxmlShadingFill, resolveStrictHexFill, reviewAnchorIndex, reviewItemGeometry, revisionRemovesParagraph, roundFontUnitToFixedPoint, runBorderStrokesForLine, segmentGraphemes, segmentWords, selectionRects, semanticHorizontalBoundaries, setGraphemeBoundary, setHarfBuzzWasmUrl, sha256FontBytes, shadingFillFromElement, shapedHorizontalBoundaries, storyBlocks, syntheticSeparatorBox, tabLeaderPattern, tableOriginX, tocFieldChromeParagraphIds, tryCreateCanvasMeasurer, unionLayoutBoxes, utf16OffsetToGrapheme, vectorShapeInkClip, wordBoundary, wordSegmentsToGraphemeRecords };
|
|
3142
|
+
export type { AutonumFieldKind, AutonumFieldSpec, CanvasMeasurerOptions, CanvasTextContext, CanvasTextMetrics, CellMarginsPt, CellVerticalAlign, CompoundBorderMetrics, ContentControlFragmentRecord, CreateDocumentFurnitureSourceOptions, CreateDocumentNotesInputOptions, DocumentFurnitureSource, DocumentLinkProjectors, DocumentStyleDependencies, FieldLinkRegistry, GraphemeBoundary, GraphemeSegment, GraphemeWordSegmentRecord, HarfBuzzFaceCacheEvent, HarfBuzzOutlineCacheEvent, HarfBuzzShapeCacheEvent, HarfBuzzShapingErrorCode, HarfBuzzTextShaper, HarfBuzzTextShaperInstrumentation, HarfBuzzTextShaperOptions, HeaderFooterVariantName, KeyedRange, LayoutCacheStats, LayoutScheduler, LayoutSchedulerOptions, LayoutScope, LayoutSession, LayoutSessionStats, LineSegment, ListCounterAdvance, ListCounterState, MaterializationInput, NoteDisplayMark, NoteLayoutFallbackReason, NoteMarkContext, NotePaginationFallbackReason, NoteReferenceSite, NoteSeparatorLayout, NoteSeparatorRuleStyle, NoteStoryDrawings, NoteStoryLayout, NotesAttachResult, NotesLayoutInput, PageFurniture, PageRefIndex, ParagraphKeyInputs, ParagraphLayoutCache, ParagraphLayoutCacheOptions, PreferredWidth, PreferredWidthType, RefFieldRefreshOptions, RegisteredFieldLink, ResolvedSurfaceMeasurer, ReviewParagraphAnchor, SemanticDrawingLayer, SemanticDrawingVisit, SemanticLayoutOptions, SemanticRootStoryKind, SemanticSpanVisit, SemanticStoryKind, SemanticStoryVisit, SemanticTableCell, SemanticTableRow, SemanticTableStructure, StoryDrawingContext, StoryDrawingHost, StoryParagraphFragmentContext, StoryProjectionDependencies, TableAlignment, TablePaginationErrorCode, TableRowHeight, TableRowHeightRule, ViewportWindow, WordBoundary, WordBoundaryResolverDeps, WordSegment };
|