@stll/docx-core 0.30.1 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -48,6 +48,10 @@ bun add @stll/docx-core
48
48
  takes. `normalizeForOps` and `validateOpsDocument` establish and check the
49
49
  contract a document meets before operations apply to it; `toOpEnvelope`
50
50
  wraps an operation with its schema version for journaling.
51
+ `validateDocumentBatch`, `parseDocumentBatch` and `validateSequencedBatch`
52
+ decode bounded batch envelopes. `transformBatch`, `createSequencer` and
53
+ `createClient` provide conservative rebasing, idempotent in-memory sequencing
54
+ and optimistic pending queues (see [operation batches](src/ops/sequencing/README.md)).
51
55
 
52
56
  ## License
53
57
 
@@ -253,6 +253,22 @@ const sameEffectiveParagraphNumbering = (left, right) => {
253
253
  return resolvedLeft.numId === resolvedRight.numId && resolvedLeft.ilvl === resolvedRight.ilvl;
254
254
  };
255
255
  //#endregion
256
+ //#region src/model/numberingLevel.ts
257
+ /** A w:ilvl outside the nine numbering levels names no level. */
258
+ const NUMBERING_LEVELS = /* @__PURE__ */ new Set([
259
+ 0,
260
+ 1,
261
+ 2,
262
+ 3,
263
+ 4,
264
+ 5,
265
+ 6,
266
+ 7,
267
+ 8
268
+ ]);
269
+ /** Resolve only defined numbering levels; preserve unsupported source values elsewhere. */
270
+ const isNumberingLevel = (value) => NUMBERING_LEVELS.has(value);
271
+ //#endregion
256
272
  //#region src/model/outlineLevel.ts
257
273
  /**
258
274
  * `w:outlineLvl`: nine heading levels and one reserved "not a heading".
@@ -1144,6 +1160,7 @@ function normalizeRevisionId(id) {
1144
1160
  if (id > 2147483647) return id % 2147483648;
1145
1161
  return id;
1146
1162
  }
1163
+ const INSERTION_SEAM_POLICIES = { MERGE_PLAIN_RUNS: "merge-plain-runs" };
1147
1164
  /**
1148
1165
  * Which Unicode bidirectional control a `w:bdo`/`w:dir` wrapper is.
1149
1166
  *
@@ -1200,6 +1217,8 @@ const PARAGRAPH_MARK_CHANGE_KINDS = Object.freeze([
1200
1217
  const REVIEW_CARRIERS = { TERMINAL_TABLE: "terminal-table" };
1201
1218
  //#endregion
1202
1219
  //#region src/model/document.ts
1220
+ /** OOXML default per §17.6.13 when `w:defaultTabStop` is absent. */
1221
+ const DEFAULT_TAB_STOP_TWIPS = 720;
1203
1222
  /** DOCX package conformance classes. */
1204
1223
  const DOCX_CONFORMANCE_CLASSES = Object.freeze({
1205
1224
  STRICT: "strict",
@@ -1207,4 +1226,4 @@ const DOCX_CONFORMANCE_CLASSES = Object.freeze({
1207
1226
  UNKNOWN: "unknown"
1208
1227
  });
1209
1228
  //#endregion
1210
- export { paragraphNumberingReferenceId as $, SCHEME_COLOR_VALUE_BY_THEME_COLOR as A, relationshipIdOf as B, NUMBER_FORMATS as C, TEXT_DIRECTIONS as D, TAB_STOP_ALIGNMENTS as E, readThemeColor as F, outlineLevelStatedValue as G, headingLevelOf as H, themeColorSlot as I, isNumberingReference as J, NO_NUMBERING_NUM_ID as K, themeColorToken as L, isSchemeColorValue as M, isThemeColor as N, TEXT_DIRECTION_FLOWS as O, knownThemeColor as P, paragraphNumberingReference as Q, THEME_COLORS as R, BORDER_STYLES as S, TABLE_ALIGNMENTS as T, headingOutlineLevel as U, BODY_TEXT_OUTLINE_LEVEL as V, outlineLevelFromStatedValue as W, paragraphNumberingFromSlots as X, mergeParagraphNumbering as Y, paragraphNumberingLevel as Z, borderStyleToken as _, PARAGRAPH_MARK_CHANGE_KINDS as a, PARSE_WARNING_CODES as at, isBorderStyle as b, isNoteReferenceId as c, COUNTER_FORMATS as d, paragraphNumberingSlots as et, isPresetLineDashVal as f, borderStyleFrom as g, PRESET_LINE_DASH_VALS as h, MAX_REVISION_ID as i, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as it, THEME_COLOR_BY_SCHEME_COLOR_VALUE as j, TEXT_DIRECTION_FLOW_BY_TOKEN as k, isOoxmlSymbolCharacter as l, presetLineDashToken as m, BIDI_CONTROLS as n, sameEffectiveParagraphNumbering as nt, PROPERTY_REVISION_KINDS as o, presetLineDashFrom as p, NO_PARAGRAPH_NUMBERING as q, DRAWING_RAW_XML_MODES as r, sameStatedParagraphNumbering as rt, REVIEW_CARRIERS as s, DOCX_CONFORMANCE_CLASSES as t, resolveParagraphNumbering as tt, normalizeRevisionId as u, isBorderNil as v, PARAGRAPH_ALIGNMENTS as w, statesNoBorder as x, isBorderNone as y, mintRelationshipId as z };
1229
+ export { paragraphNumberingFromSlots as $, TEXT_DIRECTION_FLOWS as A, THEME_COLORS as B, statesNoBorder as C, TABLE_ALIGNMENTS as D, PARAGRAPH_ALIGNMENTS as E, isThemeColor as F, headingOutlineLevel as G, relationshipIdOf as H, knownThemeColor as I, isNumberingLevel as J, outlineLevelFromStatedValue as K, readThemeColor as L, SCHEME_COLOR_VALUE_BY_THEME_COLOR as M, THEME_COLOR_BY_SCHEME_COLOR_VALUE as N, TAB_STOP_ALIGNMENTS as O, isSchemeColorValue as P, mergeParagraphNumbering as Q, themeColorSlot as R, isBorderStyle as S, NUMBER_FORMATS as T, BODY_TEXT_OUTLINE_LEVEL as U, mintRelationshipId as V, headingLevelOf as W, NO_PARAGRAPH_NUMBERING as X, NO_NUMBERING_NUM_ID as Y, isNumberingReference as Z, PRESET_LINE_DASH_VALS as _, INSERTION_SEAM_POLICIES as a, sameEffectiveParagraphNumbering as at, isBorderNil as b, PROPERTY_REVISION_KINDS as c, PARSE_WARNING_CODES as ct, isOoxmlSymbolCharacter as d, paragraphNumberingLevel as et, normalizeRevisionId as f, presetLineDashToken as g, presetLineDashFrom as h, DRAWING_RAW_XML_MODES as i, resolveParagraphNumbering as it, TEXT_DIRECTION_FLOW_BY_TOKEN as j, TEXT_DIRECTIONS as k, REVIEW_CARRIERS as l, isPresetLineDashVal as m, DOCX_CONFORMANCE_CLASSES as n, paragraphNumberingReferenceId as nt, MAX_REVISION_ID as o, sameStatedParagraphNumbering as ot, COUNTER_FORMATS as p, outlineLevelStatedValue as q, BIDI_CONTROLS as r, paragraphNumberingSlots as rt, PARAGRAPH_MARK_CHANGE_KINDS as s, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as st, DEFAULT_TAB_STOP_TWIPS as t, paragraphNumberingReference as tt, isNoteReferenceId as u, borderStyleFrom as v, BORDER_STYLES as w, isBorderNone as x, borderStyleToken as y, themeColorToken as z };
@@ -516,6 +516,8 @@ declare const sameStatedParagraphNumbering: (left: ParagraphNumberingOverride |
516
516
  declare const sameEffectiveParagraphNumbering: (left: ParagraphNumberingOverride | undefined, right: ParagraphNumberingOverride | undefined) => boolean;
517
517
  //#endregion
518
518
  //#region src/model/formatting.d.ts
519
+ /** Formatting journals retain an explicitly undefined own field. */
520
+ type OwnFieldPresence<Formatting> = { [Key in keyof Formatting]: Formatting[Key] | undefined; };
519
521
  /**
520
522
  * Underline style options
521
523
  */
@@ -531,7 +533,7 @@ type EmphasisMark = "none" | "dot" | "comma" | "circle" | "underDot";
531
533
  /**
532
534
  * Complete text formatting properties (w:rPr)
533
535
  */
534
- type TextFormatting = {
536
+ type TextFormatting = OwnFieldPresence<{
535
537
  /** Bold (w:b) */
536
538
  bold?: boolean;
537
539
  /** Bold complex script (w:bCs) */
@@ -631,7 +633,7 @@ type TextFormatting = {
631
633
  * `mergeTextFormatting` drop it rather than inheriting it.
632
634
  */
633
635
  preserved?: PreservedMarkup;
634
- };
636
+ }>;
635
637
  /**
636
638
  * Tab leader character
637
639
  */
@@ -660,7 +662,7 @@ type SpacingExplicit = {
660
662
  before?: boolean;
661
663
  after?: boolean;
662
664
  };
663
- type ParagraphFormatting = {
665
+ type ParagraphFormatting = OwnFieldPresence<{
664
666
  /** Paragraph alignment (w:jc) */
665
667
  alignment?: ParagraphAlignment;
666
668
  /** Text direction (w:bidi) */
@@ -823,7 +825,7 @@ type ParagraphFormatting = {
823
825
  * tier it came from.
824
826
  */
825
827
  preserved?: PreservedMarkup;
826
- };
828
+ }>;
827
829
  /**
828
830
  * Table width type
829
831
  */
@@ -1265,6 +1267,8 @@ type ListRendering = {
1265
1267
  marker: string;
1266
1268
  /** Source `w:lvlText` pattern retained so newly inserted siblings can be numbered. */
1267
1269
  markerTemplate?: string;
1270
+ /** Cached display text of inline LISTNUM fields folded after the list marker. */
1271
+ foldedMarkerSuffix?: string;
1268
1272
  /** List level (0-8) */
1269
1273
  level: number;
1270
1274
  /** Numbering ID */
@@ -1526,6 +1530,11 @@ type NoteReferenceContent = {
1526
1530
  /** An authored custom reference mark follows this reference. */
1527
1531
  customMarkFollows?: boolean;
1528
1532
  };
1533
+ /** The authored automatic reference mark inside a note body (w:footnoteRef/w:endnoteRef). */
1534
+ type NoteMarkerContent = {
1535
+ type: "noteMarker";
1536
+ kind: "footnote" | "endnote";
1537
+ };
1529
1538
  /**
1530
1539
  * Field character (begin/separate/end)
1531
1540
  */
@@ -1656,7 +1665,7 @@ type ShapeContent = {
1656
1665
  /**
1657
1666
  * All possible run content types
1658
1667
  */
1659
- type RunContent = TextContent | TabContent | BreakContent | SymbolContent | NoteReferenceContent | FieldCharContent | InstrTextContent | SoftHyphenContent | NoBreakHyphenContent | RenderedPageBreakContent | PreservedXmlContent | DrawingContent | ShapeContent;
1668
+ type RunContent = TextContent | TabContent | BreakContent | SymbolContent | NoteReferenceContent | NoteMarkerContent | FieldCharContent | InstrTextContent | SoftHyphenContent | NoBreakHyphenContent | RenderedPageBreakContent | PreservedXmlContent | DrawingContent | ShapeContent;
1660
1669
  /**
1661
1670
  * A run is a contiguous region of text with the same formatting
1662
1671
  */
@@ -2693,11 +2702,43 @@ type PropertyChangeInfo = {
2693
2702
  * rejecting the revision both keep it.
2694
2703
  */
2695
2704
  type TrackedRunContent = Run | Hyperlink | BookmarkStart | BookmarkEnd | MoveFromRangeStart | MoveFromRangeEnd | MoveToRangeStart | MoveToRangeEnd | SimpleField | ComplexField | InlineSdt | InlineWrapper | MathEquation | PreservedInline | TrackedRunChange;
2705
+ declare const INSERTION_SEAM_POLICIES: {
2706
+ readonly MERGE_PLAIN_RUNS: "merge-plain-runs";
2707
+ };
2708
+ /** Operation-created seams only; source OOXML has no such provenance. */
2709
+ type TrackedResolutionJoins = {
2710
+ /** Editor text acceptance joins only the inserted payload's plain-run seams. */
2711
+ acceptance?: typeof INSERTION_SEAM_POLICIES.MERGE_PLAIN_RUNS;
2712
+ /** Exact join depths when the wrapper is retained and unwrapped. */
2713
+ before: number;
2714
+ after: number;
2715
+ /** Exact join depth when the wrapper is removed. */
2716
+ remove: number;
2717
+ /** A split seam survives only while all intervening insertions await rejection. */
2718
+ deferredRemove?: readonly {
2719
+ depth: number;
2720
+ blockers: readonly number[];
2721
+ }[];
2722
+ /** Source identities handed to the retained suffix when a deleted prefix goes. */
2723
+ retainedAfter?: readonly {
2724
+ depth: number;
2725
+ source: readonly {
2726
+ space: "revision" | "control";
2727
+ id: number;
2728
+ }[];
2729
+ target: readonly {
2730
+ space: "revision" | "control";
2731
+ id: number;
2732
+ }[];
2733
+ }[];
2734
+ };
2696
2735
  /**
2697
2736
  * Insertion wrapper (w:ins) — runs inserted by tracked changes
2698
2737
  */
2699
2738
  type Insertion = {
2700
2739
  type: "insertion";
2740
+ /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2741
+ resolutionJoins?: TrackedResolutionJoins;
2701
2742
  /** Tracked change metadata */
2702
2743
  info: TrackedChangeInfo;
2703
2744
  /** Inserted content */
@@ -2708,6 +2749,8 @@ type Insertion = {
2708
2749
  */
2709
2750
  type Deletion = {
2710
2751
  type: "deletion";
2752
+ /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2753
+ resolutionJoins?: TrackedResolutionJoins;
2711
2754
  /** Tracked change metadata */
2712
2755
  info: TrackedChangeInfo;
2713
2756
  /** Deleted content */
@@ -2718,6 +2761,8 @@ type Deletion = {
2718
2761
  */
2719
2762
  type MoveFrom = {
2720
2763
  type: "moveFrom";
2764
+ /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2765
+ resolutionJoins?: TrackedResolutionJoins;
2721
2766
  /** Tracked change metadata */
2722
2767
  info: TrackedChangeInfo;
2723
2768
  /** Moved content */
@@ -2728,6 +2773,8 @@ type MoveFrom = {
2728
2773
  */
2729
2774
  type MoveTo = {
2730
2775
  type: "moveTo";
2776
+ /** In-memory cut provenance; imported OOXML wrappers omit this field. */
2777
+ resolutionJoins?: TrackedResolutionJoins;
2731
2778
  /** Tracked change metadata */
2732
2779
  info: TrackedChangeInfo;
2733
2780
  /** Moved content */
@@ -2841,6 +2888,8 @@ type TrackedRunChange = Insertion | Deletion | MoveFrom | MoveTo;
2841
2888
  */
2842
2889
  type RunPropertyChange = {
2843
2890
  type: "runPropertyChange";
2891
+ /** Cuts created by this action; omitted on imported OOXML records. */
2892
+ boundaryJoins?: readonly ("before" | "after")[];
2844
2893
  /** Tracked change metadata */
2845
2894
  info: PropertyChangeInfo;
2846
2895
  /** Run properties before the tracked change */
@@ -3161,6 +3210,26 @@ type PreservedInline = {
3161
3210
  xml: string;
3162
3211
  /** The visible text the markup contributes, empty when it shows nothing. */
3163
3212
  text: string;
3213
+ /**
3214
+ * Set on the two captures the reader makes of a `LISTNUM` field it draws in
3215
+ * the paragraph's list marker: the field's own runs, and the tab run after
3216
+ * it. The marker shows the field's cached result, so the captures show
3217
+ * nothing; they stand at the start of the content, where the field and the
3218
+ * tab stood, and are written back there as they were read.
3219
+ */
3220
+ foldedListNumber?: FoldedListNumber;
3221
+ };
3222
+ /**
3223
+ * What a capture of a folded `LISTNUM` field stands for, as the item it would
3224
+ * otherwise be. A capture is hidden only while the paragraph's marker shows
3225
+ * it; anywhere else it is replaced by this item, which shows on the line.
3226
+ */
3227
+ type FoldedListNumber = {
3228
+ kind: "field";
3229
+ field: ComplexField;
3230
+ } | {
3231
+ kind: "tab";
3232
+ run: Run;
3164
3233
  };
3165
3234
  /**
3166
3235
  * Paragraph content types
@@ -3188,6 +3257,8 @@ type ParagraphMarkChangeKind = (typeof PARAGRAPH_MARK_CHANGE_KINDS)[number];
3188
3257
  type ParagraphMarkChange = {
3189
3258
  kind: ParagraphMarkChangeKind;
3190
3259
  info: TrackedChangeInfo;
3260
+ /** Exact source-cut depth for rejection; absent in ordinary imported revisions. */
3261
+ resolutionJoin?: number | undefined;
3191
3262
  };
3192
3263
  declare const REVIEW_CARRIERS: {
3193
3264
  readonly TERMINAL_TABLE: "terminal-table";
@@ -3216,7 +3287,7 @@ type Paragraph = {
3216
3287
  /** Word's cached layout says this paragraph started on a new rendered page. */
3217
3288
  renderedPageBreakBefore?: boolean;
3218
3289
  /** Section properties (if this paragraph ends a section) */
3219
- sectionProperties?: SectionProperties;
3290
+ sectionProperties?: SectionProperties | undefined;
3220
3291
  /**
3221
3292
  * Attributes `w:p` carried that this record has no field for.
3222
3293
  *
@@ -3623,9 +3694,9 @@ type Section = {
3623
3694
  /** Content in this section */
3624
3695
  content: BlockContent[];
3625
3696
  /** Headers for this section */
3626
- headers?: Map<HeaderFooterType, HeaderFooter>;
3697
+ headers?: Map<HeaderFooterType, HeaderFooter> | undefined;
3627
3698
  /** Footers for this section */
3628
- footers?: Map<HeaderFooterType, HeaderFooter>;
3699
+ footers?: Map<HeaderFooterType, HeaderFooter> | undefined;
3629
3700
  };
3630
3701
  /**
3631
3702
  * Drawing payload under the document-level `w:background`.
@@ -3660,9 +3731,9 @@ type DocumentBody = {
3660
3731
  /** All content (paragraphs, tables) */
3661
3732
  content: BlockContent[];
3662
3733
  /** Sections (derived from sectPr in paragraphs and final sectPr) */
3663
- sections?: Section[];
3734
+ sections?: Section[] | undefined;
3664
3735
  /** Final section properties (from body's sectPr) */
3665
- finalSectionProperties?: SectionProperties;
3736
+ finalSectionProperties?: SectionProperties | undefined;
3666
3737
  /** Comments from comments.xml */
3667
3738
  comments?: Comment[];
3668
3739
  };
@@ -4057,7 +4128,13 @@ type MediaFile = {
4057
4128
  */
4058
4129
  type ExhaustiveFields<Source, Classified extends keyof Source> = Exclude<keyof Source, Classified> extends never ? Source : never;
4059
4130
  //#endregion
4131
+ //#region src/model/numberingLevel.d.ts
4132
+ /** Resolve only defined numbering levels; preserve unsupported source values elsewhere. */
4133
+ declare const isNumberingLevel: (value: number) => boolean;
4134
+ //#endregion
4060
4135
  //#region src/model/document.d.ts
4136
+ /** OOXML default per §17.6.13 when `w:defaultTabStop` is absent. */
4137
+ declare const DEFAULT_TAB_STOP_TWIPS = 720;
4061
4138
  /**
4062
4139
  * Document-wide settings parsed from `word/settings.xml`.
4063
4140
  * Extend as more settings.xml fields enter the layout pipeline.
@@ -4159,7 +4236,7 @@ type DocxPackage = {
4159
4236
  /** Theme */
4160
4237
  theme?: Theme;
4161
4238
  /** Numbering definitions */
4162
- numbering?: NumberingDefinitions;
4239
+ numbering?: NumberingDefinitions | undefined;
4163
4240
  /** Font table */
4164
4241
  fontTable?: FontTable;
4165
4242
  /** Footnotes */
@@ -4205,4 +4282,4 @@ type Document = {
4205
4282
  parseWarnings?: ParseWarning[];
4206
4283
  };
4207
4284
  //#endregion
4208
- export { EffectExtentSlots as $, BORDER_STYLES as $i, isOoxmlSymbolCharacter as $n, mergeParagraphNumbering as $r, PositionedBookmarkMarker as $t, BlockContent as A, ShadingProperties as Ai, Table as An, SpacingExplicit as Ar, MarkupRangeMarker as At, CommentRangeStart as B, themeColorToken as Bi, TableRowPropertyChange as Bn, TablePropertyExceptionFormatting as Br, NonVisualDrawingNames as Bt, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as C, TEXT_DIRECTION_FLOW_BY_TOKEN as Ci, ShapeOutline as Cn, NumberingInstance as Cr, ImageWrapPolygon as Ct, ParseWarningLocation as D, TextDirectionFlow as Di, SoftHyphenContent as Dn, FloatingTableProperties as Dr, InstrTextContent as Dt, ParseWarningCode as E, TextDirection as Ei, SimpleField as En, EmphasisMark as Er, Insertion as Et, BookmarkStart as F, isSchemeColorValue as Fi, TableCustomXmlWrapper as Fn, TableCellFormatting as Fr, MoveFromRangeStart as Ft, DisplacedByCustomXml as G, BorderStyleValue as Gi, TrackedChangeInfo as Gn, UnderlineStyle as Gr, PageOrientation as Gt, ComplexField as H, SchemeColorValue as Hi, TextBox as Hn, TableWidthType as Hr, NoteReferenceContent as Ht, BreakContent as I, isThemeColor as Ii, TablePreservedMarkup as In, TableFormatting as Ir, MoveTo as It, DocumentBody as J, borderStyleToken as Ji, VerticalAlign as Jn, ParagraphNumberingOverride as Jr, ParagraphMarkChange as Jt, DocumentBackground as K, UnrecognisedBorderStyle as Ki, TrackedRunChange as Kn, NO_NUMBERING_NUM_ID as Kr, Paragraph as Kt, Column as L, knownThemeColor as Li, TablePropertyChange as Ln, TableGridChange as Lr, MoveToRangeEnd as Lt, BlockSdt as M, THEME_COLOR_BY_SCHEME_COLOR_VALUE as Mi, TableCellBlock as Mn, TabStop as Mr, MoveBookmarkMarker as Mt, BookmarkEnd as N, ThemeColorValue as Ni, TableCellPropertyChange as Nn, TableBorders as Nr, MoveFrom as Nt, BIDI_CONTROLS as O, BorderSpec as Oi, SymbolContent as On, LineSpacingRule as Or, LineNumberRestart as Ot, BookmarkRangeMarker as P, UnrecognisedThemeColor as Pi, TableContentCarrier as Pn, TableCellBorders as Pr, MoveFromRangeEnd as Pt, DrawingRawXmlMode as Q, statesNoBorder as Qi, WrapPolygonPoint as Qn, isNumberingReference as Qr, PositionalTab as Qt, Comment as R, readThemeColor as Ri, TablePropertyExceptionChange as Rn, TableLook as Rr, MoveToRangeStart as Rt, ThemeFontScheme as S, TEXT_DIRECTION_FLOWS as Si, ShapeGeometryAdjustment as Sn, NumberingDefinitions as Sr, ImageWrap as St, ParseWarning as T, TableAlignment as Ti, ShapeType as Tn, ConditionalFormatStyle as Tr, InlineWrapper as Tt, DRAWING_RAW_XML_MODES as U, THEME_COLORS as Ui, TextContent as Un, TextEffect as Ur, PARAGRAPH_MARK_CHANGE_KINDS as Ut, CommentReference as V, SchemeColorSlot as Vi, TableStructuralChangeInfo as Vn, TableRowFormatting as Vr, NoteNumberRestart as Vt, Deletion as W, ThemeColor as Wi, TextWatermark as Wn, TextFormatting as Wr, PROPERTY_REVISION_KINDS as Wt, DrawingContent as X, isBorderNone as Xi, WrapDistanceSlots as Xn, ParagraphNumberingSlots as Xr, ParagraphPropertyChange as Xt, DrawingAnchor as Y, isBorderNil as Yi, Watermark as Yn, ParagraphNumberingReference as Yr, ParagraphMarkChangeKind as Yt, DrawingGroupChild as Z, isBorderStyle as Zi, WrapDistances as Zn, ResolvedParagraphNumbering as Zr, PictureWatermark as Zt, StyleDefinitions as _, PARAGRAPH_ALIGNMENTS as _i, SectionStart as _n, LevelOverride as _r, ImageFrameLocks as _t, DocxPackage as a, resolveParagraphNumbering as ai, PropertyRevisionKind as an, presetLineDashToken as ar, FieldType as at, ThemeColorScheme as b, TAB_STOP_ALIGNMENTS as bi, ShapeContent as bn, ListMarkerFormatting as br, ImageSize as bt, EmbeddedFontRef as c, BODY_TEXT_OUTLINE_LEVEL as ci, Run as cn, RelationshipId as cr, FootnotePosition as ct, FontTable as d, headingLevelOf as di, SdtEndProperties as dn, PreviewDescriptor as dr, HeaderFooterType as dt, BorderStyle as ea, paragraphNumberingFromSlots as ei, PreservedBlock as en, normalizeRevisionId as er, Endnote as et, MediaFile as f, headingOutlineLevel as fi, SdtProperties as fn, PreviewShape as fr, HeaderReference as ft, Style as g, NumberFormat as gi, SectionPropertyChange as gn, LevelLegacy as gr, ImageDocPrLink as gt, RelationshipType as h, NUMBER_FORMATS as hi, SectionProperties as hn, CounterFormat as hr, ImageCrop as ht, DocxConformanceClass as i, paragraphNumberingSlots as ii, PropertyChangeInfo as in, presetLineDashFrom as ir, FieldCharContent as it, BlockCustomXml as j, SCHEME_COLOR_VALUE_BY_THEME_COLOR as ji, TableCell as jn, TabLeader as jr, MathEquation as jt, BidiControl as k, ColorValue as ki, TabContent as kn, ParagraphFormatting as kr, MAX_REVISION_ID as kt, FontCharset as l, HeadingOutlineLevel as li, RunContent as ln, mintRelationshipId as lr, FootnoteProperties as lt, RelationshipMap as m, outlineLevelStatedValue as mi, Section as mn, COUNTER_FORMATS as mr, Image as mt, Document as n, paragraphNumberingReference as ni, PreservedXmlContent as nn, UnrecognisedPresetLineDash as nr, EndnoteProperties as nt, ExhaustiveFields as o, sameEffectiveParagraphNumbering as oi, REVIEW_CARRIERS as on, PRESET_LINE_DASH_VALS as or, FooterReference as ot, Relationship as p, outlineLevelFromStatedValue as pi, SdtType as pn, AbstractNumbering as pr, Hyperlink as pt, DocumentBackgroundDrawing as q, borderStyleFrom as qi, TrackedRunContent as qn, NO_PARAGRAPH_NUMBERING as qr, ParagraphContent as qt, DocumentSettings as r, paragraphNumberingReferenceId as ri, PropertyChange as rn, isPresetLineDashVal as rr, Field as rt, DocDefaults as s, sameStatedParagraphNumbering as si, ReviewCarrier as sn, PresetLineDashVal as sr, Footnote as st, DOCX_CONFORMANCE_CLASSES as t, paragraphNumberingLevel as ti, PreservedInline as tn, PresetLineDashValue as tr, EndnotePosition as tt, FontInfo as u, OutlineLevel as ui, RunPropertyChange as un, relationshipIdOf as ur, HeaderFooter as ut, StyleType as v, ParagraphAlignment as vi, Shape as vn, LevelSuffix as vr, ImagePadding as vt, PARSE_WARNING_CODES as w, TabStopAlignment as wi, ShapeTextBody as wn, CellMargins as wr, InlineSdt as wt, ThemeFont as x, TEXT_DIRECTIONS as xi, ShapeFill as xn, ListRendering as xr, ImageTransform as xt, Theme as y, TABLE_ALIGNMENTS as yi, ShapeAlternateContent as yn, ListLevel as yr, ImagePosition as yt, CommentRangeEnd as z, themeColorSlot as zi, TableRow as zn, TableMeasurement as zr, NoBreakHyphenContent as zt };
4285
+ export { DrawingGroupChild as $, borderStyleToken as $i, VerticalAlign as $n, ParagraphNumberingOverride as $r, ParagraphMarkChange as $t, BIDI_CONTROLS as A, TableAlignment as Ai, ShapeType as An, ConditionalFormatStyle as Ar, Insertion as At, Comment as B, isSchemeColorValue as Bi, TableCustomXmlWrapper as Bn, TableCellFormatting as Br, MoveTo as Bt, ThemeFont as C, ParagraphAlignment as Ci, Shape as Cn, LevelSuffix as Cr, ImagePosition as Ct, ParseWarning as D, TEXT_DIRECTION_FLOWS as Di, ShapeGeometryAdjustment as Dn, NumberingDefinitions as Dr, ImageWrapPolygon as Dt, PARSE_WARNING_CODES as E, TEXT_DIRECTIONS as Ei, ShapeFill as En, ListRendering as Er, ImageWrap as Et, BookmarkEnd as F, ShadingProperties as Fi, Table as Fn, SpacingExplicit as Fr, MathEquation as Ft, DRAWING_RAW_XML_MODES as G, themeColorToken as Gi, TableRowPropertyChange as Gn, TablePropertyExceptionFormatting as Gr, NoteMarkerContent as Gt, CommentRangeStart as H, knownThemeColor as Hi, TablePropertyChange as Hn, TableGridChange as Hr, MoveToRangeStart as Ht, BookmarkRangeMarker as I, SCHEME_COLOR_VALUE_BY_THEME_COLOR as Ii, TableCell as In, TabLeader as Ir, MoveBookmarkMarker as It, DocumentBackground as J, THEME_COLORS as Ji, TextContent as Jn, TextEffect as Jr, PARAGRAPH_MARK_CHANGE_KINDS as Jt, Deletion as K, SchemeColorSlot as Ki, TableStructuralChangeInfo as Kn, TableRowFormatting as Kr, NoteNumberRestart as Kt, BookmarkStart as L, THEME_COLOR_BY_SCHEME_COLOR_VALUE as Li, TableCellBlock as Ln, TabStop as Lr, MoveFrom as Lt, BlockContent as M, TextDirectionFlow as Mi, SoftHyphenContent as Mn, FloatingTableProperties as Mr, LineNumberRestart as Mt, BlockCustomXml as N, BorderSpec as Ni, SymbolContent as Nn, LineSpacingRule as Nr, MAX_REVISION_ID as Nt, ParseWarningCode as O, TEXT_DIRECTION_FLOW_BY_TOKEN as Oi, ShapeOutline as On, NumberingInstance as Or, InlineSdt as Ot, BlockSdt as P, ColorValue as Pi, TabContent as Pn, ParagraphFormatting as Pr, MarkupRangeMarker as Pt, DrawingContent as Q, borderStyleFrom as Qi, TrackedRunContent as Qn, NO_PARAGRAPH_NUMBERING as Qr, ParagraphContent as Qt, BreakContent as R, ThemeColorValue as Ri, TableCellPropertyChange as Rn, TableBorders as Rr, MoveFromRangeEnd as Rt, ThemeColorScheme as S, PARAGRAPH_ALIGNMENTS as Si, SectionStart as Sn, LevelOverride as Sr, ImagePadding as St, MAX_RETAINED_PARSE_WARNINGS_PER_CODE as T, TAB_STOP_ALIGNMENTS as Ti, ShapeContent as Tn, ListMarkerFormatting as Tr, ImageTransform as Tt, CommentReference as U, readThemeColor as Ui, TablePropertyExceptionChange as Un, TableLook as Ur, NoBreakHyphenContent as Ut, CommentRangeEnd as V, isThemeColor as Vi, TablePreservedMarkup as Vn, TableFormatting as Vr, MoveToRangeEnd as Vt, ComplexField as W, themeColorSlot as Wi, TableRow as Wn, TableMeasurement as Wr, NonVisualDrawingNames as Wt, DocumentBody as X, BorderStyleValue as Xi, TrackedChangeInfo as Xn, UnderlineStyle as Xr, PageOrientation as Xt, DocumentBackgroundDrawing as Y, ThemeColor as Yi, TextWatermark as Yn, TextFormatting as Yr, PROPERTY_REVISION_KINDS as Yt, DrawingAnchor as Z, UnrecognisedBorderStyle as Zi, TrackedRunChange as Zn, NO_NUMBERING_NUM_ID as Zr, Paragraph as Zt, RelationshipType as _, headingOutlineLevel as _i, SdtProperties as _n, PreviewShape as _r, INSERTION_SEAM_POLICIES as _t, DocxConformanceClass as a, BorderStyle as aa, paragraphNumberingFromSlots as ai, PreservedBlock as an, normalizeRevisionId as ar, Field as at, StyleType as b, NUMBER_FORMATS as bi, SectionProperties as bn, CounterFormat as br, ImageDocPrLink as bt, ExhaustiveFields as c, paragraphNumberingReferenceId as ci, PropertyChange as cn, isPresetLineDashVal as cr, FoldedListNumber as ct, FontCharset as d, sameEffectiveParagraphNumbering as di, REVIEW_CARRIERS as dn, PRESET_LINE_DASH_VALS as dr, FootnotePosition as dt, isBorderNil as ea, ParagraphNumberingReference as ei, ParagraphMarkChangeKind as en, Watermark as er, DrawingRawXmlMode as et, FontInfo as f, sameStatedParagraphNumbering as fi, ReviewCarrier as fn, PresetLineDashVal as fr, FootnoteProperties as ft, RelationshipMap as g, headingLevelOf as gi, SdtEndProperties as gn, PreviewDescriptor as gr, Hyperlink as gt, Relationship as h, OutlineLevel as hi, RunPropertyChange as hn, relationshipIdOf as hr, HeaderReference as ht, DocumentSettings as i, BORDER_STYLES as ia, mergeParagraphNumbering as ii, PositionedBookmarkMarker as in, isOoxmlSymbolCharacter as ir, EndnoteProperties as it, BidiControl as j, TextDirection as ji, SimpleField as jn, EmphasisMark as jr, InstrTextContent as jt, ParseWarningLocation as k, TabStopAlignment as ki, ShapeTextBody as kn, CellMargins as kr, InlineWrapper as kt, DocDefaults as l, paragraphNumberingSlots as li, PropertyChangeInfo as ln, presetLineDashFrom as lr, FooterReference as lt, MediaFile as m, HeadingOutlineLevel as mi, RunContent as mn, mintRelationshipId as mr, HeaderFooterType as mt, DOCX_CONFORMANCE_CLASSES as n, isBorderStyle as na, ResolvedParagraphNumbering as ni, PictureWatermark as nn, WrapDistances as nr, Endnote as nt, DocxPackage as o, paragraphNumberingLevel as oi, PreservedInline as on, PresetLineDashValue as or, FieldCharContent as ot, FontTable as p, BODY_TEXT_OUTLINE_LEVEL as pi, Run as pn, RelationshipId as pr, HeaderFooter as pt, DisplacedByCustomXml as q, SchemeColorValue as qi, TextBox as qn, TableWidthType as qr, NoteReferenceContent as qt, Document as r, statesNoBorder as ra, isNumberingReference as ri, PositionalTab as rn, WrapPolygonPoint as rr, EndnotePosition as rt, isNumberingLevel as s, paragraphNumberingReference as si, PreservedXmlContent as sn, UnrecognisedPresetLineDash as sr, FieldType as st, DEFAULT_TAB_STOP_TWIPS as t, isBorderNone as ta, ParagraphNumberingSlots as ti, ParagraphPropertyChange as tn, WrapDistanceSlots as tr, EffectExtentSlots as tt, EmbeddedFontRef as u, resolveParagraphNumbering as ui, PropertyRevisionKind as un, presetLineDashToken as ur, Footnote as ut, Style as v, outlineLevelFromStatedValue as vi, SdtType as vn, AbstractNumbering as vr, Image as vt, ThemeFontScheme as w, TABLE_ALIGNMENTS as wi, ShapeAlternateContent as wn, ListLevel as wr, ImageSize as wt, Theme as x, NumberFormat as xi, SectionPropertyChange as xn, LevelLegacy as xr, ImageFrameLocks as xt, StyleDefinitions as y, outlineLevelStatedValue as yi, Section as yn, COUNTER_FORMATS as yr, ImageCrop as yt, Column as z, UnrecognisedThemeColor as zi, TableContentCarrier as zn, TableCellBorders as zr, MoveFromRangeStart as zt };
Binary file
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as BlockContent, An as Table, I as BreakContent, J as DocumentBody, K as DocumentBackground, Kt as Paragraph, Qt as PositionalTab, Sr as NumberingDefinitions, Un as TextContent, a as DocxPackage, cn as Run, g as Style, hn as SectionProperties, i as DocxConformanceClass, jn as TableCell, ln as RunContent, n as Document, q as DocumentBackgroundDrawing, qt as ParagraphContent, t as DOCX_CONFORMANCE_CLASSES, zn as TableRow } from "./document-DrtmJ_hz.js";
1
+ import { Dr as NumberingDefinitions, Fn as Table, In as TableCell, J as DocumentBackground, Jn as TextContent, M as BlockContent, Qt as ParagraphContent, R as BreakContent, Wn as TableRow, X as DocumentBody, Y as DocumentBackgroundDrawing, Zt as Paragraph, a as DocxConformanceClass, bn as SectionProperties, mn as RunContent, n as DOCX_CONFORMANCE_CLASSES, o as DocxPackage, pn as Run, r as Document, rn as PositionalTab, v as Style } from "./document-w6pPLpob.js";
2
2
  import JSZip from "jszip";
3
3
  import { Buffer } from "node:buffer";
4
4
  //#region src/legal-source/types.d.ts
@@ -344,6 +344,8 @@ declare module "jszip" {
344
344
  declare const DOCX_PACKAGE_ISSUE_CODES: {
345
345
  readonly ArchiveBoundsExceeded: "archive_bounds_exceeded";
346
346
  readonly InvalidArchive: "invalid_archive";
347
+ readonly InvalidPackageGraph: "invalid_package_graph";
348
+ readonly InvalidSchemaAttribute: "invalid_schema_attribute";
347
349
  readonly InvalidDocumentRoot: "invalid_document_root";
348
350
  readonly MissingNumberingPart: "missing_numbering_part";
349
351
  readonly MissingPackagePart: "missing_package_part";