@stll/docx-core 0.38.0 → 0.39.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.
@@ -669,6 +669,8 @@ type ParagraphFormatting = OwnFieldPresence<{
669
669
  bidi?: boolean;
670
670
  /** Apply East Asian first/last-character line-breaking rules (w:kinsoku). */
671
671
  kinsoku?: boolean;
672
+ autoSpaceDE?: boolean;
673
+ autoSpaceDN?: boolean;
672
674
  /** Allow punctuation to hang beyond the text margin (w:overflowPunct). */
673
675
  overflowPunctuation?: boolean;
674
676
  /** Spacing before in twips (w:spacing/@w:before) */
@@ -1344,6 +1346,47 @@ type NumberingDefinitions = {
1344
1346
  preservedAttributes?: PreservedAttribute[];
1345
1347
  };
1346
1348
  //#endregion
1349
+ //#region src/model/presetLineDash.gen.d.ts
1350
+ /**
1351
+ * GENERATED FILE — do not edit.
1352
+ *
1353
+ * The `ST_PresetLineDashVal` enumeration, in schema order, derived from
1354
+ * `specifications/generated/docx-transitional-schema.gen.json` by
1355
+ * `scripts/generate-preset-line-dash.ts`. Regenerate with:
1356
+ *
1357
+ * bun run generate:preset-line-dash
1358
+ *
1359
+ * It is the dash vocabulary of `a:ln/a:prstDash@val`, and only that: the
1360
+ * spellings it shares with CSS `border-style` (`solid`, `dash`, `dot`)
1361
+ * name different patterns there. Read it through `./presetLineDash`.
1362
+ */
1363
+ /** Every `ST_PresetLineDashVal` member, in schema order. */
1364
+ declare const PRESET_LINE_DASH_VALS: readonly ["solid", "dot", "dash", "lgDash", "dashDot", "lgDashDot", "lgDashDotDot", "sysDash", "sysDot", "sysDashDot", "sysDashDotDot"];
1365
+ /** `a:prstDash@val`: a preset dash the schema declares. */
1366
+ type PresetLineDashVal = (typeof PRESET_LINE_DASH_VALS)[number];
1367
+ //#endregion
1368
+ //#region src/model/presetLineDash.d.ts
1369
+ /**
1370
+ * A `@val` the schema does not declare, kept exactly as the file spelled it.
1371
+ *
1372
+ * Dropping the dash would repaint an authored outline as a plain line, and
1373
+ * reading it as `solid` would rewrite the document on open. The parser reports
1374
+ * it through `ParseContext` so the normalisation is visible, and the
1375
+ * serializer writes `raw` back unchanged.
1376
+ */
1377
+ type UnrecognisedPresetLineDash = {
1378
+ readonly kind: "unrecognised";
1379
+ readonly raw: string;
1380
+ };
1381
+ /** What `ShapeOutline.dash` holds: a schema member, or the raw token. */
1382
+ type PresetLineDashValue = PresetLineDashVal | UnrecognisedPresetLineDash;
1383
+ /** Whether the schema declares this token. */
1384
+ declare const isPresetLineDashVal: (value: string) => value is PresetLineDashVal;
1385
+ /** Read a `@val` into the model, keeping an undeclared token verbatim. */
1386
+ declare const presetLineDashFrom: (value: string) => PresetLineDashValue;
1387
+ /** The token to write back, whether or not the schema declares it. */
1388
+ declare const presetLineDashToken: (dash: PresetLineDashValue) => string;
1389
+ //#endregion
1347
1390
  //#region src/model/preview.d.ts
1348
1391
  /**
1349
1392
  * How a drawing with no image data is drawn, without drawing it.
@@ -1354,27 +1397,42 @@ type NumberingDefinitions = {
1354
1397
  * a megapixel PNG — megabytes per drawing — for the life of the document,
1355
1398
  * whether or not anything ever paints it.
1356
1399
  *
1357
- * A descriptor says the same thing as a list of flat rectangles in the
1358
- * drawing's own coordinate space. It is hundreds of bytes against megabytes,
1359
- * and it is what a renderer draws: no picture is built at parse time or at
1360
- * paint time, so a backend with vector operators draws vectors.
1361
- */
1362
- /** One flat rectangle of a preview, in the coordinate space of {@link PreviewDescriptor.extent}. */
1400
+ * A descriptor says the same thing as a list of filled rectangles, filled
1401
+ * polygons, and stroked polylines in the drawing's own coordinate space. It
1402
+ * is hundreds of bytes against megabytes, and it is what a renderer draws: no
1403
+ * picture is built at parse time or at paint time, so a backend with vector
1404
+ * operators draws vectors.
1405
+ */
1406
+ /** One point in the coordinate space of {@link PreviewDescriptor.extent}. */
1407
+ type PreviewPoint = {
1408
+ readonly x: number;
1409
+ readonly y: number;
1410
+ };
1363
1411
  type PreviewShape = {
1412
+ /** Absent on diagram rectangles produced before previews supported paths. */
1413
+ readonly type?: "rect";
1364
1414
  readonly x: number;
1365
1415
  readonly y: number;
1366
1416
  readonly width: number;
1367
1417
  readonly height: number;
1368
1418
  /** Six hexadecimal digits, no leading `#`, as `a:srgbClr@val` spells it. */
1369
1419
  readonly color: string;
1420
+ } | {
1421
+ readonly type: "polygon";
1422
+ readonly points: readonly PreviewPoint[];
1423
+ readonly color: string;
1424
+ } | {
1425
+ readonly type: "polyline";
1426
+ readonly points: readonly PreviewPoint[];
1427
+ readonly color: string;
1428
+ readonly strokeWidth: number;
1370
1429
  };
1371
1430
  /**
1372
- * Discriminated on `kind` rather than shaped as a diagram record: chart frames
1373
- * and OLE previews are the same problem and will want the same field, and a
1374
- * `kind` now is cheaper than migrating a bare `diagram` later.
1431
+ * The kind identifies the drawing source while the renderers share the same
1432
+ * bounded vector primitives for every source.
1375
1433
  */
1376
1434
  type PreviewDescriptor = {
1377
- readonly kind: "diagram";
1435
+ readonly kind: "chart" | "diagram";
1378
1436
  /**
1379
1437
  * The drawing's extent, in the units `shapes` coordinates use (EMU).
1380
1438
  *
@@ -1386,7 +1444,7 @@ type PreviewDescriptor = {
1386
1444
  readonly width: number;
1387
1445
  readonly height: number;
1388
1446
  };
1389
- /** Already clipped to the shape cap, in paint order. */
1447
+ /** Already bounded by the shape and point caps, in paint order. */
1390
1448
  readonly shapes: readonly PreviewShape[];
1391
1449
  };
1392
1450
  //#endregion
@@ -1427,47 +1485,6 @@ declare const relationshipIdOf: (value: string | null | undefined) => Relationsh
1427
1485
  */
1428
1486
  declare const mintRelationshipId: (ordinal: number) => RelationshipId;
1429
1487
  //#endregion
1430
- //#region src/model/presetLineDash.gen.d.ts
1431
- /**
1432
- * GENERATED FILE — do not edit.
1433
- *
1434
- * The `ST_PresetLineDashVal` enumeration, in schema order, derived from
1435
- * `specifications/generated/docx-transitional-schema.gen.json` by
1436
- * `scripts/generate-preset-line-dash.ts`. Regenerate with:
1437
- *
1438
- * bun run generate:preset-line-dash
1439
- *
1440
- * It is the dash vocabulary of `a:ln/a:prstDash@val`, and only that: the
1441
- * spellings it shares with CSS `border-style` (`solid`, `dash`, `dot`)
1442
- * name different patterns there. Read it through `./presetLineDash`.
1443
- */
1444
- /** Every `ST_PresetLineDashVal` member, in schema order. */
1445
- declare const PRESET_LINE_DASH_VALS: readonly ["solid", "dot", "dash", "lgDash", "dashDot", "lgDashDot", "lgDashDotDot", "sysDash", "sysDot", "sysDashDot", "sysDashDotDot"];
1446
- /** `a:prstDash@val`: a preset dash the schema declares. */
1447
- type PresetLineDashVal = (typeof PRESET_LINE_DASH_VALS)[number];
1448
- //#endregion
1449
- //#region src/model/presetLineDash.d.ts
1450
- /**
1451
- * A `@val` the schema does not declare, kept exactly as the file spelled it.
1452
- *
1453
- * Dropping the dash would repaint an authored outline as a plain line, and
1454
- * reading it as `solid` would rewrite the document on open. The parser reports
1455
- * it through `ParseContext` so the normalisation is visible, and the
1456
- * serializer writes `raw` back unchanged.
1457
- */
1458
- type UnrecognisedPresetLineDash = {
1459
- readonly kind: "unrecognised";
1460
- readonly raw: string;
1461
- };
1462
- /** What `ShapeOutline.dash` holds: a schema member, or the raw token. */
1463
- type PresetLineDashValue = PresetLineDashVal | UnrecognisedPresetLineDash;
1464
- /** Whether the schema declares this token. */
1465
- declare const isPresetLineDashVal: (value: string) => value is PresetLineDashVal;
1466
- /** Read a `@val` into the model, keeping an undeclared token verbatim. */
1467
- declare const presetLineDashFrom: (value: string) => PresetLineDashValue;
1468
- /** The token to write back, whether or not the schema declares it. */
1469
- declare const presetLineDashToken: (dash: PresetLineDashValue) => string;
1470
- //#endregion
1471
1488
  //#region src/model/content.d.ts
1472
1489
  /**
1473
1490
  * Plain text content
@@ -1642,15 +1659,15 @@ type DrawingContent = {
1642
1659
  * The shape models the `mc:Choice` branch; `mc:Fallback` repeats the shape for
1643
1660
  * consumers that cannot process that branch (ECMA-376 Part 3), typically as VML
1644
1661
  * holding a second copy of the text. The element is written back whole while
1645
- * the shape is unedited. Once the shape is edited, the Choice is regenerated
1646
- * from the model and the Fallback is dropped: it would describe the shape as it
1647
- * was, contradicting the new Choice for every consumer that reads only it.
1662
+ * the shape is unedited. A text-only edit updates both branches; other edits
1663
+ * regenerate the Choice and drop the Fallback rather than replaying stale geometry.
1648
1664
  */
1649
1665
  type ShapeAlternateContent = {
1650
1666
  /** The whole element, every branch included, as `captureVerbatimXml` wrote it. */
1651
1667
  verbatimXml: string;
1652
1668
  /** Fingerprint of the modeled shape when the element was captured. */
1653
1669
  verbatimFingerprint: string;
1670
+ verbatimStructureFingerprint?: string;
1654
1671
  };
1655
1672
  /**
1656
1673
  * Shape reference
@@ -1707,7 +1724,7 @@ type Hyperlink = {
1707
1724
  /** Document location */
1708
1725
  docLocation?: string;
1709
1726
  /**
1710
- * The link's content: runs, bookmark boundaries, the transparent wrappers,
1727
+ * The link's content: runs, bookmark and comment markers, the transparent wrappers,
1711
1728
  * and markup folio does not model kept where the source put it.
1712
1729
  *
1713
1730
  * `CT_Hyperlink` is `EG_PContent`, so a link may hold a permission range, a
@@ -1721,7 +1738,7 @@ type Hyperlink = {
1721
1738
  * That is the parse leg only: the editor carries a wrapper as a mark and the
1722
1739
  * save leg writes the canonical order, wrapper outside the link.
1723
1740
  */
1724
- children: (Run | BookmarkStart | BookmarkEnd | InlineWrapper | PreservedInline)[];
1741
+ children: (Run | BookmarkStart | BookmarkEnd | CommentRangeStart | CommentRangeEnd | CommentReference | InlineWrapper | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | PreservedInline)[];
1725
1742
  };
1726
1743
  /**
1727
1744
  * Which side of a `w:customXml` element a range marker was displaced to
@@ -1742,6 +1759,12 @@ type MarkupRangeMarker = {
1742
1759
  id: number;
1743
1760
  displacedByCustomXml?: DisplacedByCustomXml;
1744
1761
  };
1762
+ /** Added-revision ancestors that own a copied bookmark or move boundary. */
1763
+ type CopyOriginAncestorOrdinals = readonly [number, ...number[]];
1764
+ type CopyOriginMarker = {
1765
+ /** Nearest added revision ancestor is ordinal 0. */
1766
+ copyOriginAncestors?: CopyOriginAncestorOrdinals;
1767
+ };
1745
1768
  /** `CT_Bookmark`: a named range, optionally scoped to table columns. */
1746
1769
  type BookmarkRangeMarker = MarkupRangeMarker & {
1747
1770
  name: string;
@@ -1767,13 +1790,13 @@ type MoveBookmarkMarker = BookmarkRangeMarker & {
1767
1790
  */
1768
1791
  type BookmarkStart = {
1769
1792
  type: "bookmarkStart";
1770
- } & BookmarkRangeMarker;
1793
+ } & BookmarkRangeMarker & CopyOriginMarker;
1771
1794
  /**
1772
1795
  * Bookmark end marker (w:bookmarkEnd)
1773
1796
  */
1774
1797
  type BookmarkEnd = {
1775
1798
  type: "bookmarkEnd";
1776
- } & MarkupRangeMarker;
1799
+ } & MarkupRangeMarker & CopyOriginMarker;
1777
1800
  /**
1778
1801
  * A bookmark marker standing between a container's own children.
1779
1802
  *
@@ -2582,6 +2605,8 @@ type Table = {
2582
2605
  type Comment = {
2583
2606
  /** Comment ID (matches commentRangeStart/End) */
2584
2607
  id: number;
2608
+ /** Whether the author selected content or placed a point annotation. */
2609
+ anchorKind?: "point" | "range";
2585
2610
  /** Author name */
2586
2611
  author: string;
2587
2612
  /** Author initials */
@@ -2701,7 +2726,7 @@ type PropertyChangeInfo = {
2701
2726
  * with it: the text is then neither inserted nor deleted, and accepting and
2702
2727
  * rejecting the revision both keep it.
2703
2728
  */
2704
- type TrackedRunContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | SimpleField | ComplexField | InlineSdt | InlineWrapper | MathEquation | PreservedInline | TrackedRunChange;
2729
+ type TrackedRunContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | CommentRangeStart | CommentRangeEnd | CommentReference | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | SimpleField | ComplexField | InlineSdt | InlineWrapper | MathEquation | PreservedInline | TrackedRunChange;
2705
2730
  declare const INSERTION_SEAM_POLICIES: {
2706
2731
  readonly MERGE_PLAIN_RUNS: "merge-plain-runs";
2707
2732
  };
@@ -2859,26 +2884,26 @@ type InlineWrapper = {
2859
2884
  */
2860
2885
  type MoveFromRangeStart = {
2861
2886
  type: "moveFromRangeStart";
2862
- } & MoveBookmarkMarker;
2887
+ } & MoveBookmarkMarker & CopyOriginMarker;
2863
2888
  /**
2864
2889
  * Move-from range end marker (w:moveFromRangeEnd)
2865
2890
  */
2866
2891
  type MoveFromRangeEnd = {
2867
2892
  type: "moveFromRangeEnd";
2868
- } & MarkupRangeMarker;
2893
+ } & MarkupRangeMarker & CopyOriginMarker;
2869
2894
  /**
2870
2895
  * Move-to range start marker (w:moveToRangeStart) — ECMA-376 §17.13.5.24
2871
2896
  * Pairs with moveToRangeEnd to delimit the destination of a move.
2872
2897
  */
2873
2898
  type MoveToRangeStart = {
2874
2899
  type: "moveToRangeStart";
2875
- } & MoveBookmarkMarker;
2900
+ } & MoveBookmarkMarker & CopyOriginMarker;
2876
2901
  /**
2877
2902
  * Move-to range end marker (w:moveToRangeEnd)
2878
2903
  */
2879
2904
  type MoveToRangeEnd = {
2880
2905
  type: "moveToRangeEnd";
2881
- } & MarkupRangeMarker;
2906
+ } & MarkupRangeMarker & CopyOriginMarker;
2882
2907
  /**
2883
2908
  * Run-level tracked wrappers represented in WordprocessingML.
2884
2909
  */
@@ -3151,14 +3176,16 @@ type SdtEndProperties = {
3151
3176
  * sibling of the control has changed extent or ownership. A bookmark that
3152
3177
  * covered the control's content ends up covering the control and whatever
3153
3178
  * follows it; a tracked move can stop covering the marker that identifies its
3154
- * source or destination.
3179
+ * source or destination. Comment range boundaries are also members of
3180
+ * `EG_RangeMarkupElements` and retain their authored position inside the
3181
+ * control when the editor resolves nearby content.
3155
3182
  */
3156
3183
  type InlineSdt = {
3157
3184
  type: "inlineSdt";
3158
3185
  /** SDT properties */
3159
3186
  properties: SdtProperties;
3160
3187
  /** Inline content held inside the control */
3161
- content: (Run | Hyperlink | BookmarkStart | BookmarkEnd | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | SimpleField | ComplexField | InlineSdt | InlineWrapper | Insertion | Deletion | MoveFrom | MoveTo | MathEquation | PreservedInline)[];
3188
+ content: (Run | Hyperlink | BookmarkStart | BookmarkEnd | CommentRangeStart | CommentRangeEnd | CommentReference | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | SimpleField | ComplexField | InlineSdt | InlineWrapper | Insertion | Deletion | MoveFrom | MoveTo | MathEquation | PreservedInline)[];
3162
3189
  };
3163
3190
  /**
3164
3191
  * Block-level SDT (content control wrapping paragraphs/tables).
@@ -3682,7 +3709,7 @@ type PreservedBlock = {
3682
3709
  * the paragraph-level half unpaired, and an unpaired boundary is deleted: the
3683
3710
  * bookmark would not merely move, it would go.
3684
3711
  */
3685
- type BlockContent = Paragraph | Table | BlockSdt | BlockCustomXml | PreservedBlock | BookmarkStart | BookmarkEnd;
3712
+ type BlockContent = Paragraph | Table | BlockSdt | BlockCustomXml | PreservedBlock | BookmarkStart | BookmarkEnd | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd;
3686
3713
  /** A block that can occur inside a table cell. */
3687
3714
  type TableCellBlock = BlockContent;
3688
3715
  /**
@@ -3742,6 +3769,20 @@ type DocumentBody = {
3742
3769
  /** A run-property container has one pending formatting revision. */
3743
3770
  declare const getSingularRunPropertyChange: (propertyChanges: readonly RunPropertyChange[] | undefined) => RunPropertyChange | undefined;
3744
3771
  //#endregion
3772
+ //#region src/model/canonical.d.ts
3773
+ /** Set modeled comments while keeping an empty comments part out of the document model. */
3774
+ declare const setDocumentBodyComments: (body: DocumentBody, comments: Comment[]) => void;
3775
+ /**
3776
+ * Finish paragraph formatting at a model boundary.
3777
+ *
3778
+ * The parser represents an empty `w:pPr`, including one whose only state was
3779
+ * source-replay metadata, as absent formatting. Live conversion must use the
3780
+ * same representation so save/reopen does not change the model's shape.
3781
+ */
3782
+ declare const finalizeParagraphFormatting: (formatting: ParagraphFormatting | undefined) => ParagraphFormatting | undefined;
3783
+ /** Whether paragraph formatting states no modeled properties. */
3784
+ declare const isCanonicallyEmptyParagraphFormatting: (formatting: ParagraphFormatting | undefined) => boolean;
3785
+ //#endregion
3745
3786
  //#region src/model/parseWarning.d.ts
3746
3787
  /**
3747
3788
  * What folio normalised to open a document, as data rather than as prose.
@@ -4154,6 +4195,53 @@ type ExhaustiveFields<Source, Classified extends keyof Source> = Exclude<keyof S
4154
4195
  /** Resolve only defined numbering levels; preserve unsupported source values elsewhere. */
4155
4196
  declare const isNumberingLevel: (value: number) => boolean;
4156
4197
  //#endregion
4198
+ //#region src/model/numberingLevels.d.ts
4199
+ type NumberingLevelResolution = {
4200
+ kind: "level";
4201
+ level: ListLevel;
4202
+ source: "abstract" | "override" | "styleLink";
4203
+ } | {
4204
+ kind: "undefined";
4205
+ reason: "levelOutOfRange" | "noInstance" | "noAbstract" | "unresolvedStyleLink" | "levelNotDefined";
4206
+ };
4207
+ type NumberingLevelEntry = {
4208
+ numId: number;
4209
+ ilvl: number;
4210
+ level: ListLevel;
4211
+ };
4212
+ /** Whether a numbering level reserves space for a visible marker. */
4213
+ declare const numberingLevelHasMarkerSlot: (level: {
4214
+ numFmt: CounterFormat;
4215
+ }, isLegal?: boolean) => boolean;
4216
+ /**
4217
+ * Whether a `w:numId` names an instance that can define any level: a `w:num`
4218
+ * whose `w:abstractNum` exists, or one carrying a full `lvlOverride/lvl`,
4219
+ * which is a complete level of its own (see `resolveNumberingLevel`). A
4220
+ * reference that fails this numbers nothing at any level.
4221
+ */
4222
+ declare const numberingInstanceResolves: (definitions: NumberingDefinitions, numId: number) => boolean;
4223
+ /**
4224
+ * Resolves the level named by a concrete numbering reference.
4225
+ *
4226
+ * ECMA-376 §17.9.3 and §17.9.6 restrict `ilvl` to 0..8; an invalid or
4227
+ * undefined level remains authored but is not materialised. Sections
4228
+ * §17.9.8 and §17.9.9 make a full `lvlOverride/lvl` authoritative while a
4229
+ * `startOverride` changes the selected full or abstract level's start. Sections
4230
+ * §17.9.21 and §17.9.27 link a level-less abstract through `numStyleLink` to
4231
+ * the first document-order abstract whose `styleLink` matches.
4232
+ *
4233
+ * Duplicate ids are resolved in document order, matching the package part.
4234
+ */
4235
+ declare const resolveNumberingLevel: (definitions: NumberingDefinitions, numId: number, ilvl: number) => NumberingLevelResolution;
4236
+ /** ECMA-376 §17.9.6 permits nine levels; enumerate each instance through the owner. */
4237
+ declare const numberingLevelEntries: (definitions: NumberingDefinitions) => NumberingLevelEntry[];
4238
+ /**
4239
+ * Whether the resolved level paints a non-blank marker. ECMA-376 §17.3.2.41
4240
+ * hides vanished runs; §17.9.11, §17.9.14 and §17.9.23 define the
4241
+ * current level's legal-numbering mode, `none`, and placeholder rendering.
4242
+ */
4243
+ declare const levelShowsMarker: (definitions: NumberingDefinitions, numId: number, ilvl: number) => boolean;
4244
+ //#endregion
4157
4245
  //#region src/model/document.d.ts
4158
4246
  /** OOXML default per §17.6.13 when `w:defaultTabStop` is absent. */
4159
4247
  declare const DEFAULT_TAB_STOP_TWIPS = 720;
@@ -4167,6 +4255,8 @@ type DocumentSettings = {
4167
4255
  * `w:compat/w:compatSetting[@w:name="compatibilityMode"]`.
4168
4256
  */
4169
4257
  compatibilityMode?: number;
4258
+ /** `w:compat/w:noColumnBalance` requests natural fill-first columns in legacy modes. */
4259
+ noColumnBalance?: boolean;
4170
4260
  /**
4171
4261
  * `w:defaultTabStop` (§17.6.13) — interval in twips between default
4172
4262
  * tab stops applied when a paragraph has no custom `w:tabs`. Word
@@ -4315,4 +4405,4 @@ declare const COMMENT_PART_RELATIONSHIPS: {
4315
4405
  };
4316
4406
  };
4317
4407
  //#endregion
4318
- export { DocumentBackgroundDrawing as $, ThemeColor as $i, TextWatermark as $n, TextFormatting as $r, PROPERTY_REVISION_KINDS as $t, ParseWarning as A, TEXT_DIRECTIONS as Ai, ShapeFill as An, ListRendering as Ar, ImageWrap as At, BookmarkRangeMarker as B, SCHEME_COLOR_VALUE_BY_THEME_COLOR as Bi, TableCell as Bn, TabLeader as Br, MoveBookmarkMarker as Bt, ThemeColorScheme as C, outlineLevelStatedValue as Ci, Section as Cn, COUNTER_FORMATS as Cr, ImageCrop as Ct, ImportedIdCollisionKind as D, ParagraphAlignment as Di, Shape as Dn, LevelSuffix as Dr, ImagePosition as Dt, IMPORTED_ID_COLLISION_KINDS as E, PARAGRAPH_ALIGNMENTS as Ei, SectionStart as En, LevelOverride as Er, ImagePadding as Et, BidiControl as F, TextDirection as Fi, SimpleField as Fn, EmphasisMark as Fr, InstrTextContent as Ft, CommentRangeEnd as G, isThemeColor as Gi, TablePreservedMarkup as Gn, TableFormatting as Gr, MoveToRangeEnd as Gt, BreakContent as H, ThemeColorValue as Hi, TableCellPropertyChange as Hn, TableBorders as Hr, MoveFromRangeEnd as Ht, BlockContent as I, TextDirectionFlow as Ii, SoftHyphenContent as In, FloatingTableProperties as Ir, LineNumberRestart as It, ComplexField as J, themeColorSlot as Ji, TableRow as Jn, TableMeasurement as Jr, NonVisualDrawingNames as Jt, CommentRangeStart as K, knownThemeColor as Ki, TablePropertyChange as Kn, TableGridChange as Kr, MoveToRangeStart as Kt, BlockCustomXml as L, BorderSpec as Li, SymbolContent as Ln, LineSpacingRule as Lr, MAX_REVISION_ID as Lt, ParseWarningLocation as M, TEXT_DIRECTION_FLOW_BY_TOKEN as Mi, ShapeOutline as Mn, NumberingInstance as Mr, InlineSdt as Mt, getSingularRunPropertyChange as N, TabStopAlignment as Ni, ShapeTextBody as Nn, CellMargins as Nr, InlineWrapper as Nt, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as O, TABLE_ALIGNMENTS as Oi, ShapeAlternateContent as On, ListLevel as Or, ImageSize as Ot, BIDI_CONTROLS as P, TableAlignment as Pi, ShapeType as Pn, ConditionalFormatStyle as Pr, Insertion as Pt, DocumentBackground as Q, THEME_COLORS as Qi, TextContent as Qn, TextEffect as Qr, PARAGRAPH_MARK_CHANGE_KINDS as Qt, BlockSdt as R, ColorValue as Ri, TabContent as Rn, ParagraphFormatting as Rr, MarkupRangeMarker as Rt, Theme as S, outlineLevelFromStatedValue as Si, SdtType as Sn, AbstractNumbering as Sr, Image as St, ThemeFontScheme as T, NumberFormat as Ti, SectionPropertyChange as Tn, LevelLegacy as Tr, ImageFrameLocks as Tt, Column as U, UnrecognisedThemeColor as Ui, TableContentCarrier as Un, TableCellBorders as Ur, MoveFromRangeStart as Ut, BookmarkStart as V, THEME_COLOR_BY_SCHEME_COLOR_VALUE as Vi, TableCellBlock as Vn, TabStop as Vr, MoveFrom as Vt, Comment as W, isSchemeColorValue as Wi, TableCustomXmlWrapper as Wn, TableCellFormatting as Wr, MoveTo as Wt, Deletion as X, SchemeColorSlot as Xi, TableStructuralChangeInfo as Xn, TableRowFormatting as Xr, NoteNumberRestart as Xt, DRAWING_RAW_XML_MODES as Y, themeColorToken as Yi, TableRowPropertyChange as Yn, TablePropertyExceptionFormatting as Yr, NoteMarkerContent as Yt, DisplacedByCustomXml as Z, SchemeColorValue as Zi, TextBox as Zn, TableWidthType as Zr, NoteReferenceContent as Zt, RelationshipMap as _, BODY_TEXT_OUTLINE_LEVEL as _i, Run as _n, RelationshipId as _r, HeaderFooter as _t, DocumentSettings as a, isBorderNone as aa, ParagraphNumberingSlots as ai, ParagraphPropertyChange as an, WrapDistanceSlots as ar, EffectExtentSlots as at, StyleDefinitions as b, headingLevelOf as bi, SdtEndProperties as bn, PreviewDescriptor as br, Hyperlink as bt, isNumberingLevel as c, BORDER_STYLES as ca, mergeParagraphNumbering as ci, PositionedBookmarkMarker as cn, isOoxmlSymbolCharacter as cr, EndnoteProperties as ct, EmbeddedFontRef as d, paragraphNumberingReference as di, PreservedXmlContent as dn, UnrecognisedPresetLineDash as dr, FieldType as dt, BorderStyleValue as ea, UnderlineStyle as ei, PageOrientation as en, TrackedChangeInfo as er, DocumentBody as et, FontCharset as f, paragraphNumberingReferenceId as fi, PropertyChange as fn, isPresetLineDashVal as fr, FoldedListNumber as ft, Relationship as g, sameStatedParagraphNumbering as gi, ReviewCarrier as gn, PresetLineDashVal as gr, FootnoteProperties as gt, MediaFile as h, sameEffectiveParagraphNumbering as hi, REVIEW_CARRIERS as hn, PRESET_LINE_DASH_VALS as hr, FootnotePosition as ht, Document as i, isBorderNil as ia, ParagraphNumberingReference as ii, ParagraphMarkChangeKind as in, Watermark as ir, DrawingRawXmlMode as it, ParseWarningCode as j, TEXT_DIRECTION_FLOWS as ji, ShapeGeometryAdjustment as jn, NumberingDefinitions as jr, ImageWrapPolygon as jt, PARSE_WARNING_CODES as k, TAB_STOP_ALIGNMENTS as ki, ShapeContent as kn, ListMarkerFormatting as kr, ImageTransform as kt, ExhaustiveFields as l, BorderStyle as la, paragraphNumberingFromSlots as li, PreservedBlock as ln, normalizeRevisionId as lr, Field as lt, FontTable as m, resolveParagraphNumbering as mi, PropertyRevisionKind as mn, presetLineDashToken as mr, Footnote as mt, DEFAULT_TAB_STOP_TWIPS as n, borderStyleFrom as na, NO_PARAGRAPH_NUMBERING as ni, ParagraphContent as nn, TrackedRunContent as nr, DrawingContent as nt, DocxConformanceClass as o, isBorderStyle as oa, ResolvedParagraphNumbering as oi, PictureWatermark as on, WrapDistances as or, Endnote as ot, FontInfo as p, paragraphNumberingSlots as pi, PropertyChangeInfo as pn, presetLineDashFrom as pr, FooterReference as pt, CommentReference as q, readThemeColor as qi, TablePropertyExceptionChange as qn, TableLook as qr, NoBreakHyphenContent as qt, DOCX_CONFORMANCE_CLASSES as r, borderStyleToken as ra, ParagraphNumberingOverride as ri, ParagraphMarkChange as rn, VerticalAlign as rr, DrawingGroupChild as rt, DocxPackage as s, statesNoBorder as sa, isNumberingReference as si, PositionalTab as sn, WrapPolygonPoint as sr, EndnotePosition as st, COMMENT_PART_RELATIONSHIPS as t, UnrecognisedBorderStyle as ta, NO_NUMBERING_NUM_ID as ti, Paragraph as tn, TrackedRunChange as tr, DrawingAnchor as tt, DocDefaults as u, paragraphNumberingLevel as ui, PreservedInline as un, PresetLineDashValue as ur, FieldCharContent as ut, RelationshipType as v, HeadingOutlineLevel as vi, RunContent as vn, mintRelationshipId as vr, HeaderFooterType as vt, ThemeFont as w, NUMBER_FORMATS as wi, SectionProperties as wn, CounterFormat as wr, ImageDocPrLink as wt, StyleType as x, headingOutlineLevel as xi, SdtProperties as xn, PreviewShape as xr, INSERTION_SEAM_POLICIES as xt, Style as y, OutlineLevel as yi, RunPropertyChange as yn, relationshipIdOf as yr, HeaderReference as yt, BookmarkEnd as z, ShadingProperties as zi, Table as zn, SpacingExplicit as zr, MathEquation as zt };
4408
+ export { Column as $, UnrecognisedThemeColor as $i, TableContentCarrier as $n, TableCellBorders as $r, MoveFromRangeStart as $t, ThemeColorScheme as A, headingLevelOf as Ai, SdtEndProperties as An, PRESET_LINE_DASH_VALS as Ar, Hyperlink as At, finalizeParagraphFormatting as B, TEXT_DIRECTIONS as Bi, ShapeFill as Bn, ListRendering as Br, ImageWrap as Bt, Relationship as C, paragraphNumberingSlots as Ci, PropertyChangeInfo as Cn, PreviewDescriptor as Cr, FooterReference as Ct, StyleDefinitions as D, BODY_TEXT_OUTLINE_LEVEL as Di, Run as Dn, isPresetLineDashVal as Dr, HeaderFooter as Dt, Style as E, sameStatedParagraphNumbering as Ei, ReviewCarrier as En, UnrecognisedPresetLineDash as Er, FootnoteProperties as Et, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as F, NumberFormat as Fi, SectionPropertyChange as Fn, LevelLegacy as Fr, ImageFrameLocks as Ft, BidiControl as G, TextDirection as Gi, SimpleField as Gn, EmphasisMark as Gr, InstrTextContent as Gt, setDocumentBodyComments as H, TEXT_DIRECTION_FLOW_BY_TOKEN as Hi, ShapeOutline as Hn, NumberingInstance as Hr, InlineSdt as Ht, PARSE_WARNING_CODES as I, PARAGRAPH_ALIGNMENTS as Ii, SectionStart as In, LevelOverride as Ir, ImagePadding as It, BlockSdt as J, ColorValue as Ji, TabContent as Jn, ParagraphFormatting as Jr, MarkupRangeMarker as Jt, BlockContent as K, TextDirectionFlow as Ki, SoftHyphenContent as Kn, FloatingTableProperties as Kr, LineNumberRestart as Kt, ParseWarning as L, ParagraphAlignment as Li, Shape as Ln, LevelSuffix as Lr, ImagePosition as Lt, ThemeFontScheme as M, outlineLevelFromStatedValue as Mi, SdtType as Mn, AbstractNumbering as Mr, Image as Mt, IMPORTED_ID_COLLISION_KINDS as N, outlineLevelStatedValue as Ni, Section as Nn, COUNTER_FORMATS as Nr, ImageCrop as Nt, StyleType as O, HeadingOutlineLevel as Oi, RunContent as On, presetLineDashFrom as Or, HeaderFooterType as Ot, ImportedIdCollisionKind as P, NUMBER_FORMATS as Pi, SectionProperties as Pn, CounterFormat as Pr, ImageDocPrLink as Pt, BreakContent as Q, ThemeColorValue as Qi, TableCellPropertyChange as Qn, TableBorders as Qr, MoveFromRangeEnd as Qt, ParseWarningCode as R, TABLE_ALIGNMENTS as Ri, ShapeAlternateContent as Rn, ListLevel as Rr, ImageSize as Rt, MediaFile as S, paragraphNumberingReferenceId as Si, PropertyChange as Sn, relationshipIdOf as Sr, FoldedListNumber as St, RelationshipType as T, sameEffectiveParagraphNumbering as Ti, REVIEW_CARRIERS as Tn, PresetLineDashValue as Tr, FootnotePosition as Tt, getSingularRunPropertyChange as U, TabStopAlignment as Ui, ShapeTextBody as Un, CellMargins as Ur, InlineWrapper as Ut, isCanonicallyEmptyParagraphFormatting as V, TEXT_DIRECTION_FLOWS as Vi, ShapeGeometryAdjustment as Vn, NumberingDefinitions as Vr, ImageWrapPolygon as Vt, BIDI_CONTROLS as W, TableAlignment as Wi, ShapeType as Wn, ConditionalFormatStyle as Wr, Insertion as Wt, BookmarkRangeMarker as X, SCHEME_COLOR_VALUE_BY_THEME_COLOR as Xi, TableCell as Xn, TabLeader as Xr, MoveBookmarkMarker as Xt, BookmarkEnd as Y, ShadingProperties as Yi, Table as Yn, SpacingExplicit as Yr, MathEquation as Yt, BookmarkStart as Z, THEME_COLOR_BY_SCHEME_COLOR_VALUE as Zi, TableCellBlock as Zn, TabStop as Zr, MoveFrom as Zt, DocDefaults as _, statesNoBorder as _a, isNumberingReference as _i, PositionalTab as _n, WrapPolygonPoint as _r, EndnotePosition as _t, DocumentSettings as a, themeColorToken as aa, TablePropertyExceptionFormatting as ai, NoteMarkerContent as an, TableRowPropertyChange as ar, DRAWING_RAW_XML_MODES as at, FontInfo as b, paragraphNumberingLevel as bi, PreservedInline as bn, RelationshipId as br, FieldCharContent as bt, NumberingLevelEntry as c, THEME_COLORS as ca, TextEffect as ci, PARAGRAPH_MARK_CHANGE_KINDS as cn, TextContent as cr, DocumentBackground as ct, numberingInstanceResolves as d, UnrecognisedBorderStyle as da, NO_NUMBERING_NUM_ID as di, Paragraph as dn, TrackedRunChange as dr, DrawingAnchor as dt, isSchemeColorValue as ea, TableCellFormatting as ei, MoveTo as en, TableCustomXmlWrapper as er, Comment as et, numberingLevelEntries as f, borderStyleFrom as fa, NO_PARAGRAPH_NUMBERING as fi, ParagraphContent as fn, TrackedRunContent as fr, DrawingContent as ft, ExhaustiveFields as g, isBorderStyle as ga, ResolvedParagraphNumbering as gi, PictureWatermark as gn, WrapDistances as gr, Endnote as gt, isNumberingLevel as h, isBorderNone as ha, ParagraphNumberingSlots as hi, ParagraphPropertyChange as hn, WrapDistanceSlots as hr, EffectExtentSlots as ht, Document as i, themeColorSlot as ia, TableMeasurement as ii, NonVisualDrawingNames as in, TableRow as ir, ComplexField as it, ThemeFont as j, headingOutlineLevel as ji, SdtProperties as jn, PresetLineDashVal as jr, INSERTION_SEAM_POLICIES as jt, Theme as k, OutlineLevel as ki, RunPropertyChange as kn, presetLineDashToken as kr, HeaderReference as kt, NumberingLevelResolution as l, ThemeColor as la, TextFormatting as li, PROPERTY_REVISION_KINDS as ln, TextWatermark as lr, DocumentBackgroundDrawing as lt, resolveNumberingLevel as m, isBorderNil as ma, ParagraphNumberingReference as mi, ParagraphMarkChangeKind as mn, Watermark as mr, DrawingRawXmlMode as mt, DEFAULT_TAB_STOP_TWIPS as n, knownThemeColor as na, TableGridChange as ni, MoveToRangeStart as nn, TablePropertyChange as nr, CommentRangeStart as nt, DocxConformanceClass as o, SchemeColorSlot as oa, TableRowFormatting as oi, NoteNumberRestart as on, TableStructuralChangeInfo as or, Deletion as ot, numberingLevelHasMarkerSlot as p, borderStyleToken as pa, ParagraphNumberingOverride as pi, ParagraphMarkChange as pn, VerticalAlign as pr, DrawingGroupChild as pt, BlockCustomXml as q, BorderSpec as qi, SymbolContent as qn, LineSpacingRule as qr, MAX_REVISION_ID as qt, DOCX_CONFORMANCE_CLASSES as r, readThemeColor as ra, TableLook as ri, NoBreakHyphenContent as rn, TablePropertyExceptionChange as rr, CommentReference as rt, DocxPackage as s, SchemeColorValue as sa, TableWidthType as si, NoteReferenceContent as sn, TextBox as sr, DisplacedByCustomXml as st, COMMENT_PART_RELATIONSHIPS as t, isThemeColor as ta, TableFormatting as ti, MoveToRangeEnd as tn, TablePreservedMarkup as tr, CommentRangeEnd as tt, levelShowsMarker as u, BorderStyleValue as ua, UnderlineStyle as ui, PageOrientation as un, TrackedChangeInfo as ur, DocumentBody as ut, EmbeddedFontRef as v, BORDER_STYLES as va, mergeParagraphNumbering as vi, PositionedBookmarkMarker as vn, isOoxmlSymbolCharacter as vr, EndnoteProperties as vt, RelationshipMap as w, resolveParagraphNumbering as wi, PropertyRevisionKind as wn, PreviewShape as wr, Footnote as wt, FontTable as x, paragraphNumberingReference as xi, PreservedXmlContent as xn, mintRelationshipId as xr, FieldType as xt, FontCharset as y, BorderStyle as ya, paragraphNumberingFromSlots as yi, PreservedBlock as yn, normalizeRevisionId as yr, Field as yt, ParseWarningLocation as z, TAB_STOP_ALIGNMENTS as zi, ShapeContent as zn, ListMarkerFormatting as zr, ImageTransform as zt };
@@ -10,6 +10,28 @@ const getSingularRunPropertyChange = (propertyChanges) => {
10
10
  return propertyChanges?.at(0);
11
11
  };
12
12
  //#endregion
13
+ //#region src/model/canonical.ts
14
+ /** Set modeled comments while keeping an empty comments part out of the document model. */
15
+ const setDocumentBodyComments = (body, comments) => {
16
+ if (comments.length === 0) {
17
+ Reflect.set(body, "comments", void 0);
18
+ return;
19
+ }
20
+ body.comments = comments;
21
+ };
22
+ /**
23
+ * Finish paragraph formatting at a model boundary.
24
+ *
25
+ * The parser represents an empty `w:pPr`, including one whose only state was
26
+ * source-replay metadata, as absent formatting. Live conversion must use the
27
+ * same representation so save/reopen does not change the model's shape.
28
+ */
29
+ const finalizeParagraphFormatting = (formatting) => {
30
+ return isCanonicallyEmptyParagraphFormatting(formatting) ? void 0 : formatting;
31
+ };
32
+ /** Whether paragraph formatting states no modeled properties. */
33
+ const isCanonicallyEmptyParagraphFormatting = (formatting) => formatting === void 0 || Object.keys(formatting).every((key) => key === "sourceXml");
34
+ //#endregion
13
35
  //#region src/model/parseWarning.ts
14
36
  /**
15
37
  * What folio normalised to open a document, as data rather than as prose.
@@ -1148,6 +1170,124 @@ const COUNTER_FORMATS = [
1148
1170
  "decimalZero5"
1149
1171
  ];
1150
1172
  //#endregion
1173
+ //#region src/model/numberingLevels.ts
1174
+ const MIN_NUMBERING_LEVEL = 0;
1175
+ const MAX_NUMBERING_LEVEL = 8;
1176
+ /** Whether a numbering level reserves space for a visible marker. */
1177
+ const numberingLevelHasMarkerSlot = (level, isLegal = false) => isLegal || level.numFmt !== "none";
1178
+ const firstById = (values, idOf, id) => values.find((value) => idOf(value) === id);
1179
+ /**
1180
+ * Whether a `w:numId` names an instance that can define any level: a `w:num`
1181
+ * whose `w:abstractNum` exists, or one carrying a full `lvlOverride/lvl`,
1182
+ * which is a complete level of its own (see `resolveNumberingLevel`). A
1183
+ * reference that fails this numbers nothing at any level.
1184
+ */
1185
+ const numberingInstanceResolves = (definitions, numId) => {
1186
+ const instance = firstById(definitions.nums, (candidate) => candidate.numId, numId);
1187
+ if (!instance) return false;
1188
+ return instance.levelOverrides?.some((override) => override.lvl !== void 0) === true || firstById(definitions.abstractNums, (candidate) => candidate.abstractNumId, instance.abstractNumId) !== void 0;
1189
+ };
1190
+ /**
1191
+ * Resolves the level named by a concrete numbering reference.
1192
+ *
1193
+ * ECMA-376 §17.9.3 and §17.9.6 restrict `ilvl` to 0..8; an invalid or
1194
+ * undefined level remains authored but is not materialised. Sections
1195
+ * §17.9.8 and §17.9.9 make a full `lvlOverride/lvl` authoritative while a
1196
+ * `startOverride` changes the selected full or abstract level's start. Sections
1197
+ * §17.9.21 and §17.9.27 link a level-less abstract through `numStyleLink` to
1198
+ * the first document-order abstract whose `styleLink` matches.
1199
+ *
1200
+ * Duplicate ids are resolved in document order, matching the package part.
1201
+ */
1202
+ const resolveNumberingLevel = (definitions, numId, ilvl) => {
1203
+ if (!Number.isInteger(ilvl) || ilvl < MIN_NUMBERING_LEVEL || ilvl > MAX_NUMBERING_LEVEL) return {
1204
+ kind: "undefined",
1205
+ reason: "levelOutOfRange"
1206
+ };
1207
+ const instance = firstById(definitions.nums, (candidate) => candidate.numId, numId);
1208
+ if (!instance) return {
1209
+ kind: "undefined",
1210
+ reason: "noInstance"
1211
+ };
1212
+ const override = instance.levelOverrides?.find((candidate) => candidate.ilvl === ilvl);
1213
+ if (override?.lvl) return {
1214
+ kind: "level",
1215
+ level: override.startOverride === void 0 ? override.lvl : {
1216
+ ...override.lvl,
1217
+ start: override.startOverride
1218
+ },
1219
+ source: "override"
1220
+ };
1221
+ const abstract = firstById(definitions.abstractNums, (candidate) => candidate.abstractNumId, instance.abstractNumId);
1222
+ if (!abstract) return {
1223
+ kind: "undefined",
1224
+ reason: "noAbstract"
1225
+ };
1226
+ let levelOwner = abstract;
1227
+ let source = "abstract";
1228
+ if (abstract.levels.length === 0 && abstract.numStyleLink !== void 0) {
1229
+ const linked = definitions.abstractNums.find((candidate) => candidate.styleLink === abstract.numStyleLink);
1230
+ if (!linked) return {
1231
+ kind: "undefined",
1232
+ reason: "unresolvedStyleLink"
1233
+ };
1234
+ levelOwner = linked;
1235
+ source = "styleLink";
1236
+ }
1237
+ const level = levelOwner.levels.find((candidate) => candidate.ilvl === ilvl);
1238
+ if (!level) return {
1239
+ kind: "undefined",
1240
+ reason: "levelNotDefined"
1241
+ };
1242
+ if (override?.startOverride === void 0) return {
1243
+ kind: "level",
1244
+ level,
1245
+ source
1246
+ };
1247
+ return {
1248
+ kind: "level",
1249
+ level: {
1250
+ ...level,
1251
+ start: override.startOverride
1252
+ },
1253
+ source
1254
+ };
1255
+ };
1256
+ /** ECMA-376 §17.9.6 permits nine levels; enumerate each instance through the owner. */
1257
+ const numberingLevelEntries = (definitions) => {
1258
+ const entries = [];
1259
+ const seen = /* @__PURE__ */ new Set();
1260
+ for (const instance of definitions.nums) {
1261
+ if (seen.has(instance.numId)) continue;
1262
+ seen.add(instance.numId);
1263
+ for (let ilvl = MIN_NUMBERING_LEVEL; ilvl <= MAX_NUMBERING_LEVEL; ilvl += 1) {
1264
+ const resolution = resolveNumberingLevel(definitions, instance.numId, ilvl);
1265
+ if (resolution.kind === "level") entries.push({
1266
+ numId: instance.numId,
1267
+ ilvl,
1268
+ level: resolution.level
1269
+ });
1270
+ }
1271
+ }
1272
+ return entries;
1273
+ };
1274
+ /**
1275
+ * Whether the resolved level paints a non-blank marker. ECMA-376 §17.3.2.41
1276
+ * hides vanished runs; §17.9.11, §17.9.14 and §17.9.23 define the
1277
+ * current level's legal-numbering mode, `none`, and placeholder rendering.
1278
+ */
1279
+ const levelShowsMarker = (definitions, numId, ilvl) => {
1280
+ const resolution = resolveNumberingLevel(definitions, numId, ilvl);
1281
+ if (resolution.kind === "undefined" || resolution.level.rPr?.hidden === true) return false;
1282
+ const { level } = resolution;
1283
+ if (level.lvlText.length === 0) return numberingLevelHasMarkerSlot(level, level.isLgl);
1284
+ return level.lvlText.replace(/%([1-9])/gu, (_placeholder, ordinal) => {
1285
+ const referenced = resolveNumberingLevel(definitions, numId, Number.parseInt(ordinal, 10) - 1);
1286
+ if (referenced.kind === "undefined") return "";
1287
+ return numberingLevelHasMarkerSlot(referenced.level, level.isLgl) ? "x" : "";
1288
+ }).trim().length > 0;
1289
+ };
1290
+ //#endregion
1151
1291
  //#region src/model/content.ts
1152
1292
  const OOXML_SYMBOL_CHARACTER_PATTERN = /^[\dA-Fa-f]{4}$/u;
1153
1293
  /** Whether a symbol character is exactly four hexadecimal digits. */
@@ -1263,4 +1403,4 @@ const COMMENT_PART_RELATIONSHIPS = {
1263
1403
  }
1264
1404
  };
1265
1405
  //#endregion
1266
- export { mergeParagraphNumbering as $, TEXT_DIRECTIONS as A, themeColorToken as B, isBorderStyle as C, PARAGRAPH_ALIGNMENTS as D, NUMBER_FORMATS as E, isSchemeColorValue as F, headingLevelOf as G, mintRelationshipId as H, isThemeColor as I, outlineLevelStatedValue as J, headingOutlineLevel as K, knownThemeColor as L, TEXT_DIRECTION_FLOW_BY_TOKEN as M, SCHEME_COLOR_VALUE_BY_THEME_COLOR as N, TABLE_ALIGNMENTS as O, THEME_COLOR_BY_SCHEME_COLOR_VALUE as P, isNumberingReference as Q, readThemeColor as R, isBorderNone as S, BORDER_STYLES as T, relationshipIdOf as U, THEME_COLORS as V, BODY_TEXT_OUTLINE_LEVEL as W, NO_NUMBERING_NUM_ID as X, isNumberingLevel as Y, NO_PARAGRAPH_NUMBERING as Z, presetLineDashToken as _, DRAWING_RAW_XML_MODES as a, resolveParagraphNumbering as at, borderStyleToken as b, PARAGRAPH_MARK_CHANGE_KINDS as c, IMPORTED_ID_COLLISION_KINDS as ct, isNoteReferenceId as d, getSingularRunPropertyChange as dt, paragraphNumberingFromSlots as et, isOoxmlSymbolCharacter as f, presetLineDashFrom as g, isPresetLineDashVal as h, BIDI_CONTROLS as i, paragraphNumberingSlots as it, TEXT_DIRECTION_FLOWS as j, TAB_STOP_ALIGNMENTS as k, PROPERTY_REVISION_KINDS as l, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as lt, COUNTER_FORMATS as m, DEFAULT_TAB_STOP_TWIPS as n, paragraphNumberingReference as nt, INSERTION_SEAM_POLICIES as o, sameEffectiveParagraphNumbering as ot, normalizeRevisionId as p, outlineLevelFromStatedValue as q, DOCX_CONFORMANCE_CLASSES as r, paragraphNumberingReferenceId as rt, MAX_REVISION_ID as s, sameStatedParagraphNumbering as st, COMMENT_PART_RELATIONSHIPS as t, paragraphNumberingLevel as tt, REVIEW_CARRIERS as u, PARSE_WARNING_CODES as ut, PRESET_LINE_DASH_VALS as v, statesNoBorder as w, isBorderNil as x, borderStyleFrom as y, themeColorSlot as z };
1406
+ export { outlineLevelStatedValue as $, BORDER_STYLES as A, isSchemeColorValue as B, PRESET_LINE_DASH_VALS as C, isBorderNone as D, isBorderNil as E, TEXT_DIRECTIONS as F, themeColorToken as G, knownThemeColor as H, TEXT_DIRECTION_FLOWS as I, relationshipIdOf as J, THEME_COLORS as K, TEXT_DIRECTION_FLOW_BY_TOKEN as L, PARAGRAPH_ALIGNMENTS as M, TABLE_ALIGNMENTS as N, isBorderStyle as O, TAB_STOP_ALIGNMENTS as P, outlineLevelFromStatedValue as Q, SCHEME_COLOR_VALUE_BY_THEME_COLOR as R, presetLineDashToken as S, borderStyleToken as T, readThemeColor as U, isThemeColor as V, themeColorSlot as W, headingLevelOf as X, BODY_TEXT_OUTLINE_LEVEL as Y, headingOutlineLevel as Z, numberingLevelHasMarkerSlot as _, isCanonicallyEmptyParagraphFormatting as _t, DRAWING_RAW_XML_MODES as a, paragraphNumberingFromSlots as at, isPresetLineDashVal as b, PARAGRAPH_MARK_CHANGE_KINDS as c, paragraphNumberingReferenceId as ct, isNoteReferenceId as d, sameEffectiveParagraphNumbering as dt, isNumberingLevel as et, isOoxmlSymbolCharacter as f, sameStatedParagraphNumbering as ft, numberingLevelEntries as g, finalizeParagraphFormatting as gt, numberingInstanceResolves as h, PARSE_WARNING_CODES as ht, BIDI_CONTROLS as i, mergeParagraphNumbering as it, NUMBER_FORMATS as j, statesNoBorder as k, PROPERTY_REVISION_KINDS as l, paragraphNumberingSlots as lt, levelShowsMarker as m, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as mt, DEFAULT_TAB_STOP_TWIPS as n, NO_PARAGRAPH_NUMBERING as nt, INSERTION_SEAM_POLICIES as o, paragraphNumberingLevel as ot, normalizeRevisionId as p, IMPORTED_ID_COLLISION_KINDS as pt, mintRelationshipId as q, DOCX_CONFORMANCE_CLASSES as r, isNumberingReference as rt, MAX_REVISION_ID as s, paragraphNumberingReference as st, COMMENT_PART_RELATIONSHIPS as t, NO_NUMBERING_NUM_ID as tt, REVIEW_CARRIERS as u, resolveParagraphNumbering as ut, resolveNumberingLevel as v, setDocumentBodyComments as vt, borderStyleFrom as w, presetLineDashFrom as x, COUNTER_FORMATS as y, getSingularRunPropertyChange as yt, THEME_COLOR_BY_SCHEME_COLOR_VALUE as z };
Binary file