@stll/docx-core 0.43.1 → 0.44.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.
@@ -1,4 +1,4 @@
1
- import { n as PreservedChild, r as PreservedMarkup, t as PreservedAttribute } from "./preservedMarkup-9L4lbGnE.js";
1
+ import { a as DeepReadonly, n as PreservedChild, o as RecordField, r as PreservedMarkup, s as WritableRecord, t as PreservedAttribute } from "./preservedMarkup-BWpGhchw.js";
2
2
  /**
3
3
  * GENERATED FILE — do not edit.
4
4
  *
@@ -26,7 +26,7 @@ type BorderStyle = (typeof BORDER_STYLES)[number];
26
26
  * parser reports it through `ParseContext` so the normalisation is visible,
27
27
  * and the serializer writes `raw` back unchanged.
28
28
  */
29
- type UnrecognisedBorderStyle = {
29
+ type UnrecognisedBorderStyle = WritableRecord & {
30
30
  readonly kind: "unrecognised";
31
31
  readonly raw: string;
32
32
  };
@@ -39,9 +39,9 @@ declare const borderStyleFrom: (value: string) => BorderStyleValue;
39
39
  /** The token to write back, whether or not the schema declares it. */
40
40
  declare const borderStyleToken: (style: BorderStyleValue) => string;
41
41
  /** `none`: the author cancelled a border inherited from the container. */
42
- declare const isBorderNone: (style: BorderStyleValue | undefined) => boolean;
42
+ declare const isBorderNone: (style: DeepReadonly<BorderStyleValue> | undefined) => boolean;
43
43
  /** `nil`: the author stated no border. */
44
- declare const isBorderNil: (style: BorderStyleValue | undefined) => boolean;
44
+ declare const isBorderNil: (style: DeepReadonly<BorderStyleValue> | undefined) => boolean;
45
45
  /**
46
46
  * Whether the edge paints nothing, by either reserved member.
47
47
  *
@@ -50,7 +50,7 @@ declare const isBorderNil: (style: BorderStyleValue | undefined) => boolean;
50
50
  * draw. Which one was written still matters on the way back out, which is why
51
51
  * the value keeps it.
52
52
  */
53
- declare const statesNoBorder: (style: BorderStyleValue | undefined) => boolean;
53
+ declare const statesNoBorder: (style: DeepReadonly<BorderStyleValue> | undefined) => boolean;
54
54
  /**
55
55
  * GENERATED FILE — do not edit.
56
56
  *
@@ -133,7 +133,7 @@ declare const THEME_COLOR_BY_SCHEME_COLOR_VALUE: {
133
133
  * treatment `w:val` on `CT_Border` already gets for a style outside
134
134
  * `ST_Border`.
135
135
  */
136
- type UnrecognisedThemeColor = {
136
+ type UnrecognisedThemeColor = WritableRecord & {
137
137
  readonly kind: "unrecognised";
138
138
  readonly raw: string;
139
139
  };
@@ -151,18 +151,18 @@ declare const readThemeColor: (raw: string | null | undefined) => ThemeColorValu
151
151
  /** The token to write back, whether or not the schema enumerates it. */
152
152
  declare const themeColorToken: (value: ThemeColorValue) => string;
153
153
  /** The schema token, or `undefined` for one the model only carries verbatim. */
154
- declare const knownThemeColor: (value: ThemeColorValue) => ThemeColor | undefined;
154
+ declare const knownThemeColor: (value: DeepReadonly<ThemeColorValue>) => ThemeColor | undefined;
155
155
  /**
156
156
  * The theme slot a reference paints with, or `undefined` when it names none.
157
157
  *
158
158
  * `undefined` covers both `none`, which cancels an inherited theme colour, and
159
159
  * a token the schema does not enumerate.
160
160
  */
161
- declare const themeColorSlot: (value: ThemeColorValue) => SchemeColorSlot | undefined;
161
+ declare const themeColorSlot: (value: DeepReadonly<ThemeColorValue>) => SchemeColorSlot | undefined;
162
162
  /**
163
163
  * Color value - can be direct RGB, theme reference, or auto
164
164
  */
165
- type ColorValue = {
165
+ type ColorValue = WritableRecord & {
166
166
  /** RGB hex value without # (e.g., "FF0000") */
167
167
  rgb?: string;
168
168
  /**
@@ -180,7 +180,7 @@ type ColorValue = {
180
180
  /**
181
181
  * Border specification for any border (paragraph, table, page)
182
182
  */
183
- type BorderSpec = {
183
+ type BorderSpec = WritableRecord & {
184
184
  /**
185
185
  * `w:val`: an `ST_Border` member, or the raw token when the file wrote one
186
186
  * the schema does not declare. Ask `statesNoBorder`/`isBorderNone`/
@@ -223,7 +223,7 @@ type BorderSpec = {
223
223
  /**
224
224
  * Shading/background properties
225
225
  */
226
- type ShadingProperties = {
226
+ type ShadingProperties = WritableRecord & {
227
227
  /** Pattern fill color */
228
228
  color?: ColorValue;
229
229
  /** Background fill color */
@@ -442,11 +442,11 @@ declare const NO_PARAGRAPH_NUMBERING: {
442
442
  * bytes, so `ilvl` stays optional inside `reference`: collapsing it turns an
443
443
  * untouched save into a document that states something its source did not.
444
444
  */
445
- type ParagraphNumberingSlots = {
445
+ type ParagraphNumberingSlots = WritableRecord & {
446
446
  numId?: number;
447
447
  ilvl?: number;
448
448
  };
449
- type ParagraphNumberingReferenceOptions<NumId extends number, Level extends number | undefined> = {
449
+ type ParagraphNumberingReferenceOptions<NumId extends number, Level extends number | undefined> = WritableRecord & {
450
450
  numId: Exclude<NumId, typeof NO_NUMBERING_NUM_ID>;
451
451
  ilvl?: Level | undefined;
452
452
  };
@@ -516,7 +516,7 @@ type EmphasisMark = "none" | "dot" | "comma" | "circle" | "underDot";
516
516
  /**
517
517
  * Complete text formatting properties (w:rPr)
518
518
  */
519
- type TextFormatting = OwnFieldPresence<{
519
+ type TextFormatting = WritableRecord & OwnFieldPresence<{
520
520
  /** Bold (w:b) */
521
521
  bold?: boolean;
522
522
  /** Bold complex script (w:bCs) */
@@ -526,7 +526,7 @@ type TextFormatting = OwnFieldPresence<{
526
526
  /** Italic complex script (w:iCs) */
527
527
  italicCs?: boolean;
528
528
  /** Underline style and color (w:u) */
529
- underline?: {
529
+ underline?: WritableRecord & {
530
530
  style: UnderlineStyle;
531
531
  color?: ColorValue;
532
532
  };
@@ -555,7 +555,7 @@ type TextFormatting = OwnFieldPresence<{
555
555
  /** Font size complex script (w:szCs) */
556
556
  fontSizeCs?: number;
557
557
  /** Font family (w:rFonts) */
558
- fontFamily?: {
558
+ fontFamily?: WritableRecord & {
559
559
  ascii?: string;
560
560
  hAnsi?: string;
561
561
  eastAsia?: string;
@@ -569,7 +569,7 @@ type TextFormatting = OwnFieldPresence<{
569
569
  csTheme?: string;
570
570
  };
571
571
  /** Run language metadata (`w:lang`) used by spelling and line breaking. */
572
- language?: {
572
+ language?: WritableRecord & {
573
573
  val?: string;
574
574
  eastAsia?: string;
575
575
  bidi?: string;
@@ -624,7 +624,7 @@ type TabLeader = "none" | "dot" | "hyphen" | "underscore" | "heavy" | "middleDot
624
624
  /**
625
625
  * Tab stop definition
626
626
  */
627
- type TabStop = {
627
+ type TabStop = WritableRecord & {
628
628
  /** Position in twips from left margin */
629
629
  position: number;
630
630
  /** Alignment at tab stop */
@@ -641,11 +641,11 @@ type LineSpacingRule = "auto" | "exact" | "atLeast";
641
641
  /**
642
642
  * Complete paragraph formatting properties (w:pPr)
643
643
  */
644
- type SpacingExplicit = {
644
+ type SpacingExplicit = WritableRecord & {
645
645
  before?: boolean;
646
646
  after?: boolean;
647
647
  };
648
- type ParagraphFormatting = OwnFieldPresence<{
648
+ type ParagraphFormatting = WritableRecord & OwnFieldPresence<{
649
649
  /** Paragraph alignment (w:jc) */
650
650
  alignment?: ParagraphAlignment;
651
651
  /** Text direction (w:bidi) */
@@ -698,7 +698,7 @@ type ParagraphFormatting = OwnFieldPresence<{
698
698
  */
699
699
  indentPreservedAttributes?: PreservedAttribute[];
700
700
  /** Paragraph borders (w:pBdr) */
701
- borders?: {
701
+ borders?: WritableRecord & {
702
702
  top?: BorderSpec;
703
703
  bottom?: BorderSpec;
704
704
  left?: BorderSpec;
@@ -764,7 +764,7 @@ type ParagraphFormatting = OwnFieldPresence<{
764
764
  /** Paragraph style ID (w:pStyle) */
765
765
  styleId?: string;
766
766
  /** Text frame properties (w:framePr) */
767
- frame?: {
767
+ frame?: WritableRecord & {
768
768
  dropCap?: "none" | "drop" | "margin";
769
769
  lines?: number;
770
770
  width?: number;
@@ -818,7 +818,7 @@ type TableWidthType = "auto" | "dxa" | "nil" | "pct";
818
818
  /**
819
819
  * Table measurement (width or height)
820
820
  */
821
- type TableMeasurement = {
821
+ type TableMeasurement = WritableRecord & {
822
822
  /** Value in twips (for dxa) or fifths of a percent (for pct) */
823
823
  value: number;
824
824
  /** Measurement type */
@@ -827,7 +827,7 @@ type TableMeasurement = {
827
827
  /**
828
828
  * Table borders
829
829
  */
830
- type TableBorders = {
830
+ type TableBorders = WritableRecord & {
831
831
  top?: BorderSpec;
832
832
  bottom?: BorderSpec;
833
833
  left?: BorderSpec;
@@ -839,14 +839,14 @@ type TableBorders = {
839
839
  * Table cell borders, including w:tl2br (top-left to bottom-right) and
840
840
  * w:tr2bl (top-right to bottom-left).
841
841
  */
842
- type TableCellBorders = TableBorders & {
842
+ type TableCellBorders = TableBorders & WritableRecord & {
843
843
  topLeftToBottomRight?: BorderSpec;
844
844
  topRightToBottomLeft?: BorderSpec;
845
845
  };
846
846
  /**
847
847
  * Cell margins
848
848
  */
849
- type CellMargins = {
849
+ type CellMargins = WritableRecord & {
850
850
  top?: TableMeasurement;
851
851
  bottom?: TableMeasurement;
852
852
  left?: TableMeasurement;
@@ -864,7 +864,7 @@ type CellMargins = {
864
864
  *
865
865
  * Read one with `resolveTableLook`, never on its own.
866
866
  */
867
- type TableLook = {
867
+ type TableLook = WritableRecord & {
868
868
  /**
869
869
  * `w:val`, the legacy `ST_ShortHexNumber` bitmask, kept as the author spelled
870
870
  * it. Producers older than the attribute form write only this.
@@ -880,7 +880,7 @@ type TableLook = {
880
880
  /**
881
881
  * Floating table properties
882
882
  */
883
- type FloatingTableProperties = {
883
+ type FloatingTableProperties = WritableRecord & {
884
884
  /** Horizontal anchor */
885
885
  horzAnchor?: "margin" | "page" | "text";
886
886
  /** Vertical anchor */
@@ -910,7 +910,7 @@ type FloatingTableProperties = {
910
910
  * a column of width zero: `undefined` is what says the snapshot recorded a
911
911
  * column and no measure for it.
912
912
  */
913
- type TableGridChange = {
913
+ type TableGridChange = WritableRecord & {
914
914
  /** `@w:id`: a physical revision id, re-minted on every save. */
915
915
  id: number;
916
916
  /** One entry per `w:gridCol`, in source order. */
@@ -919,7 +919,7 @@ type TableGridChange = {
919
919
  /**
920
920
  * Table formatting properties (w:tblPr)
921
921
  */
922
- type TableFormatting = {
922
+ type TableFormatting = WritableRecord & {
923
923
  /** Table width */
924
924
  width?: TableMeasurement;
925
925
  /** Table placement (`w:tblPr/w:jc`) */
@@ -991,11 +991,11 @@ type TableFormatting = {
991
991
  sourceXml?: string;
992
992
  };
993
993
  /** Table properties a row may override in `w:tblPrEx`. */
994
- type TablePropertyExceptionFormatting = Pick<TableFormatting, "width" | "justification" | "cellSpacing" | "indent" | "borders" | "shading" | "layout" | "cellMargins" | "look" | "preserved" | "sourceXml">;
994
+ type TablePropertyExceptionFormatting = WritableRecord & Pick<TableFormatting, "width" | "justification" | "cellSpacing" | "indent" | "borders" | "shading" | "layout" | "cellMargins" | "look" | "preserved" | "sourceXml">;
995
995
  /**
996
996
  * Table row formatting properties (w:trPr)
997
997
  */
998
- type TableRowFormatting = {
998
+ type TableRowFormatting = WritableRecord & {
999
999
  /** Number of table grid columns omitted before the first cell */
1000
1000
  gridBefore?: number;
1001
1001
  /** Preferred width of the omitted leading grid columns */
@@ -1039,7 +1039,7 @@ type TableRowFormatting = {
1039
1039
  /**
1040
1040
  * Conditional format style
1041
1041
  */
1042
- type ConditionalFormatStyle = {
1042
+ type ConditionalFormatStyle = WritableRecord & {
1043
1043
  /** First row */
1044
1044
  firstRow?: boolean;
1045
1045
  /** Last row */
@@ -1068,7 +1068,7 @@ type ConditionalFormatStyle = {
1068
1068
  /**
1069
1069
  * Table cell formatting properties (w:tcPr)
1070
1070
  */
1071
- type TableCellFormatting = {
1071
+ type TableCellFormatting = WritableRecord & {
1072
1072
  /** Cell width */
1073
1073
  width?: TableMeasurement;
1074
1074
  /** Cell borders */
@@ -1133,7 +1133,7 @@ type LevelSuffix = "tab" | "space" | "nothing";
1133
1133
  * an absent flag and an explicit `w:legacy="0"` are different states and the
1134
1134
  * element is recorded by presence.
1135
1135
  */
1136
- type LevelLegacy = {
1136
+ type LevelLegacy = WritableRecord & {
1137
1137
  legacy?: boolean;
1138
1138
  legacySpace?: number;
1139
1139
  legacyIndent?: number;
@@ -1141,7 +1141,7 @@ type LevelLegacy = {
1141
1141
  /**
1142
1142
  * List level definition
1143
1143
  */
1144
- type ListLevel = {
1144
+ type ListLevel = WritableRecord & {
1145
1145
  /** Level index (0-8) */
1146
1146
  ilvl: number;
1147
1147
  /** `w:tplc`: the template code Word keys the level's gallery entry by. */
@@ -1187,7 +1187,7 @@ type ListLevel = {
1187
1187
  /**
1188
1188
  * Abstract numbering definition (w:abstractNum)
1189
1189
  */
1190
- type AbstractNumbering = {
1190
+ type AbstractNumbering = WritableRecord & {
1191
1191
  /** Abstract numbering ID */
1192
1192
  abstractNumId: number;
1193
1193
  /**
@@ -1216,7 +1216,7 @@ type AbstractNumbering = {
1216
1216
  preservedAttributes?: PreservedAttribute[];
1217
1217
  };
1218
1218
  /** One `w:lvlOverride`: what a concrete instance changes about one level. */
1219
- type LevelOverride = {
1219
+ type LevelOverride = WritableRecord & {
1220
1220
  ilvl: number;
1221
1221
  startOverride?: number;
1222
1222
  lvl?: ListLevel;
@@ -1228,7 +1228,7 @@ type LevelOverride = {
1228
1228
  /**
1229
1229
  * Numbering instance (w:num)
1230
1230
  */
1231
- type NumberingInstance = {
1231
+ type NumberingInstance = WritableRecord & {
1232
1232
  /** Numbering ID (referenced by paragraphs) */
1233
1233
  numId: number;
1234
1234
  /** Reference to abstract numbering */
@@ -1241,11 +1241,11 @@ type NumberingInstance = {
1241
1241
  preservedAttributes?: PreservedAttribute[];
1242
1242
  };
1243
1243
  /** Typography from numbering-level `w:rPr` that applies to the marker glyphs. */
1244
- type ListMarkerFormatting = Pick<TextFormatting, "fontFamily" | "fontSize" | "fontSizeCs" | "bold" | "boldCs" | "italic" | "italicCs" | "rtl" | "cs" | "color">;
1244
+ type ListMarkerFormatting = WritableRecord & Pick<TextFormatting, "fontFamily" | "fontSize" | "fontSizeCs" | "bold" | "boldCs" | "italic" | "italicCs" | "rtl" | "cs" | "color">;
1245
1245
  /**
1246
1246
  * Computed list rendering info
1247
1247
  */
1248
- type ListRendering = {
1248
+ type ListRendering = WritableRecord & {
1249
1249
  /** Computed marker text (e.g., "1.", "a)", "•") */
1250
1250
  marker: string;
1251
1251
  /** Source `w:lvlText` pattern retained so newly inserted siblings can be numbered. */
@@ -1316,7 +1316,7 @@ type ListRendering = {
1316
1316
  /**
1317
1317
  * Complete numbering definitions
1318
1318
  */
1319
- type NumberingDefinitions = {
1319
+ type NumberingDefinitions = WritableRecord & {
1320
1320
  /** Abstract numbering definitions */
1321
1321
  abstractNums: AbstractNumbering[];
1322
1322
  /** Numbering instances */
@@ -1357,7 +1357,7 @@ type PresetLineDashVal = (typeof PRESET_LINE_DASH_VALS)[number];
1357
1357
  * it through `ParseContext` so the normalisation is visible, and the
1358
1358
  * serializer writes `raw` back unchanged.
1359
1359
  */
1360
- type UnrecognisedPresetLineDash = {
1360
+ type UnrecognisedPresetLineDash = WritableRecord & {
1361
1361
  readonly kind: "unrecognised";
1362
1362
  readonly raw: string;
1363
1363
  };
@@ -1466,7 +1466,7 @@ declare const mintRelationshipId: (ordinal: number) => RelationshipId;
1466
1466
  /**
1467
1467
  * Plain text content
1468
1468
  */
1469
- type TextContent = {
1469
+ type TextContent = WritableRecord & {
1470
1470
  type: "text";
1471
1471
  /** The text string */
1472
1472
  text: string;
@@ -1474,12 +1474,12 @@ type TextContent = {
1474
1474
  /**
1475
1475
  * Tab character
1476
1476
  */
1477
- type PositionalTab = {
1477
+ type PositionalTab = WritableRecord & {
1478
1478
  relativeTo?: "margin" | "indent";
1479
1479
  alignment?: "left" | "center" | "right";
1480
1480
  leader?: "none" | "dot" | "hyphen" | "underscore" | "middleDot";
1481
1481
  };
1482
- type TabContent = {
1482
+ type TabContent = WritableRecord & {
1483
1483
  type: "tab";
1484
1484
  /** Word positional-tab properties (`w:ptab`); absent for a regular `w:tab`. */
1485
1485
  positional?: PositionalTab;
@@ -1487,7 +1487,7 @@ type TabContent = {
1487
1487
  /**
1488
1488
  * Line break
1489
1489
  */
1490
- type BreakContent = {
1490
+ type BreakContent = WritableRecord & ({
1491
1491
  type: "break";
1492
1492
  /** The distinct carriage-return element, which cannot carry break attributes. */
1493
1493
  sourceElement: "cr";
@@ -1501,11 +1501,11 @@ type BreakContent = {
1501
1501
  breakType?: "page" | "column" | "textWrapping";
1502
1502
  /** Clear type for text wrapping break */
1503
1503
  clear?: "none" | "left" | "right" | "all";
1504
- };
1504
+ });
1505
1505
  /**
1506
1506
  * Symbol character (special font character)
1507
1507
  */
1508
- type SymbolContent = {
1508
+ type SymbolContent = WritableRecord & {
1509
1509
  type: "symbol";
1510
1510
  /** Font name */
1511
1511
  font: string;
@@ -1517,7 +1517,7 @@ declare const isOoxmlSymbolCharacter: (value: string) => boolean;
1517
1517
  /**
1518
1518
  * Footnote or endnote reference
1519
1519
  */
1520
- type NoteReferenceContent = {
1520
+ type NoteReferenceContent = WritableRecord & {
1521
1521
  type: "footnoteRef" | "endnoteRef";
1522
1522
  /** Note ID */
1523
1523
  id: number;
@@ -1525,14 +1525,14 @@ type NoteReferenceContent = {
1525
1525
  customMarkFollows?: boolean;
1526
1526
  };
1527
1527
  /** The authored automatic reference mark inside a note body (w:footnoteRef/w:endnoteRef). */
1528
- type NoteMarkerContent = {
1528
+ type NoteMarkerContent = WritableRecord & {
1529
1529
  type: "noteMarker";
1530
1530
  kind: "footnote" | "endnote";
1531
1531
  };
1532
1532
  /**
1533
1533
  * Field character (begin/separate/end)
1534
1534
  */
1535
- type FieldCharContent = {
1535
+ type FieldCharContent = WritableRecord & {
1536
1536
  type: "fieldChar";
1537
1537
  /** Field character type */
1538
1538
  charType: "begin" | "separate" | "end";
@@ -1552,7 +1552,7 @@ type FieldCharContent = {
1552
1552
  /**
1553
1553
  * Field instruction text
1554
1554
  */
1555
- type InstrTextContent = {
1555
+ type InstrTextContent = WritableRecord & {
1556
1556
  type: "instrText";
1557
1557
  /** Field instruction */
1558
1558
  text: string;
@@ -1560,17 +1560,17 @@ type InstrTextContent = {
1560
1560
  /**
1561
1561
  * Soft hyphen
1562
1562
  */
1563
- type SoftHyphenContent = {
1563
+ type SoftHyphenContent = WritableRecord & {
1564
1564
  type: "softHyphen";
1565
1565
  };
1566
1566
  /**
1567
1567
  * Non-breaking hyphen
1568
1568
  */
1569
- type NoBreakHyphenContent = {
1569
+ type NoBreakHyphenContent = WritableRecord & {
1570
1570
  type: "noBreakHyphen";
1571
1571
  };
1572
1572
  /** Cached pagination boundary emitted by a previous layout pass. */
1573
- type RenderedPageBreakContent = {
1573
+ type RenderedPageBreakContent = WritableRecord & {
1574
1574
  type: "renderedPageBreak";
1575
1575
  };
1576
1576
  /**
@@ -1583,7 +1583,7 @@ type RenderedPageBreakContent = {
1583
1583
  * save 2 differs from save 1. Holding the markup in the model is what makes
1584
1584
  * parse∘serialize a fixed point for the whole class at once.
1585
1585
  */
1586
- type PreservedXmlContent = {
1586
+ type PreservedXmlContent = WritableRecord & {
1587
1587
  type: "preservedXml";
1588
1588
  /** Replayable markup for one run child, as `captureVerbatimXml` wrote it. */
1589
1589
  xml: string;
@@ -1603,7 +1603,7 @@ declare const DRAWING_RAW_XML_MODES: {
1603
1603
  /** Raw XML handling mode for a drawing. */
1604
1604
  type DrawingRawXmlMode = (typeof DRAWING_RAW_XML_MODES)[keyof typeof DRAWING_RAW_XML_MODES];
1605
1605
  /** Drawing/image reference with replayable XML required for preservation-only content. */
1606
- type DrawingContent = {
1606
+ type DrawingContent = WritableRecord & ({
1607
1607
  type: "drawing";
1608
1608
  /** Image data */
1609
1609
  image: Image;
@@ -1629,7 +1629,7 @@ type DrawingContent = {
1629
1629
  /** Required: a stale fingerprint is what marks the preview unsaveable rather than regenerable. */
1630
1630
  rawImageFingerprint: string;
1631
1631
  rawXmlMode: typeof DRAWING_RAW_XML_MODES.PREVIEW_ONLY;
1632
- };
1632
+ });
1633
1633
  /**
1634
1634
  * The `mc:AlternateContent` element a shape was read from.
1635
1635
  *
@@ -1639,7 +1639,7 @@ type DrawingContent = {
1639
1639
  * the shape is unedited. A text-only edit updates both branches; other edits
1640
1640
  * regenerate the Choice and drop the Fallback rather than replaying stale geometry.
1641
1641
  */
1642
- type ShapeAlternateContent = {
1642
+ type ShapeAlternateContent = WritableRecord & {
1643
1643
  /** The whole element, every branch included, as `captureVerbatimXml` wrote it. */
1644
1644
  verbatimXml: string;
1645
1645
  /** Fingerprint of the modeled shape when the element was captured. */
@@ -1649,7 +1649,7 @@ type ShapeAlternateContent = {
1649
1649
  /**
1650
1650
  * Shape reference
1651
1651
  */
1652
- type ShapeContent = {
1652
+ type ShapeContent = WritableRecord & {
1653
1653
  type: "shape";
1654
1654
  /** Shape data */
1655
1655
  shape: Shape;
@@ -1663,7 +1663,7 @@ type RunContent = TextContent | TabContent | BreakContent | SymbolContent | Note
1663
1663
  /**
1664
1664
  * A run is a contiguous region of text with the same formatting
1665
1665
  */
1666
- type Run = {
1666
+ type Run = WritableRecord & {
1667
1667
  type: "run";
1668
1668
  /** Text formatting properties */
1669
1669
  formatting?: TextFormatting;
@@ -1684,7 +1684,7 @@ type Run = {
1684
1684
  /**
1685
1685
  * Hyperlink (w:hyperlink)
1686
1686
  */
1687
- type Hyperlink = {
1687
+ type Hyperlink = WritableRecord & {
1688
1688
  type: "hyperlink";
1689
1689
  /** Relationship ID for external link */
1690
1690
  rId?: string;
@@ -1735,19 +1735,41 @@ type DisplacedByCustomXml = "next" | "prev";
1735
1735
  * is the element's attribute set rather than a hand-picked subset of it. Every
1736
1736
  * marker that lost attributes on save lost them by declaring its own fields.
1737
1737
  */
1738
- type MarkupRangeMarker = {
1738
+ type MarkupRangeMarker = WritableRecord & {
1739
1739
  /** Pairs a start with its end (`w:id`). */
1740
1740
  id: number;
1741
1741
  displacedByCustomXml?: DisplacedByCustomXml;
1742
+ /**
1743
+ * Review state, never written: a resolution kept this marker from removed
1744
+ * content and it stands between pieces of a record that content cut,
1745
+ * waiting for them to meet.
1746
+ */
1747
+ keptCut?: KeptCut;
1742
1748
  };
1749
+ /**
1750
+ * The cut a kept range marker stands in: the date of the revision it was kept
1751
+ * from, and, where only one side of it is a piece of that cut (`piece`), that
1752
+ * side: its record, or the pending change beside the marker once resolved,
1753
+ * takes the marker with no alike record across from it.
1754
+ */
1755
+ type KeptCut = WritableRecord & {
1756
+ keptFrom: string;
1757
+ piece?: KeptCutPiece;
1758
+ };
1759
+ /**
1760
+ * The side of a kept marker whose record, or the pending change that took
1761
+ * its seam, is a piece of its cut; `both` where pending changes either side
1762
+ * took it.
1763
+ */
1764
+ type KeptCutPiece = "before" | "after" | "both";
1743
1765
  /** Added-revision ancestors that own a copied bookmark or move boundary. */
1744
1766
  type CopyOriginAncestorOrdinals = readonly [number, ...number[]];
1745
- type CopyOriginMarker = {
1767
+ type CopyOriginMarker = WritableRecord & {
1746
1768
  /** Nearest added revision ancestor is ordinal 0. */
1747
1769
  copyOriginAncestors?: CopyOriginAncestorOrdinals;
1748
1770
  };
1749
1771
  /** `CT_Bookmark`: a named range, optionally scoped to table columns. */
1750
- type BookmarkRangeMarker = MarkupRangeMarker & {
1772
+ type BookmarkRangeMarker = MarkupRangeMarker & WritableRecord & {
1751
1773
  name: string;
1752
1774
  /** Column index for table bookmarks */
1753
1775
  colFirst?: number;
@@ -1762,20 +1784,20 @@ type BookmarkRangeMarker = MarkupRangeMarker & {
1762
1784
  * but a date folio does not have is not a date it may invent, so a document
1763
1785
  * that arrived without one keeps arriving without one.
1764
1786
  */
1765
- type MoveBookmarkMarker = BookmarkRangeMarker & {
1787
+ type MoveBookmarkMarker = BookmarkRangeMarker & WritableRecord & {
1766
1788
  author: string;
1767
1789
  date?: string;
1768
1790
  };
1769
1791
  /**
1770
1792
  * Bookmark start marker (w:bookmarkStart)
1771
1793
  */
1772
- type BookmarkStart = {
1794
+ type BookmarkStart = WritableRecord & {
1773
1795
  type: "bookmarkStart";
1774
1796
  } & BookmarkRangeMarker & CopyOriginMarker;
1775
1797
  /**
1776
1798
  * Bookmark end marker (w:bookmarkEnd)
1777
1799
  */
1778
- type BookmarkEnd = {
1800
+ type BookmarkEnd = WritableRecord & {
1779
1801
  type: "bookmarkEnd";
1780
1802
  } & MarkupRangeMarker & CopyOriginMarker;
1781
1803
  /**
@@ -1794,7 +1816,7 @@ type BookmarkEnd = {
1794
1816
  * which is the same honest cost {@link TableRow.preserved} carries and the
1795
1817
  * reason {@link BlockContent} admits the marker as a member wherever it can.
1796
1818
  */
1797
- type PositionedBookmarkMarker = {
1819
+ type PositionedBookmarkMarker = WritableRecord & {
1798
1820
  /** Modelled siblings (rows for a table, cells for a row) that preceded it. */
1799
1821
  index: number;
1800
1822
  marker: BookmarkStart | BookmarkEnd;
@@ -1811,7 +1833,7 @@ type FieldType = "PAGE" | "NUMPAGES" | "NUMWORDS" | "NUMCHARS" | "DATE" | "TIME"
1811
1833
  /**
1812
1834
  * Simple field (w:fldSimple)
1813
1835
  */
1814
- type SimpleField = {
1836
+ type SimpleField = WritableRecord & {
1815
1837
  type: "simpleField";
1816
1838
  /** Field instruction (e.g., "PAGE \\* MERGEFORMAT") */
1817
1839
  instruction: string;
@@ -1833,7 +1855,7 @@ type SimpleField = {
1833
1855
  /**
1834
1856
  * Complex field (w:fldChar begin/separate/end with w:instrText)
1835
1857
  */
1836
- type ComplexField = {
1858
+ type ComplexField = WritableRecord & {
1837
1859
  type: "complexField";
1838
1860
  /** Field instruction */
1839
1861
  instruction: string;
@@ -1869,7 +1891,7 @@ type Field = SimpleField | ComplexField;
1869
1891
  /**
1870
1892
  * Image size specification
1871
1893
  */
1872
- type ImageSize = {
1894
+ type ImageSize = WritableRecord & {
1873
1895
  /** Width in EMUs (English Metric Units) */
1874
1896
  width: number;
1875
1897
  /** Height in EMUs */
@@ -1879,7 +1901,7 @@ type ImageSize = {
1879
1901
  * The four wrap insets, in EMU. Tri-state per key: absent is the element having
1880
1902
  * stated none, which OOXML reads as zero only once no other carrier states one.
1881
1903
  */
1882
- type WrapDistances = {
1904
+ type WrapDistances = WritableRecord & {
1883
1905
  distT?: number;
1884
1906
  distB?: number;
1885
1907
  distL?: number;
@@ -1894,7 +1916,7 @@ type WrapDistances = {
1894
1916
  * writes each inset back on the element that stated it instead of collecting
1895
1917
  * them all onto the drawing.
1896
1918
  */
1897
- type WrapDistanceSlots = {
1919
+ type WrapDistanceSlots = WritableRecord & {
1898
1920
  /** `wp:inline`, or `wp:anchor` for a floating drawing. */
1899
1921
  drawing?: WrapDistances;
1900
1922
  /** The `wp:wrap*` child of an anchor. */
@@ -1910,14 +1932,14 @@ type WrapDistanceSlots = {
1910
1932
  * records rather than one, so a rebuild writes each back on the element that
1911
1933
  * stated it instead of collecting both onto the drawing.
1912
1934
  */
1913
- type EffectExtentSlots = {
1935
+ type EffectExtentSlots = WritableRecord & {
1914
1936
  /** `wp:inline`, or `wp:anchor` for a floating drawing. */
1915
1937
  drawing?: ImagePadding;
1916
1938
  /** The `wp:wrapSquare` or `wp:wrapTopAndBottom` child of an anchor. */
1917
1939
  wrapChild?: ImagePadding;
1918
1940
  };
1919
1941
  /** A point on a wrap polygon. */
1920
- type WrapPolygonPoint = {
1942
+ type WrapPolygonPoint = WritableRecord & {
1921
1943
  x: number;
1922
1944
  y: number;
1923
1945
  };
@@ -1927,7 +1949,7 @@ type WrapPolygonPoint = {
1927
1949
  * The coordinates are the type's own relative space (a 21600-unit box over the
1928
1950
  * drawing's extent), not EMU, and are kept exactly as authored.
1929
1951
  */
1930
- type ImageWrapPolygon = {
1952
+ type ImageWrapPolygon = WritableRecord & {
1931
1953
  /** `@edited`: absent states nothing, `false` is an explicit "generated". */
1932
1954
  edited?: boolean;
1933
1955
  /** `wp:start`, which `CT_WrapPath` requires. */
@@ -1938,7 +1960,7 @@ type ImageWrapPolygon = {
1938
1960
  /**
1939
1961
  * Image wrap type for floating images
1940
1962
  */
1941
- type ImageWrap = {
1963
+ type ImageWrap = WritableRecord & {
1942
1964
  type: "inline" | "square" | "tight" | "through" | "topAndBottom" | "behind" | "inFront";
1943
1965
  /** Wrap text direction */
1944
1966
  wrapText?: "bothSides" | "left" | "right" | "largest";
@@ -1959,7 +1981,7 @@ type ImageWrap = {
1959
1981
  * `wp:docPr`, `pic:cNvPr` and `wps:cNvPr` each have their own set, and they are
1960
1982
  * the object's accessible name and alt text rather than folio's to mint.
1961
1983
  */
1962
- type NonVisualDrawingNames = {
1984
+ type NonVisualDrawingNames = WritableRecord & {
1963
1985
  /** `@name`, schema-required, so `""` means the object was never named. */
1964
1986
  name?: string;
1965
1987
  /** `@descr`: alt text, accessibility content. */
@@ -1979,11 +2001,11 @@ type NonVisualDrawingNames = {
1979
2001
  * rebuild then writes OOXML's own default for the five `CT_Anchor` requires
1980
2002
  * rather than a value folio chose.
1981
2003
  */
1982
- type DrawingAnchor = {
2004
+ type DrawingAnchor = WritableRecord & {
1983
2005
  /** `@simplePos`: position from `wp:simplePos` rather than `positionH`/`positionV`. */
1984
2006
  useSimplePosition?: boolean;
1985
2007
  /** `wp:simplePos` itself, in EMUs. */
1986
- simplePosition?: {
2008
+ simplePosition?: WritableRecord & {
1987
2009
  x: number;
1988
2010
  y: number;
1989
2011
  };
@@ -2001,15 +2023,15 @@ type DrawingAnchor = {
2001
2023
  /**
2002
2024
  * Position for floating images
2003
2025
  */
2004
- type ImagePosition = {
2026
+ type ImagePosition = WritableRecord & {
2005
2027
  /** Horizontal positioning */
2006
- horizontal: {
2028
+ horizontal: WritableRecord & {
2007
2029
  relativeTo: "character" | "column" | "insideMargin" | "leftMargin" | "margin" | "outsideMargin" | "page" | "rightMargin";
2008
2030
  alignment?: "left" | "right" | "center" | "inside" | "outside";
2009
2031
  posOffset?: number;
2010
2032
  };
2011
2033
  /** Vertical positioning */
2012
- vertical: {
2034
+ vertical: WritableRecord & {
2013
2035
  relativeTo: "insideMargin" | "line" | "margin" | "outsideMargin" | "page" | "paragraph" | "topMargin" | "bottomMargin";
2014
2036
  alignment?: "top" | "bottom" | "center" | "inside" | "outside";
2015
2037
  posOffset?: number;
@@ -2018,7 +2040,7 @@ type ImagePosition = {
2018
2040
  /**
2019
2041
  * Image transformation
2020
2042
  */
2021
- type ImageTransform = {
2043
+ type ImageTransform = WritableRecord & {
2022
2044
  /** Rotation in degrees */
2023
2045
  rotation?: number;
2024
2046
  /** Flip horizontal */
@@ -2029,7 +2051,7 @@ type ImageTransform = {
2029
2051
  /**
2030
2052
  * Image padding/margins
2031
2053
  */
2032
- type ImagePadding = {
2054
+ type ImagePadding = WritableRecord & {
2033
2055
  top?: number;
2034
2056
  bottom?: number;
2035
2057
  left?: number;
@@ -2042,7 +2064,7 @@ type ImagePadding = {
2042
2064
  *
2043
2065
  * eigenpal #424 (image-crop subset).
2044
2066
  */
2045
- type ImageCrop = {
2067
+ type ImageCrop = WritableRecord & {
2046
2068
  left?: number;
2047
2069
  top?: number;
2048
2070
  right?: number;
@@ -2053,7 +2075,7 @@ type ImageCrop = {
2053
2075
  * attribute order. A field is undefined when the authored XML omits the
2054
2076
  * attribute, so a round-trip never materializes a lock the author never wrote.
2055
2077
  */
2056
- type ImageFrameLocks = {
2078
+ type ImageFrameLocks = WritableRecord & {
2057
2079
  noGrp?: boolean;
2058
2080
  noDrilldown?: boolean;
2059
2081
  noSelect?: boolean;
@@ -2065,14 +2087,14 @@ type ImageFrameLocks = {
2065
2087
  * A `wp:docPr` link as authored. `rId` is the target it named, so comparing it
2066
2088
  * with the model's tells a retargeted link from an untouched one.
2067
2089
  */
2068
- type ImageDocPrLink = {
2090
+ type ImageDocPrLink = WritableRecord & {
2069
2091
  xml: string;
2070
2092
  rId?: string;
2071
2093
  };
2072
2094
  /**
2073
2095
  * Embedded image (w:drawing)
2074
2096
  */
2075
- type Image = {
2097
+ type Image = WritableRecord & {
2076
2098
  type: "image";
2077
2099
  /** Unique ID */
2078
2100
  id?: string;
@@ -2178,7 +2200,7 @@ type Image = {
2178
2200
  /** Image outline/border */
2179
2201
  outline?: ShapeOutline;
2180
2202
  /** Image effects */
2181
- effects?: {
2203
+ effects?: WritableRecord & {
2182
2204
  brightness?: number;
2183
2205
  contrast?: number;
2184
2206
  saturation?: number;
@@ -2189,14 +2211,14 @@ type Image = {
2189
2211
  */
2190
2212
  type ShapeType = "rect" | "roundRect" | "ellipse" | "triangle" | "rtTriangle" | "parallelogram" | "trapezoid" | "pentagon" | "hexagon" | "heptagon" | "octagon" | "decagon" | "dodecagon" | "star4" | "star5" | "star6" | "star7" | "star8" | "star10" | "star12" | "star16" | "star24" | "star32" | "line" | "straightConnector1" | "bentConnector2" | "bentConnector3" | "bentConnector4" | "bentConnector5" | "curvedConnector2" | "curvedConnector3" | "curvedConnector4" | "curvedConnector5" | "rightArrow" | "leftArrow" | "upArrow" | "downArrow" | "leftRightArrow" | "upDownArrow" | "quadArrow" | "leftRightUpArrow" | "bentArrow" | "uturnArrow" | "leftUpArrow" | "bentUpArrow" | "curvedRightArrow" | "curvedLeftArrow" | "curvedUpArrow" | "curvedDownArrow" | "stripedRightArrow" | "notchedRightArrow" | "homePlate" | "chevron" | "rightArrowCallout" | "downArrowCallout" | "leftArrowCallout" | "upArrowCallout" | "leftRightArrowCallout" | "quadArrowCallout" | "circularArrow" | "flowChartProcess" | "flowChartAlternateProcess" | "flowChartDecision" | "flowChartInputOutput" | "flowChartPredefinedProcess" | "flowChartInternalStorage" | "flowChartDocument" | "flowChartMultidocument" | "flowChartTerminator" | "flowChartPreparation" | "flowChartManualInput" | "flowChartManualOperation" | "flowChartConnector" | "flowChartOffpageConnector" | "flowChartPunchedCard" | "flowChartPunchedTape" | "flowChartSummingJunction" | "flowChartOr" | "flowChartCollate" | "flowChartSort" | "flowChartExtract" | "flowChartMerge" | "flowChartOnlineStorage" | "flowChartDelay" | "flowChartMagneticTape" | "flowChartMagneticDisk" | "flowChartMagneticDrum" | "flowChartDisplay" | "wedgeRectCallout" | "wedgeRoundRectCallout" | "wedgeEllipseCallout" | "cloudCallout" | "borderCallout1" | "borderCallout2" | "borderCallout3" | "accentCallout1" | "accentCallout2" | "accentCallout3" | "callout1" | "callout2" | "callout3" | "accentBorderCallout1" | "accentBorderCallout2" | "accentBorderCallout3" | "actionButtonBlank" | "actionButtonHome" | "actionButtonHelp" | "actionButtonInformation" | "actionButtonBackPrevious" | "actionButtonForwardNext" | "actionButtonBeginning" | "actionButtonEnd" | "actionButtonReturn" | "actionButtonDocument" | "actionButtonSound" | "actionButtonMovie" | "irregularSeal1" | "irregularSeal2" | "frame" | "halfFrame" | "corner" | "diagStripe" | "chord" | "arc" | "bracketPair" | "bracePair" | "leftBracket" | "rightBracket" | "leftBrace" | "rightBrace" | "can" | "cube" | "bevel" | "donut" | "noSmoking" | "blockArc" | "foldedCorner" | "smileyFace" | "heart" | "lightningBolt" | "sun" | "moon" | "cloud" | "snip1Rect" | "snip2SameRect" | "snip2DiagRect" | "snipRoundRect" | "round1Rect" | "round2SameRect" | "round2DiagRect" | "plaque" | "teardrop" | "mathPlus" | "mathMinus" | "mathMultiply" | "mathDivide" | "mathEqual" | "mathNotEqual" | "gear6" | "gear9" | "funnel" | "pieWedge" | "pie" | "leftCircularArrow" | "leftRightCircularArrow" | "swooshArrow" | "textBox";
2191
2213
  /** Authored adjustment formula for a preset DrawingML geometry. */
2192
- type ShapeGeometryAdjustment = {
2214
+ type ShapeGeometryAdjustment = WritableRecord & {
2193
2215
  name: string;
2194
2216
  formula: string;
2195
2217
  };
2196
2218
  /**
2197
2219
  * Shape fill type
2198
2220
  */
2199
- type ShapeFill = {
2221
+ type ShapeFill = WritableRecord & {
2200
2222
  type: "none" | "solid" | "gradient" | "pattern" | "picture";
2201
2223
  /**
2202
2224
  * Authored DrawingML retained when the normalized projection is incomplete.
@@ -2206,7 +2228,7 @@ type ShapeFill = {
2206
2228
  /** Solid fill color */
2207
2229
  color?: ColorValue;
2208
2230
  /** Gradient stops for gradient fill */
2209
- gradient?: {
2231
+ gradient?: WritableRecord & {
2210
2232
  type: "linear" | "radial" | "rectangular" | "path";
2211
2233
  angle?: number;
2212
2234
  /**
@@ -2214,16 +2236,16 @@ type ShapeFill = {
2214
2236
  * with the fill region (ECMA-376 §20.1.8.41). Absent means not stated.
2215
2237
  */
2216
2238
  scaled?: boolean;
2217
- stops: {
2239
+ stops: (WritableRecord & {
2218
2240
  position: number;
2219
2241
  color: ColorValue;
2220
- }[];
2242
+ })[];
2221
2243
  };
2222
2244
  };
2223
2245
  /**
2224
2246
  * Shape outline/stroke
2225
2247
  */
2226
- type ShapeOutline = {
2248
+ type ShapeOutline = WritableRecord & {
2227
2249
  /**
2228
2250
  * Authored DrawingML retained for lossless round-trips. Serializers prefer
2229
2251
  * this value; callers modifying structured outline fields must omit it.
@@ -2246,14 +2268,16 @@ type ShapeOutline = {
2246
2268
  /** Line join */
2247
2269
  join?: "bevel" | "miter" | "round";
2248
2270
  /** Head arrow */
2249
- headEnd?: {
2250
- type: "none" | "triangle" | "stealth" | "diamond" | "oval" | "arrow";
2271
+ headEnd?: WritableRecord & {
2272
+ /** `@type`; absent when the source omits it (the schema default is none). */
2273
+ type?: "none" | "triangle" | "stealth" | "diamond" | "oval" | "arrow";
2251
2274
  width?: "sm" | "med" | "lg";
2252
2275
  length?: "sm" | "med" | "lg";
2253
2276
  };
2254
2277
  /** Tail arrow */
2255
- tailEnd?: {
2256
- type: "none" | "triangle" | "stealth" | "diamond" | "oval" | "arrow";
2278
+ tailEnd?: WritableRecord & {
2279
+ /** `@type`; absent when the source omits it (the schema default is none). */
2280
+ type?: "none" | "triangle" | "stealth" | "diamond" | "oval" | "arrow";
2257
2281
  width?: "sm" | "med" | "lg";
2258
2282
  length?: "sm" | "med" | "lg";
2259
2283
  };
@@ -2261,9 +2285,9 @@ type ShapeOutline = {
2261
2285
  /**
2262
2286
  * Text body inside a shape
2263
2287
  */
2264
- type ShapeTextBody = {
2288
+ type ShapeTextBody = WritableRecord & {
2265
2289
  /** Authored DrawingML WordArt metadata. */
2266
- wordArt?: {
2290
+ wordArt?: WritableRecord & {
2267
2291
  /** Authored `wps:bodyPr/@fromWordArt`; omitted when the source omitted it. */
2268
2292
  fromWordArt?: boolean;
2269
2293
  preset?: string;
@@ -2282,7 +2306,7 @@ type ShapeTextBody = {
2282
2306
  /** Horizontal text wrapping inside the shape */
2283
2307
  textWrap?: "square" | "none";
2284
2308
  /** Text margins */
2285
- margins?: {
2309
+ margins?: WritableRecord & {
2286
2310
  top?: number;
2287
2311
  bottom?: number;
2288
2312
  left?: number;
@@ -2300,7 +2324,7 @@ type ShapeTextBody = {
2300
2324
  * than a drawing of its own: a writer puts the text back into the group and
2301
2325
  * writes no second drawing for it.
2302
2326
  */
2303
- type DrawingGroupChild = {
2327
+ type DrawingGroupChild = WritableRecord & {
2304
2328
  /**
2305
2329
  * Element indices from the `wpg:wgp` down to the `wps:wsp`, one per level,
2306
2330
  * passing through any nested `wpg:grpSp`.
@@ -2314,7 +2338,7 @@ type DrawingGroupChild = {
2314
2338
  /**
2315
2339
  * Shape/drawing object (wps:wsp)
2316
2340
  */
2317
- type Shape = {
2341
+ type Shape = WritableRecord & {
2318
2342
  type: "shape";
2319
2343
  /** Shape type preset */
2320
2344
  shapeType: ShapeType;
@@ -2358,7 +2382,7 @@ type Shape = {
2358
2382
  /**
2359
2383
  * Text box (floating text container)
2360
2384
  */
2361
- type TextBox = {
2385
+ type TextBox = WritableRecord & {
2362
2386
  type: "textBox";
2363
2387
  /** Unique ID */
2364
2388
  id?: string;
@@ -2393,7 +2417,7 @@ type TextBox = {
2393
2417
  /** Vertical text alignment inside the box */
2394
2418
  verticalAlign?: ShapeTextBody["anchor"];
2395
2419
  /** Internal margins */
2396
- margins?: {
2420
+ margins?: WritableRecord & {
2397
2421
  top?: number;
2398
2422
  bottom?: number;
2399
2423
  left?: number;
@@ -2405,7 +2429,7 @@ type TextBox = {
2405
2429
  /**
2406
2430
  * Table cell
2407
2431
  */
2408
- type TableCell = {
2432
+ type TableCell = WritableRecord & {
2409
2433
  type: "tableCell";
2410
2434
  /** Authored cell identifier (`w:tc/@w:id`). */
2411
2435
  id?: string;
@@ -2438,31 +2462,31 @@ type TableCell = {
2438
2462
  * marker inside its authored wrapper and prevents one control from being
2439
2463
  * rebuilt as two wrappers around the children on either side of it.
2440
2464
  */
2441
- type TablePreservedMarkup = {
2442
- children?: (PreservedChild & {
2465
+ type TablePreservedMarkup = WritableRecord & {
2466
+ children?: (PreservedChild & WritableRecord & {
2443
2467
  contentControls?: SdtProperties[];
2444
2468
  carrierStack?: TableContentCarrier[];
2445
2469
  })[];
2446
2470
  };
2447
2471
  /** Replayable shell for a transparent custom-XML wrapper around table structure. */
2448
- type TableCustomXmlWrapper = {
2472
+ type TableCustomXmlWrapper = WritableRecord & {
2449
2473
  /** Parser-assigned identity; equal shell markup can still name distinct wrappers. */
2450
2474
  id: number;
2451
2475
  openingXml: string;
2452
2476
  closingXml: string;
2453
2477
  };
2454
2478
  /** Ordered transparent carrier stack on table, row and cell children. */
2455
- type TableContentCarrier = {
2479
+ type TableContentCarrier = WritableRecord & ({
2456
2480
  type: "customXml";
2457
2481
  wrapper: TableCustomXmlWrapper;
2458
2482
  } | {
2459
2483
  type: "sdt";
2460
2484
  properties: SdtProperties;
2461
- };
2485
+ });
2462
2486
  /**
2463
2487
  * Table row
2464
2488
  */
2465
- type TableRow = {
2489
+ type TableRow = WritableRecord & {
2466
2490
  type: "tableRow";
2467
2491
  /** Row formatting */
2468
2492
  formatting?: TableRowFormatting;
@@ -2546,7 +2570,7 @@ type TableRow = {
2546
2570
  /**
2547
2571
  * Table (w:tbl)
2548
2572
  */
2549
- type Table = {
2573
+ type Table = WritableRecord & {
2550
2574
  type: "table";
2551
2575
  /** Table formatting */
2552
2576
  formatting?: TableFormatting;
@@ -2583,10 +2607,10 @@ type Table = {
2583
2607
  /**
2584
2608
  * A comment (w:comment) from comments.xml
2585
2609
  */
2586
- type Comment = {
2610
+ type Comment = WritableRecord & {
2587
2611
  /** Comment ID (matches commentRangeStart/End) */
2588
2612
  id: number;
2589
- /** Whether the author selected content or placed a point annotation. */
2613
+ /** Whether the author selected content or placed a point annotation; absent for an unanchored source definition. */
2590
2614
  anchorKind?: "point" | "range";
2591
2615
  /** Author name */
2592
2616
  author: string;
@@ -2620,27 +2644,27 @@ type Comment = {
2620
2644
  /**
2621
2645
  * Comment range start marker in paragraph content
2622
2646
  */
2623
- type CommentRangeStart = {
2647
+ type CommentRangeStart = WritableRecord & {
2624
2648
  type: "commentRangeStart";
2625
2649
  } & MarkupRangeMarker;
2626
2650
  /**
2627
2651
  * Comment range end marker in paragraph content
2628
2652
  */
2629
- type CommentRangeEnd = {
2653
+ type CommentRangeEnd = WritableRecord & {
2630
2654
  type: "commentRangeEnd";
2631
2655
  } & MarkupRangeMarker;
2632
2656
  /**
2633
2657
  * Point comment reference (w:commentReference without an explicit range).
2634
2658
  * Word sometimes stores comments this way; we anchor them to nearby text for display.
2635
2659
  */
2636
- type CommentReference = {
2660
+ type CommentReference = WritableRecord & {
2637
2661
  type: "commentReference";
2638
2662
  id: number;
2639
2663
  };
2640
2664
  /**
2641
2665
  * Math equation content (m:oMath or m:oMathPara)
2642
2666
  */
2643
- type MathEquation = {
2667
+ type MathEquation = WritableRecord & {
2644
2668
  type: "mathEquation";
2645
2669
  /** Whether this is a block (oMathPara) or inline (oMath) equation */
2646
2670
  display: "inline" | "block";
@@ -2672,7 +2696,7 @@ declare function normalizeRevisionId(id: number): number;
2672
2696
  /**
2673
2697
  * Tracked change metadata (w:ins, w:del attributes)
2674
2698
  */
2675
- type TrackedChangeInfo = {
2699
+ type TrackedChangeInfo = WritableRecord & {
2676
2700
  /** Revision ID */
2677
2701
  id: number;
2678
2702
  /** Author who made the change */
@@ -2690,7 +2714,7 @@ type TrackedChangeInfo = {
2690
2714
  * namespace the part declares on its root, and re-emitting it under a
2691
2715
  * prefix of our choosing would name one that is not there.
2692
2716
  */
2693
- utcDate?: {
2717
+ utcDate?: WritableRecord & {
2694
2718
  attribute: string;
2695
2719
  value: string;
2696
2720
  };
@@ -2705,7 +2729,7 @@ type TrackedChangeInfo = {
2705
2729
  /**
2706
2730
  * Generic tracked property-change wrapper metadata (w:*PrChange)
2707
2731
  */
2708
- type PropertyChangeInfo = {
2732
+ type PropertyChangeInfo = WritableRecord & {
2709
2733
  /** Optional revision session ID */
2710
2734
  rsid?: string;
2711
2735
  } & TrackedChangeInfo;
@@ -2724,8 +2748,18 @@ type TrackedRunContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | Comment
2724
2748
  declare const INSERTION_SEAM_POLICIES: {
2725
2749
  readonly MERGE_PLAIN_RUNS: "merge-plain-runs";
2726
2750
  };
2751
+ /**
2752
+ * Whether an insertion marked as what its paragraph stands for had resolution
2753
+ * joins of its own: without, its zero depths only carry the marker, and it
2754
+ * resolves as an insertion with no joins.
2755
+ */
2756
+ declare const HELD_PARAGRAPH_JOINS: {
2757
+ readonly OWN: "own-joins";
2758
+ readonly NONE: "no-joins";
2759
+ };
2760
+ type HeldParagraphJoins = (typeof HELD_PARAGRAPH_JOINS)[keyof typeof HELD_PARAGRAPH_JOINS];
2727
2761
  /** Operation-created seams only; source OOXML has no such provenance. */
2728
- type TrackedResolutionJoins = {
2762
+ type TrackedResolutionJoins = WritableRecord & {
2729
2763
  /** Editor text acceptance joins only the inserted payload's plain-run seams. */
2730
2764
  acceptance?: typeof INSERTION_SEAM_POLICIES.MERGE_PLAIN_RUNS;
2731
2765
  /** Exact join depths when the wrapper is retained and unwrapped. */
@@ -2734,48 +2768,86 @@ type TrackedResolutionJoins = {
2734
2768
  /** Exact join depth when the wrapper is removed. */
2735
2769
  remove: number;
2736
2770
  /**
2737
- * Sides where the wrapper now meets accepted new content rather than a
2738
- * source piece: resolving it joins plain runs there and nothing else.
2771
+ * Sides where the wrapper meets no source piece of its cut: accepted new
2772
+ * content beside it, or, at the edge of accepted content it stands in,
2773
+ * whatever lies beyond that content. Resolving it joins plain runs there
2774
+ * and nothing else; a join recorded there takes the kept range markers that
2775
+ * name its side inside the content, as deep as it says.
2739
2776
  */
2740
2777
  plainSides?: readonly ("before" | "after")[];
2778
+ /**
2779
+ * An acceptance took every record of the container this insertion stands
2780
+ * in other than pending insertions. Rejecting the last of them empties the
2781
+ * container away, as accepting that content last does.
2782
+ */
2783
+ emptiedHolder?: true;
2784
+ /**
2785
+ * The paragraph this insertion stands in ends a block content control or
2786
+ * stands before a block it cannot join, and its added mark was rejected
2787
+ * while the paragraph held only pending insertions: it stands only for
2788
+ * them, as there was nothing to join. Rejecting the last of them removes the paragraph, as rejecting
2789
+ * the mark and them at once does. The value says whether the insertion
2790
+ * had joins of its own when marked; resolving it reads it without the
2791
+ * marker either way.
2792
+ */
2793
+ holdsParagraph?: HeldParagraphJoins;
2794
+ /**
2795
+ * This deletion is all its content control holds: it deleted exactly the
2796
+ * control's text. Accepting it leaves the control, emptied, as deleting
2797
+ * that text directly does.
2798
+ */
2799
+ holdsControlText?: true;
2800
+ /**
2801
+ * Edges of the container this change stands in where accepted content
2802
+ * meets it that its insertion joined to nothing there. A resolution that
2803
+ * empties the container leaves it standing there, emptied, as resolving
2804
+ * the change before that acceptance does.
2805
+ */
2806
+ closedHolder?: readonly ("before" | "after")[];
2741
2807
  /** A split seam survives only while all intervening insertions await rejection. */
2742
- deferredRemove?: readonly {
2808
+ deferredRemove?: readonly (WritableRecord & {
2743
2809
  depth: number;
2744
2810
  blockers: readonly number[];
2745
- }[];
2811
+ /**
2812
+ * On a pending deletion or move source that holds a piece of the cut
2813
+ * record: the edge of it where that piece meets the seam. Rejecting it
2814
+ * joins there; accepting it retires the seam.
2815
+ */
2816
+ edge?: "start" | "end";
2817
+ })[];
2746
2818
  /** Source identities handed to the retained suffix when a deleted prefix goes. */
2747
- retainedAfter?: readonly {
2819
+ retainedAfter?: readonly (WritableRecord & {
2748
2820
  depth: number;
2749
- source: readonly {
2821
+ source: readonly (WritableRecord & {
2750
2822
  space: "revision" | "control";
2751
2823
  id: number;
2752
- }[];
2753
- target: readonly {
2824
+ })[];
2825
+ target: readonly (WritableRecord & {
2754
2826
  space: "revision" | "control";
2755
2827
  id: number;
2756
- }[];
2757
- }[];
2828
+ })[];
2829
+ })[];
2758
2830
  /**
2759
2831
  * Identities of the record `levels` above this wrapper, handed to the
2760
2832
  * piece of it that an edit cut off after this wrapper, when removing this
2761
2833
  * wrapper leaves that record empty. Saved as its own ignorable attribute.
2762
2834
  */
2763
- retainedEnclosing?: readonly {
2835
+ retainedEnclosing?: readonly (WritableRecord & {
2764
2836
  levels: number;
2765
- source: readonly {
2837
+ source: readonly (WritableRecord & {
2766
2838
  space: "revision" | "control";
2767
2839
  id: number;
2768
- }[];
2769
- target: readonly {
2840
+ })[];
2841
+ target: readonly (WritableRecord & {
2770
2842
  space: "revision" | "control";
2771
2843
  id: number;
2772
- }[];
2773
- }[];
2844
+ })[];
2845
+ })[];
2774
2846
  };
2775
2847
  /**
2776
2848
  * Insertion wrapper (w:ins) — runs inserted by tracked changes
2777
2849
  */
2778
- type Insertion = {
2850
+ type Insertion = WritableRecord & {
2779
2851
  type: "insertion";
2780
2852
  /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2781
2853
  resolutionJoins?: TrackedResolutionJoins;
@@ -2787,7 +2859,7 @@ type Insertion = {
2787
2859
  /**
2788
2860
  * Deletion wrapper (w:del) — runs deleted by tracked changes
2789
2861
  */
2790
- type Deletion = {
2862
+ type Deletion = WritableRecord & {
2791
2863
  type: "deletion";
2792
2864
  /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2793
2865
  resolutionJoins?: TrackedResolutionJoins;
@@ -2799,7 +2871,7 @@ type Deletion = {
2799
2871
  /**
2800
2872
  * Move-from wrapper (w:moveFrom) — content moved away from this position
2801
2873
  */
2802
- type MoveFrom = {
2874
+ type MoveFrom = WritableRecord & {
2803
2875
  type: "moveFrom";
2804
2876
  /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2805
2877
  resolutionJoins?: TrackedResolutionJoins;
@@ -2811,7 +2883,7 @@ type MoveFrom = {
2811
2883
  /**
2812
2884
  * Move-to wrapper (w:moveTo) — content moved into this position
2813
2885
  */
2814
- type MoveTo = {
2886
+ type MoveTo = WritableRecord & {
2815
2887
  type: "moveTo";
2816
2888
  /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2817
2889
  resolutionJoins?: TrackedResolutionJoins;
@@ -2859,7 +2931,7 @@ type BidiControl = (typeof BIDI_CONTROLS)[keyof typeof BIDI_CONTROLS];
2859
2931
  * - `smartTag` is `w:smartTag` — §17.5.1.9.
2860
2932
  * - `customXml` is the run-level `w:customXml` — §17.5.1.6.
2861
2933
  */
2862
- type InlineWrapper = {
2934
+ type InlineWrapper = WritableRecord & ({
2863
2935
  type: "inlineWrapper";
2864
2936
  kind: "bidi";
2865
2937
  control: BidiControl;
@@ -2892,31 +2964,31 @@ type InlineWrapper = {
2892
2964
  /** `w:customXmlPr` verbatim; see the `smartTag` branch. */
2893
2965
  propertiesXml?: string;
2894
2966
  content: ParagraphContent[];
2895
- };
2967
+ });
2896
2968
  /**
2897
2969
  * Move-from range start marker (w:moveFromRangeStart) — ECMA-376 §17.13.5.22
2898
2970
  * Pairs with moveFromRangeEnd to delimit the source of a move in the document.
2899
2971
  */
2900
- type MoveFromRangeStart = {
2972
+ type MoveFromRangeStart = WritableRecord & {
2901
2973
  type: "moveFromRangeStart";
2902
2974
  } & MoveBookmarkMarker & CopyOriginMarker;
2903
2975
  /**
2904
2976
  * Move-from range end marker (w:moveFromRangeEnd)
2905
2977
  */
2906
- type MoveFromRangeEnd = {
2978
+ type MoveFromRangeEnd = WritableRecord & {
2907
2979
  type: "moveFromRangeEnd";
2908
2980
  } & MarkupRangeMarker & CopyOriginMarker;
2909
2981
  /**
2910
2982
  * Move-to range start marker (w:moveToRangeStart) — ECMA-376 §17.13.5.24
2911
2983
  * Pairs with moveToRangeEnd to delimit the destination of a move.
2912
2984
  */
2913
- type MoveToRangeStart = {
2985
+ type MoveToRangeStart = WritableRecord & {
2914
2986
  type: "moveToRangeStart";
2915
2987
  } & MoveBookmarkMarker & CopyOriginMarker;
2916
2988
  /**
2917
2989
  * Move-to range end marker (w:moveToRangeEnd)
2918
2990
  */
2919
- type MoveToRangeEnd = {
2991
+ type MoveToRangeEnd = WritableRecord & {
2920
2992
  type: "moveToRangeEnd";
2921
2993
  } & MarkupRangeMarker & CopyOriginMarker;
2922
2994
  /**
@@ -2926,7 +2998,7 @@ type TrackedRunChange = Insertion | Deletion | MoveFrom | MoveTo;
2926
2998
  /**
2927
2999
  * Run property change (w:rPrChange)
2928
3000
  */
2929
- type RunPropertyChange = {
3001
+ type RunPropertyChange = WritableRecord & {
2930
3002
  type: "runPropertyChange";
2931
3003
  /** Cuts created by this action; omitted on imported OOXML records. */
2932
3004
  boundaryJoins?: readonly ("before" | "after")[];
@@ -2940,10 +3012,18 @@ type RunPropertyChange = {
2940
3012
  /**
2941
3013
  * Paragraph property change (w:pPrChange)
2942
3014
  */
2943
- type ParagraphPropertyChange = {
3015
+ type ParagraphPropertyChange = WritableRecord & {
2944
3016
  type: "paragraphPropertyChange";
2945
3017
  /** Tracked change metadata */
2946
3018
  info: PropertyChangeInfo;
3019
+ /**
3020
+ * The revision this change belongs to: the paragraph-mark deletion of the
3021
+ * tracked join that set these properties. Accepting or rejecting that
3022
+ * revision resolves this change the same way; this change alone still
3023
+ * resolves by its own id. Folio review history (`folio:resolvesWith`);
3024
+ * omitted on an ordinary property change.
3025
+ */
3026
+ resolvesWith?: number;
2947
3027
  /** Paragraph properties before the tracked change */
2948
3028
  previousFormatting?: ParagraphFormatting;
2949
3029
  /** Paragraph properties after the tracked change (editor model convenience) */
@@ -2952,7 +3032,7 @@ type ParagraphPropertyChange = {
2952
3032
  /**
2953
3033
  * Table property change (w:tblPrChange)
2954
3034
  */
2955
- type TablePropertyChange = {
3035
+ type TablePropertyChange = WritableRecord & {
2956
3036
  type: "tablePropertyChange";
2957
3037
  /** Tracked change metadata */
2958
3038
  info: PropertyChangeInfo;
@@ -2968,7 +3048,7 @@ type TablePropertyChange = {
2968
3048
  * subset and is written as a different element in a different container. A
2969
3049
  * shared discriminator would let one reach the other's serializer.
2970
3050
  */
2971
- type TablePropertyExceptionChange = {
3051
+ type TablePropertyExceptionChange = WritableRecord & {
2972
3052
  type: "tablePropertyExceptionChange";
2973
3053
  /** Tracked change metadata */
2974
3054
  info: PropertyChangeInfo;
@@ -2980,7 +3060,7 @@ type TablePropertyExceptionChange = {
2980
3060
  /**
2981
3061
  * Table row property change (w:trPrChange)
2982
3062
  */
2983
- type TableRowPropertyChange = {
3063
+ type TableRowPropertyChange = WritableRecord & {
2984
3064
  type: "tableRowPropertyChange";
2985
3065
  /** Tracked change metadata */
2986
3066
  info: PropertyChangeInfo;
@@ -2992,7 +3072,7 @@ type TableRowPropertyChange = {
2992
3072
  /**
2993
3073
  * Table cell property change (w:tcPrChange)
2994
3074
  */
2995
- type TableCellPropertyChange = {
3075
+ type TableCellPropertyChange = WritableRecord & {
2996
3076
  type: "tableCellPropertyChange";
2997
3077
  /** Tracked change metadata */
2998
3078
  info: PropertyChangeInfo;
@@ -3014,14 +3094,14 @@ type TableCellPropertyChange = {
3014
3094
  /**
3015
3095
  * Section property change (w:sectPrChange)
3016
3096
  */
3017
- type SectionPropertyChange = {
3097
+ type SectionPropertyChange = WritableRecord & {
3018
3098
  type: "sectionPropertyChange";
3019
3099
  /** Tracked change metadata */
3020
3100
  info: PropertyChangeInfo;
3021
3101
  /** Section properties before the tracked change */
3022
3102
  previousProperties?: SectionProperties;
3023
3103
  /** Complete prior header/footer selection, stored in Folio's ignorable MCE extension. */
3024
- previousReferences?: {
3104
+ previousReferences?: WritableRecord & {
3025
3105
  headerReferences?: HeaderReference[];
3026
3106
  footerReferences?: FooterReference[];
3027
3107
  };
@@ -3061,7 +3141,7 @@ declare const PROPERTY_REVISION_KINDS: Readonly<{
3061
3141
  /**
3062
3142
  * Table structural tracked change metadata (row/cell insert/delete/merge)
3063
3143
  */
3064
- type TableStructuralChangeInfo = {
3144
+ type TableStructuralChangeInfo = WritableRecord & ({
3065
3145
  type: "tableRowInsertion" | "tableRowDeletion" | "tableCellInsertion" | "tableCellDeletion";
3066
3146
  /** Tracked change metadata */
3067
3147
  info: TrackedChangeInfo;
@@ -3073,7 +3153,7 @@ type TableStructuralChangeInfo = {
3073
3153
  verticalMerge?: "continue" | "rest";
3074
3154
  /** Vertical merge state that existed before the revision. */
3075
3155
  verticalMergeOriginal?: "continue" | "rest";
3076
- };
3156
+ });
3077
3157
  /**
3078
3158
  * SDT type (content control type)
3079
3159
  */
@@ -3089,7 +3169,7 @@ type SdtType = "richText" | "plainText" | "date" | "dropdown" | "comboBox" | "ch
3089
3169
  * sequence gives them. Together the two are the whole element: the serializer
3090
3170
  * writes both halves and nothing replays the source's bytes whole.
3091
3171
  */
3092
- type SdtProperties = {
3172
+ type SdtProperties = WritableRecord & {
3093
3173
  /** SDT type (a projection of the control-kind element the set holds). */
3094
3174
  sdtType: SdtType;
3095
3175
  /** Numeric id (`w:id/@w:val`). */
@@ -3117,10 +3197,10 @@ type SdtProperties = {
3117
3197
  */
3118
3198
  dateValueISO?: string;
3119
3199
  /** Dropdown/combobox list items. */
3120
- listItems?: {
3200
+ listItems?: (WritableRecord & {
3121
3201
  displayText: string;
3122
3202
  value: string;
3123
- }[];
3203
+ })[];
3124
3204
  /**
3125
3205
  * Selected dropdown / comboBox value (`w:dropDownList@w:lastValue`).
3126
3206
  * Persisted as the OOXML value, independent of the body display text.
@@ -3173,7 +3253,7 @@ type SdtProperties = {
3173
3253
  * absent element does not, which is why presence is the record rather than a
3174
3254
  * flag on {@link SdtProperties}.
3175
3255
  */
3176
- type SdtEndProperties = {
3256
+ type SdtEndProperties = WritableRecord & {
3177
3257
  /** `w:sdtEndPr/w:rPr`, absent when the element declared none. */
3178
3258
  runProperties?: TextFormatting;
3179
3259
  };
@@ -3195,7 +3275,7 @@ type SdtEndProperties = {
3195
3275
  * `EG_RangeMarkupElements` and retain their authored position inside the
3196
3276
  * control when the editor resolves nearby content.
3197
3277
  */
3198
- type InlineSdt = {
3278
+ type InlineSdt = WritableRecord & {
3199
3279
  type: "inlineSdt";
3200
3280
  /** SDT properties */
3201
3281
  properties: SdtProperties;
@@ -3209,7 +3289,7 @@ type InlineSdt = {
3209
3289
  * OOXML allows block SDTs to nest — e.g. a repeating-section control
3210
3290
  * whose row is itself a content control.
3211
3291
  */
3212
- type BlockSdt = {
3292
+ type BlockSdt = WritableRecord & {
3213
3293
  type: "blockSdt";
3214
3294
  /** SDT properties; `properties.preserved` carries what the model does not. */
3215
3295
  properties: SdtProperties;
@@ -3217,7 +3297,7 @@ type BlockSdt = {
3217
3297
  content: BlockContent[];
3218
3298
  };
3219
3299
  /** Transparent block-level `w:customXml` wrapper. */
3220
- type BlockCustomXml = {
3300
+ type BlockCustomXml = WritableRecord & {
3221
3301
  type: "blockCustomXml";
3222
3302
  /** Replayable start tag, including attributes and in-scope namespace bindings. */
3223
3303
  openingXml: string;
@@ -3246,7 +3326,7 @@ type BlockCustomXml = {
3246
3326
  * markup puts on the line, which is empty for everything except a transparent
3247
3327
  * wrapper such as `w:customXml`.
3248
3328
  */
3249
- type PreservedInline = {
3329
+ type PreservedInline = WritableRecord & {
3250
3330
  type: "preservedInline";
3251
3331
  /** Replayable markup for one child, as `captureVerbatimXml` wrote it. */
3252
3332
  xml: string;
@@ -3266,13 +3346,13 @@ type PreservedInline = {
3266
3346
  * otherwise be. A capture is hidden only while the paragraph's marker shows
3267
3347
  * it; anywhere else it is replaced by this item, which shows on the line.
3268
3348
  */
3269
- type FoldedListNumber = {
3349
+ type FoldedListNumber = (WritableRecord & {
3270
3350
  kind: "field";
3271
3351
  field: ComplexField;
3272
- } | {
3352
+ }) | (WritableRecord & {
3273
3353
  kind: "tab";
3274
3354
  run: Run;
3275
- };
3355
+ });
3276
3356
  /**
3277
3357
  * Paragraph content types
3278
3358
  */
@@ -3296,11 +3376,18 @@ declare const PARAGRAPH_MARK_CHANGE_KINDS: readonly ["moveFrom", "moveTo", "ins"
3296
3376
  /** One of {@link PARAGRAPH_MARK_CHANGE_KINDS}. */
3297
3377
  type ParagraphMarkChangeKind = (typeof PARAGRAPH_MARK_CHANGE_KINDS)[number];
3298
3378
  /** A paragraph-mark tracked change, written under `<w:pPr><w:rPr>`. */
3299
- type ParagraphMarkChange = {
3379
+ type ParagraphMarkChange = WritableRecord & {
3300
3380
  kind: ParagraphMarkChangeKind;
3301
3381
  info: TrackedChangeInfo;
3302
3382
  /** Exact source-cut depth for rejection; absent in ordinary imported revisions. */
3303
3383
  resolutionJoin?: number | undefined;
3384
+ /**
3385
+ * When the split whose cut `resolutionJoin` records was made, on a deleted
3386
+ * mark that holds the cut of the inserted break it deletes after that
3387
+ * insertion was accepted. Saved as folio's own ignorable review
3388
+ * provenance; a reader that does not know it joins at the deletion's date.
3389
+ */
3390
+ splitDate?: string | undefined;
3304
3391
  /**
3305
3392
  * Which paragraph rejecting this inserted mark keeps: `"first"` when the
3306
3393
  * paragraph after it took over the mark this one had, so this one is the
@@ -3309,6 +3396,17 @@ type ParagraphMarkChange = {
3309
3396
  * reader that does not know it joins as any rejected mark does.
3310
3397
  */
3311
3398
  survivor?: "first" | undefined;
3399
+ /**
3400
+ * A later pending deletion of this added mark, `w:del` written beside its
3401
+ * `w:ins` or `w:moveTo`: another author deleted the break an insertion
3402
+ * made, and either can be resolved first. Absent on deleted and
3403
+ * moved-from marks.
3404
+ */
3405
+ deletion?: ParagraphMarkDeletion | undefined;
3406
+ };
3407
+ /** The later deletion an added paragraph mark holds beside its insertion. */
3408
+ type ParagraphMarkDeletion = WritableRecord & {
3409
+ info: TrackedChangeInfo;
3312
3410
  };
3313
3411
  declare const REVIEW_CARRIERS: {
3314
3412
  readonly TERMINAL_TABLE: "terminal-table";
@@ -3316,7 +3414,7 @@ declare const REVIEW_CARRIERS: {
3316
3414
  /** A Folio-private untracked paragraph used to resolve a terminal table deletion. */
3317
3415
  type ReviewCarrier = (typeof REVIEW_CARRIERS)[keyof typeof REVIEW_CARRIERS];
3318
3416
  /** Paragraph (w:p) */
3319
- type Paragraph = {
3417
+ type Paragraph = WritableRecord & {
3320
3418
  type: "paragraph";
3321
3419
  /** Unique paragraph ID */
3322
3420
  paraId?: string;
@@ -3336,7 +3434,10 @@ type Paragraph = {
3336
3434
  listRendering?: ListRendering;
3337
3435
  /** Word's cached layout says this paragraph started on a new rendered page. */
3338
3436
  renderedPageBreakBefore?: boolean;
3339
- /** Section properties (if this paragraph ends a section) */
3437
+ /**
3438
+ * Section properties, if this paragraph ends a section. A section ends
3439
+ * outside every table: no operation puts one on a paragraph in a cell.
3440
+ */
3340
3441
  sectionProperties?: SectionProperties | undefined;
3341
3442
  /**
3342
3443
  * Attributes `w:p` carried that this record has no field for.
@@ -3358,18 +3459,18 @@ type HeaderFooterType = "default" | "first" | "even";
3358
3459
  /**
3359
3460
  * Header or footer reference
3360
3461
  */
3361
- type HeaderReference = {
3462
+ type HeaderReference = WritableRecord & {
3362
3463
  type: HeaderFooterType;
3363
3464
  rId: string;
3364
3465
  };
3365
- type FooterReference = {
3466
+ type FooterReference = WritableRecord & {
3366
3467
  type: HeaderFooterType;
3367
3468
  rId: string;
3368
3469
  };
3369
3470
  /**
3370
3471
  * Header or footer content
3371
3472
  */
3372
- type HeaderFooter = {
3473
+ type HeaderFooter = WritableRecord & {
3373
3474
  type: "header" | "footer";
3374
3475
  /** Header/footer type */
3375
3476
  hdrFtrType: HeaderFooterType;
@@ -3416,7 +3517,7 @@ type HeaderFooter = {
3416
3517
  * Document watermark (MS Word's behind-content page decoration).
3417
3518
  */
3418
3519
  type Watermark = TextWatermark | PictureWatermark;
3419
- type TextWatermark = {
3520
+ type TextWatermark = WritableRecord & {
3420
3521
  kind: "text";
3421
3522
  /** Visible string. Required. */
3422
3523
  text: string;
@@ -3440,7 +3541,7 @@ type TextWatermark = {
3440
3541
  */
3441
3542
  opacity?: number;
3442
3543
  };
3443
- type PictureWatermark = {
3544
+ type PictureWatermark = WritableRecord & {
3444
3545
  kind: "picture";
3445
3546
  /** Relationship id of the image part in `word/_rels/header*.xml.rels`. */
3446
3547
  imageRId: string;
@@ -3493,7 +3594,7 @@ type NoteNumberRestart = "continuous" | "eachSect" | "eachPage";
3493
3594
  /**
3494
3595
  * Footnote properties
3495
3596
  */
3496
- type FootnoteProperties = {
3597
+ type FootnoteProperties = WritableRecord & {
3497
3598
  position?: FootnotePosition;
3498
3599
  numFmt?: NumberFormat;
3499
3600
  /** `w:numFmt/@w:format`, as authored. */
@@ -3504,7 +3605,7 @@ type FootnoteProperties = {
3504
3605
  /**
3505
3606
  * Endnote properties
3506
3607
  */
3507
- type EndnoteProperties = {
3608
+ type EndnoteProperties = WritableRecord & {
3508
3609
  position?: EndnotePosition;
3509
3610
  numFmt?: NumberFormat;
3510
3611
  /** `w:numFmt/@w:format`, as authored. */
@@ -3515,7 +3616,7 @@ type EndnoteProperties = {
3515
3616
  /**
3516
3617
  * Footnote (w:footnote)
3517
3618
  */
3518
- type Footnote = {
3619
+ type Footnote = WritableRecord & {
3519
3620
  type: "footnote";
3520
3621
  /** Footnote ID */
3521
3622
  id: number;
@@ -3533,7 +3634,7 @@ type Footnote = {
3533
3634
  /**
3534
3635
  * Endnote (w:endnote)
3535
3636
  */
3536
- type Endnote = {
3637
+ type Endnote = WritableRecord & {
3537
3638
  type: "endnote";
3538
3639
  /** Endnote ID */
3539
3640
  id: number;
@@ -3564,7 +3665,7 @@ type LineNumberRestart = "continuous" | "newPage" | "newSection";
3564
3665
  /**
3565
3666
  * Column definition
3566
3667
  */
3567
- type Column = {
3668
+ type Column = WritableRecord & {
3568
3669
  /** Column width in twips */
3569
3670
  width?: number;
3570
3671
  /** Space after column in twips */
@@ -3573,7 +3674,7 @@ type Column = {
3573
3674
  /**
3574
3675
  * Section properties (w:sectPr)
3575
3676
  */
3576
- type SectionProperties = {
3677
+ type SectionProperties = WritableRecord & {
3577
3678
  /** Page width in twips */
3578
3679
  pageWidth?: number;
3579
3680
  /** Page height in twips */
@@ -3621,21 +3722,21 @@ type SectionProperties = {
3621
3722
  /** Different odd/even page headers/footers */
3622
3723
  evenAndOddHeaders?: boolean;
3623
3724
  /** Line numbering settings */
3624
- lineNumbers?: {
3725
+ lineNumbers?: WritableRecord & {
3625
3726
  start?: number;
3626
3727
  countBy?: number;
3627
3728
  distance?: number;
3628
3729
  restart?: LineNumberRestart;
3629
3730
  };
3630
3731
  /** Page numbering settings */
3631
- pageNumbering?: {
3732
+ pageNumbering?: WritableRecord & {
3632
3733
  format?: NumberFormat;
3633
3734
  start?: number;
3634
3735
  chapterStyle?: number;
3635
3736
  chapterSeparator?: string;
3636
3737
  };
3637
3738
  /** Page borders */
3638
- pageBorders?: {
3739
+ pageBorders?: WritableRecord & {
3639
3740
  top?: BorderSpec;
3640
3741
  bottom?: BorderSpec;
3641
3742
  left?: BorderSpec;
@@ -3648,7 +3749,7 @@ type SectionProperties = {
3648
3749
  zOrder?: "front" | "back";
3649
3750
  };
3650
3751
  /** Page background */
3651
- background?: {
3752
+ background?: WritableRecord & {
3652
3753
  color?: ColorValue;
3653
3754
  themeColor?: ThemeColorValue;
3654
3755
  themeTint?: string;
@@ -3661,7 +3762,7 @@ type SectionProperties = {
3661
3762
  /** Endnote properties for this section */
3662
3763
  endnotePr?: EndnoteProperties;
3663
3764
  /** Document grid */
3664
- docGrid?: {
3765
+ docGrid?: WritableRecord & {
3665
3766
  type?: "default" | "lines" | "linesAndChars" | "snapToChars";
3666
3767
  linePitch?: number;
3667
3768
  charSpace?: number;
@@ -3707,7 +3808,7 @@ type SectionProperties = {
3707
3808
  * looking for any of those may skip it, and every walker that rebuilds block
3708
3809
  * content must write it back.
3709
3810
  */
3710
- type PreservedBlock = {
3811
+ type PreservedBlock = WritableRecord & {
3711
3812
  type: "preservedBlock";
3712
3813
  /** Replayable markup for one child, as `captureVerbatimXml` wrote it. */
3713
3814
  xml: string;
@@ -3738,7 +3839,7 @@ type TableCellBlock = BlockContent;
3738
3839
  /**
3739
3840
  * Section (implicit or explicit based on sectPr)
3740
3841
  */
3741
- type Section = {
3842
+ type Section = WritableRecord & {
3742
3843
  /** Section properties */
3743
3844
  properties: SectionProperties;
3744
3845
  /** Content in this section */
@@ -3755,12 +3856,12 @@ type Section = {
3755
3856
  * inventing an editable projection for legacy VML/DrawingML page art while the
3756
3857
  * surrounding background attributes remain typed.
3757
3858
  */
3758
- type DocumentBackgroundDrawing = {
3859
+ type DocumentBackgroundDrawing = WritableRecord & {
3759
3860
  /** Replayable `w:drawing` markup, as the source wrote it. */
3760
3861
  rawXml: string;
3761
3862
  };
3762
3863
  /** Page background declared directly under `w:document`. */
3763
- type DocumentBackground = {
3864
+ type DocumentBackground = WritableRecord & {
3764
3865
  /** Direct colour or the `auto` sentinel. */
3765
3866
  color?: ColorValue;
3766
3867
  /** Theme colour token, including the explicit `none` cancellation. */
@@ -3775,7 +3876,7 @@ type DocumentBackground = {
3775
3876
  /**
3776
3877
  * Document body (w:body)
3777
3878
  */
3778
- type DocumentBody = {
3879
+ type DocumentBody = WritableRecord & {
3779
3880
  /** Optional `w:document/w:background`, serialized before the body. */
3780
3881
  background?: DocumentBackground;
3781
3882
  /** All content (paragraphs, tables) */
@@ -3802,7 +3903,7 @@ type ContentControlChange = "editContent" | "removeControl";
3802
3903
  */
3803
3904
  declare const contentControlLockAllows: (lock: ContentControlLock | null | undefined, change: ContentControlChange) => boolean;
3804
3905
  /** A content control, on the caller's position scale. */
3805
- type LockedControlSpan = {
3906
+ type LockedControlSpan = WritableRecord & {
3806
3907
  lock: ContentControlLock;
3807
3908
  /** Before the control. */
3808
3909
  from: number;
@@ -3820,13 +3921,13 @@ type LockedControlSpan = {
3820
3921
  * standing (a text edit across a whole control rewrites its content). An
3821
3922
  * insertion is an `edit` whose `from` equals `to`.
3822
3923
  */
3823
- type LockedControlTouch = {
3924
+ type LockedControlTouch = WritableRecord & {
3824
3925
  from: number;
3825
3926
  to: number;
3826
3927
  effect: "remove" | "edit";
3827
3928
  };
3828
3929
  /** Why a lock refuses a change. */
3829
- type LockedControlViolation = {
3930
+ type LockedControlViolation = WritableRecord & {
3830
3931
  lock: ContentControlLock;
3831
3932
  change: ContentControlChange;
3832
3933
  };
@@ -3840,6 +3941,15 @@ declare const firstLockedControlViolation: (controls: Iterable<LockedControlSpan
3840
3941
  declare const lockedControlMessage: ({ lock, change }: LockedControlViolation) => string;
3841
3942
  /** Set modeled comments while keeping an empty comments part out of the document model. */
3842
3943
  declare const setDocumentBodyComments: (body: DocumentBody, comments: Comment[]) => void;
3944
+ /**
3945
+ * The sides of `w:spacing` a paragraph's own properties state, as the parser
3946
+ * reads them: a side is explicit exactly when the record holds its value.
3947
+ *
3948
+ * The one rule for the field. The parser marks a record it reads with it, and
3949
+ * an operation that states a paragraph's spacing states the field with it, so
3950
+ * a paragraph an edit changed has the field the saved file reopens to.
3951
+ */
3952
+ declare const paragraphSpacingExplicit: (formatting: ParagraphFormatting) => SpacingExplicit | undefined;
3843
3953
  /**
3844
3954
  * Finish paragraph formatting at a model boundary.
3845
3955
  *
@@ -3850,20 +3960,6 @@ declare const setDocumentBodyComments: (body: DocumentBody, comments: Comment[])
3850
3960
  declare const finalizeParagraphFormatting: (formatting: ParagraphFormatting | undefined) => ParagraphFormatting | undefined;
3851
3961
  /** Whether paragraph formatting states no modeled properties. */
3852
3962
  declare const isCanonicallyEmptyParagraphFormatting: (formatting: ParagraphFormatting | undefined) => boolean;
3853
- /**
3854
- * What folio normalised to open a document, as data rather than as prose.
3855
- *
3856
- * Word accepts input the schema does not describe, so folio accepts it too and
3857
- * normalises at the parse boundary. Every such decision is recorded here: a
3858
- * stable `code`, the part it happened in, the best position that part can
3859
- * name, and the value folio declined to read. A host can count them, group
3860
- * them, or decide on one; the human-readable string the parser has always
3861
- * exposed is derived from this, never written by hand at the call site, so the
3862
- * two cannot drift.
3863
- *
3864
- * It lives beside `Document` because it is part of the parsed document, and a
3865
- * `Document` may be produced by anything that builds this model.
3866
- */
3867
3963
  /**
3868
3964
  * Every normalisation the parse boundary is allowed to make.
3869
3965
  *
@@ -3887,10 +3983,22 @@ declare const PARSE_WARNING_CODES: {
3887
3983
  readonly missingCommentId: "missing-comment-id";
3888
3984
  /** A later `w:footnote`/`w:endnote` repeating an id an earlier one defines. */
3889
3985
  readonly duplicateNoteId: "duplicate-note-id";
3986
+ /** An automatic note mark outside its matching note story, kept verbatim. */
3987
+ readonly misplacedNoteMark: "misplaced-note-mark";
3890
3988
  /** A comment marker naming a comment `comments.xml` never defines. */
3891
3989
  readonly danglingCommentReference: "dangling-comment-reference";
3892
3990
  /** A comment range with no matching start or end, re-anchored as a point. */
3893
3991
  readonly unbalancedCommentRange: "unbalanced-comment-range";
3992
+ /** A comment range boundary with no partner, dropped: the comment's reference anchors it. */
3993
+ readonly unpairedCommentRangeBoundary: "unpaired-comment-range-boundary";
3994
+ /** A comment reference repeating one its comment already has, dropped. */
3995
+ readonly duplicateCommentReference: "duplicate-comment-reference";
3996
+ /** A comment's full range after its first, dropped: a comment holds one range. */
3997
+ readonly droppedCommentRange: "dropped-comment-range";
3998
+ /** A comment range no `w:commentReference` names, given one after its end. */
3999
+ readonly missingCommentReference: "missing-comment-reference";
4000
+ /** A `comments.xml` paragraph repeating an earlier one's `w14:paraId`, given a minted id. */
4001
+ readonly repeatedCommentParagraphId: "repeated-comment-paragraph-id";
3894
4002
  /** A `w:headerReference` naming a header part the package does not carry. */
3895
4003
  readonly danglingHeaderReference: "dangling-header-reference";
3896
4004
  /** A `w:footerReference` naming a footer part the package does not carry. */
@@ -3903,6 +4011,8 @@ declare const PARSE_WARNING_CODES: {
3903
4011
  readonly unnumberedStyle: "unnumbered-style";
3904
4012
  /** A tracked move range with no matching start or end. */
3905
4013
  readonly unbalancedMoveRange: "unbalanced-move-range";
4014
+ /** A tracked move range after the first of its id, dropped: a move holds one range. */
4015
+ readonly droppedMoveRange: "dropped-move-range";
3906
4016
  /** A `w:type` outside `ST_HdrFtr`, read as the enumeration's default. */
3907
4017
  readonly headerFooterTypeOutsideEnum: "header-footer-type-outside-enum";
3908
4018
  /** A value outside `ST_OnOff`'s six spellings. */
@@ -3945,7 +4055,7 @@ declare const IMPORTED_ID_COLLISION_KINDS: {
3945
4055
  type ImportedIdCollisionKind = (typeof IMPORTED_ID_COLLISION_KINDS)[keyof typeof IMPORTED_ID_COLLISION_KINDS];
3946
4056
  type ParseWarningCode = (typeof PARSE_WARNING_CODES)[keyof typeof PARSE_WARNING_CODES];
3947
4057
  /** Where a warning happened, as precisely as the part can say. */
3948
- type ParseWarningLocation = {
4058
+ type ParseWarningLocation = WritableRecord & {
3949
4059
  /** The package part, e.g. `word/document.xml`. `package` for the container. */
3950
4060
  part: string;
3951
4061
  /** The element as written, prefix included, when one is known. */
@@ -3957,7 +4067,7 @@ type ParseWarningLocation = {
3957
4067
  */
3958
4068
  at?: string;
3959
4069
  };
3960
- type ParseWarning = {
4070
+ type ParseWarning = WritableRecord & {
3961
4071
  code: ParseWarningCode;
3962
4072
  /** The identity domain, for imported collision diagnostics. */
3963
4073
  identityKind?: ImportedIdCollisionKind;
@@ -3987,7 +4097,7 @@ type StyleType = "paragraph" | "character" | "numbering" | "table";
3987
4097
  /**
3988
4098
  * Style definition
3989
4099
  */
3990
- type Style = {
4100
+ type Style = WritableRecord & {
3991
4101
  /** Style ID */
3992
4102
  styleId: string;
3993
4103
  /** Style type */
@@ -4025,19 +4135,19 @@ type Style = {
4025
4135
  /** Table cell properties */
4026
4136
  tcPr?: TableCellFormatting;
4027
4137
  /** Conditional table style parts */
4028
- tblStylePr?: {
4138
+ tblStylePr?: (WritableRecord & {
4029
4139
  type: "band1Horz" | "band1Vert" | "band2Horz" | "band2Vert" | "firstCol" | "firstRow" | "lastCol" | "lastRow" | "neCell" | "nwCell" | "seCell" | "swCell" | "wholeTable";
4030
4140
  pPr?: ParagraphFormatting;
4031
4141
  rPr?: TextFormatting;
4032
4142
  tblPr?: TableFormatting;
4033
4143
  trPr?: TableRowFormatting;
4034
4144
  tcPr?: TableCellFormatting;
4035
- }[];
4145
+ })[];
4036
4146
  };
4037
4147
  /**
4038
4148
  * Document defaults (w:docDefaults)
4039
4149
  */
4040
- type DocDefaults = {
4150
+ type DocDefaults = WritableRecord & {
4041
4151
  /** Default run properties */
4042
4152
  rPr?: TextFormatting;
4043
4153
  /** Default paragraph properties */
@@ -4046,11 +4156,11 @@ type DocDefaults = {
4046
4156
  /**
4047
4157
  * Style definitions from styles.xml
4048
4158
  */
4049
- type StyleDefinitions = {
4159
+ type StyleDefinitions = WritableRecord & {
4050
4160
  /** Document defaults */
4051
4161
  docDefaults?: DocDefaults;
4052
4162
  /** Latent styles */
4053
- latentStyles?: {
4163
+ latentStyles?: WritableRecord & {
4054
4164
  defLockedState?: boolean;
4055
4165
  defUIPriority?: number;
4056
4166
  defSemiHidden?: boolean;
@@ -4064,7 +4174,7 @@ type StyleDefinitions = {
4064
4174
  /**
4065
4175
  * Theme color scheme (a:clrScheme)
4066
4176
  */
4067
- type ThemeColorScheme = {
4177
+ type ThemeColorScheme = WritableRecord & {
4068
4178
  /** Dark 1 color (usually black) */
4069
4179
  dk1?: string;
4070
4180
  /** Light 1 color (usually white) */
@@ -4088,7 +4198,7 @@ type ThemeColorScheme = {
4088
4198
  /**
4089
4199
  * Theme font (with script variants)
4090
4200
  */
4091
- type ThemeFont = {
4201
+ type ThemeFont = WritableRecord & {
4092
4202
  /** Latin font */
4093
4203
  latin?: string;
4094
4204
  /** East Asian font */
@@ -4096,12 +4206,12 @@ type ThemeFont = {
4096
4206
  /** Complex script font */
4097
4207
  cs?: string;
4098
4208
  /** Script-specific fonts */
4099
- fonts?: Record<string, string>;
4209
+ fonts?: WritableRecord & Record<string, string>;
4100
4210
  };
4101
4211
  /**
4102
4212
  * Theme font scheme (a:fontScheme)
4103
4213
  */
4104
- type ThemeFontScheme = {
4214
+ type ThemeFontScheme = WritableRecord & {
4105
4215
  /** Major font (headings) */
4106
4216
  majorFont?: ThemeFont;
4107
4217
  /** Minor font (body text) */
@@ -4110,7 +4220,7 @@ type ThemeFontScheme = {
4110
4220
  /**
4111
4221
  * Theme (from theme1.xml)
4112
4222
  */
4113
- type Theme = {
4223
+ type Theme = WritableRecord & {
4114
4224
  /** Theme name */
4115
4225
  name?: string;
4116
4226
  /** Color scheme */
@@ -4118,7 +4228,7 @@ type Theme = {
4118
4228
  /** Font scheme */
4119
4229
  fontScheme?: ThemeFontScheme;
4120
4230
  /** Format scheme (fills, lines, effects) - simplified */
4121
- formatScheme?: {
4231
+ formatScheme?: WritableRecord & {
4122
4232
  name?: string;
4123
4233
  };
4124
4234
  };
@@ -4128,7 +4238,7 @@ type Theme = {
4128
4238
  * Two attributes of one element rather than two fields on the font, because
4129
4239
  * `w:charset` is the thing that carries both and a producer may write either.
4130
4240
  */
4131
- type FontCharset = {
4241
+ type FontCharset = WritableRecord & {
4132
4242
  /** `w:val`: the code page as a two-digit hexadecimal number. */
4133
4243
  val?: string;
4134
4244
  /** `w:characterSet`: the same set named (`ANSI_CHARSET`) rather than numbered. */
@@ -4141,7 +4251,7 @@ type FontCharset = {
4141
4251
  * GUID the `.odttf` is obfuscated with, so a package that keeps the id and
4142
4252
  * drops the key keeps a pointer to bytes nothing can decode.
4143
4253
  */
4144
- type EmbeddedFontRef = {
4254
+ type EmbeddedFontRef = WritableRecord & {
4145
4255
  /** `r:id` of the relationship to the font binary, in `word/_rels/fontTable.xml.rels`. */
4146
4256
  id: string;
4147
4257
  /** `w:fontKey`: the obfuscation GUID, e.g. `{XXXXXXXX-…}`. */
@@ -4152,7 +4262,7 @@ type EmbeddedFontRef = {
4152
4262
  /**
4153
4263
  * Font info from fontTable.xml
4154
4264
  */
4155
- type FontInfo = {
4265
+ type FontInfo = WritableRecord & {
4156
4266
  /** Font name */
4157
4267
  name: string;
4158
4268
  /** Alternate names */
@@ -4166,7 +4276,7 @@ type FontInfo = {
4166
4276
  /** Pitch (fixed or variable) */
4167
4277
  pitch?: "default" | "fixed" | "variable";
4168
4278
  /** Signature */
4169
- sig?: {
4279
+ sig?: WritableRecord & {
4170
4280
  usb0?: string;
4171
4281
  usb1?: string;
4172
4282
  usb2?: string;
@@ -4187,7 +4297,7 @@ type FontInfo = {
4187
4297
  /**
4188
4298
  * Font table from fontTable.xml
4189
4299
  */
4190
- type FontTable = {
4300
+ type FontTable = WritableRecord & {
4191
4301
  fonts: FontInfo[];
4192
4302
  /** Children of `w:fonts` that are not `w:font`, in source position. */
4193
4303
  preserved?: PreservedMarkup;
@@ -4207,7 +4317,7 @@ type RelationshipType = string;
4207
4317
  /**
4208
4318
  * Relationship entry
4209
4319
  */
4210
- type Relationship = {
4320
+ type Relationship = WritableRecord & {
4211
4321
  /** Relationship ID (e.g., "rId1") */
4212
4322
  id: string;
4213
4323
  /** Relationship type URI */
@@ -4224,7 +4334,7 @@ type RelationshipMap = Map<string, Relationship>;
4224
4334
  /**
4225
4335
  * Media file from word/media/
4226
4336
  */
4227
- type MediaFile = {
4337
+ type MediaFile = WritableRecord & {
4228
4338
  /** File path in ZIP */
4229
4339
  path: string;
4230
4340
  /** Original filename */
@@ -4252,18 +4362,18 @@ type MediaFile = {
4252
4362
  * type ExhaustiveBorder = ExhaustiveFields<BorderSpec, ClassifiedBorderField>;
4253
4363
  * ```
4254
4364
  */
4255
- type ExhaustiveFields<Source, Classified extends keyof Source> = Exclude<keyof Source, Classified> extends never ? Source : never;
4365
+ type ExhaustiveFields<Source, Classified extends RecordField<Source>> = Exclude<RecordField<Source>, Classified> extends never ? Source : never;
4256
4366
  /** Resolve only defined numbering levels; preserve unsupported source values elsewhere. */
4257
4367
  declare const isNumberingLevel: (value: number) => boolean;
4258
- type NumberingLevelResolution = {
4368
+ type NumberingLevelResolution = (WritableRecord & {
4259
4369
  kind: "level";
4260
4370
  level: ListLevel;
4261
4371
  source: "abstract" | "override" | "styleLink";
4262
- } | {
4372
+ }) | (WritableRecord & {
4263
4373
  kind: "undefined";
4264
4374
  reason: "levelOutOfRange" | "noInstance" | "noAbstract" | "unresolvedStyleLink" | "levelNotDefined";
4265
- };
4266
- type NumberingLevelEntry = {
4375
+ });
4376
+ type NumberingLevelEntry = WritableRecord & {
4267
4377
  numId: number;
4268
4378
  ilvl: number;
4269
4379
  level: ListLevel;
@@ -4306,7 +4416,7 @@ declare const DEFAULT_TAB_STOP_TWIPS = 720;
4306
4416
  * Document-wide settings parsed from `word/settings.xml`.
4307
4417
  * Extend as more settings.xml fields enter the layout pipeline.
4308
4418
  */
4309
- type DocumentSettings = {
4419
+ type DocumentSettings = WritableRecord & {
4310
4420
  /**
4311
4421
  * Application compatibility generation from
4312
4422
  * `w:compat/w:compatSetting[@w:name="compatibilityMode"]`.
@@ -4352,7 +4462,7 @@ type DocumentSettings = {
4352
4462
  * `<a:ea>`/`<a:cs>` theme font slots from the script-specific
4353
4463
  * `<a:font script="…">` entries. Absent for non-CJK/bidi docs.
4354
4464
  */
4355
- themeFontLang?: {
4465
+ themeFontLang?: WritableRecord & {
4356
4466
  eastAsia?: string;
4357
4467
  bidi?: string;
4358
4468
  };
@@ -4365,12 +4475,12 @@ type DocumentSettings = {
4365
4475
  /** Legacy hyphenation zone (`w:hyphenationZone`) in twips; retained for compatibility tooling. */
4366
4476
  hyphenationZoneTwips?: number;
4367
4477
  /** Word/OOXML document-wide line-breaking overrides. */
4368
- lineBreakRules?: {
4369
- noLineBreaksBefore?: {
4478
+ lineBreakRules?: WritableRecord & {
4479
+ noLineBreaksBefore?: WritableRecord & {
4370
4480
  language?: string;
4371
4481
  characters: string;
4372
4482
  };
4373
- noLineBreaksAfter?: {
4483
+ noLineBreaksAfter?: WritableRecord & {
4374
4484
  language?: string;
4375
4485
  characters: string;
4376
4486
  };
@@ -4393,7 +4503,7 @@ declare const DOCX_CONFORMANCE_CLASSES: Readonly<{
4393
4503
  /** Conformance class detected from a DOCX package. */
4394
4504
  type DocxConformanceClass = (typeof DOCX_CONFORMANCE_CLASSES)[keyof typeof DOCX_CONFORMANCE_CLASSES];
4395
4505
  /** Complete DOCX package structure. */
4396
- type DocxPackage = {
4506
+ type DocxPackage = WritableRecord & {
4397
4507
  /** Conformance class detected from the main document namespace. */
4398
4508
  conformanceClass?: DocxConformanceClass;
4399
4509
  /** Document body */
@@ -4421,7 +4531,7 @@ type DocxPackage = {
4421
4531
  /** Media files */
4422
4532
  media?: Map<string, MediaFile> | undefined;
4423
4533
  /** Document properties */
4424
- properties?: {
4534
+ properties?: WritableRecord & {
4425
4535
  title?: string;
4426
4536
  subject?: string;
4427
4537
  creator?: string;
@@ -4436,7 +4546,7 @@ type DocxPackage = {
4436
4546
  /**
4437
4547
  * Complete parsed DOCX document
4438
4548
  */
4439
- type Document = {
4549
+ type Document = WritableRecord & {
4440
4550
  /** DOCX package with all parsed content */
4441
4551
  package: DocxPackage;
4442
4552
  /** Original ArrayBuffer for round-trip */
@@ -4461,4 +4571,4 @@ declare const COMMENT_PART_RELATIONSHIPS: {
4461
4571
  readonly target: "commentsExtended.xml";
4462
4572
  };
4463
4573
  };
4464
- export { locksContent as $, TEXT_DIRECTION_FLOWS as $i, ShapeGeometryAdjustment as $n, NumberingDefinitions as $r, ImageWrapPolygon as $t, ThemeColorScheme as A, BORDER_STYLES as Aa, mergeParagraphNumbering as Ai, PositionedBookmarkMarker as An, isOoxmlSymbolCharacter as Ar, EndnoteProperties as At, finalizeParagraphFormatting as B, HeadingOutlineLevel as Bi, RunContent as Bn, presetLineDashFrom as Br, HeaderFooterType as Bt, Relationship as C, UnrecognisedBorderStyle as Ca, NO_NUMBERING_NUM_ID as Ci, Paragraph as Cn, TrackedRunChange as Cr, DrawingAnchor as Ct, StyleDefinitions as D, isBorderNone as Da, ParagraphNumberingSlots as Di, ParagraphPropertyChange as Dn, WrapDistanceSlots as Dr, EffectExtentSlots as Dt, Style as E, isBorderNil as Ea, ParagraphNumberingReference as Ei, ParagraphMarkChangeKind as En, Watermark as Er, DrawingRawXmlMode as Et, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as F, paragraphNumberingSlots as Fi, PropertyChangeInfo as Fn, PreviewDescriptor as Fr, FooterReference as Ft, ContentControlLock as G, outlineLevelStatedValue as Gi, Section as Gn, COUNTER_FORMATS as Gr, ImageCrop as Gt, setDocumentBodyComments as H, headingLevelOf as Hi, SdtEndProperties as Hn, PRESET_LINE_DASH_VALS as Hr, Hyperlink as Ht, PARSE_WARNING_CODES as I, resolveParagraphNumbering as Ii, PropertyRevisionKind as In, PreviewShape as Ir, Footnote as It, LockedControlViolation as J, PARAGRAPH_ALIGNMENTS as Ji, SectionStart as Jn, LevelOverride as Jr, ImagePadding as Jt, LockedControlSpan as K, NUMBER_FORMATS as Ki, SectionProperties as Kn, CounterFormat as Kr, ImageDocPrLink as Kt, ParseWarning as L, sameEffectiveParagraphNumbering as Li, REVIEW_CARRIERS as Ln, PresetLineDashValue as Lr, FootnotePosition as Lt, ThemeFontScheme as M, paragraphNumberingLevel as Mi, PreservedInline as Mn, RelationshipId as Mr, FieldCharContent as Mt, IMPORTED_ID_COLLISION_KINDS as N, paragraphNumberingReference as Ni, PreservedXmlContent as Nn, mintRelationshipId as Nr, FieldType as Nt, StyleType as O, isBorderStyle as Oa, ResolvedParagraphNumbering as Oi, PictureWatermark as On, WrapDistances as Or, Endnote as Ot, ImportedIdCollisionKind as P, paragraphNumberingReferenceId as Pi, PropertyChange as Pn, relationshipIdOf as Pr, FoldedListNumber as Pt, lockedControlViolation as Q, TEXT_DIRECTIONS as Qi, ShapeFill as Qn, ListRendering as Qr, ImageWrap as Qt, ParseWarningCode as R, sameStatedParagraphNumbering as Ri, ReviewCarrier as Rn, UnrecognisedPresetLineDash as Rr, FootnoteProperties as Rt, MediaFile as S, BorderStyleValue as Sa, UnderlineStyle as Si, PageOrientation as Sn, TrackedChangeInfo as Sr, DocumentBody as St, RelationshipType as T, borderStyleToken as Ta, ParagraphNumberingOverride as Ti, ParagraphMarkChange as Tn, VerticalAlign as Tr, DrawingGroupChild as Tt, CONTENT_CONTROL_LOCK as U, headingOutlineLevel as Ui, SdtProperties as Un, PresetLineDashVal as Ur, INSERTION_SEAM_POLICIES as Ut, isCanonicallyEmptyParagraphFormatting as V, OutlineLevel as Vi, RunPropertyChange as Vn, presetLineDashToken as Vr, HeaderReference as Vt, ContentControlChange as W, outlineLevelFromStatedValue as Wi, SdtType as Wn, AbstractNumbering as Wr, Image as Wt, firstLockedControlViolation as X, TABLE_ALIGNMENTS as Xi, ShapeAlternateContent as Xn, ListLevel as Xr, ImageSize as Xt, contentControlLockAllows as Y, ParagraphAlignment as Yi, Shape as Yn, LevelSuffix as Yr, ImagePosition as Yt, lockedControlMessage as Z, TAB_STOP_ALIGNMENTS as Zi, ShapeContent as Zn, ListMarkerFormatting as Zr, ImageTransform as Zt, DocDefaults as _, themeColorToken as _a, TablePropertyExceptionFormatting as _i, NoteMarkerContent as _n, TableRowPropertyChange as _r, DRAWING_RAW_XML_MODES as _t, DocumentSettings as a, BorderSpec as aa, LineSpacingRule as ai, MAX_REVISION_ID as an, SymbolContent as ar, BlockCustomXml as at, FontInfo as b, THEME_COLORS as ba, TextEffect as bi, PARAGRAPH_MARK_CHANGE_KINDS as bn, TextContent as br, DocumentBackground as bt, NumberingLevelEntry as c, SCHEME_COLOR_VALUE_BY_THEME_COLOR as ca, TabLeader as ci, MoveBookmarkMarker as cn, TableCell as cr, BookmarkRangeMarker as ct, numberingInstanceResolves as d, UnrecognisedThemeColor as da, TableCellBorders as di, MoveFromRangeStart as dn, TableContentCarrier as dr, Column as dt, TEXT_DIRECTION_FLOW_BY_TOKEN as ea, NumberingInstance as ei, InlineSdt as en, ShapeOutline as er, locksControl as et, numberingLevelEntries as f, isSchemeColorValue as fa, TableCellFormatting as fi, MoveTo as fn, TableCustomXmlWrapper as fr, Comment as ft, ExhaustiveFields as g, themeColorSlot as ga, TableMeasurement as gi, NonVisualDrawingNames as gn, TableRow as gr, ComplexField as gt, isNumberingLevel as h, readThemeColor as ha, TableLook as hi, NoBreakHyphenContent as hn, TablePropertyExceptionChange as hr, CommentReference as ht, Document as i, TextDirectionFlow as ia, FloatingTableProperties as ii, LineNumberRestart as in, SoftHyphenContent as ir, BlockContent as it, ThemeFont as j, BorderStyle as ja, paragraphNumberingFromSlots as ji, PreservedBlock as jn, normalizeRevisionId as jr, Field as jt, Theme as k, statesNoBorder as ka, isNumberingReference as ki, PositionalTab as kn, WrapPolygonPoint as kr, EndnotePosition as kt, NumberingLevelResolution as l, THEME_COLOR_BY_SCHEME_COLOR_VALUE as la, TabStop as li, MoveFrom as ln, TableCellBlock as lr, BookmarkStart as lt, resolveNumberingLevel as m, knownThemeColor as ma, TableGridChange as mi, MoveToRangeStart as mn, TablePropertyChange as mr, CommentRangeStart as mt, DEFAULT_TAB_STOP_TWIPS as n, TableAlignment as na, ConditionalFormatStyle as ni, Insertion as nn, ShapeType as nr, BIDI_CONTROLS as nt, DocxConformanceClass as o, ColorValue as oa, ParagraphFormatting as oi, MarkupRangeMarker as on, TabContent as or, BlockSdt as ot, numberingLevelHasMarkerSlot as p, isThemeColor as pa, TableFormatting as pi, MoveToRangeEnd as pn, TablePreservedMarkup as pr, CommentRangeEnd as pt, LockedControlTouch as q, NumberFormat as qi, SectionPropertyChange as qn, LevelLegacy as qr, ImageFrameLocks as qt, DOCX_CONFORMANCE_CLASSES as r, TextDirection as ra, EmphasisMark as ri, InstrTextContent as rn, SimpleField as rr, BidiControl as rt, DocxPackage as s, ShadingProperties as sa, SpacingExplicit as si, MathEquation as sn, Table as sr, BookmarkEnd as st, COMMENT_PART_RELATIONSHIPS as t, TabStopAlignment as ta, CellMargins as ti, InlineWrapper as tn, ShapeTextBody as tr, getSingularRunPropertyChange as tt, levelShowsMarker as u, ThemeColorValue as ua, TableBorders as ui, MoveFromRangeEnd as un, TableCellPropertyChange as ur, BreakContent as ut, EmbeddedFontRef as v, SchemeColorSlot as va, TableRowFormatting as vi, NoteNumberRestart as vn, TableStructuralChangeInfo as vr, Deletion as vt, RelationshipMap as w, borderStyleFrom as wa, NO_PARAGRAPH_NUMBERING as wi, ParagraphContent as wn, TrackedRunContent as wr, DrawingContent as wt, FontTable as x, ThemeColor as xa, TextFormatting as xi, PROPERTY_REVISION_KINDS as xn, TextWatermark as xr, DocumentBackgroundDrawing as xt, FontCharset as y, SchemeColorValue as ya, TableWidthType as yi, NoteReferenceContent as yn, TextBox as yr, DisplacedByCustomXml as yt, ParseWarningLocation as z, BODY_TEXT_OUTLINE_LEVEL as zi, Run as zn, isPresetLineDashVal as zr, HeaderFooter as zt };
4574
+ export { lockedControlViolation as $, ParagraphAlignment as $i, Shape as $n, LevelSuffix as $r, ImageWrap as $t, ThemeColorScheme as A, isBorderNil as Aa, ParagraphNumberingReference as Ai, ParagraphMarkDeletion as An, Watermark as Ar, EndnotePosition as At, finalizeParagraphFormatting as B, resolveParagraphNumbering as Bi, PropertyRevisionKind as Bn, PreviewShape as Br, HeaderFooter as Bt, Relationship as C, SchemeColorValue as Ca, TableWidthType as Ci, PARAGRAPH_MARK_CHANGE_KINDS as Cn, TextBox as Cr, DocumentBody as Ct, StyleDefinitions as D, UnrecognisedBorderStyle as Da, NO_NUMBERING_NUM_ID as Di, ParagraphContent as Dn, TrackedRunChange as Dr, DrawingRawXmlMode as Dt, Style as E, BorderStyleValue as Ea, UnderlineStyle as Ei, Paragraph as En, TrackedChangeInfo as Er, DrawingGroupChild as Et, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as F, BorderStyle as Fa, paragraphNumberingFromSlots as Fi, PreservedBlock as Fn, normalizeRevisionId as Fr, FoldedListNumber as Ft, ContentControlChange as G, OutlineLevel as Gi, RunPropertyChange as Gn, presetLineDashToken as Gr, Image as Gt, paragraphSpacingExplicit as H, sameStatedParagraphNumbering as Hi, ReviewCarrier as Hn, UnrecognisedPresetLineDash as Hr, HeaderReference as Ht, PARSE_WARNING_CODES as I, paragraphNumberingLevel as Ii, PreservedInline as In, RelationshipId as Ir, FooterReference as It, LockedControlTouch as J, outlineLevelFromStatedValue as Ji, SdtType as Jn, AbstractNumbering as Jr, ImageFrameLocks as Jt, ContentControlLock as K, headingLevelOf as Ki, SdtEndProperties as Kn, PRESET_LINE_DASH_VALS as Kr, ImageCrop as Kt, ParseWarning as L, paragraphNumberingReference as Li, PreservedXmlContent as Ln, mintRelationshipId as Lr, Footnote as Lt, ThemeFontScheme as M, isBorderStyle as Ma, ResolvedParagraphNumbering as Mi, PictureWatermark as Mn, WrapDistances as Mr, Field as Mt, IMPORTED_ID_COLLISION_KINDS as N, statesNoBorder as Na, isNumberingReference as Ni, PositionalTab as Nn, WrapPolygonPoint as Nr, FieldCharContent as Nt, StyleType as O, borderStyleFrom as Oa, NO_PARAGRAPH_NUMBERING as Oi, ParagraphMarkChange as On, TrackedRunContent as Or, EffectExtentSlots as Ot, ImportedIdCollisionKind as P, BORDER_STYLES as Pa, mergeParagraphNumbering as Pi, PositionedBookmarkMarker as Pn, isOoxmlSymbolCharacter as Pr, FieldType as Pt, lockedControlMessage as Q, PARAGRAPH_ALIGNMENTS as Qi, SectionStart as Qn, LevelOverride as Qr, ImageTransform as Qt, ParseWarningCode as R, paragraphNumberingReferenceId as Ri, PropertyChange as Rn, relationshipIdOf as Rr, FootnotePosition as Rt, MediaFile as S, SchemeColorSlot as Sa, TableRowFormatting as Si, NoteReferenceContent as Sn, TableStructuralChangeInfo as Sr, DocumentBackgroundDrawing as St, RelationshipType as T, ThemeColor as Ta, TextFormatting as Ti, PageOrientation as Tn, TextWatermark as Tr, DrawingContent as Tt, setDocumentBodyComments as U, BODY_TEXT_OUTLINE_LEVEL as Ui, Run as Un, isPresetLineDashVal as Ur, Hyperlink as Ut, isCanonicallyEmptyParagraphFormatting as V, sameEffectiveParagraphNumbering as Vi, REVIEW_CARRIERS as Vn, PresetLineDashValue as Vr, HeaderFooterType as Vt, CONTENT_CONTROL_LOCK as W, HeadingOutlineLevel as Wi, RunContent as Wn, presetLineDashFrom as Wr, INSERTION_SEAM_POLICIES as Wt, contentControlLockAllows as X, NUMBER_FORMATS as Xi, SectionProperties as Xn, CounterFormat as Xr, ImagePosition as Xt, LockedControlViolation as Y, outlineLevelStatedValue as Yi, Section as Yn, COUNTER_FORMATS as Yr, ImagePadding as Yt, firstLockedControlViolation as Z, NumberFormat as Zi, SectionPropertyChange as Zn, LevelLegacy as Zr, ImageSize as Zt, DocDefaults as _, isThemeColor as _a, TableFormatting as _i, MoveToRangeStart as _n, TablePreservedMarkup as _r, ComplexField as _t, DocumentSettings as a, TabStopAlignment as aa, CellMargins as ai, KeptCut as an, ShapeTextBody as ar, BlockContent as at, FontInfo as b, themeColorSlot as ba, TableMeasurement as bi, NoteMarkerContent as bn, TableRow as br, DisplacedByCustomXml as bt, NumberingLevelEntry as c, TextDirectionFlow as ca, FloatingTableProperties as ci, MAX_REVISION_ID as cn, SoftHyphenContent as cr, BookmarkEnd as ct, numberingInstanceResolves as d, ShadingProperties as da, SpacingExplicit as di, MoveBookmarkMarker as dn, Table as dr, BreakContent as dt, TABLE_ALIGNMENTS as ea, ListLevel as ei, ImageWrapPolygon as en, ShapeAlternateContent as er, locksContent as et, numberingLevelEntries as f, SCHEME_COLOR_VALUE_BY_THEME_COLOR as fa, TabLeader as fi, MoveFrom as fn, TableCell as fr, Column as ft, ExhaustiveFields as g, isSchemeColorValue as ga, TableCellFormatting as gi, MoveToRangeEnd as gn, TableCustomXmlWrapper as gr, CommentReference as gt, isNumberingLevel as h, UnrecognisedThemeColor as ha, TableCellBorders as hi, MoveTo as hn, TableContentCarrier as hr, CommentRangeStart as ht, Document as i, TEXT_DIRECTION_FLOW_BY_TOKEN as ia, NumberingInstance as ii, InstrTextContent as in, ShapeOutline as ir, BidiControl as it, ThemeFont as j, isBorderNone as ja, ParagraphNumberingSlots as ji, ParagraphPropertyChange as jn, WrapDistanceSlots as jr, EndnoteProperties as jt, Theme as k, borderStyleToken as ka, ParagraphNumberingOverride as ki, ParagraphMarkChangeKind as kn, VerticalAlign as kr, Endnote as kt, NumberingLevelResolution as l, BorderSpec as la, LineSpacingRule as li, MarkupRangeMarker as ln, SymbolContent as lr, BookmarkRangeMarker as lt, resolveNumberingLevel as m, ThemeColorValue as ma, TableBorders as mi, MoveFromRangeStart as mn, TableCellPropertyChange as mr, CommentRangeEnd as mt, DEFAULT_TAB_STOP_TWIPS as n, TEXT_DIRECTIONS as na, ListRendering as ni, InlineWrapper as nn, ShapeFill as nr, getSingularRunPropertyChange as nt, DocxConformanceClass as o, TableAlignment as oa, ConditionalFormatStyle as oi, KeptCutPiece as on, ShapeType as or, BlockCustomXml as ot, numberingLevelHasMarkerSlot as p, THEME_COLOR_BY_SCHEME_COLOR_VALUE as pa, TabStop as pi, MoveFromRangeEnd as pn, TableCellBlock as pr, Comment as pt, LockedControlSpan as q, headingOutlineLevel as qi, SdtProperties as qn, PresetLineDashVal as qr, ImageDocPrLink as qt, DOCX_CONFORMANCE_CLASSES as r, TEXT_DIRECTION_FLOWS as ra, NumberingDefinitions as ri, Insertion as rn, ShapeGeometryAdjustment as rr, BIDI_CONTROLS as rt, DocxPackage as s, TextDirection as sa, EmphasisMark as si, LineNumberRestart as sn, SimpleField as sr, BlockSdt as st, COMMENT_PART_RELATIONSHIPS as t, TAB_STOP_ALIGNMENTS as ta, ListMarkerFormatting as ti, InlineSdt as tn, ShapeContent as tr, locksControl as tt, levelShowsMarker as u, ColorValue as ua, ParagraphFormatting as ui, MathEquation as un, TabContent as ur, BookmarkStart as ut, EmbeddedFontRef as v, knownThemeColor as va, TableGridChange as vi, NoBreakHyphenContent as vn, TablePropertyChange as vr, DRAWING_RAW_XML_MODES as vt, RelationshipMap as w, THEME_COLORS as wa, TextEffect as wi, PROPERTY_REVISION_KINDS as wn, TextContent as wr, DrawingAnchor as wt, FontTable as x, themeColorToken as xa, TablePropertyExceptionFormatting as xi, NoteNumberRestart as xn, TableRowPropertyChange as xr, DocumentBackground as xt, FontCharset as y, readThemeColor as ya, TableLook as yi, NonVisualDrawingNames as yn, TablePropertyExceptionChange as yr, Deletion as yt, ParseWarningLocation as z, paragraphNumberingSlots as zi, PropertyChangeInfo as zn, PreviewDescriptor as zr, FootnoteProperties as zt };