@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 +4 -0
- package/dist/{document-DdWrTPQY.js → document-3WKQA1r3.js} +20 -1
- package/dist/{document-DrtmJ_hz.d.ts → document-w6pPLpob.d.ts} +89 -12
- package/dist/docx_kernel_bg.wasm +0 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +357 -13
- package/dist/model/document.d.ts +2 -2
- package/dist/model/document.js +2 -2
- package/dist/ops/documentOps.d.ts +590 -24
- package/dist/ops/documentOps.js +8403 -2148
- package/dist/schema/sequenceChildren.d.ts +2 -1
- package/dist/schema/sequenceChildren.js +2 -2
- package/dist/{sequenceChildren-BIixCB49.js → sequenceChildren-B8ODeI3J.js} +99 -1
- package/package.json +2 -1
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 {
|
|
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 {
|
|
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 };
|
package/dist/docx_kernel_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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";
|