@docx-editor.dev/core 2.32.0 → 2.34.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.
Files changed (121) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +1 -0
  3. package/dist/automation.cjs +1 -1
  4. package/dist/automation.d.ts +14 -52
  5. package/dist/automation.js +1 -1
  6. package/dist/binding.cjs +1 -1
  7. package/dist/binding.d.ts +14 -14
  8. package/dist/binding.js +1 -1
  9. package/dist/{chrome-print-CznJ0ucN.d.ts → chrome-print-DY0xsXm_.d.ts} +231 -125
  10. package/dist/chunk-37IYWENL.cjs +1 -0
  11. package/dist/chunk-37RNWL45.js +4 -0
  12. package/dist/chunk-5HUVQXET.cjs +4 -0
  13. package/dist/chunk-5JP3QQF7.js +7 -0
  14. package/dist/chunk-5KOLFKOB.cjs +5 -0
  15. package/dist/chunk-6MF5PN2E.js +236 -0
  16. package/dist/chunk-77JT2AU7.js +2 -0
  17. package/dist/{chunk-ETDZFNMI.js → chunk-7FUORGCW.js} +1 -1
  18. package/dist/chunk-A5BTVPET.cjs +236 -0
  19. package/dist/chunk-AFXFH2T2.js +3 -0
  20. package/dist/chunk-AVCYP7OY.js +5 -0
  21. package/dist/chunk-BL2E4QRA.js +1 -0
  22. package/dist/chunk-DB7X4Y6O.js +4 -0
  23. package/dist/chunk-DR6W23TB.cjs +2 -0
  24. package/dist/chunk-DYLB5U42.js +1 -0
  25. package/dist/chunk-E5BKDHIP.cjs +1 -0
  26. package/dist/chunk-IWXBRUPG.cjs +4 -0
  27. package/dist/{chunk-L5TYBFDB.js → chunk-KCUXXO3Q.js} +1 -1
  28. package/dist/chunk-KYA4Y2YB.js +1 -0
  29. package/dist/{chunk-6UDJUI3W.cjs → chunk-L74TCGVH.cjs} +1 -1
  30. package/dist/chunk-NBSSQSKY.js +30 -0
  31. package/dist/{chunk-OKMEMSKB.cjs → chunk-NEM774E3.cjs} +1 -1
  32. package/dist/chunk-NKZVMMHU.cjs +1 -0
  33. package/dist/chunk-TXIO5WYQ.cjs +32 -0
  34. package/dist/chunk-UKG2TXWH.cjs +7 -0
  35. package/dist/chunk-V7CO55DO.cjs +3 -0
  36. package/dist/chunk-VLQDQNSS.js +1 -0
  37. package/dist/chunk-VQOAC3VI.cjs +30 -0
  38. package/dist/chunk-YWJSQA2O.js +32 -0
  39. package/dist/chunk-ZJ74LCFI.cjs +1 -0
  40. package/dist/collaboration/replication.cjs +1 -1
  41. package/dist/collaboration/replication.d.ts +13 -4
  42. package/dist/collaboration/replication.js +1 -1
  43. package/dist/collaboration.d.ts +3 -3
  44. package/dist/contracts/document.d.ts +3 -3
  45. package/dist/contracts/editor.d.ts +10 -10
  46. package/dist/contracts/interaction.d.ts +2 -2
  47. package/dist/contracts/modules.d.ts +12 -12
  48. package/dist/contracts/types.d.ts +4 -4
  49. package/dist/{custom-node-writes-CLJKGD9t.d.ts → custom-node-writes-DparEcZK.d.ts} +45 -7
  50. package/dist/diagnostic-context-CkZKkKvB.d.ts +98 -0
  51. package/dist/{diagnostic-hints-DK8-V0fk.d.ts → diagnostic-hints-BTyb8yzX.d.ts} +3 -3
  52. package/dist/{document-protection-NaniLHWF.d.ts → document-protection-DdWxihIN.d.ts} +1 -1
  53. package/dist/{headless-document-view-Bcz9_Qva.d.ts → drawing-graphic-kind-CK0cMc7H.d.ts} +161 -18
  54. package/dist/drawing-preview-package-fFjXpOMS.d.ts +115 -0
  55. package/dist/{editor-DZwOTmlR.d.ts → editor-DDCkWqfD.d.ts} +125 -21
  56. package/dist/{editor-scope-B3L-1ALc.d.ts → editor-scope-CA6egMaK.d.ts} +5 -1
  57. package/dist/editor.cjs +1 -1
  58. package/dist/editor.css +4 -4
  59. package/dist/editor.d.ts +387 -78
  60. package/dist/editor.js +1 -1
  61. package/dist/export.cjs +2 -2
  62. package/dist/export.d.ts +47 -12
  63. package/dist/export.js +2 -2
  64. package/dist/{font-resolver-BlQNGdvR.d.ts → font-resolver-Bm9XqTNO.d.ts} +14 -0
  65. package/dist/index.cjs +1 -1
  66. package/dist/index.d.ts +38 -23
  67. package/dist/index.js +1 -1
  68. package/dist/{layout-shaping-E5J4Z1Gf.d.ts → layout-shaping-Byj-TwsI.d.ts} +1 -1
  69. package/dist/layout.cjs +1 -1
  70. package/dist/layout.d.ts +434 -199
  71. package/dist/layout.js +1 -1
  72. package/dist/metafile-drawing-Ce6TuWLm.d.ts +115 -0
  73. package/dist/{note-properties-Ds5R2_3F.d.ts → note-properties-BiunaIQa.d.ts} +31 -7
  74. package/dist/output.cjs +1 -1
  75. package/dist/output.d.ts +77 -13
  76. package/dist/output.js +1 -1
  77. package/dist/{protocol-DKa4qt7F.d.ts → protocol-Dn44dL4M.d.ts} +184 -120
  78. package/dist/{review-paragraph-order-Dc17w_6v.d.ts → review-paragraph-order-BWMXAKuA.d.ts} +1 -1
  79. package/dist/{revision-projection-Cn6rZJ7H.d.ts → revision-projection-DwFhgIR0.d.ts} +1 -1
  80. package/dist/{semantic-cell-selection-BaUR0iJ4.d.ts → semantic-cell-selection-DhalxEBH.d.ts} +2 -2
  81. package/dist/{semantic-interaction-CJoHLoOl.d.ts → semantic-interaction-QeuzEtAk.d.ts} +2 -4
  82. package/dist/{semantic-paint-BPw_n0li.d.ts → semantic-paint-BYDZbTiY.d.ts} +16 -9
  83. package/dist/{semantic-record-queries-C0rJ3sB4.d.ts → semantic-record-queries-Bf5bgQL3.d.ts} +1 -1
  84. package/dist/{semantic-records-BvN-WWst.d.ts → semantic-records-CzZiWMY8.d.ts} +348 -132
  85. package/dist/store.cjs +1 -1
  86. package/dist/store.d.ts +526 -19
  87. package/dist/store.js +1 -1
  88. package/dist/{tree-op-types-C_S2niXW.d.ts → tree-op-types-DKvJSH8T.d.ts} +1024 -501
  89. package/dist/{tree-package-store-CRHvMyNj.d.ts → tree-package-store-Cl3BkWXF.d.ts} +8 -3
  90. package/dist/{tree-session-contract-D1awo_dA.d.ts → tree-session-contract-BL50pqs8.d.ts} +15 -8
  91. package/dist/{unsupported-elements-CVos5cqe.d.ts → unsupported-elements-Bra4QTOM.d.ts} +1 -1
  92. package/licenses/ECMA-376.md +29 -0
  93. package/package.json +2 -2
  94. package/dist/bookmark-names-DDuAra_V.d.ts +0 -37
  95. package/dist/chunk-25EXMBV2.cjs +0 -5
  96. package/dist/chunk-3IEXDEFH.cjs +0 -7
  97. package/dist/chunk-65XBN67F.cjs +0 -2
  98. package/dist/chunk-6NVZNB7O.cjs +0 -3
  99. package/dist/chunk-ACLR4DMK.js +0 -1
  100. package/dist/chunk-B2BEELUE.js +0 -1
  101. package/dist/chunk-DDFHKQFU.js +0 -30
  102. package/dist/chunk-E4IAO4CY.cjs +0 -2
  103. package/dist/chunk-FDSL5OJU.cjs +0 -30
  104. package/dist/chunk-FS7CMYLT.js +0 -4
  105. package/dist/chunk-GDS24SZN.js +0 -30
  106. package/dist/chunk-GIY6NT2X.js +0 -5
  107. package/dist/chunk-GWM3AKUD.js +0 -18
  108. package/dist/chunk-HDOXACHP.js +0 -2
  109. package/dist/chunk-IILEENID.js +0 -1
  110. package/dist/chunk-MNF2K7NN.cjs +0 -30
  111. package/dist/chunk-O324RB6R.cjs +0 -1
  112. package/dist/chunk-QXJKYNYZ.js +0 -1
  113. package/dist/chunk-RALTVLB6.js +0 -2
  114. package/dist/chunk-SRVKFUFI.js +0 -3
  115. package/dist/chunk-TELQ52LG.cjs +0 -1
  116. package/dist/chunk-TJHE5EET.cjs +0 -1
  117. package/dist/chunk-UMMRURPE.js +0 -7
  118. package/dist/chunk-XJYZVGQR.cjs +0 -1
  119. package/dist/chunk-ZGTIE3QJ.cjs +0 -4
  120. package/dist/chunk-ZOZI27AW.cjs +0 -18
  121. package/dist/diagnostic-context-BtDUY3v2.d.ts +0 -31
@@ -1,6 +1,6 @@
1
- import { a4 as OoxmlNode, az as OoxmlProperty, O as OoxmlPart, av as OoxmlElement, b3 as TableBorderStyle, af as ImageResourceState, b4 as DrawingAccessibility, b5 as DrawingImageEffects, aT as SourceCrop, b2 as DrawingTransform, b6 as VectorShapeProjection, a7 as DrawingHorizontalReferenceFrame, ab as DrawingVerticalReferenceFrame, ag as ImageWrapTarget, b7 as DrawingProjection, b8 as OoxmlDrawingNode } from './tree-op-types-C_S2niXW.js';
2
- import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-Cn6rZJ7H.js';
3
- import { O as OmmlEquationProjection, H as HeadlessDocumentView } from './headless-document-view-Bcz9_Qva.js';
1
+ import { a4 as OoxmlNode, aC as OoxmlProperty, O as OoxmlPart, av as OoxmlElement, aU as TableBorderStyle, aV as TextboxOutlineProjection, af as ImageResourceState, aT as SourceCrop, aW as VectorShapeComponent, aX as DrawingAccessibility, aY as DrawingImageEffects, aZ as DrawingTransform, a_ as DrawingChartSummary, a$ as VectorShapeProjection, b0 as PictureFrameEffects, a7 as DrawingHorizontalReferenceFrame, ab as DrawingVerticalReferenceFrame, ag as ImageWrapTarget, b1 as DrawingProjection, b2 as OoxmlDrawingNode } from './tree-op-types-DKvJSH8T.js';
2
+ import { b as RevisionDisplayMode, p as RevisionAuthorFilter, q as RevisionAttribution } from './revision-projection-DwFhgIR0.js';
3
+ import { O as OmmlEquationProjection, a as DrawingSupport, b as DrawingSupportIssue, D as DrawingGraphicKind, H as HeadlessDocumentView } from './drawing-graphic-kind-CK0cMc7H.js';
4
4
 
5
5
  /**
6
6
  * Whether a paragraph must start a new page (`w:pageBreakBefore`).
@@ -73,8 +73,10 @@ interface ParagraphAutoSpacingContext {
73
73
  /** Section grid pitch in points; no grid uses Word's fixed 12pt line unit. */
74
74
  readonly lineUnitPt?: number;
75
75
  /**
76
- * `w:doNotUseHTMLParagraphAutoSpacing` is on: automatic spacing outside a list resolves to
77
- * the fixed 5pt before and 10pt after instead of {@link AUTO_PARAGRAPH_SPACING_PT}.
76
+ * `w:doNotUseHTMLParagraphAutoSpacing` is on (§17.15.3, "Use Fixed Paragraph Spacing for
77
+ * HTML Auto Setting"): `w:beforeAutospacing` / `w:afterAutospacing` have no effect, and each
78
+ * side keeps its authored measurement, in a list, a table cell or at a story edge alike.
79
+ * Captured references put 5pt on each side for `w:before="100"` and 15pt for `"300"`.
78
80
  */
79
81
  readonly fixedAutoSpacing?: boolean;
80
82
  }
@@ -102,6 +104,15 @@ interface ParagraphLineSpacing {
102
104
  readonly value: number;
103
105
  /** Legacy noExtraLineSpacing: retain the natural baseline within an exact-height box. */
104
106
  readonly preserveExactBaseline?: true;
107
+ /** A wrap band tests only the line's content, not the extra an `auto` multiple adds. @internal */
108
+ readonly wrapsContentOnly?: true;
109
+ /**
110
+ * DrawingML shape text: an `auto` line keeps its descent at the bottom of the box, so the
111
+ * space a multiple adds or removes is above the glyphs, never below them.
112
+ *
113
+ * @internal
114
+ */
115
+ readonly descentAnchored?: true;
105
116
  /**
106
117
  * Active section line-grid pitch in points (`w:docGrid/@w:linePitch`). Present only when
107
118
  * the paragraph snaps to the grid; only with `auto`. See `line-grid.ts`.
@@ -165,7 +176,8 @@ interface ParagraphBorders {
165
176
  * height, not the gap between paragraphs — and is not resolved here.
166
177
  *
167
178
  * `w:beforeAutospacing` / `w:afterAutospacing` REPLACE the authored measurement on their own
168
- * side rather than adding to it; see {@link AUTO_PARAGRAPH_SPACING_PT}.
179
+ * side rather than adding to it; see {@link AUTO_PARAGRAPH_SPACING_PT}. With
180
+ * {@link ParagraphAutoSpacingContext.fixedAutoSpacing} they are ignored instead.
169
181
  */
170
182
  declare function paragraphSpacing(props: readonly OoxmlProperty[], context?: ParagraphAutoSpacingContext): ParagraphSpacing;
171
183
  /**
@@ -310,7 +322,7 @@ interface SectionPageBorders {
310
322
  readonly right?: ParagraphBorderEdge;
311
323
  }
312
324
  /**
313
- * Parse `w:pgBorders` off one `w:sectPr`.
325
+ * Parse `w:pgBorders` off one `w:sectPr`, or off its `w:sectPrChange` when it has none.
314
326
  *
315
327
  * Undefined when the element is absent AND when it paints nothing — every edge off, or every
316
328
  * edge an art border. Unlike `w:pgNumType`, an empty-but-present element is not distinguished:
@@ -363,6 +375,8 @@ interface SectionColumns {
363
375
  readonly separator?: boolean;
364
376
  /** Authored `w:col` geometry when `equalWidth` is false. */
365
377
  readonly definitions?: readonly SectionColumnDefinition[];
378
+ /** A right-to-left section (`w:bidi`): the first column is the rightmost. */
379
+ readonly rightToLeft?: true;
366
380
  }
367
381
  /**
368
382
  * How this section is placed relative to the previous one (ECMA-376 17.6.22,
@@ -516,7 +530,7 @@ declare function geometryOfSection(section: SectionProperties): PageGeometry;
516
530
 
517
531
  /**
518
532
  * `w:tblpPr/@w:horzAnchor` (17.4.58) and `@w:vertAnchor` (17.4.66): the box a floated
519
- * table's offsets are measured from. Absent means `text` for both.
533
+ * table's offsets are measured from. An absent horizontal anchor means `text`; an absent vertical anchor means `margin`.
520
534
  */
521
535
  type TableFloatAnchor = 'text' | 'margin' | 'page';
522
536
  /** `w:tblpPr/@w:tblpXSpec` (17.4.63, ST_XAlign). */
@@ -1251,6 +1265,12 @@ interface ResolvedRunStyle {
1251
1265
  * slot-homogeneous pieces happens downstream (`piecesOfParagraph`).
1252
1266
  */
1253
1267
  readonly fontFamilyEastAsia: string | null;
1268
+ /**
1269
+ * True when a `w:rFonts` in the cascade (run, style, or authored `w:rPrDefault`) names the
1270
+ * East Asian face, not only a format, application, or theme default.
1271
+ * @internal
1272
+ */
1273
+ readonly eastAsianFontAuthored?: true;
1254
1274
  /**
1255
1275
  * Present only on a `w:rtl` or `w:cs` run: the LATIN lane that the complex-script values
1256
1276
  * replaced in `fontFamily`, `fontSizePt`, `bold` and `italic`. Nothing draws with it; it
@@ -1282,7 +1302,11 @@ interface ResolvedRunStyle {
1282
1302
  readonly baseLevel: number;
1283
1303
  /** Resolved w:rtl context; absent when authored Unicode controls govern the paragraph. */
1284
1304
  readonly runDirection?: 'ltr' | 'rtl';
1305
+ /** A `w:bdo` override: every character reads in this direction, whatever its class. */
1306
+ readonly override?: 'ltr' | 'rtl';
1285
1307
  readonly wordSpacingPt?: number;
1308
+ /** The run-direction group comes from a `w:dir` or `w:bdo` wrapper, not the run. */
1309
+ readonly wrapperGroup?: true;
1286
1310
  /** Neighbouring text a joining script reads across a formatting-run boundary. */
1287
1311
  readonly context?: ShapingContext;
1288
1312
  };
@@ -1409,9 +1433,6 @@ declare function baselineShiftPtOf(style: ResolvedRunStyle): number;
1409
1433
  */
1410
1434
  declare function glyphSizeFactorOf(style: ResolvedRunStyle): number;
1411
1435
 
1412
- /** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
1413
- type Alignment = 'left' | 'center' | 'right' | 'both';
1414
-
1415
1436
  /** The number formats a page field's `\*` switch can select (ST_NumberFormat names). */
1416
1437
  type PageFieldNumberFormat = 'decimal' | 'lowerRoman' | 'upperRoman' | 'lowerLetter' | 'upperLetter' | 'numberInDash';
1417
1438
 
@@ -1579,6 +1600,22 @@ interface EquationBarGeometry extends EquationGeometryBase {
1579
1600
  readonly body: EquationGeometry;
1580
1601
  readonly bar: LayoutBox;
1581
1602
  }
1603
+ /** A straight stroke between two points, relative to its node's box. */
1604
+ interface EquationDiagonal {
1605
+ readonly x1: number;
1606
+ readonly y1: number;
1607
+ readonly x2: number;
1608
+ readonly y2: number;
1609
+ }
1610
+ interface EquationBorderBoxGeometry extends EquationGeometryBase {
1611
+ readonly kind: 'borderBox';
1612
+ readonly body: EquationGeometry;
1613
+ /** Edges and horizontal or vertical strikes, as filled rectangles. */
1614
+ readonly rules: readonly LayoutBox[];
1615
+ /** Diagonal strikes, stroked at {@link thickness}. */
1616
+ readonly diagonals: readonly EquationDiagonal[];
1617
+ readonly thickness: number;
1618
+ }
1582
1619
  interface EquationScriptGeometry extends EquationGeometryBase {
1583
1620
  readonly kind: 'script';
1584
1621
  readonly base: EquationGeometry;
@@ -1592,7 +1629,7 @@ interface EquationNaryGeometry extends EquationGeometryBase {
1592
1629
  readonly lowerLimit?: EquationGeometry;
1593
1630
  readonly upperLimit?: EquationGeometry;
1594
1631
  }
1595
- type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationScriptGeometry | EquationNaryGeometry;
1632
+ type EquationGeometry = EquationTextGeometry | EquationRowGeometry | EquationFractionGeometry | EquationRadicalGeometry | EquationBarGeometry | EquationBorderBoxGeometry | EquationScriptGeometry | EquationNaryGeometry;
1596
1633
  /** Equation metadata carried by one atomic semantic span. */
1597
1634
  interface EquationSpanRecord {
1598
1635
  readonly sourceNodeId: string;
@@ -1603,31 +1640,101 @@ interface EquationSpanRecord {
1603
1640
  /** Compose one bounded OMML projection into paint-ready point geometry. */
1604
1641
  declare function layoutEquation(projection: OmmlEquationProjection, measurer: TextMeasurer, style: ResolvedRunStyle): EquationSpanRecord;
1605
1642
 
1606
- /** Source metadata for content the engine cannot render. @public */
1643
+ /**
1644
+ * One occurrence that a custom component can replace: a placeholder for content the editor
1645
+ * cannot render, or, with `includePartial`, a drawing that the editor renders without some
1646
+ * features. The drawing fields are present only for drawings.
1647
+ *
1648
+ * @public
1649
+ */
1607
1650
  interface UnsupportedElement {
1651
+ /**
1652
+ * How completely the editor shows this drawing: `unrendered` for a placeholder, or
1653
+ * `partial` for a drawing that renders without some features, offered only with
1654
+ * `includePartial`. Absent for content that is not a drawing.
1655
+ */
1656
+ readonly support?: Exclude<DrawingSupport, 'native'>;
1657
+ /**
1658
+ * The features of this drawing that the editor does not show as authored, read from its
1659
+ * own XML. Chart and diagram parts, inherited theme effects, and image bytes are not read,
1660
+ * so an empty list does not prove fidelity.
1661
+ * Never holds `unplaced-drawing` or `projection-diagnostic`, which only a report lists. For
1662
+ * a placeholder, `graphicKind` names the graphic that the editor cannot draw.
1663
+ */
1664
+ readonly drawingIssues?: readonly DrawingSupportIssue[];
1665
+ /**
1666
+ * The graphic a drawing holds, such as `picture`, `chart`, or `diagram`, from its source.
1667
+ * Note: `textbox` names every DrawingML shape, with or without text, and `shape` names only
1668
+ * legacy VML drawings.
1669
+ */
1670
+ readonly graphicKind?: DrawingGraphicKind;
1671
+ /** The node the occurrence comes from, in the editor's current document. */
1608
1672
  readonly nodeId: string;
1673
+ /** The part that holds it, such as `/word/document.xml` or `/word/header1.xml`. */
1609
1674
  readonly ownerPartName: string;
1675
+ /** The namespace of the source element, such as the WordprocessingML namespace. */
1610
1676
  readonly namespaceUri: string | null;
1677
+ /** The local name of the source element, such as `drawing` or `AlternateContent`. */
1611
1678
  readonly localName: string;
1612
- /** Lossless canonical source. Treat this value as read-only and untrusted. */
1679
+ /**
1680
+ * Lossless canonical source. Treat this value as read-only and untrusted.
1681
+ * The object identity stays unchanged until the drawing content changes.
1682
+ * Use `source` to identify cached previews across component remounts.
1683
+ * Editor occurrences always provide a source. Standalone painters without a source lookup
1684
+ * return `null`.
1685
+ */
1613
1686
  readonly source: OoxmlElement | null;
1687
+ /** `inline` inside a line of text, or `block` between paragraphs. */
1614
1688
  readonly placement: 'inline' | 'block';
1689
+ /** The text of the built-in placeholder. */
1615
1690
  readonly label: string;
1616
- /** Reserved geometry in document points, when the element has been laid out. */
1691
+ /**
1692
+ * Reserved geometry in document points, when the element has been laid out. Always present
1693
+ * for a drawing, and it includes the effect extent, as the page of
1694
+ * `createDrawingPreviewPackage` does.
1695
+ */
1617
1696
  readonly bounds?: LayoutBox;
1697
+ /**
1698
+ * The layout record of a drawing. Use `graphicKind` to identify the graphic: the record's
1699
+ * `placeholderGraphicKind` names the graphic only for placeholders. A chart whose chart part
1700
+ * can be read also carries `chart`, whose `shownAs` describes the native presentation.
1701
+ * Absent for other content.
1702
+ */
1618
1703
  readonly drawing?: InlineDrawingRecord | AnchoredDrawingRecord;
1704
+ /** The layout record of an equation shown as the built-in placeholder. */
1619
1705
  readonly equation?: EquationSpanRecord;
1620
1706
  }
1621
1707
  /** Dimensions reserved before pagination, in document points. @public */
1622
1708
  interface UnsupportedElementLayout {
1709
+ /** Width in points: finite, positive, and at most 100,000. */
1623
1710
  readonly width: number;
1711
+ /** Height in points: finite, positive, and at most 100,000. */
1624
1712
  readonly height: number;
1625
1713
  }
1626
1714
  /** The first matching registration renders each unsupported element. @public */
1627
1715
  interface UnsupportedElementRule {
1716
+ /**
1717
+ * Include partially rendered drawings (`support: 'partial'`). Defaults to `false`.
1718
+ * Excludes fully supported drawings, hidden drawings, and drawings without a layout position.
1719
+ * Excludes shapes with editable text. Partially rendered shapes without text remain eligible.
1720
+ */
1721
+ readonly includePartial?: boolean;
1722
+ /**
1723
+ * Return true to replace this occurrence. Omit to match every offered occurrence. Offered
1724
+ * occurrences also include equations and other content that is not a drawing; test
1725
+ * `element.drawing` to match drawings only.
1726
+ */
1628
1727
  readonly match?: (element: UnsupportedElement) => boolean;
1728
+ /** The box to reserve for content that has no layout box of its own, in points. */
1629
1729
  readonly layout?: UnsupportedElementLayout;
1630
1730
  }
1731
+ /**
1732
+ * Whether a rule claims an occurrence. Adapters use it to pick the first matching
1733
+ * declaration; hosts with their own registration can use it the same way.
1734
+ *
1735
+ * @public
1736
+ */
1737
+ declare function unsupportedElementRuleMatches(rule: UnsupportedElementRule, element: UnsupportedElement): boolean;
1631
1738
 
1632
1739
  /** Reserved geometry for one opaque content component. @internal */
1633
1740
  interface UnsupportedContentRecord {
@@ -1648,45 +1755,6 @@ declare function createUnsupportedContentProjector(resolve: UnsupportedContentRe
1648
1755
  view(view: HeadlessDocumentView): HeadlessDocumentView;
1649
1756
  };
1650
1757
 
1651
- interface DrawingPoint {
1652
- readonly x: number;
1653
- readonly y: number;
1654
- }
1655
- interface DrawingInsets {
1656
- readonly top: number;
1657
- readonly right: number;
1658
- readonly bottom: number;
1659
- readonly left: number;
1660
- }
1661
- type DrawingClipFallback = 'none' | 'unsupported-preset';
1662
- interface DrawingGeometry {
1663
- readonly contentBounds: LayoutBox;
1664
- readonly paintBounds: LayoutBox;
1665
- readonly hitBounds: LayoutBox;
1666
- readonly transformedCorners: readonly DrawingPoint[];
1667
- /** Unclipped image corners for affine encoding; clipping must not stretch the image. */
1668
- readonly imageTransformCorners?: readonly DrawingPoint[];
1669
- readonly clipPolygon: readonly DrawingPoint[] | null;
1670
- readonly clipFallback: DrawingClipFallback;
1671
- readonly effectInsets: DrawingInsets;
1672
- }
1673
-
1674
- /**
1675
- * UAX #9 embedding levels, one per UTF-16 code unit, plus the paragraph ranges they were resolved
1676
- * within.
1677
- *
1678
- * The level is EXACT, not a direction: its parity gives direction, but the numeric value is what
1679
- * reordering needs, and collapsing it early loses nested isolates.
1680
- */
1681
- interface BidiEmbeddingLevels {
1682
- readonly levels: Uint8Array;
1683
- readonly paragraphs: readonly {
1684
- readonly start: number;
1685
- readonly end: number;
1686
- readonly level: number;
1687
- }[];
1688
- }
1689
-
1690
1758
  /**
1691
1759
  * Which `w:rFonts` slot a character resolves its face through.
1692
1760
  *
@@ -1694,50 +1762,6 @@ interface BidiEmbeddingLevels {
1694
1762
  * and CJK text uses two different fonts without saying so anywhere in its properties.
1695
1763
  */
1696
1764
  type FontSlot = 'ascii' | 'hAnsi' | 'eastAsia' | 'cs';
1697
- /**
1698
- * A run of text sharing one script, direction and font slot — the unit handed to the shaper.
1699
- *
1700
- * Shaping cannot span a script change: Arabic and Latin in one call would produce wrong joining
1701
- * behaviour, so a run is itemized into these first.
1702
- */
1703
- interface ScriptItem {
1704
- readonly from: number;
1705
- readonly to: number;
1706
- readonly direction: TextDirection;
1707
- readonly bidiLevel: number;
1708
- readonly script: 'Zyyy' | 'Latn' | 'Grek' | 'Cyrl' | 'Hani' | 'Hebr' | 'Arab' | 'Deva' | 'Beng' | 'Thai' | 'Khmr';
1709
- readonly slot: FontSlot;
1710
- }
1711
- /**
1712
- * A code point whose script this engine does not itemize.
1713
- *
1714
- * Carries the offending `codePoint` so the caller can report which character stopped it, rather
1715
- * than failing anonymously somewhere in the middle of a paragraph.
1716
- */
1717
- declare class UnsupportedScriptError extends Error {
1718
- readonly name = "UnsupportedScriptError";
1719
- readonly code = "unsupportedScript";
1720
- readonly codePoint: number;
1721
- constructor(codePoint: number);
1722
- }
1723
- /**
1724
- * Split text into shapeable runs by script, bidi level and font slot.
1725
- *
1726
- * Consumes the bidi levels rather than re-deriving direction, so itemization and reordering agree
1727
- * by construction instead of by two implementations happening to match.
1728
- */
1729
- declare function itemizeScriptFontSlots(text: string, paragraphOffset: number, embedding: BidiEmbeddingLevels): readonly ScriptItem[];
1730
- /**
1731
- * The style a piece's text is MEASURED AND PAINTED in, given the font slot it carries.
1732
- *
1733
- * This is the measurer-boundary resolution: pieces and spans keep the run's real resolved
1734
- * style — with `fontFamily` and `fontFamilyEastAsia` both intact, so formatting readback
1735
- * and the format painter see the run as authored — and every consumer that turns text into
1736
- * geometry or ink resolves the face through here. The derived object is memoized per
1737
- * (style, family) by {@link withFontFamily}, so measurers amortizing over style identity
1738
- * keep their caches.
1739
- */
1740
- declare function styleForFontSlot(style: ResolvedRunStyle, slot: FontSlot | undefined): ResolvedRunStyle;
1741
1765
 
1742
1766
  /**
1743
1767
  * One parsed `HYPERLINK` instruction: the raw, unsanitized pieces.
@@ -1859,6 +1883,31 @@ interface CjkTypographySettings {
1859
1883
  readonly punctuationKerning?: boolean;
1860
1884
  /** The document defaults explicitly select an East Asian face as the East Asian font. */
1861
1885
  readonly sourceEastAsianFont?: boolean;
1886
+ /**
1887
+ * False when the document defaults turn off inter-character East Asian justification on
1888
+ * justified lines and automatic spacing between East Asian and other text
1889
+ * ({@link defaultsTypography}). Absent means both apply.
1890
+ * @internal
1891
+ */
1892
+ readonly eastAsianSpacing?: false;
1893
+ /**
1894
+ * A legacy compatibility mode (`lineEndPunctuationAtEveryAlignment`): line-end punctuation
1895
+ * hangs at every paragraph alignment, and the paragraph kinsoku switch does not stop it.
1896
+ * @internal
1897
+ */
1898
+ readonly legacyLineEndPunctuation?: true;
1899
+ /**
1900
+ * The compatibility setting `w:balanceSingleByteDoubleByteWidth`: lines in a legacy mode keep
1901
+ * their natural inter-word spaces, also with punctuation compression.
1902
+ * @internal
1903
+ */
1904
+ readonly balancedWidths?: true;
1905
+ /**
1906
+ * The compatibility setting `w:useWord97LineBreakRules`. With `balancedWidths`, lines in a
1907
+ * legacy mode keep natural inter-word spaces in proportional faces.
1908
+ * @internal
1909
+ */
1910
+ readonly word97LineBreaks?: true;
1862
1911
  /** Whitespace compression selected by `w:characterSpacingControl`. */
1863
1912
  readonly compression: 'doNotCompress' | 'compressPunctuation' | 'compressPunctuationAndJapaneseKana';
1864
1913
  /** Custom no-line-start characters, keyed by normalized language tag. */
@@ -1867,6 +1916,9 @@ interface CjkTypographySettings {
1867
1916
  readonly after: Readonly<Record<string, string>>;
1868
1917
  }
1869
1918
 
1919
+ /** Horizontal alignment of a paragraph (`w:jc`, ECMA-376 §17.3.1.13). */
1920
+ type Alignment = 'left' | 'center' | 'right' | 'both';
1921
+
1870
1922
  /** Soft ceiling matching Word's practical custom-tab UI limit. */
1871
1923
  declare const MAX_TAB_STOPS = 64;
1872
1924
  /**
@@ -1988,6 +2040,20 @@ declare function tabAdvanceWidth(alignment: TabAlignment, currentX: number, dest
1988
2040
  */
1989
2041
  declare function tabStopsFingerprint(tabs: ResolvedTabStops): string;
1990
2042
 
2043
+ /** One layout-owned diagonal stroke, clipped to its cell-local rectangle. */
2044
+ interface TableCellDiagonalRecord {
2045
+ readonly direction: 'tl2br' | 'tr2bl';
2046
+ readonly x1: number;
2047
+ readonly y1: number;
2048
+ readonly x2: number;
2049
+ readonly y2: number;
2050
+ readonly widthPt: number;
2051
+ readonly color: string | null;
2052
+ readonly cssStyle: 'solid' | 'dashed' | 'dotted';
2053
+ readonly clipWidth: number;
2054
+ readonly clipHeight: number;
2055
+ }
2056
+
1991
2057
  /** Test-only mutable counters; omitted by production call sites. Not package-public. */
1992
2058
  interface TableBorderGridResolveWork {
1993
2059
  /** Sparse intervals emitted (not dense column slots). */
@@ -2030,6 +2096,8 @@ interface TableBorderBox {
2030
2096
  }
2031
2097
  /** The four resolved edges of one cell, after conflict resolution against its neighbours. */
2032
2098
  interface CellBorderBox {
2099
+ readonly tl2br?: TableBorderSide;
2100
+ readonly tr2bl?: TableBorderSide;
2033
2101
  readonly top: TableBorderSide;
2034
2102
  readonly left: TableBorderSide;
2035
2103
  readonly bottom: TableBorderSide;
@@ -2080,6 +2148,7 @@ interface TableBorderStrokeRecord {
2080
2148
  * only on `edgeSegments`. Compound geometry is always on `strokes`.
2081
2149
  */
2082
2150
  interface ResolvedCellBorders {
2151
+ readonly diagonals?: readonly TableCellDiagonalRecord[];
2083
2152
  readonly top?: ResolvedTableBorderEdge;
2084
2153
  readonly left?: ResolvedTableBorderEdge;
2085
2154
  readonly bottom?: ResolvedTableBorderEdge;
@@ -2202,6 +2271,8 @@ interface TextboxStoryLayout {
2202
2271
  * insets. Placement resolves the shape at this width. Absent when the extent width holds.
2203
2272
  */
2204
2273
  readonly extentWidth?: number;
2274
+ /** Box height a story that fits its shape sizes it to; absent when the extent height holds. */
2275
+ readonly extentHeight?: number;
2205
2276
  /** Content box height (extent minus vertical insets). */
2206
2277
  readonly contentHeight: number;
2207
2278
  /** Solid fill of the hosting shape, painted behind the story; null for no fill. */
@@ -2210,8 +2281,45 @@ interface TextboxStoryLayout {
2210
2281
  readonly strokeHex: string | null;
2211
2282
  /** Outline width in points; 0 when absent. */
2212
2283
  readonly strokeWidthPt: number;
2284
+ /**
2285
+ * Clockwise turn of the content box about `pivot`, in drawing-extent points. Absent when
2286
+ * the story is upright: vertical text and text that turns with its shape set it.
2287
+ */
2288
+ readonly contentRotation?: Readonly<{
2289
+ degrees: number;
2290
+ pivot: Readonly<{
2291
+ x: number;
2292
+ y: number;
2293
+ }>;
2294
+ }>;
2295
+ /** Shape outline painted instead of a rectangle; absent for a rectangle. */
2296
+ readonly outline?: TextboxOutlineProjection;
2297
+ /** Clockwise turn of the fill and outline about the extent centre; absent when upright. */
2298
+ readonly chromeRotationDegrees?: number;
2299
+ /** The outline is centred on the extent edge rather than inside it. */
2300
+ readonly strokeCentered?: true;
2301
+ /** Outline dash pattern in points; absent for solid. */
2302
+ readonly strokeDashPt?: readonly number[];
2303
+ /** How outline dashes end; absent for flat ends. */
2304
+ readonly strokeCap?: 'round' | 'square';
2305
+ /** Shadow colour, opacity and page offset in points. */
2306
+ readonly shadow?: Readonly<{
2307
+ hex: string;
2308
+ alpha: number;
2309
+ dx: number;
2310
+ dy: number;
2311
+ /** The solid silhouette, seen only outside the shape; no text shadow. */
2312
+ obscured: boolean;
2313
+ }>;
2213
2314
  /** True when layout hit a named bound and returned a truncated / empty story. */
2214
2315
  readonly fallbackReason?: TextboxStoryFallbackReason;
2316
+ /** DrawingML shape text: lines past the box paint outside it, not clipped at the drawing. */
2317
+ readonly overflowVisible?: true;
2318
+ /**
2319
+ * The drawing's `vectorShape` paints the box; the fill, outline and shadow fields here only
2320
+ * describe it, and painters draw just the text.
2321
+ */
2322
+ readonly chromeByVector?: true;
2215
2323
  /**
2216
2324
  * Resource identities of the drawings the clip DROPPED, in flow order.
2217
2325
  *
@@ -2241,6 +2349,32 @@ interface GroupTextboxStoryRecord {
2241
2349
  readonly rotationDegrees: number;
2242
2350
  }
2243
2351
 
2352
+ /** One picture member of a drawing group after the first, as a drawing record holds it. */
2353
+ interface DrawingGroupPictureLayerRecord {
2354
+ /** The picture's own image resource, resolved like the record's `resource`. */
2355
+ readonly resource: ImageResourceState;
2356
+ /** The picture's own `a:srcRect` crop, as fractions of the image. */
2357
+ readonly crop: SourceCrop;
2358
+ /**
2359
+ * The picture's frame as fractions of the drawing extent, which is
2360
+ * `geometry.contentBounds` of the record.
2361
+ */
2362
+ readonly frameUnit: Readonly<{
2363
+ x: number;
2364
+ y: number;
2365
+ width: number;
2366
+ height: number;
2367
+ }>;
2368
+ }
2369
+ /**
2370
+ * The record that paints one layer picture alone: the layer's resource and crop, with its
2371
+ * frame as the image corners, no vector members, no link, and no other layers. Every output
2372
+ * paints a layer through its ordinary group picture path with this record.
2373
+ *
2374
+ * @internal
2375
+ */
2376
+ declare function groupPictureLayerDrawing<D extends InlineDrawingRecord | AnchoredDrawingRecord>(drawing: D, layer: DrawingGroupPictureLayerRecord): D;
2377
+
2244
2378
  /** `x' = scaleX * x + offsetX`, `y' = scaleY * y + offsetY`, from text space into the box. */
2245
2379
  interface TextArtFit {
2246
2380
  readonly scaleX: number;
@@ -2272,18 +2406,65 @@ interface DrawingTextArtRecord {
2272
2406
  readonly path: string | null;
2273
2407
  /** Null when the measurer could not bound the string's ink: nothing paints. */
2274
2408
  readonly fit: TextArtFit | null;
2409
+ /**
2410
+ * The geometry an installed text art layout drew, in EMU from the box's top-left corner,
2411
+ * unrotated. When present, paint draws these in place of `path`.
2412
+ */
2413
+ readonly components?: readonly VectorShapeComponent[];
2414
+ /** Box-local bounds of the components' ink in points, when it reaches past the box. */
2415
+ readonly inkBounds?: Readonly<{
2416
+ left: number;
2417
+ top: number;
2418
+ right: number;
2419
+ bottom: number;
2420
+ }>;
2275
2421
  }
2276
2422
 
2277
- /** Clip `box` to a horizontal content band; preserves authored size, zeroes clipped axes. */
2278
- /** How a drawing record holds the picture member of a shape group. */
2423
+ interface DrawingPoint {
2424
+ readonly x: number;
2425
+ readonly y: number;
2426
+ }
2427
+ interface DrawingInsets {
2428
+ readonly top: number;
2429
+ readonly right: number;
2430
+ readonly bottom: number;
2431
+ readonly left: number;
2432
+ }
2433
+ type DrawingClipFallback = 'none' | 'unsupported-preset';
2434
+ interface DrawingGeometry {
2435
+ readonly contentBounds: LayoutBox;
2436
+ readonly paintBounds: LayoutBox;
2437
+ readonly hitBounds: LayoutBox;
2438
+ readonly transformedCorners: readonly DrawingPoint[];
2439
+ /** Unclipped image corners for affine encoding; clipping must not stretch the image. */
2440
+ readonly imageTransformCorners?: readonly DrawingPoint[];
2441
+ readonly clipPolygon: readonly DrawingPoint[] | null;
2442
+ readonly clipFallback: DrawingClipFallback;
2443
+ readonly effectInsets: DrawingInsets;
2444
+ }
2445
+
2446
+ /**
2447
+ * How a drawing record holds the picture member of a shape group.
2448
+ *
2449
+ * @public
2450
+ */
2279
2451
  interface DrawingGroupPictureRecord {
2280
2452
  /**
2281
- * Whether the group is the chosen branch of a run-level `mc:AlternateContent`. An output
2282
- * that cannot draw the picture leaves such a group out, as it leaves out other MC content
2283
- * it cannot draw. A group without it shows the output's unsupported-drawing result.
2453
+ * Whether the group is the chosen branch of a run-level `mc:AlternateContent`.
2454
+ * Failed picture resources show one placeholder for the whole group.
2284
2455
  */
2285
2456
  readonly alternateContent: boolean;
2286
2457
  }
2458
+ /**
2459
+ * The kind of graphic a non-picture drawing holds: `chart` (a chart), `diagram` (SmartArt),
2460
+ * `textbox` (a DrawingML shape, with or without text), `group` (a shape group), `canvas` (a
2461
+ * drawing canvas), `shape` (a legacy VML drawing, such as WordArt), or `graphic` (any other
2462
+ * graphic). A picture, including an EMF, WMF or TIFF picture that does not convert, has none.
2463
+ *
2464
+ * @public
2465
+ */
2466
+ type DrawingPlaceholderKind = 'chart' | 'diagram' | 'shape' | 'group' | 'textbox' | 'canvas' | 'graphic';
2467
+
2287
2468
  interface InlineDrawingRecord {
2288
2469
  readonly kind: 'inlineDrawing';
2289
2470
  readonly drawingNodeId: string;
@@ -2314,10 +2495,26 @@ interface InlineDrawingRecord {
2314
2495
  readonly effects: DrawingImageEffects;
2315
2496
  readonly crop: SourceCrop;
2316
2497
  readonly transform: DrawingTransform;
2317
- /** Fixed non-picture graphic kind for refusal labels (`chart`, `group`, …); null for pictures. */
2318
- readonly placeholderGraphicKind: string | null;
2498
+ /** Graphic kind of a non-picture drawing, naming its placeholder; null for pictures. */
2499
+ readonly placeholderGraphicKind: DrawingPlaceholderKind | null;
2500
+ /**
2501
+ * The title and plot types of a drawing that holds a chart whose chart part can be read, and
2502
+ * how the page shows it (`shownAs`): drawn, by its saved fallback, or as a placeholder.
2503
+ */
2504
+ readonly chart?: DrawingChartSummary;
2505
+ /**
2506
+ * The resource of the picture saved in a chart's `mc:Fallback`, whichever branch the page
2507
+ * shows, for an output that exports a chart as its saved picture. Absent without one.
2508
+ *
2509
+ * @internal
2510
+ */
2511
+ readonly chartFallbackResource?: ImageResourceState;
2319
2512
  /** Typed solid-geometry payload for a renderable `wps:wsp` shape; null otherwise. */
2320
2513
  readonly vectorShape: VectorShapeProjection | null;
2514
+ /** Legacy text art on the line, fitted to its box. */
2515
+ readonly textArt?: DrawingTextArtRecord;
2516
+ /** A picture's reflection and soft edges, in the extent's EMU; absent when it has none. */
2517
+ readonly frameEffects?: PictureFrameEffects;
2321
2518
  /**
2322
2519
  * Present when the image is the picture member of a drawing group. The image then fills
2323
2520
  * the bounds of `geometry.imageTransformCorners`, not `geometry.contentBounds`, and paints
@@ -2327,6 +2524,11 @@ interface InlineDrawingRecord {
2327
2524
  * shows no part of the group.
2328
2525
  */
2329
2526
  readonly groupPicture?: DrawingGroupPictureRecord;
2527
+ /**
2528
+ * The group's other picture members, in document order. Each paints above the record's
2529
+ * own image and the layers before it, and below `vectorShape`. Absent for one picture.
2530
+ */
2531
+ readonly groupPictureLayers?: readonly DrawingGroupPictureLayerRecord[];
2330
2532
  /**
2331
2533
  * The revision wrappers enclosing the owning run, outermost first — the same stack spans
2332
2534
  * carry, so paint and review chrome give a tracked picture the same cues as tracked text.
@@ -2339,6 +2541,8 @@ interface InlineDrawingRecord {
2339
2541
  * paragraph needed no bidi resolution.
2340
2542
  */
2341
2543
  readonly bidiLevel?: number;
2544
+ /** The run-direction group of a picture in a `w:bdo` override or a wrapper's group; else its level's. */
2545
+ readonly bidiRunDirection?: 'ltr' | 'rtl';
2342
2546
  /**
2343
2547
  * Laid-out textbox story for a `wps:txbx` drawing; paint renders it clipped inside the
2344
2548
  * extent instead of a placeholder. Absent when the drawing carries no story or the host
@@ -2429,25 +2633,6 @@ interface ResolvedListItem {
2429
2633
  /** Fingerprint for layout cache keys (indent, marker text, marker face). */
2430
2634
  readonly cacheToken: string;
2431
2635
  }
2432
- /**
2433
- * Read `w:numPr` from cascaded paragraph-property nodes (lowest precedence first).
2434
- *
2435
- * Flat `OoxmlProperty[]` bags drop nested `ilvl`/`numId`, so this walks the tree nodes
2436
- * the same way borders and tabs do.
2437
- *
2438
- * `w:ilvl` and `w:numId` inherit INDEPENDENTLY through the style chain and the direct
2439
- * `w:pPr` (§17.3.1.19): a tier stating only the level keeps the id it inherits — Word's
2440
- * standard Heading2–Heading9 shape, where only Heading1 names the `w:num` — and a tier
2441
- * stating only the id keeps the inherited level. Treating each `w:numPr` node as a full
2442
- * replacement dropped the id at every level-only tier and unnumbered the paragraph. A
2443
- * stated `w:numId w:val="0"` (or an invalid value) still switches numbering off at that
2444
- * tier even when a lower tier set one; a higher tier stating a valid id re-enables. A
2445
- * level-only tier with no id inherited from below resolves to no numbering.
2446
- */
2447
- declare function readNumPr(paragraphPropertyNodes: readonly OoxmlNode[]): {
2448
- numId: string;
2449
- ilvl: number;
2450
- } | null;
2451
2636
  /**
2452
2637
  * Resolve `w:numStyleLink` delegation using the document's styles (§17.9.21).
2453
2638
  *
@@ -2507,10 +2692,18 @@ declare const MAX_STYLE_DEFINITIONS = 4096;
2507
2692
  * styles part are never reused under another.
2508
2693
  */
2509
2694
  interface StyleCascadeTable {
2695
+ /** Fill section columns without balancing: `w:noColumnBalance` is on in a legacy mode. */
2696
+ readonly noColumnBalance?: true;
2510
2697
  /** Keep floating tables that fit a full page together under the compatibility flag. */
2511
2698
  readonly doNotBreakWrappedTables?: true;
2512
2699
  /** Legacy or explicitly disabled optional OpenType substitutions. */
2513
2700
  readonly disableOptionalLigatures?: true;
2701
+ /**
2702
+ * How distributed paragraphs spread their lines when the document selects character
2703
+ * distribution (`DistributedSpacing` in `distributed-spacing.ts`); absent for `'spaces'`.
2704
+ * @internal
2705
+ */
2706
+ readonly distributedSpacing?: 'characters' | 'legacyCharacters';
2514
2707
  /** Legacy noExtraLineSpacing behavior, included in the producer fingerprint. */
2515
2708
  readonly preserveExactLineBaseline?: true;
2516
2709
  /** `w:adjustLineHeightInTable`: cell paragraphs snap to the section line grid too. */
@@ -2518,20 +2711,19 @@ interface StyleCascadeTable {
2518
2711
  /** `w:doNotUseIndentAsNumberingTabStop`, carried onto each paragraph's tab stops. */
2519
2712
  readonly ignoreIndentAsNumberingTabStop?: true;
2520
2713
  /**
2521
- * `w:doNotUseHTMLParagraphAutoSpacing`: adjacent paragraph spacing adds up, and automatic
2522
- * spacing is a fixed 5pt before and 10pt after.
2714
+ * `w:doNotUseHTMLParagraphAutoSpacing`: adjacent paragraph spacing adds up, and the automatic
2715
+ * spacing flags are ignored, so the authored measurement stays.
2523
2716
  */
2524
2717
  readonly fixedParagraphSpacing?: true;
2525
- /**
2526
- * `w:doNotExpandShiftReturn`: a justified line ending in a manual line break keeps its
2527
- * natural spacing, as a last line does.
2528
- */
2718
+ /** `w:doNotExpandShiftReturn`: a justified line before a manual break keeps natural spacing. */
2529
2719
  readonly unstretchedManualBreakLines?: true;
2530
2720
  /**
2531
2721
  * Legacy modes: a justified line ending in a page or column break stretches to the measure
2532
2722
  * unless it is the last line of its paragraph.
2533
2723
  */
2534
2724
  readonly pageBreakLinesStretch?: true;
2725
+ /** `w:splitPgBreakAndParaMark` in a legacy mode: the mark after a page break takes a line. @internal */
2726
+ readonly pageBreakMarkOnNextPage?: true;
2535
2727
  /** Explicit compatibility opt-in to the unmodified ISO table style hierarchy. */
2536
2728
  readonly strictTableStyleHierarchy?: boolean;
2537
2729
  readonly typography?: CjkTypographySettings;
@@ -2795,7 +2987,16 @@ interface SemanticCommentArtifactRecord {
2795
2987
  readonly kind: 'comment';
2796
2988
  readonly id: string;
2797
2989
  readonly author: string;
2990
+ /** Initials to show for the author: the document's, or ones made from the author name. */
2798
2991
  readonly initials: string;
2992
+ /** The initials the document itself declares, trimmed; absent when it declares none. */
2993
+ readonly declaredInitials?: string;
2994
+ /**
2995
+ * The place of the comment's reference mark among the reference marks in the main document
2996
+ * body, counting from 0; absent when the body holds no reference mark for it. Comments are
2997
+ * numbered in this order.
2998
+ */
2999
+ readonly referenceOrder?: number;
2799
3000
  readonly date?: string;
2800
3001
  readonly text: string;
2801
3002
  readonly resolved: boolean;
@@ -2949,6 +3150,12 @@ interface TextMeasurer {
2949
3150
  textOutline?(text: string, style: ResolvedRunStyle): TextOutline | undefined;
2950
3151
  /** Whether line metrics use an admitted face instead of approximate fallback metrics. */
2951
3152
  hasResolvedFont?(style: ResolvedRunStyle): boolean;
3153
+ /**
3154
+ * Optional: whether the resolved face itself has a glyph for every character of `text`, with
3155
+ * no glyph fallback. Undefined when no face resolves or the measurer cannot tell.
3156
+ * @internal
3157
+ */
3158
+ faceCovers?(text: string, style: ResolvedRunStyle): boolean | undefined;
2952
3159
  /**
2953
3160
  * Optional `OS/2` strikeout stroke for the resolved face, at the drawn size. Word paints
2954
3161
  * `w:separator` as a strikeout, so the note rule reads its thickness and offset here rather
@@ -3124,6 +3331,13 @@ interface StyleSpanRecord {
3124
3331
  * typed there would be — which is what Word draws.
3125
3332
  */
3126
3333
  readonly tabLeaderAdvancePt?: number;
3334
+ /**
3335
+ * Alignment of the stop a `\t` span advanced to, when it is not `left`. A distributed
3336
+ * line stretches the text after its last tab only when that tab reached a left stop.
3337
+ *
3338
+ * @internal
3339
+ */
3340
+ readonly tabAlignment?: Exclude<TabAlignment, 'left'>;
3127
3341
  /**
3128
3342
  * The hyperlink this span belongs to, or absent for ordinary text.
3129
3343
  *
@@ -3340,6 +3554,8 @@ interface ParagraphFragmentRecord {
3340
3554
  readonly hSpace: number;
3341
3555
  readonly vSpace: number;
3342
3556
  readonly box: LayoutBox;
3557
+ /** The frame's vertical position comes from the page or margin, not from the text flow. */
3558
+ readonly pageFramed?: true;
3343
3559
  };
3344
3560
  readonly range: SourceRange;
3345
3561
  readonly props: readonly OoxmlProperty[];
@@ -3857,5 +4073,5 @@ interface SectionBreakMarkRecord {
3857
4073
  readonly kind: SectionBreakType;
3858
4074
  }
3859
4075
 
3860
- export { FontResolutionError as aL, HARD_MAX_AGGREGATE_FONT_BYTES as aU, HARD_MAX_FONT_BYTES as aV, HARD_MAX_FONT_SOURCES as aW, AUTO_PARAGRAPH_SPACING_PT as ab, DEFAULT_PAGE_GEOMETRY as am, DEFAULT_RUN_STYLE as an, DEFAULT_SECTION_PROPERTIES as ao, DEFAULT_TAB_INTERVAL_PT as ap, DEFAULT_TAB_INTERVAL_TWIPS as aq, EMPTY_NUMBERING_INDEX as ay, EMPTY_TAB_STOPS as az, MAX_BORDER_SPACE_PT as b0, MAX_BORDER_WIDTH_PT as b1, MAX_DOCUMENT_SECTIONS as b2, MAX_LVL_OVERRIDES as b3, MAX_NUMBERING_DEFINITIONS as b4, MAX_PARAGRAPH_SPACING_PT as b5, MAX_SHAPING_CONTEXT as b6, MAX_STYLE_DEFINITIONS as b7, MAX_TABLE_BORDER_STROKES as b8, MAX_TAB_POSITION_TWIPS as b9, SINGLE_LINE_SPACING as bD, MAX_TAB_STOPS as ba, PAGE_BORDER_SIDES as bd, PARAGRAPH_BORDER_SIDES as be, readBorderSide as c$, TAB_LEADER_GLYPH as c0, enumerateDocumentSections as cA, enumerateDocumentSectionsBounded as cB, fixedPoint as cC, fontRequestKey as cD, geometryOfSection as cE, glyphSizeFactorOf as cF, isValidStyleId as cG, itemizeScriptFontSlots as cH, layoutEquation as cI, measureDisplayText as cJ, nextTabDestination as cK, pageBordersFingerprint as cL, paragraphBorderExtentPt as cM, paragraphBorderStrokeWidthPt as cN, paragraphBorders as cO, paragraphBordersFingerprint as cP, paragraphBreaksBefore as cQ, paragraphContextualSpacing as cR, paragraphLineSpacing as cS, paragraphSectionNode as cT, paragraphSpacing as cU, paragraphTabStops as cV, parsePageBorders as cW, parsePageNumbering as cX, parseRefInstruction as cY, parseSectionProperties as cZ, projectedSectionSourceIndexes as c_, UnsupportedScriptError as cd, appliedSpaceBefore as cf, applyLineSpacing as cg, baselineShiftPtOf as ch, borderExtentPt as ci, borderWeight as cj, bottomBorderExtentPt as ck, boundedStructuralFontValidator as cl, buildNumberingIndex as cm, buildStyleCascadeTable as cn, cascadeParagraphFormatting as co, cascadeRunProperties as cp, cascadedBottomBorder as cq, cascadedParagraphBorders as cr, cascadedTabStops as cs, collapsedSpaceBefore as ct, createFontResourceSnapshot as cu, createShapedRun as cv, createShapingEnvironment as cw, createUnsupportedContentProjector as cx, defaultTabIntervalFromSettings as cy, displayText as cz, readCellBorders as d0, readNumPr as d1, readSectionProperties as d2, readTableBorders as d3, resolveBorderConflict as d4, resolveNumberingLevel as d5, resolveParagraphLayoutInputs as d6, resolveRunStyle as d7, resolveStoryListItems as d8, resolveStoryRefFields as d9, resolveTableCellBorderGrid as da, runStylesEqual as db, shapedRunComparatorInputs as dc, shapingEnvironmentFingerprint as dd, shapingEnvironmentFingerprintInputs as de, styleForFontSlot as df, tabAdvanceWidth as dg, tabStopsFingerprint as dh, withDefaultTabInterval as di, withNumberingStyleLinks as dj, withResolvedListItems as dk };
3861
- export type { SourceRange as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, DrawingPoint as D, NumberingLevelIndent as E, FontResourceSnapshot as F, ResolvedListItem as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, RefFieldContext as J, InlineDrawingLayoutContext as K, LineRecord as L, ModelRange as M, NoteAreaRecord as N, CellBorderBox as O, ParagraphFragmentRecord as P, TableBorderBox as Q, ResolvedRunStyle as R, SemanticLayout as S, TextMeasurer as T, UnsupportedElement as U, VersionedShapingLibrary as V, TableCellStyleFormatting as W, TableFloatPosition as X, StyleCascadeTable as Y, FixedPoint as Z, FontByteValidator as _, PageRecord as a, ListSuffix as a$, HyperlinkProjector as a0, FieldLinkProjector as a1, StoryPageFieldNeeds as a2, HyperlinkFieldSpec as a3, SpanLinkRecord as a4, PageGeometry as a5, SectionColumns as a6, SectionPageBorders as a7, PageBorderFrameRecord as a8, ParagraphBorderStrokeRecord as a9, EquationBarGeometry as aA, EquationFractionGeometry as aB, EquationGeometry as aC, EquationNaryGeometry as aD, EquationRadicalGeometry as aE, EquationRowGeometry as aF, EquationScriptGeometry as aG, EquationSpanRecord as aH, EquationTextGeometry as aI, FieldAtomMarker as aJ, FontFingerprintInputs as aK, FontResolutionErrorCode as aM, FontResourceDefinition as aN, FontResourceInstrumentation as aO, FontResourceSnapshotOptions as aP, FontSlot as aQ, FontValidationResult as aR, GlyphOutline as aS, GroupTextboxStoryRecord as aT, LevelOverride as aX, LineSpacingRule as aY, ListMarkerAlign as aZ, ListMarkerRecord as a_, StrikeoutStrokePt as aa, AbstractNumDefinition as ac, AnchoredDrawingLayoutFallback as ad, BidiEmbeddingLevels as ae, BorderGridGeometry as af, CascadedParagraphFormatting as ag, CjkTypographySettings as ah, ContentControlGeometryFragment as ai, ContentControlLevel as aj, ContentControlMappedType as ak, ContentControlModelRange as al, DeclaredFontSubstitution as ar, DocumentSection as as, DocumentSectionsEnumeration as at, DrawingClipFallback as au, DrawingGeometry as av, DrawingGroupPictureRecord as aw, DrawingTextArtRecord as ax, LayoutBox as b, StyleDefinition as b$, ResolvedTableBorderEdge as bA, ResolvedTableBorderEdgeSegment as bB, ResolvedUnderline as bC, ScriptItem as bE, SectionBreakMarkRecord as bF, SectionBreakType as bG, SectionColumnDefinition as bH, SectionMargins as bI, SectionPageNumbering as bJ, SemanticArtifactRootStoryKind as bK, SemanticArtifactStoryKind as bL, SemanticCommentArtifactRecord as bM, SemanticReviewArtifactOccurrence as bN, SemanticReviewArtifactOccurrenceGeometry as bO, SemanticReviewArtifactPosition as bP, SemanticReviewArtifactSource as bQ, SemanticTrackedChangeArtifactRecord as bR, ShapeInput as bS, ShapedCluster as bT, ShapedFontSpan as bU, ShapedGlyph as bV, ShapedRunComparatorInputs as bW, ShapedVerticalMetrics as bX, ShapingContext as bY, ShapingEnvironment as bZ, ShapingEnvironmentFingerprintInputs as b_, NumDefinition as bb, NumberingPictureBullet as bc, PageBorderDisplay as bf, PageBorderOffsetFrom as bg, PageBorderSide as bh, PageBorderStrokeRecord as bi, PageBorderZOrder as bj, PageRefCalibrationCell as bk, PageRefFieldProjection as bl, ParagraphAutoSpacingContext as bm, ParagraphBorderEdge as bn, ParagraphBorderSide as bo, ParagraphBorders as bp, ParagraphBottomBorderRecord as bq, ParagraphIndent as br, ParagraphLayoutInputs as bs, ParagraphLineSpacing as bt, ParagraphSpacing as bu, RefFieldSpec as bv, RefNoteParts as bw, ResolvedCellBorders as bx, ResolvedPictureBullet as by, ResolvedTabStops as bz, NoteStoryRecord as c, TabAlignment as c1, TabDestination as c2, TabLeader as c3, TabStop as c4, TableBorderSideName as c5, TableBorderStrokeRecord as c6, TableFragmentRecord as c7, TextArtFit as c8, TextDirection as c9, TextOutline as ca, TextboxStoryFallbackReason as cb, TextboxStoryLayout as cc, VerticalAlign as ce, ContentControlLock as d, UnsupportedElementLayout as e, UnsupportedElementRule as f, StyleSpanRecord as g, TableRowFragmentRecord as h, TableCellFragmentRecord as i, ShapingEnvironmentInput as j, TextShaper as k, ResolvedFont as l, NormalizationPolicy as m, FixedPointRoundingMode as n, FontRequest as o, SemanticReviewArtifactRecord as p, ListMarkerPictureRecord as q, FontSubstitution as r, ShapedRun as s, SectionProperties as t, NumberingLevel as u, NumberingIndex as v, DrawingInsets as w, TableBorderSide as x, TableFloatXSpec as y, TableFloatYSpec as z };
4076
+ export { HARD_MAX_FONT_BYTES as a$, EMPTY_NUMBERING_INDEX as aD, EMPTY_TAB_STOPS as aE, FontResolutionError as aS, HARD_MAX_AGGREGATE_FONT_BYTES as a_, AUTO_PARAGRAPH_SPACING_PT as af, DEFAULT_PAGE_GEOMETRY as ap, DEFAULT_RUN_STYLE as aq, DEFAULT_SECTION_PROPERTIES as ar, DEFAULT_TAB_INTERVAL_PT as as, DEFAULT_TAB_INTERVAL_TWIPS as at, HARD_MAX_FONT_SOURCES as b0, MAX_BORDER_SPACE_PT as b6, MAX_BORDER_WIDTH_PT as b7, MAX_DOCUMENT_SECTIONS as b8, MAX_LVL_OVERRIDES as b9, SINGLE_LINE_SPACING as bJ, MAX_NUMBERING_DEFINITIONS as ba, MAX_PARAGRAPH_SPACING_PT as bb, MAX_SHAPING_CONTEXT as bc, MAX_STYLE_DEFINITIONS as bd, MAX_TABLE_BORDER_STROKES as be, MAX_TAB_POSITION_TWIPS as bf, MAX_TAB_STOPS as bg, PAGE_BORDER_SIDES as bj, PARAGRAPH_BORDER_SIDES as bk, parseRefInstruction as c$, TAB_LEADER_GLYPH as c5, createUnsupportedContentProjector as cA, defaultTabIntervalFromSettings as cB, displayText as cC, enumerateDocumentSections as cD, enumerateDocumentSectionsBounded as cE, fixedPoint as cF, fontRequestKey as cG, geometryOfSection as cH, glyphSizeFactorOf as cI, groupPictureLayerDrawing as cJ, isValidStyleId as cK, layoutEquation as cL, measureDisplayText as cM, nextTabDestination as cN, pageBordersFingerprint as cO, paragraphBorderExtentPt as cP, paragraphBorderStrokeWidthPt as cQ, paragraphBorders as cR, paragraphBordersFingerprint as cS, paragraphBreaksBefore as cT, paragraphContextualSpacing as cU, paragraphLineSpacing as cV, paragraphSectionNode as cW, paragraphSpacing as cX, paragraphTabStops as cY, parsePageBorders as cZ, parsePageNumbering as c_, appliedSpaceBefore as ci, applyLineSpacing as cj, baselineShiftPtOf as ck, borderExtentPt as cl, borderWeight as cm, bottomBorderExtentPt as cn, boundedStructuralFontValidator as co, buildNumberingIndex as cp, buildStyleCascadeTable as cq, cascadeParagraphFormatting as cr, cascadeRunProperties as cs, cascadedBottomBorder as ct, cascadedParagraphBorders as cu, cascadedTabStops as cv, collapsedSpaceBefore as cw, createFontResourceSnapshot as cx, createShapedRun as cy, createShapingEnvironment as cz, parseSectionProperties as d0, projectedSectionSourceIndexes as d1, readBorderSide as d2, readCellBorders as d3, readSectionProperties as d4, readTableBorders as d5, resolveBorderConflict as d6, resolveNumberingLevel as d7, resolveParagraphLayoutInputs as d8, resolveRunStyle as d9, resolveStoryListItems as da, resolveStoryRefFields as db, resolveTableCellBorderGrid as dc, runStylesEqual as dd, shapedRunComparatorInputs as de, shapingEnvironmentFingerprint as df, shapingEnvironmentFingerprintInputs as dg, tabAdvanceWidth as dh, tabStopsFingerprint as di, withDefaultTabInterval as dj, withNumberingStyleLinks as dk, withResolvedListItems as dl, unsupportedElementRuleMatches as u };
4077
+ export type { StyleCascadeTable as $, AnchoredDrawingRecord as A, BlockFragmentRecord as B, ContentControlBoundaryRecord as C, DrawingPoint as D, DrawingInsets as E, FontResourceSnapshot as F, TableFloatXSpec as G, HeaderFooterStoryRecord as H, InlineDrawingRecord as I, TableFloatYSpec as J, NumberingLevelIndent as K, LineRecord as L, ModelRange as M, NoteAreaRecord as N, ResolvedListItem as O, ParagraphFragmentRecord as P, RefFieldContext as Q, ResolvedRunStyle as R, SemanticLayout as S, TextMeasurer as T, UnsupportedElement as U, VersionedShapingLibrary as V, InlineDrawingLayoutContext as W, CellBorderBox as X, TableBorderBox as Y, TableCellStyleFormatting as Z, TableFloatPosition as _, PageRecord as a, FixedPoint as a0, FontByteValidator as a1, SourceRange as a2, HyperlinkProjector as a3, FieldLinkProjector as a4, StoryPageFieldNeeds as a5, HyperlinkFieldSpec as a6, SpanLinkRecord as a7, PageGeometry as a8, SectionColumns as a9, DrawingGroupPictureRecord as aA, DrawingPlaceholderKind as aB, DrawingTextArtRecord as aC, EquationBarGeometry as aF, EquationBorderBoxGeometry as aG, EquationDiagonal as aH, EquationFractionGeometry as aI, EquationGeometry as aJ, EquationNaryGeometry as aK, EquationRadicalGeometry as aL, EquationRowGeometry as aM, EquationScriptGeometry as aN, EquationSpanRecord as aO, EquationTextGeometry as aP, FieldAtomMarker as aQ, FontFingerprintInputs as aR, FontResolutionErrorCode as aT, FontResourceDefinition as aU, FontResourceInstrumentation as aV, FontResourceSnapshotOptions as aW, FontValidationResult as aX, GlyphOutline as aY, GroupTextboxStoryRecord as aZ, SectionPageBorders as aa, PageBorderFrameRecord as ab, ParagraphBorderStrokeRecord as ac, StrikeoutStrokePt as ad, TextOutline as ae, AbstractNumDefinition as ag, AnchoredDrawingLayoutFallback as ah, BorderGridGeometry as ai, CascadedParagraphFormatting as aj, CjkTypographySettings as ak, ContentControlGeometryFragment as al, ContentControlLevel as am, ContentControlMappedType as an, ContentControlModelRange as ao, DeclaredFontSubstitution as au, DocumentSection as av, DocumentSectionsEnumeration as aw, DrawingClipFallback as ax, DrawingGeometry as ay, DrawingGroupPictureLayerRecord as az, LayoutBox as b, ShapedRunComparatorInputs as b$, LevelOverride as b1, LineSpacingRule as b2, ListMarkerAlign as b3, ListMarkerRecord as b4, ListSuffix as b5, ParagraphSpacing as bA, RefFieldSpec as bB, RefNoteParts as bC, ResolvedCellBorders as bD, ResolvedPictureBullet as bE, ResolvedTabStops as bF, ResolvedTableBorderEdge as bG, ResolvedTableBorderEdgeSegment as bH, ResolvedUnderline as bI, SectionBreakMarkRecord as bK, SectionBreakType as bL, SectionColumnDefinition as bM, SectionMargins as bN, SectionPageNumbering as bO, SemanticArtifactRootStoryKind as bP, SemanticArtifactStoryKind as bQ, SemanticCommentArtifactRecord as bR, SemanticReviewArtifactOccurrence as bS, SemanticReviewArtifactOccurrenceGeometry as bT, SemanticReviewArtifactPosition as bU, SemanticReviewArtifactSource as bV, SemanticTrackedChangeArtifactRecord as bW, ShapeInput as bX, ShapedCluster as bY, ShapedFontSpan as bZ, ShapedGlyph as b_, NumDefinition as bh, NumberingPictureBullet as bi, PageBorderDisplay as bl, PageBorderOffsetFrom as bm, PageBorderSide as bn, PageBorderStrokeRecord as bo, PageBorderZOrder as bp, PageRefCalibrationCell as bq, PageRefFieldProjection as br, ParagraphAutoSpacingContext as bs, ParagraphBorderEdge as bt, ParagraphBorderSide as bu, ParagraphBorders as bv, ParagraphBottomBorderRecord as bw, ParagraphIndent as bx, ParagraphLayoutInputs as by, ParagraphLineSpacing as bz, NoteStoryRecord as c, ShapedVerticalMetrics as c0, ShapingContext as c1, ShapingEnvironment as c2, ShapingEnvironmentFingerprintInputs as c3, StyleDefinition as c4, TabAlignment as c6, TabDestination as c7, TabLeader as c8, TabStop as c9, TableBorderSideName as ca, TableBorderStrokeRecord as cb, TableCellDiagonalRecord as cc, TableFragmentRecord as cd, TextArtFit as ce, TextboxStoryFallbackReason as cf, TextboxStoryLayout as cg, VerticalAlign as ch, ContentControlLock as d, StyleSpanRecord as e, TableRowFragmentRecord as f, TableCellFragmentRecord as g, UnsupportedElementLayout as h, UnsupportedElementRule as i, ShapingEnvironmentInput as j, TextShaper as k, ResolvedFont as l, NormalizationPolicy as m, FixedPointRoundingMode as n, FontRequest as o, SemanticReviewArtifactRecord as p, ListMarkerPictureRecord as q, FontSubstitution as r, ShapedRun as s, SectionProperties as t, NumberingLevel as v, NumberingIndex as w, TextDirection as x, FontSlot as y, TableBorderSide as z };