docx-plus 0.0.0 → 0.0.1

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.
@@ -0,0 +1,3230 @@
1
+ import { Element } from "xml-js";
2
+ //#region src/file/file-child.d.ts
3
+ declare class FileChild extends XmlComponent {
4
+ readonly fileChild: symbol;
5
+ }
6
+ //#endregion
7
+ //#region src/util/values.d.ts
8
+ type UniversalMeasure = `${"-" | ""}${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi"}`;
9
+ type PositiveUniversalMeasure = `${number}${"mm" | "cm" | "in" | "pt" | "pc" | "pi"}`;
10
+ type Percentage = `${"-" | ""}${number}%`;
11
+ type PositivePercentage = `${number}%`;
12
+ type RelativeMeasure = `${"-" | ""}${number}${"em" | "ex"}`;
13
+ declare const decimalNumber: (val: number) => number;
14
+ declare const unsignedDecimalNumber: (val: number) => number;
15
+ declare const longHexNumber: (val: string) => string;
16
+ declare const shortHexNumber: (val: string) => string;
17
+ declare const uCharHexNumber: (val: string) => string;
18
+ declare const universalMeasureValue: (val: UniversalMeasure) => UniversalMeasure;
19
+ declare const positiveUniversalMeasureValue: (val: PositiveUniversalMeasure) => PositiveUniversalMeasure;
20
+ declare const hexColorValue: (val: string) => string;
21
+ declare const signedTwipsMeasureValue: (val: UniversalMeasure | number) => UniversalMeasure | number;
22
+ declare const hpsMeasureValue: (val: PositiveUniversalMeasure | number) => string | number;
23
+ declare const signedHpsMeasureValue: (val: UniversalMeasure | number) => string | number;
24
+ declare const twipsMeasureValue: (val: PositiveUniversalMeasure | number) => PositiveUniversalMeasure | number;
25
+ declare const percentageValue: (val: Percentage) => Percentage;
26
+ declare const measurementOrPercentValue: (val: number | Percentage | UniversalMeasure) => number | UniversalMeasure | Percentage;
27
+ declare const eighthPointMeasureValue: (val: number) => number;
28
+ declare const pointMeasureValue: (val: number) => number;
29
+ declare const dateTimeValue: (val: Date) => string;
30
+ //#endregion
31
+ //#region src/file/table/grid.d.ts
32
+ interface ITableGridChangeOptions {
33
+ readonly id: number;
34
+ readonly columnWidths: readonly number[] | readonly PositiveUniversalMeasure[];
35
+ }
36
+ //#endregion
37
+ //#region src/file/table/table-cell-spacing.d.ts
38
+ declare const CellSpacingType: {
39
+ readonly DXA: "dxa";
40
+ readonly NIL: "nil";
41
+ };
42
+ interface ITableCellSpacingProperties {
43
+ readonly value: number | Percentage | UniversalMeasure;
44
+ readonly type?: (typeof CellSpacingType)[keyof typeof CellSpacingType];
45
+ }
46
+ //#endregion
47
+ //#region src/file/track-revision/track-revision.d.ts
48
+ interface IChangedAttributesProperties {
49
+ readonly id: number;
50
+ readonly author: string;
51
+ readonly date: string;
52
+ }
53
+ //#endregion
54
+ //#region src/file/shading/shading.d.ts
55
+ interface IShadingAttributesProperties {
56
+ readonly fill?: string;
57
+ readonly color?: string;
58
+ readonly type?: (typeof ShadingType)[keyof typeof ShadingType];
59
+ }
60
+ declare const createShading: ({
61
+ fill,
62
+ color,
63
+ type
64
+ }: IShadingAttributesProperties) => XmlComponent;
65
+ declare const ShadingType: {
66
+ readonly CLEAR: "clear";
67
+ readonly DIAGONAL_CROSS: "diagCross";
68
+ readonly DIAGONAL_STRIPE: "diagStripe";
69
+ readonly HORIZONTAL_CROSS: "horzCross";
70
+ readonly HORIZONTAL_STRIPE: "horzStripe";
71
+ readonly NIL: "nil";
72
+ readonly PERCENT_10: "pct10";
73
+ readonly PERCENT_12: "pct12";
74
+ readonly PERCENT_15: "pct15";
75
+ readonly PERCENT_20: "pct20";
76
+ readonly PERCENT_25: "pct25";
77
+ readonly PERCENT_30: "pct30";
78
+ readonly PERCENT_35: "pct35";
79
+ readonly PERCENT_37: "pct37";
80
+ readonly PERCENT_40: "pct40";
81
+ readonly PERCENT_45: "pct45";
82
+ readonly PERCENT_5: "pct5";
83
+ readonly PERCENT_50: "pct50";
84
+ readonly PERCENT_55: "pct55";
85
+ readonly PERCENT_60: "pct60";
86
+ readonly PERCENT_62: "pct62";
87
+ readonly PERCENT_65: "pct65";
88
+ readonly PERCENT_70: "pct70";
89
+ readonly PERCENT_75: "pct75";
90
+ readonly PERCENT_80: "pct80";
91
+ readonly PERCENT_85: "pct85";
92
+ readonly PERCENT_87: "pct87";
93
+ readonly PERCENT_90: "pct90";
94
+ readonly PERCENT_95: "pct95";
95
+ readonly REVERSE_DIAGONAL_STRIPE: "reverseDiagStripe";
96
+ readonly SOLID: "solid";
97
+ readonly THIN_DIAGONAL_CROSS: "thinDiagCross";
98
+ readonly THIN_DIAGONAL_STRIPE: "thinDiagStripe";
99
+ readonly THIN_HORIZONTAL_CROSS: "thinHorzCross";
100
+ readonly THIN_REVERSE_DIAGONAL_STRIPE: "thinReverseDiagStripe";
101
+ readonly THIN_VERTICAL_STRIPE: "thinVertStripe";
102
+ readonly VERTICAL_STRIPE: "vertStripe";
103
+ };
104
+ //#endregion
105
+ //#region src/file/table/table-width.d.ts
106
+ declare const WidthType: {
107
+ readonly AUTO: "auto";
108
+ readonly DXA: "dxa";
109
+ readonly NIL: "nil";
110
+ readonly PERCENTAGE: "pct";
111
+ };
112
+ interface ITableWidthProperties {
113
+ readonly size: number | Percentage | UniversalMeasure;
114
+ readonly type?: (typeof WidthType)[keyof typeof WidthType];
115
+ }
116
+ declare const createTableWidthElement: (name: string, {
117
+ type,
118
+ size
119
+ }: ITableWidthProperties) => XmlComponent;
120
+ //#endregion
121
+ //#region src/file/border/border.d.ts
122
+ interface IBorderOptions {
123
+ readonly style: (typeof BorderStyle)[keyof typeof BorderStyle];
124
+ readonly color?: string;
125
+ readonly size?: number;
126
+ readonly space?: number;
127
+ }
128
+ declare const createBorderElement: (elementName: string, {
129
+ color,
130
+ size,
131
+ space,
132
+ style
133
+ }: IBorderOptions) => XmlComponent;
134
+ declare const BorderStyle: {
135
+ readonly SINGLE: "single";
136
+ readonly DASH_DOT_STROKED: "dashDotStroked";
137
+ readonly DASHED: "dashed";
138
+ readonly DASH_SMALL_GAP: "dashSmallGap";
139
+ readonly DOT_DASH: "dotDash";
140
+ readonly DOT_DOT_DASH: "dotDotDash";
141
+ readonly DOTTED: "dotted";
142
+ readonly DOUBLE: "double";
143
+ readonly DOUBLE_WAVE: "doubleWave";
144
+ readonly INSET: "inset";
145
+ readonly NIL: "nil";
146
+ readonly NONE: "none";
147
+ readonly OUTSET: "outset";
148
+ readonly THICK: "thick";
149
+ readonly THICK_THIN_LARGE_GAP: "thickThinLargeGap";
150
+ readonly THICK_THIN_MEDIUM_GAP: "thickThinMediumGap";
151
+ readonly THICK_THIN_SMALL_GAP: "thickThinSmallGap";
152
+ readonly THIN_THICK_LARGE_GAP: "thinThickLargeGap";
153
+ readonly THIN_THICK_MEDIUM_GAP: "thinThickMediumGap";
154
+ readonly THIN_THICK_SMALL_GAP: "thinThickSmallGap";
155
+ readonly THIN_THICK_THIN_LARGE_GAP: "thinThickThinLargeGap";
156
+ readonly THIN_THICK_THIN_MEDIUM_GAP: "thinThickThinMediumGap";
157
+ readonly THIN_THICK_THIN_SMALL_GAP: "thinThickThinSmallGap";
158
+ readonly THREE_D_EMBOSS: "threeDEmboss";
159
+ readonly THREE_D_ENGRAVE: "threeDEngrave";
160
+ readonly TRIPLE: "triple";
161
+ readonly WAVE: "wave";
162
+ };
163
+ //#endregion
164
+ //#region src/file/table/table-properties/table-borders.d.ts
165
+ interface ITableBordersOptions {
166
+ readonly top?: IBorderOptions;
167
+ readonly bottom?: IBorderOptions;
168
+ readonly left?: IBorderOptions;
169
+ readonly right?: IBorderOptions;
170
+ readonly insideHorizontal?: IBorderOptions;
171
+ readonly insideVertical?: IBorderOptions;
172
+ }
173
+ declare class TableBorders extends XmlComponent {
174
+ static readonly NONE: ITableBordersOptions;
175
+ constructor(options: ITableBordersOptions);
176
+ }
177
+ //#endregion
178
+ //#region src/file/table/table-properties/table-cell-margin.d.ts
179
+ interface ITableCellMarginOptions {
180
+ readonly marginUnitType?: (typeof WidthType)[keyof typeof WidthType];
181
+ readonly top?: number;
182
+ readonly bottom?: number;
183
+ readonly left?: number;
184
+ readonly right?: number;
185
+ }
186
+ //#endregion
187
+ //#region src/file/table/table-properties/table-float-properties.d.ts
188
+ declare const TableAnchorType: {
189
+ readonly MARGIN: "margin";
190
+ readonly PAGE: "page";
191
+ readonly TEXT: "text";
192
+ };
193
+ declare const RelativeHorizontalPosition: {
194
+ readonly CENTER: "center";
195
+ readonly INSIDE: "inside";
196
+ readonly LEFT: "left";
197
+ readonly OUTSIDE: "outside";
198
+ readonly RIGHT: "right";
199
+ };
200
+ declare const RelativeVerticalPosition: {
201
+ readonly BOTTOM: "bottom";
202
+ readonly CENTER: "center";
203
+ readonly INLINE: "inline";
204
+ readonly INSIDE: "inside";
205
+ readonly OUTSIDE: "outside";
206
+ readonly TOP: "top";
207
+ };
208
+ declare const OverlapType: {
209
+ readonly NEVER: "never";
210
+ readonly OVERLAP: "overlap";
211
+ };
212
+ interface ITableFloatOptions {
213
+ readonly horizontalAnchor?: (typeof TableAnchorType)[keyof typeof TableAnchorType];
214
+ readonly absoluteHorizontalPosition?: number | UniversalMeasure;
215
+ readonly relativeHorizontalPosition?: (typeof RelativeHorizontalPosition)[keyof typeof RelativeHorizontalPosition];
216
+ readonly verticalAnchor?: (typeof TableAnchorType)[keyof typeof TableAnchorType];
217
+ readonly absoluteVerticalPosition?: number | UniversalMeasure;
218
+ readonly relativeVerticalPosition?: (typeof RelativeVerticalPosition)[keyof typeof RelativeVerticalPosition];
219
+ readonly bottomFromText?: number | PositiveUniversalMeasure;
220
+ readonly topFromText?: number | PositiveUniversalMeasure;
221
+ readonly leftFromText?: number | PositiveUniversalMeasure;
222
+ readonly rightFromText?: number | PositiveUniversalMeasure;
223
+ readonly overlap?: (typeof OverlapType)[keyof typeof OverlapType];
224
+ }
225
+ declare const createTableFloatProperties: ({
226
+ horizontalAnchor,
227
+ verticalAnchor,
228
+ absoluteHorizontalPosition,
229
+ relativeHorizontalPosition,
230
+ absoluteVerticalPosition,
231
+ relativeVerticalPosition,
232
+ bottomFromText,
233
+ topFromText,
234
+ leftFromText,
235
+ rightFromText,
236
+ overlap
237
+ }: ITableFloatOptions) => XmlComponent;
238
+ //#endregion
239
+ //#region src/file/table/table-properties/table-layout.d.ts
240
+ declare const TableLayoutType: {
241
+ readonly AUTOFIT: "autofit";
242
+ readonly FIXED: "fixed";
243
+ };
244
+ declare const createTableLayout: (type: (typeof TableLayoutType)[keyof typeof TableLayoutType]) => XmlComponent;
245
+ //#endregion
246
+ //#region src/file/table/table-properties/table-look.d.ts
247
+ interface ITableLookOptions {
248
+ readonly firstRow?: boolean;
249
+ readonly lastRow?: boolean;
250
+ readonly firstColumn?: boolean;
251
+ readonly lastColumn?: boolean;
252
+ readonly noHBand?: boolean;
253
+ readonly noVBand?: boolean;
254
+ }
255
+ declare const createTableLook: ({
256
+ firstRow,
257
+ lastRow,
258
+ firstColumn,
259
+ lastColumn,
260
+ noHBand,
261
+ noVBand
262
+ }: ITableLookOptions) => XmlComponent;
263
+ //#endregion
264
+ //#region src/file/table/table-properties/table-properties.d.ts
265
+ interface ITablePropertiesOptionsBase {
266
+ readonly width?: ITableWidthProperties;
267
+ readonly indent?: ITableWidthProperties;
268
+ readonly layout?: (typeof TableLayoutType)[keyof typeof TableLayoutType];
269
+ readonly borders?: ITableBordersOptions;
270
+ readonly float?: ITableFloatOptions;
271
+ readonly shading?: IShadingAttributesProperties;
272
+ readonly style?: string;
273
+ readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType];
274
+ readonly cellMargin?: ITableCellMarginOptions;
275
+ readonly visuallyRightToLeft?: boolean;
276
+ readonly tableLook?: ITableLookOptions;
277
+ readonly cellSpacing?: ITableCellSpacingProperties;
278
+ }
279
+ type ITablePropertiesChangeOptions = ITablePropertiesOptions & IChangedAttributesProperties;
280
+ type ITablePropertiesOptions = {
281
+ readonly revision?: ITablePropertiesChangeOptions;
282
+ readonly includeIfEmpty?: boolean;
283
+ } & ITablePropertiesOptionsBase;
284
+ declare class TableProperties extends IgnoreIfEmptyXmlComponent {
285
+ constructor(options: ITablePropertiesOptions);
286
+ }
287
+ //#endregion
288
+ //#region src/file/track-revision/track-revision-components/inserted-text-run.d.ts
289
+ type IInsertedRunOptions = IChangedAttributesProperties & IRunOptions;
290
+ declare class InsertedTextRun extends XmlComponent {
291
+ constructor(options: IInsertedRunOptions);
292
+ }
293
+ //#endregion
294
+ //#region src/file/paragraph/run/emphasis-mark.d.ts
295
+ declare const EmphasisMarkType: {
296
+ readonly DOT: "dot";
297
+ };
298
+ declare const createEmphasisMark: (emphasisMarkType?: (typeof EmphasisMarkType)[keyof typeof EmphasisMarkType]) => XmlComponent;
299
+ declare const createDotEmphasisMark: () => XmlComponent;
300
+ //#endregion
301
+ //#region src/file/paragraph/run/language.d.ts
302
+ interface ILanguageOptions {
303
+ readonly value?: string;
304
+ readonly eastAsia?: string;
305
+ readonly bidirectional?: string;
306
+ }
307
+ //#endregion
308
+ //#region src/file/paragraph/run/run-fonts.d.ts
309
+ interface IFontAttributesProperties {
310
+ readonly ascii?: string;
311
+ readonly cs?: string;
312
+ readonly eastAsia?: string;
313
+ readonly hAnsi?: string;
314
+ readonly hint?: string;
315
+ }
316
+ declare const createRunFonts: (nameOrAttrs: string | IFontAttributesProperties, hint?: string) => XmlComponent;
317
+ //#endregion
318
+ //#region src/file/paragraph/run/underline.d.ts
319
+ declare const UnderlineType: {
320
+ readonly SINGLE: "single";
321
+ readonly WORDS: "words";
322
+ readonly DOUBLE: "double";
323
+ readonly THICK: "thick";
324
+ readonly DOTTED: "dotted";
325
+ readonly DOTTEDHEAVY: "dottedHeavy";
326
+ readonly DASH: "dash";
327
+ readonly DASHEDHEAVY: "dashedHeavy";
328
+ readonly DASHLONG: "dashLong";
329
+ readonly DASHLONGHEAVY: "dashLongHeavy";
330
+ readonly DOTDASH: "dotDash";
331
+ readonly DASHDOTHEAVY: "dashDotHeavy";
332
+ readonly DOTDOTDASH: "dotDotDash";
333
+ readonly DASHDOTDOTHEAVY: "dashDotDotHeavy";
334
+ readonly WAVE: "wave";
335
+ readonly WAVYHEAVY: "wavyHeavy";
336
+ readonly WAVYDOUBLE: "wavyDouble";
337
+ readonly NONE: "none";
338
+ };
339
+ declare const createUnderline: (underlineType?: (typeof UnderlineType)[keyof typeof UnderlineType], color?: string) => XmlComponent;
340
+ //#endregion
341
+ //#region src/file/paragraph/run/properties.d.ts
342
+ interface IFontOptions {
343
+ readonly name: string;
344
+ readonly hint?: string;
345
+ }
346
+ declare const TextEffect: {
347
+ readonly BLINK_BACKGROUND: "blinkBackground";
348
+ readonly LIGHTS: "lights";
349
+ readonly ANTS_BLACK: "antsBlack";
350
+ readonly ANTS_RED: "antsRed";
351
+ readonly SHIMMER: "shimmer";
352
+ readonly SPARKLE: "sparkle";
353
+ readonly NONE: "none";
354
+ };
355
+ declare const HighlightColor: {
356
+ readonly BLACK: "black";
357
+ readonly BLUE: "blue";
358
+ readonly CYAN: "cyan";
359
+ readonly DARK_BLUE: "darkBlue";
360
+ readonly DARK_CYAN: "darkCyan";
361
+ readonly DARK_GRAY: "darkGray";
362
+ readonly DARK_GREEN: "darkGreen";
363
+ readonly DARK_MAGENTA: "darkMagenta";
364
+ readonly DARK_RED: "darkRed";
365
+ readonly DARK_YELLOW: "darkYellow";
366
+ readonly GREEN: "green";
367
+ readonly LIGHT_GRAY: "lightGray";
368
+ readonly MAGENTA: "magenta";
369
+ readonly NONE: "none";
370
+ readonly RED: "red";
371
+ readonly WHITE: "white";
372
+ readonly YELLOW: "yellow";
373
+ };
374
+ interface IRunStylePropertiesOptions {
375
+ readonly noProof?: boolean;
376
+ readonly bold?: boolean;
377
+ readonly boldComplexScript?: boolean;
378
+ readonly italics?: boolean;
379
+ readonly italicsComplexScript?: boolean;
380
+ readonly underline?: {
381
+ readonly color?: string;
382
+ readonly type?: (typeof UnderlineType)[keyof typeof UnderlineType];
383
+ };
384
+ readonly effect?: (typeof TextEffect)[keyof typeof TextEffect];
385
+ readonly emphasisMark?: {
386
+ readonly type?: (typeof EmphasisMarkType)[keyof typeof EmphasisMarkType];
387
+ };
388
+ readonly color?: string;
389
+ readonly kern?: number | PositiveUniversalMeasure;
390
+ readonly position?: UniversalMeasure;
391
+ readonly size?: number | PositiveUniversalMeasure;
392
+ readonly sizeComplexScript?: boolean | number | PositiveUniversalMeasure;
393
+ readonly rightToLeft?: boolean;
394
+ readonly smallCaps?: boolean;
395
+ readonly allCaps?: boolean;
396
+ readonly strike?: boolean;
397
+ readonly doubleStrike?: boolean;
398
+ readonly subScript?: boolean;
399
+ readonly superScript?: boolean;
400
+ readonly font?: string | IFontOptions | IFontAttributesProperties;
401
+ readonly highlight?: (typeof HighlightColor)[keyof typeof HighlightColor];
402
+ readonly highlightComplexScript?: boolean | string;
403
+ readonly characterSpacing?: number;
404
+ readonly shading?: IShadingAttributesProperties;
405
+ readonly emboss?: boolean;
406
+ readonly imprint?: boolean;
407
+ readonly revision?: IRunPropertiesChangeOptions;
408
+ readonly language?: ILanguageOptions;
409
+ readonly border?: IBorderOptions;
410
+ readonly snapToGrid?: boolean;
411
+ readonly vanish?: boolean;
412
+ readonly specVanish?: boolean;
413
+ readonly scale?: number;
414
+ readonly math?: boolean;
415
+ }
416
+ type IRunPropertiesOptions = {
417
+ readonly style?: string;
418
+ } & IRunStylePropertiesOptions;
419
+ type IRunPropertiesChangeOptions = {} & IRunPropertiesOptions & IChangedAttributesProperties;
420
+ type IParagraphRunPropertiesOptions = {
421
+ readonly insertion?: IChangedAttributesProperties;
422
+ readonly deletion?: IChangedAttributesProperties;
423
+ } & IRunPropertiesOptions;
424
+ declare class RunProperties extends IgnoreIfEmptyXmlComponent {
425
+ constructor(options?: IRunPropertiesOptions);
426
+ push(item: XmlComponent): void;
427
+ }
428
+ declare class ParagraphRunProperties extends RunProperties {
429
+ constructor(options?: IParagraphRunPropertiesOptions);
430
+ }
431
+ declare class RunPropertiesChange extends XmlComponent {
432
+ constructor(options: IRunPropertiesChangeOptions);
433
+ }
434
+ //#endregion
435
+ //#region src/file/paragraph/run/text-run.d.ts
436
+ declare class TextRun extends Run {
437
+ constructor(options: IRunOptions | string);
438
+ }
439
+ //#endregion
440
+ //#region src/file/paragraph/run/symbol-run.d.ts
441
+ type ISymbolRunOptions = {
442
+ readonly char: string;
443
+ readonly symbolfont?: string;
444
+ } & IRunOptions;
445
+ declare class SymbolRun extends Run {
446
+ constructor(options: ISymbolRunOptions | string);
447
+ }
448
+ //#endregion
449
+ //#region src/file/drawing/doc-properties/doc-properties.d.ts
450
+ interface DocPropertiesOptions {
451
+ readonly name: string;
452
+ readonly description?: string;
453
+ readonly title?: string;
454
+ readonly id?: string;
455
+ }
456
+ //#endregion
457
+ //#region src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/scheme-color.d.ts
458
+ declare const SchemeColor: {
459
+ readonly BG1: "bg1";
460
+ readonly TX1: "tx1";
461
+ readonly BG2: "bg2";
462
+ readonly TX2: "tx2";
463
+ readonly ACCENT1: "accent1";
464
+ readonly ACCENT2: "accent2";
465
+ readonly ACCENT3: "accent3";
466
+ readonly ACCENT4: "accent4";
467
+ readonly ACCENT5: "accent5";
468
+ readonly ACCENT6: "accent6";
469
+ readonly HLINK: "hlink";
470
+ readonly FOLHLINK: "folHlink";
471
+ readonly DK1: "dk1";
472
+ readonly LT1: "lt1";
473
+ readonly DK2: "dk2";
474
+ readonly LT2: "lt2";
475
+ readonly PHCLR: "phClr";
476
+ };
477
+ //#endregion
478
+ //#region src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/outline.d.ts
479
+ declare const LineCap: {
480
+ readonly ROUND: "rnd";
481
+ readonly SQUARE: "sq";
482
+ readonly FLAT: "flat";
483
+ };
484
+ declare const CompoundLine: {
485
+ readonly SINGLE: "sng";
486
+ readonly DOUBLE: "dbl";
487
+ readonly THICK_THIN: "thickThin";
488
+ readonly THIN_THICK: "thinThick";
489
+ readonly TRI: "tri";
490
+ };
491
+ declare const PenAlignment: {
492
+ readonly CENTER: "ctr";
493
+ readonly INSET: "in";
494
+ };
495
+ interface OutlineAttributes {
496
+ readonly width?: number;
497
+ readonly cap?: keyof typeof LineCap;
498
+ readonly compoundLine?: keyof typeof CompoundLine;
499
+ readonly align?: keyof typeof PenAlignment;
500
+ }
501
+ interface OutlineNoFill {
502
+ readonly type: "noFill";
503
+ }
504
+ interface OutlineRgbSolidFill {
505
+ readonly type: "solidFill";
506
+ readonly solidFillType: "rgb";
507
+ readonly value: string;
508
+ }
509
+ interface OutlineSchemeSolidFill {
510
+ readonly type: "solidFill";
511
+ readonly solidFillType: "scheme";
512
+ readonly value: (typeof SchemeColor)[keyof typeof SchemeColor];
513
+ }
514
+ type OutlineSolidFill = OutlineRgbSolidFill | OutlineSchemeSolidFill;
515
+ type OutlineFillProperties = OutlineNoFill | OutlineSolidFill;
516
+ type OutlineOptions = OutlineAttributes & OutlineFillProperties;
517
+ //#endregion
518
+ //#region src/file/drawing/inline/graphic/graphic-data/pic/shape-properties/outline/solid-fill.d.ts
519
+ interface RgbColorOptions {
520
+ readonly type: "rgb";
521
+ readonly value: string;
522
+ }
523
+ interface SchemeColorOptions {
524
+ readonly type: "scheme";
525
+ readonly value: (typeof SchemeColor)[keyof typeof SchemeColor];
526
+ }
527
+ type SolidFillOptions = RgbColorOptions | SchemeColorOptions;
528
+ //#endregion
529
+ //#region src/file/drawing/text-wrap/text-wrapping.d.ts
530
+ declare const TextWrappingType: {
531
+ readonly NONE: 0;
532
+ readonly SQUARE: 1;
533
+ readonly TIGHT: 2;
534
+ readonly TOP_AND_BOTTOM: 3;
535
+ };
536
+ declare const TextWrappingSide: {
537
+ readonly BOTH_SIDES: "bothSides";
538
+ readonly LEFT: "left";
539
+ readonly RIGHT: "right";
540
+ readonly LARGEST: "largest";
541
+ };
542
+ interface ITextWrapping {
543
+ readonly type: (typeof TextWrappingType)[keyof typeof TextWrappingType];
544
+ readonly side?: (typeof TextWrappingSide)[keyof typeof TextWrappingSide];
545
+ readonly margins?: IDistance;
546
+ }
547
+ //#endregion
548
+ //#region src/file/drawing/text-wrap/wrap-none.d.ts
549
+ declare const createWrapNone: () => XmlComponent;
550
+ //#endregion
551
+ //#region src/file/shared/alignment.d.ts
552
+ declare const HorizontalPositionAlign: {
553
+ readonly CENTER: "center";
554
+ readonly INSIDE: "inside";
555
+ readonly LEFT: "left";
556
+ readonly OUTSIDE: "outside";
557
+ readonly RIGHT: "right";
558
+ };
559
+ declare const VerticalPositionAlign: {
560
+ readonly BOTTOM: "bottom";
561
+ readonly CENTER: "center";
562
+ readonly INSIDE: "inside";
563
+ readonly OUTSIDE: "outside";
564
+ readonly TOP: "top";
565
+ };
566
+ //#endregion
567
+ //#region src/file/drawing/floating/floating-position.d.ts
568
+ declare const HorizontalPositionRelativeFrom: {
569
+ readonly CHARACTER: "character";
570
+ readonly COLUMN: "column";
571
+ readonly INSIDE_MARGIN: "insideMargin";
572
+ readonly LEFT_MARGIN: "leftMargin";
573
+ readonly MARGIN: "margin";
574
+ readonly OUTSIDE_MARGIN: "outsideMargin";
575
+ readonly PAGE: "page";
576
+ readonly RIGHT_MARGIN: "rightMargin";
577
+ };
578
+ declare const VerticalPositionRelativeFrom: {
579
+ readonly BOTTOM_MARGIN: "bottomMargin";
580
+ readonly INSIDE_MARGIN: "insideMargin";
581
+ readonly LINE: "line";
582
+ readonly MARGIN: "margin";
583
+ readonly OUTSIDE_MARGIN: "outsideMargin";
584
+ readonly PAGE: "page";
585
+ readonly PARAGRAPH: "paragraph";
586
+ readonly TOP_MARGIN: "topMargin";
587
+ };
588
+ interface IHorizontalPositionOptions {
589
+ readonly relative?: (typeof HorizontalPositionRelativeFrom)[keyof typeof HorizontalPositionRelativeFrom];
590
+ readonly align?: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
591
+ readonly offset?: number;
592
+ }
593
+ interface IVerticalPositionOptions {
594
+ readonly relative?: (typeof VerticalPositionRelativeFrom)[keyof typeof VerticalPositionRelativeFrom];
595
+ readonly align?: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
596
+ readonly offset?: number;
597
+ }
598
+ interface IMargins {
599
+ readonly left?: number;
600
+ readonly bottom?: number;
601
+ readonly top?: number;
602
+ readonly right?: number;
603
+ }
604
+ interface IFloating {
605
+ readonly horizontalPosition: IHorizontalPositionOptions;
606
+ readonly verticalPosition: IVerticalPositionOptions;
607
+ readonly allowOverlap?: boolean;
608
+ readonly lockAnchor?: boolean;
609
+ readonly behindDocument?: boolean;
610
+ readonly layoutInCell?: boolean;
611
+ readonly margins?: IMargins;
612
+ readonly wrap?: ITextWrapping;
613
+ readonly zIndex?: number;
614
+ }
615
+ //#endregion
616
+ //#region src/file/drawing/floating/simple-pos.d.ts
617
+ declare const createSimplePos: () => XmlComponent;
618
+ //#endregion
619
+ //#region src/file/drawing/floating/horizontal-position.d.ts
620
+ declare const createHorizontalPosition: ({
621
+ relative,
622
+ align,
623
+ offset
624
+ }: IHorizontalPositionOptions) => XmlComponent;
625
+ //#endregion
626
+ //#region src/file/drawing/floating/vertical-position.d.ts
627
+ declare const createVerticalPosition: ({
628
+ relative,
629
+ align,
630
+ offset
631
+ }: IVerticalPositionOptions) => XmlComponent;
632
+ //#endregion
633
+ //#region src/file/drawing/text-wrap/wrap-square.d.ts
634
+ declare const createWrapSquare: (textWrapping: ITextWrapping, margins?: IMargins) => XmlComponent;
635
+ //#endregion
636
+ //#region src/file/drawing/text-wrap/wrap-tight.d.ts
637
+ declare const createWrapTight: (margins?: IMargins) => XmlComponent;
638
+ //#endregion
639
+ //#region src/file/drawing/text-wrap/wrap-top-and-bottom.d.ts
640
+ declare const createWrapTopAndBottom: (margins?: IMargins) => XmlComponent;
641
+ //#endregion
642
+ //#region src/file/drawing/inline/graphic/graphic-data/wps/body-properties.d.ts
643
+ declare enum VerticalAnchor {
644
+ CENTER = "ctr",
645
+ TOP = "t",
646
+ BOTTOM = "b"
647
+ }
648
+ interface IBodyPropertiesOptions {
649
+ readonly wrap?: (typeof TextWrappingType)[keyof typeof TextWrappingType];
650
+ readonly verticalAnchor?: VerticalAnchor;
651
+ readonly margins?: {
652
+ readonly top?: number;
653
+ readonly bottom?: number;
654
+ readonly left?: number;
655
+ readonly right?: number;
656
+ };
657
+ readonly noAutoFit?: boolean;
658
+ }
659
+ declare const createBodyProperties: (options?: IBodyPropertiesOptions) => XmlComponent;
660
+ //#endregion
661
+ //#region src/file/drawing/inline/graphic/graphic-data/wps/non-visual-shape-properties.d.ts
662
+ interface INonVisualShapePropertiesOptions {
663
+ readonly txBox: string;
664
+ }
665
+ //#endregion
666
+ //#region src/file/drawing/inline/graphic/graphic-data/wps/wps-shape.d.ts
667
+ interface WpsShapeCoreOptions {
668
+ readonly children: readonly Paragraph[];
669
+ readonly nonVisualProperties?: INonVisualShapePropertiesOptions;
670
+ readonly bodyProperties?: IBodyPropertiesOptions;
671
+ }
672
+ //#endregion
673
+ //#region src/file/media/data.d.ts
674
+ interface IMediaDataTransformation {
675
+ readonly offset?: {
676
+ readonly pixels: {
677
+ readonly x: number;
678
+ readonly y: number;
679
+ };
680
+ readonly emus?: {
681
+ readonly x: number;
682
+ readonly y: number;
683
+ };
684
+ };
685
+ readonly pixels: {
686
+ readonly x: number;
687
+ readonly y: number;
688
+ };
689
+ readonly emus: {
690
+ readonly x: number;
691
+ readonly y: number;
692
+ };
693
+ readonly flip?: {
694
+ readonly vertical?: boolean;
695
+ readonly horizontal?: boolean;
696
+ };
697
+ readonly rotation?: number;
698
+ }
699
+ interface CoreMediaData {
700
+ readonly fileName: string;
701
+ readonly transformation: IMediaDataTransformation;
702
+ readonly data: Buffer | Uint8Array | ArrayBuffer;
703
+ }
704
+ interface RegularMediaData {
705
+ readonly type: "jpg" | "png" | "gif" | "bmp";
706
+ }
707
+ interface SvgMediaData {
708
+ readonly type: "svg";
709
+ readonly fallback: RegularMediaData & CoreMediaData;
710
+ }
711
+ interface WpsMediaData {
712
+ readonly type: "wps";
713
+ readonly transformation: IMediaDataTransformation;
714
+ readonly data: WpsShapeCoreOptions;
715
+ }
716
+ interface WpgCommonMediaData {
717
+ readonly outline?: OutlineOptions;
718
+ readonly solidFill?: SolidFillOptions;
719
+ }
720
+ type IGroupChildMediaData = (WpsMediaData | IMediaData) & WpgCommonMediaData;
721
+ interface WpgMediaData {
722
+ readonly type: "wpg";
723
+ readonly transformation: IMediaDataTransformation;
724
+ readonly children: readonly IGroupChildMediaData[];
725
+ }
726
+ type IExtendedMediaData = IMediaData | WpsMediaData | WpgMediaData;
727
+ type IMediaData = (RegularMediaData | SvgMediaData) & CoreMediaData;
728
+ declare const WORKAROUND2 = "";
729
+ //#endregion
730
+ //#region src/file/media/media.d.ts
731
+ interface IMediaTransformation {
732
+ readonly offset?: {
733
+ readonly top?: number;
734
+ readonly left?: number;
735
+ };
736
+ readonly width: number;
737
+ readonly height: number;
738
+ readonly flip?: {
739
+ readonly vertical?: boolean;
740
+ readonly horizontal?: boolean;
741
+ };
742
+ readonly rotation?: number;
743
+ }
744
+ declare class Media {
745
+ private readonly map;
746
+ constructor();
747
+ addImage(key: string, mediaData: IMediaData): void;
748
+ get Array(): readonly IMediaData[];
749
+ }
750
+ //#endregion
751
+ //#region src/file/drawing/drawing.d.ts
752
+ interface IDistance {
753
+ readonly distT?: number;
754
+ readonly distB?: number;
755
+ readonly distL?: number;
756
+ readonly distR?: number;
757
+ }
758
+ interface IDrawingOptions {
759
+ readonly floating?: IFloating;
760
+ readonly docProperties?: DocPropertiesOptions;
761
+ readonly outline?: OutlineOptions;
762
+ readonly solidFill?: SolidFillOptions;
763
+ }
764
+ declare class Drawing extends XmlComponent {
765
+ constructor(imageData: IExtendedMediaData, drawingOptions?: IDrawingOptions);
766
+ }
767
+ //#endregion
768
+ //#region src/file/paragraph/run/image-run.d.ts
769
+ interface CoreImageOptions {
770
+ readonly transformation: IMediaTransformation;
771
+ readonly floating?: IFloating;
772
+ readonly altText?: DocPropertiesOptions;
773
+ readonly outline?: OutlineOptions;
774
+ readonly solidFill?: SolidFillOptions;
775
+ }
776
+ interface RegularImageOptions {
777
+ readonly type: "jpg" | "png" | "gif" | "bmp";
778
+ readonly data: Buffer | string | Uint8Array | ArrayBuffer;
779
+ }
780
+ interface SvgMediaOptions {
781
+ readonly type: "svg";
782
+ readonly data: Buffer | string | Uint8Array | ArrayBuffer;
783
+ readonly fallback: RegularImageOptions;
784
+ }
785
+ type IImageOptions = (RegularImageOptions | SvgMediaOptions) & CoreImageOptions;
786
+ declare const standardizeData: (data: string | Buffer | Uint8Array | ArrayBuffer) => Buffer | Uint8Array | ArrayBuffer;
787
+ declare class ImageRun extends Run {
788
+ private readonly imageData;
789
+ constructor(options: IImageOptions);
790
+ prepForXml(context: IContext): IXmlableObject | undefined;
791
+ }
792
+ //#endregion
793
+ //#region src/file/paragraph/run/wps-shape-run.d.ts
794
+ interface CoreShapeOptions {
795
+ readonly transformation: IMediaTransformation;
796
+ readonly floating?: IFloating;
797
+ readonly altText?: DocPropertiesOptions;
798
+ readonly outline?: OutlineOptions;
799
+ readonly solidFill?: SolidFillOptions;
800
+ }
801
+ type IWpsShapeOptions = WpsShapeCoreOptions & {
802
+ readonly type: "wps";
803
+ } & CoreShapeOptions;
804
+ declare const createTransformation: (options: IMediaTransformation) => IMediaDataTransformation;
805
+ declare class WpsShapeRun extends Run {
806
+ private readonly wpsShapeData;
807
+ constructor(options: IWpsShapeOptions);
808
+ }
809
+ //#endregion
810
+ //#region src/file/paragraph/run/wpg-group-run.d.ts
811
+ interface CoreGroupOptions {
812
+ readonly children: readonly IGroupChildMediaData[];
813
+ readonly transformation: IMediaTransformation;
814
+ readonly floating?: IFloating;
815
+ readonly altText?: DocPropertiesOptions;
816
+ }
817
+ type IWpgGroupOptions = {
818
+ readonly type: "wpg";
819
+ } & CoreGroupOptions;
820
+ declare class WpgGroupRun extends Run {
821
+ private readonly wpgGroupData;
822
+ private readonly mediaDatas;
823
+ constructor(options: IWpgGroupOptions);
824
+ prepForXml(context: IContext): IXmlableObject | undefined;
825
+ }
826
+ //#endregion
827
+ //#region src/file/paragraph/run/sequential-identifier.d.ts
828
+ declare class SequentialIdentifier extends Run {
829
+ constructor(identifier: string);
830
+ }
831
+ //#endregion
832
+ //#region src/file/paragraph/run/simple-field.d.ts
833
+ declare class SimpleField extends XmlComponent {
834
+ constructor(instruction: string, cachedValue?: string);
835
+ }
836
+ declare class SimpleMailMergeField extends SimpleField {
837
+ constructor(fieldName: string);
838
+ }
839
+ //#endregion
840
+ //#region src/file/relationships/relationship/relationship.d.ts
841
+ type RelationshipType = "http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/numbering" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/header" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" | "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/footnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments" | "http://schemas.openxmlformats.org/officeDocument/2006/relationships/font";
842
+ declare const TargetModeType: {
843
+ readonly EXTERNAL: "External";
844
+ };
845
+ //#endregion
846
+ //#region src/file/relationships/relationships.d.ts
847
+ declare class Relationships extends XmlComponent {
848
+ constructor();
849
+ addRelationship(id: number | string, type: RelationshipType, target: string, targetMode?: (typeof TargetModeType)[keyof typeof TargetModeType]): void;
850
+ get RelationshipCount(): number;
851
+ }
852
+ //#endregion
853
+ //#region src/file/paragraph/run/comment-run.d.ts
854
+ interface ICommentOptions {
855
+ readonly id: number;
856
+ readonly children: readonly FileChild[];
857
+ readonly initials?: string;
858
+ readonly author?: string;
859
+ readonly date?: Date;
860
+ }
861
+ interface ICommentsOptions {
862
+ readonly children: readonly ICommentOptions[];
863
+ }
864
+ declare class CommentRangeStart extends XmlComponent {
865
+ constructor(id: number);
866
+ }
867
+ declare class CommentRangeEnd extends XmlComponent {
868
+ constructor(id: number);
869
+ }
870
+ declare class CommentReference extends XmlComponent {
871
+ constructor(id: number);
872
+ }
873
+ declare class Comment extends XmlComponent {
874
+ constructor({
875
+ id,
876
+ initials,
877
+ author,
878
+ date,
879
+ children
880
+ }: ICommentOptions);
881
+ }
882
+ declare class Comments extends XmlComponent {
883
+ private readonly relationships;
884
+ constructor({
885
+ children
886
+ }: ICommentsOptions);
887
+ get Relationships(): Relationships;
888
+ }
889
+ //#endregion
890
+ //#region src/file/paragraph/run/empty-children.d.ts
891
+ declare class NoBreakHyphen extends EmptyElement {
892
+ constructor();
893
+ }
894
+ declare class SoftHyphen extends EmptyElement {
895
+ constructor();
896
+ }
897
+ declare class DayShort extends EmptyElement {
898
+ constructor();
899
+ }
900
+ declare class MonthShort extends EmptyElement {
901
+ constructor();
902
+ }
903
+ declare class YearShort extends EmptyElement {
904
+ constructor();
905
+ }
906
+ declare class DayLong extends EmptyElement {
907
+ constructor();
908
+ }
909
+ declare class MonthLong extends EmptyElement {
910
+ constructor();
911
+ }
912
+ declare class YearLong extends EmptyElement {
913
+ constructor();
914
+ }
915
+ declare class AnnotationReference extends EmptyElement {
916
+ constructor();
917
+ }
918
+ declare class FootnoteReferenceElement extends EmptyElement {
919
+ constructor();
920
+ }
921
+ declare class EndnoteReference extends EmptyElement {
922
+ constructor();
923
+ }
924
+ declare class Separator extends EmptyElement {
925
+ constructor();
926
+ }
927
+ declare class ContinuationSeparator extends EmptyElement {
928
+ constructor();
929
+ }
930
+ declare class PageNumberElement extends EmptyElement {
931
+ constructor();
932
+ }
933
+ declare class CarriageReturn extends EmptyElement {
934
+ constructor();
935
+ }
936
+ declare class Tab extends EmptyElement {
937
+ constructor();
938
+ }
939
+ declare class LastRenderedPageBreak extends EmptyElement {
940
+ constructor();
941
+ }
942
+ //#endregion
943
+ //#region src/file/paragraph/run/positional-tab.d.ts
944
+ declare const PositionalTabAlignment: {
945
+ readonly LEFT: "left";
946
+ readonly CENTER: "center";
947
+ readonly RIGHT: "right";
948
+ };
949
+ declare const PositionalTabRelativeTo: {
950
+ readonly MARGIN: "margin";
951
+ readonly INDENT: "indent";
952
+ };
953
+ declare const PositionalTabLeader: {
954
+ readonly NONE: "none";
955
+ readonly DOT: "dot";
956
+ readonly HYPHEN: "hyphen";
957
+ readonly UNDERSCORE: "underscore";
958
+ readonly MIDDLE_DOT: "middleDot";
959
+ };
960
+ interface PositionalTabOptions {
961
+ readonly alignment: (typeof PositionalTabAlignment)[keyof typeof PositionalTabAlignment];
962
+ readonly relativeTo: (typeof PositionalTabRelativeTo)[keyof typeof PositionalTabRelativeTo];
963
+ readonly leader: (typeof PositionalTabLeader)[keyof typeof PositionalTabLeader];
964
+ }
965
+ declare class PositionalTab extends XmlComponent {
966
+ constructor(options: PositionalTabOptions);
967
+ }
968
+ //#endregion
969
+ //#region src/file/footnotes/footnote/run/reference-run.d.ts
970
+ declare class FootNoteReferenceRunAttributes extends XmlAttributeComponent<{
971
+ readonly id: number;
972
+ }> {
973
+ protected readonly xmlKeys: {
974
+ id: string;
975
+ };
976
+ }
977
+ declare class FootnoteReference extends XmlComponent {
978
+ constructor(id: number);
979
+ }
980
+ declare class FootnoteReferenceRun extends Run {
981
+ constructor(id: number);
982
+ }
983
+ //#endregion
984
+ //#region src/file/table-of-contents/table-of-contents-properties.d.ts
985
+ declare class StyleLevel {
986
+ readonly styleName: string;
987
+ readonly level: number;
988
+ constructor(styleName: string, level: number);
989
+ }
990
+ interface ITableOfContentsOptions {
991
+ readonly captionLabel?: string;
992
+ readonly entriesFromBookmark?: string;
993
+ readonly captionLabelIncludingNumbers?: string;
994
+ readonly sequenceAndPageNumbersSeparator?: string;
995
+ readonly tcFieldIdentifier?: string;
996
+ readonly hyperlink?: boolean;
997
+ readonly tcFieldLevelRange?: string;
998
+ readonly pageNumbersEntryLevelsRange?: string;
999
+ readonly headingStyleRange?: string;
1000
+ readonly entryAndPageNumberSeparator?: string;
1001
+ readonly seqFieldIdentifierForPrefix?: string;
1002
+ readonly stylesWithLevels?: readonly StyleLevel[];
1003
+ readonly useAppliedParagraphOutlineLevel?: boolean;
1004
+ readonly preserveTabInEntries?: boolean;
1005
+ readonly preserveNewLineInEntries?: boolean;
1006
+ readonly hideTabAndPageNumbersInWebView?: boolean;
1007
+ }
1008
+ //#endregion
1009
+ //#region src/file/table-of-contents/field-instruction.d.ts
1010
+ declare class FieldInstruction extends XmlComponent {
1011
+ private readonly properties;
1012
+ constructor(properties?: ITableOfContentsOptions);
1013
+ }
1014
+ //#endregion
1015
+ //#region src/file/paragraph/run/run.d.ts
1016
+ interface IRunOptionsBase {
1017
+ readonly children?: readonly (FieldInstruction | (typeof PageNumber)[keyof typeof PageNumber] | FootnoteReferenceRun | string | AnnotationReference | CarriageReturn | ContinuationSeparator | DayLong | DayShort | EndnoteReference | FootnoteReferenceElement | LastRenderedPageBreak | MonthLong | MonthShort | NoBreakHyphen | PageNumberElement | Separator | SoftHyphen | Tab | YearLong | YearShort | XmlComponent)[];
1018
+ readonly break?: number;
1019
+ readonly text?: string;
1020
+ }
1021
+ type IRunOptions = IRunOptionsBase & IRunPropertiesOptions;
1022
+ type IParagraphRunOptions = IRunOptionsBase & IParagraphRunPropertiesOptions;
1023
+ declare const PageNumber: {
1024
+ readonly CURRENT: "CURRENT";
1025
+ readonly TOTAL_PAGES: "TOTAL_PAGES";
1026
+ readonly TOTAL_PAGES_IN_SECTION: "TOTAL_PAGES_IN_SECTION";
1027
+ readonly CURRENT_SECTION: "SECTION";
1028
+ };
1029
+ declare class Run extends XmlComponent {
1030
+ protected readonly properties: RunProperties;
1031
+ constructor(options: IRunOptions);
1032
+ }
1033
+ //#endregion
1034
+ //#region src/file/track-revision/track-revision-components/deleted-text-run.d.ts
1035
+ type IDeletedRunOptions = IRunOptions & IChangedAttributesProperties;
1036
+ declare class DeletedTextRun extends XmlComponent {
1037
+ protected readonly deletedTextRunWrapper: DeletedTextRunWrapper;
1038
+ constructor(options: IDeletedRunOptions);
1039
+ }
1040
+ declare class DeletedTextRunWrapper extends XmlComponent {
1041
+ constructor(options: IRunOptions);
1042
+ }
1043
+ //#endregion
1044
+ //#region src/file/track-revision/track-revision-components/inserted-table-row.d.ts
1045
+ declare class InsertedTableRow extends XmlComponent {
1046
+ constructor(options: IChangedAttributesProperties);
1047
+ }
1048
+ //#endregion
1049
+ //#region src/file/track-revision/track-revision-components/deleted-table-row.d.ts
1050
+ declare class DeletedTableRow extends XmlComponent {
1051
+ constructor(options: IChangedAttributesProperties);
1052
+ }
1053
+ //#endregion
1054
+ //#region src/file/track-revision/track-revision-components/inserted-table-cell.d.ts
1055
+ declare class InsertedTableCell extends XmlComponent {
1056
+ constructor(options: IChangedAttributesProperties);
1057
+ }
1058
+ //#endregion
1059
+ //#region src/file/track-revision/track-revision-components/deleted-table-cell.d.ts
1060
+ declare class DeletedTableCell extends XmlComponent {
1061
+ constructor(options: IChangedAttributesProperties);
1062
+ }
1063
+ //#endregion
1064
+ //#region src/file/track-revision/track-revision-components/cell-merge.d.ts
1065
+ declare const VerticalMergeRevisionType: {
1066
+ readonly CONTINUE: "cont";
1067
+ readonly RESTART: "rest";
1068
+ };
1069
+ type ICellMergeAttributes = IChangedAttributesProperties & {
1070
+ readonly verticalMerge?: (typeof VerticalMergeRevisionType)[keyof typeof VerticalMergeRevisionType];
1071
+ readonly verticalMergeOriginal?: (typeof VerticalMergeRevisionType)[keyof typeof VerticalMergeRevisionType];
1072
+ };
1073
+ declare class CellMergeAttributes extends XmlAttributeComponent<ICellMergeAttributes> {
1074
+ protected readonly xmlKeys: {
1075
+ author: string;
1076
+ date: string;
1077
+ id: string;
1078
+ verticalMerge: string;
1079
+ verticalMergeOriginal: string;
1080
+ };
1081
+ }
1082
+ declare class CellMerge extends XmlComponent {
1083
+ constructor(options: ICellMergeAttributes);
1084
+ }
1085
+ //#endregion
1086
+ //#region src/file/vertical-align/vertical-align.d.ts
1087
+ declare const VerticalAlignTable: {
1088
+ readonly BOTTOM: "bottom";
1089
+ readonly CENTER: "center";
1090
+ readonly TOP: "top";
1091
+ };
1092
+ declare const VerticalAlignSection: {
1093
+ readonly BOTH: "both";
1094
+ readonly BOTTOM: "bottom";
1095
+ readonly CENTER: "center";
1096
+ readonly TOP: "top";
1097
+ };
1098
+ declare const VerticalAlign: {
1099
+ readonly BOTH: "both";
1100
+ readonly BOTTOM: "bottom";
1101
+ readonly CENTER: "center";
1102
+ readonly TOP: "top";
1103
+ };
1104
+ type TableVerticalAlign = (typeof VerticalAlignTable)[keyof typeof VerticalAlignTable];
1105
+ type SectionVerticalAlign = (typeof VerticalAlignSection)[keyof typeof VerticalAlignSection];
1106
+ declare const createVerticalAlign: (value: (typeof VerticalAlign)[keyof typeof VerticalAlign]) => XmlComponent;
1107
+ //#endregion
1108
+ //#region src/file/table/table-cell/table-cell-components.d.ts
1109
+ interface ITableCellBorders {
1110
+ readonly top?: IBorderOptions;
1111
+ readonly start?: IBorderOptions;
1112
+ readonly left?: IBorderOptions;
1113
+ readonly bottom?: IBorderOptions;
1114
+ readonly end?: IBorderOptions;
1115
+ readonly right?: IBorderOptions;
1116
+ }
1117
+ declare class TableCellBorders extends IgnoreIfEmptyXmlComponent {
1118
+ constructor(options: ITableCellBorders);
1119
+ }
1120
+ declare class GridSpan extends XmlComponent {
1121
+ constructor(value: number);
1122
+ }
1123
+ declare const VerticalMergeType: {
1124
+ readonly CONTINUE: "continue";
1125
+ readonly RESTART: "restart";
1126
+ };
1127
+ declare class VerticalMerge extends XmlComponent {
1128
+ constructor(value: (typeof VerticalMergeType)[keyof typeof VerticalMergeType]);
1129
+ }
1130
+ declare const TextDirection: {
1131
+ readonly BOTTOM_TO_TOP_LEFT_TO_RIGHT: "btLr";
1132
+ readonly LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb";
1133
+ readonly TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl";
1134
+ };
1135
+ declare class TDirection extends XmlComponent {
1136
+ constructor(value: (typeof TextDirection)[keyof typeof TextDirection]);
1137
+ }
1138
+ //#endregion
1139
+ //#region src/file/table/table-cell/table-cell-properties.d.ts
1140
+ interface ITableCellPropertiesOptionsBase {
1141
+ readonly shading?: IShadingAttributesProperties;
1142
+ readonly margins?: ITableCellMarginOptions;
1143
+ readonly verticalAlign?: TableVerticalAlign;
1144
+ readonly textDirection?: (typeof TextDirection)[keyof typeof TextDirection];
1145
+ readonly verticalMerge?: (typeof VerticalMergeType)[keyof typeof VerticalMergeType];
1146
+ readonly width?: ITableWidthProperties;
1147
+ readonly columnSpan?: number;
1148
+ readonly rowSpan?: number;
1149
+ readonly borders?: ITableCellBorders;
1150
+ readonly insertion?: IChangedAttributesProperties;
1151
+ readonly deletion?: IChangedAttributesProperties;
1152
+ readonly cellMerge?: ICellMergeAttributes;
1153
+ }
1154
+ type ITableCellPropertiesOptions = {
1155
+ readonly revision?: ITableCellPropertiesChangeOptions;
1156
+ readonly includeIfEmpty?: boolean;
1157
+ } & ITableCellPropertiesOptionsBase;
1158
+ type ITableCellPropertiesChangeOptions = ITableCellPropertiesOptionsBase & IChangedAttributesProperties;
1159
+ //#endregion
1160
+ //#region src/file/table/table-cell/table-cell.d.ts
1161
+ type ITableCellOptions = {
1162
+ readonly children: readonly (Paragraph | Table)[];
1163
+ } & ITableCellPropertiesOptions;
1164
+ declare class TableCell extends XmlComponent {
1165
+ readonly options: ITableCellOptions;
1166
+ constructor(options: ITableCellOptions);
1167
+ prepForXml(context: IContext): IXmlableObject | undefined;
1168
+ }
1169
+ //#endregion
1170
+ //#region src/file/table/table-row/table-row-height.d.ts
1171
+ declare const HeightRule: {
1172
+ readonly AUTO: "auto";
1173
+ readonly ATLEAST: "atLeast";
1174
+ readonly EXACT: "exact";
1175
+ };
1176
+ declare const createTableRowHeight: (value: number | PositiveUniversalMeasure, rule: (typeof HeightRule)[keyof typeof HeightRule]) => XmlComponent;
1177
+ //#endregion
1178
+ //#region src/file/table/table-row/table-row-properties.d.ts
1179
+ interface ITableRowPropertiesOptionsBase {
1180
+ readonly cantSplit?: boolean;
1181
+ readonly tableHeader?: boolean;
1182
+ readonly height?: {
1183
+ readonly value: number | PositiveUniversalMeasure;
1184
+ readonly rule: (typeof HeightRule)[keyof typeof HeightRule];
1185
+ };
1186
+ readonly cellSpacing?: ITableCellSpacingProperties;
1187
+ }
1188
+ type ITableRowPropertiesOptions = ITableRowPropertiesOptionsBase & {
1189
+ readonly insertion?: IChangedAttributesProperties;
1190
+ readonly deletion?: IChangedAttributesProperties;
1191
+ readonly revision?: ITableRowPropertiesChangeOptions;
1192
+ readonly includeIfEmpty?: boolean;
1193
+ };
1194
+ type ITableRowPropertiesChangeOptions = ITableRowPropertiesOptionsBase & IChangedAttributesProperties;
1195
+ declare class TableRowProperties extends IgnoreIfEmptyXmlComponent {
1196
+ constructor(options: ITableRowPropertiesOptions);
1197
+ }
1198
+ declare class TableRowPropertiesChange extends XmlComponent {
1199
+ constructor(options: ITableRowPropertiesChangeOptions);
1200
+ }
1201
+ //#endregion
1202
+ //#region src/file/table/table-row/table-row.d.ts
1203
+ type ITableRowOptions = {
1204
+ readonly children: readonly TableCell[];
1205
+ } & ITableRowPropertiesOptions;
1206
+ declare class TableRow extends XmlComponent {
1207
+ private readonly options;
1208
+ constructor(options: ITableRowOptions);
1209
+ get CellCount(): number;
1210
+ get cells(): readonly TableCell[];
1211
+ addCellToIndex(cell: TableCell, index: number): void;
1212
+ addCellToColumnIndex(cell: TableCell, columnIndex: number): void;
1213
+ rootIndexToColumnIndex(rootIndex: number): number;
1214
+ columnIndexToRootIndex(columnIndex: number, allowEndNewCell?: boolean): number;
1215
+ }
1216
+ //#endregion
1217
+ //#region src/file/table/table.d.ts
1218
+ interface ITableOptions {
1219
+ readonly rows: readonly TableRow[];
1220
+ readonly width?: ITableWidthProperties;
1221
+ readonly columnWidths?: readonly number[];
1222
+ readonly columnWidthsRevision?: ITableGridChangeOptions;
1223
+ readonly margins?: ITableCellMarginOptions;
1224
+ readonly indent?: ITableWidthProperties;
1225
+ readonly float?: ITableFloatOptions;
1226
+ readonly layout?: (typeof TableLayoutType)[keyof typeof TableLayoutType];
1227
+ readonly style?: string;
1228
+ readonly borders?: ITableBordersOptions;
1229
+ readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType];
1230
+ readonly visuallyRightToLeft?: boolean;
1231
+ readonly tableLook?: ITableLookOptions;
1232
+ readonly cellSpacing?: ITableCellSpacingProperties;
1233
+ readonly revision?: ITablePropertiesChangeOptions;
1234
+ }
1235
+ declare class Table extends FileChild {
1236
+ constructor({
1237
+ rows,
1238
+ width,
1239
+ columnWidths,
1240
+ columnWidthsRevision,
1241
+ margins,
1242
+ indent,
1243
+ float,
1244
+ layout,
1245
+ style,
1246
+ borders,
1247
+ alignment,
1248
+ visuallyRightToLeft,
1249
+ tableLook,
1250
+ cellSpacing,
1251
+ revision
1252
+ }: ITableOptions);
1253
+ }
1254
+ //#endregion
1255
+ //#region src/file/table-of-contents/table-of-contents.d.ts
1256
+ interface ToCEntry {
1257
+ readonly title: string;
1258
+ readonly level: number;
1259
+ readonly page?: number;
1260
+ readonly href?: string;
1261
+ }
1262
+ declare class TableOfContents extends FileChild {
1263
+ constructor(alias?: string, {
1264
+ contentChildren,
1265
+ cachedEntries,
1266
+ beginDirty,
1267
+ ...properties
1268
+ }?: ITableOfContentsOptions & {
1269
+ readonly contentChildren?: readonly (XmlComponent | string)[];
1270
+ readonly cachedEntries?: readonly ToCEntry[];
1271
+ readonly beginDirty?: boolean;
1272
+ });
1273
+ private getTabStopsForLevel;
1274
+ private buildCachedContentRun;
1275
+ private buildCachedContentParagraphChild;
1276
+ }
1277
+ //#endregion
1278
+ //#region src/file/footer/footer.d.ts
1279
+ declare class Footer$1 extends InitializableXmlComponent {
1280
+ private readonly refId;
1281
+ constructor(referenceNumber: number, initContent?: XmlComponent);
1282
+ get ReferenceId(): number;
1283
+ add(item: Paragraph | Table): void;
1284
+ }
1285
+ //#endregion
1286
+ //#region src/file/footer-wrapper.d.ts
1287
+ interface IDocumentFooter {
1288
+ readonly footer: FooterWrapper;
1289
+ readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
1290
+ }
1291
+ declare class FooterWrapper implements IViewWrapper {
1292
+ private readonly media;
1293
+ private readonly footer;
1294
+ private readonly relationships;
1295
+ constructor(media: Media, referenceId: number, initContent?: XmlComponent);
1296
+ add(item: Paragraph | Table): void;
1297
+ addChildElement(childElement: XmlComponent): void;
1298
+ get View(): Footer$1;
1299
+ get Relationships(): Relationships;
1300
+ get Media(): Media;
1301
+ }
1302
+ //#endregion
1303
+ //#region src/file/header/header.d.ts
1304
+ declare class Header$1 extends InitializableXmlComponent {
1305
+ private readonly refId;
1306
+ constructor(referenceNumber: number, initContent?: XmlComponent);
1307
+ get ReferenceId(): number;
1308
+ add(item: Paragraph | Table): void;
1309
+ }
1310
+ //#endregion
1311
+ //#region src/file/header-wrapper.d.ts
1312
+ interface IDocumentHeader {
1313
+ readonly header: HeaderWrapper;
1314
+ readonly type: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
1315
+ }
1316
+ declare class HeaderWrapper implements IViewWrapper {
1317
+ private readonly media;
1318
+ private readonly header;
1319
+ private readonly relationships;
1320
+ constructor(media: Media, referenceId: number, initContent?: XmlComponent);
1321
+ add(item: Paragraph | Table): HeaderWrapper;
1322
+ addChildElement(childElement: XmlComponent | string): void;
1323
+ get View(): Header$1;
1324
+ get Relationships(): Relationships;
1325
+ get Media(): Media;
1326
+ }
1327
+ //#endregion
1328
+ //#region src/file/document/body/section-properties/properties/column.d.ts
1329
+ interface IColumnAttributes {
1330
+ readonly width: number | PositiveUniversalMeasure;
1331
+ readonly space?: number | PositiveUniversalMeasure;
1332
+ }
1333
+ declare class Column extends XmlComponent {
1334
+ constructor(options: IColumnAttributes);
1335
+ }
1336
+ //#endregion
1337
+ //#region src/file/document/body/section-properties/properties/columns.d.ts
1338
+ interface IColumnsAttributes {
1339
+ readonly space?: number | PositiveUniversalMeasure;
1340
+ readonly count?: number;
1341
+ readonly separate?: boolean;
1342
+ readonly equalWidth?: boolean;
1343
+ readonly children?: readonly Column[];
1344
+ }
1345
+ declare const createColumns: ({
1346
+ space,
1347
+ count,
1348
+ separate,
1349
+ equalWidth,
1350
+ children
1351
+ }: IColumnsAttributes) => XmlComponent;
1352
+ //#endregion
1353
+ //#region src/file/document/body/section-properties/properties/doc-grid.d.ts
1354
+ declare const DocumentGridType: {
1355
+ readonly DEFAULT: "default";
1356
+ readonly LINES: "lines";
1357
+ readonly LINES_AND_CHARS: "linesAndChars";
1358
+ readonly SNAP_TO_CHARS: "snapToChars";
1359
+ };
1360
+ interface IDocGridAttributesProperties {
1361
+ readonly type?: (typeof DocumentGridType)[keyof typeof DocumentGridType];
1362
+ readonly linePitch: number;
1363
+ readonly charSpace?: number;
1364
+ }
1365
+ declare const createDocumentGrid: ({
1366
+ type,
1367
+ linePitch,
1368
+ charSpace
1369
+ }: IDocGridAttributesProperties) => XmlComponent;
1370
+ //#endregion
1371
+ //#region src/file/document/body/section-properties/properties/line-number.d.ts
1372
+ declare const LineNumberRestartFormat: {
1373
+ readonly NEW_PAGE: "newPage";
1374
+ readonly NEW_SECTION: "newSection";
1375
+ readonly CONTINUOUS: "continuous";
1376
+ };
1377
+ interface ILineNumberAttributes {
1378
+ readonly countBy?: number;
1379
+ readonly start?: number;
1380
+ readonly restart?: (typeof LineNumberRestartFormat)[keyof typeof LineNumberRestartFormat];
1381
+ readonly distance?: number | PositiveUniversalMeasure;
1382
+ }
1383
+ declare const createLineNumberType: ({
1384
+ countBy,
1385
+ start,
1386
+ restart,
1387
+ distance
1388
+ }: ILineNumberAttributes) => XmlComponent;
1389
+ //#endregion
1390
+ //#region src/file/document/body/section-properties/properties/page-borders.d.ts
1391
+ declare const PageBorderDisplay: {
1392
+ readonly ALL_PAGES: "allPages";
1393
+ readonly FIRST_PAGE: "firstPage";
1394
+ readonly NOT_FIRST_PAGE: "notFirstPage";
1395
+ };
1396
+ declare const PageBorderOffsetFrom: {
1397
+ readonly PAGE: "page";
1398
+ readonly TEXT: "text";
1399
+ };
1400
+ declare const PageBorderZOrder: {
1401
+ readonly BACK: "back";
1402
+ readonly FRONT: "front";
1403
+ };
1404
+ interface IPageBorderAttributes {
1405
+ readonly display?: (typeof PageBorderDisplay)[keyof typeof PageBorderDisplay];
1406
+ readonly offsetFrom?: (typeof PageBorderOffsetFrom)[keyof typeof PageBorderOffsetFrom];
1407
+ readonly zOrder?: (typeof PageBorderZOrder)[keyof typeof PageBorderZOrder];
1408
+ }
1409
+ interface IPageBordersOptions {
1410
+ readonly pageBorders?: IPageBorderAttributes;
1411
+ readonly pageBorderTop?: IBorderOptions;
1412
+ readonly pageBorderRight?: IBorderOptions;
1413
+ readonly pageBorderBottom?: IBorderOptions;
1414
+ readonly pageBorderLeft?: IBorderOptions;
1415
+ }
1416
+ declare class PageBorders extends IgnoreIfEmptyXmlComponent {
1417
+ constructor(options?: IPageBordersOptions);
1418
+ }
1419
+ //#endregion
1420
+ //#region src/file/document/body/section-properties/properties/page-margin.d.ts
1421
+ interface IPageMarginAttributes {
1422
+ readonly top?: number | UniversalMeasure;
1423
+ readonly right?: number | PositiveUniversalMeasure;
1424
+ readonly bottom?: number | UniversalMeasure;
1425
+ readonly left?: number | PositiveUniversalMeasure;
1426
+ readonly header?: number | PositiveUniversalMeasure;
1427
+ readonly footer?: number | PositiveUniversalMeasure;
1428
+ readonly gutter?: number | PositiveUniversalMeasure;
1429
+ }
1430
+ declare const createPageMargin: (top: number | UniversalMeasure, right: number | PositiveUniversalMeasure, bottom: number | UniversalMeasure, left: number | PositiveUniversalMeasure, header: number | PositiveUniversalMeasure, footer: number | PositiveUniversalMeasure, gutter: number | PositiveUniversalMeasure) => XmlComponent;
1431
+ //#endregion
1432
+ //#region src/file/shared/number-format.d.ts
1433
+ declare const NumberFormat: {
1434
+ readonly AIUEO: "aiueo";
1435
+ readonly AIUEO_FULL_WIDTH: "aiueoFullWidth";
1436
+ readonly ARABIC_ABJAD: "arabicAbjad";
1437
+ readonly ARABIC_ALPHA: "arabicAlpha";
1438
+ readonly BAHT_TEXT: "bahtText";
1439
+ readonly BULLET: "bullet";
1440
+ readonly CARDINAL_TEXT: "cardinalText";
1441
+ readonly CHICAGO: "chicago";
1442
+ readonly CHINESE_COUNTING: "chineseCounting";
1443
+ readonly CHINESE_COUNTING_TEN_THOUSAND: "chineseCountingThousand";
1444
+ readonly CHINESE_LEGAL_SIMPLIFIED: "chineseLegalSimplified";
1445
+ readonly CHOSUNG: "chosung";
1446
+ readonly DECIMAL: "decimal";
1447
+ readonly DECIMAL_ENCLOSED_CIRCLE: "decimalEnclosedCircle";
1448
+ readonly DECIMAL_ENCLOSED_CIRCLE_CHINESE: "decimalEnclosedCircleChinese";
1449
+ readonly DECIMAL_ENCLOSED_FULL_STOP: "decimalEnclosedFullstop";
1450
+ readonly DECIMAL_ENCLOSED_PAREN: "decimalEnclosedParen";
1451
+ readonly DECIMAL_FULL_WIDTH: "decimalFullWidth";
1452
+ readonly DECIMAL_FULL_WIDTH_2: "decimalFullWidth2";
1453
+ readonly DECIMAL_HALF_WIDTH: "decimalHalfWidth";
1454
+ readonly DECIMAL_ZERO: "decimalZero";
1455
+ readonly DOLLAR_TEXT: "dollarText";
1456
+ readonly GANADA: "ganada";
1457
+ readonly HEBREW_1: "hebrew1";
1458
+ readonly HEBREW_2: "hebrew2";
1459
+ readonly HEX: "hex";
1460
+ readonly HINDI_CONSONANTS: "hindiConsonants";
1461
+ readonly HINDI_COUNTING: "hindiCounting";
1462
+ readonly HINDI_NUMBERS: "hindiNumbers";
1463
+ readonly HINDI_VOWELS: "hindiVowels";
1464
+ readonly IDEOGRAPH_DIGITAL: "ideographDigital";
1465
+ readonly IDEOGRAPH_ENCLOSED_CIRCLE: "ideographEnclosedCircle";
1466
+ readonly IDEOGRAPH_LEGAL_TRADITIONAL: "ideographLegalTraditional";
1467
+ readonly IDEOGRAPH_TRADITIONAL: "ideographTraditional";
1468
+ readonly IDEOGRAPH_ZODIAC: "ideographZodiac";
1469
+ readonly IDEOGRAPH_ZODIAC_TRADITIONAL: "ideographZodiacTraditional";
1470
+ readonly IROHA: "iroha";
1471
+ readonly IROHA_FULL_WIDTH: "irohaFullWidth";
1472
+ readonly JAPANESE_COUNTING: "japaneseCounting";
1473
+ readonly JAPANESE_DIGITAL_TEN_THOUSAND: "japaneseDigitalTenThousand";
1474
+ readonly JAPANESE_LEGAL: "japaneseLegal";
1475
+ readonly KOREAN_COUNTING: "koreanCounting";
1476
+ readonly KOREAN_DIGITAL: "koreanDigital";
1477
+ readonly KOREAN_DIGITAL_2: "koreanDigital2";
1478
+ readonly KOREAN_LEGAL: "koreanLegal";
1479
+ readonly LOWER_LETTER: "lowerLetter";
1480
+ readonly LOWER_ROMAN: "lowerRoman";
1481
+ readonly NONE: "none";
1482
+ readonly NUMBER_IN_DASH: "numberInDash";
1483
+ readonly ORDINAL: "ordinal";
1484
+ readonly ORDINAL_TEXT: "ordinalText";
1485
+ readonly RUSSIAN_LOWER: "russianLower";
1486
+ readonly RUSSIAN_UPPER: "russianUpper";
1487
+ readonly TAIWANESE_COUNTING: "taiwaneseCounting";
1488
+ readonly TAIWANESE_COUNTING_THOUSAND: "taiwaneseCountingThousand";
1489
+ readonly TAIWANESE_DIGITAL: "taiwaneseDigital";
1490
+ readonly THAI_COUNTING: "thaiCounting";
1491
+ readonly THAI_LETTERS: "thaiLetters";
1492
+ readonly THAI_NUMBERS: "thaiNumbers";
1493
+ readonly UPPER_LETTER: "upperLetter";
1494
+ readonly UPPER_ROMAN: "upperRoman";
1495
+ readonly VIETNAMESE_COUNTING: "vietnameseCounting";
1496
+ };
1497
+ //#endregion
1498
+ //#region src/file/document/body/section-properties/properties/page-number.d.ts
1499
+ declare const PageNumberSeparator: {
1500
+ readonly HYPHEN: "hyphen";
1501
+ readonly PERIOD: "period";
1502
+ readonly COLON: "colon";
1503
+ readonly EM_DASH: "emDash";
1504
+ readonly EN_DASH: "endash";
1505
+ };
1506
+ interface IPageNumberTypeAttributes {
1507
+ readonly start?: number;
1508
+ readonly formatType?: (typeof NumberFormat)[keyof typeof NumberFormat];
1509
+ readonly separator?: (typeof PageNumberSeparator)[keyof typeof PageNumberSeparator];
1510
+ }
1511
+ declare const createPageNumberType: ({
1512
+ start,
1513
+ formatType,
1514
+ separator
1515
+ }: IPageNumberTypeAttributes) => XmlComponent;
1516
+ //#endregion
1517
+ //#region src/file/document/body/section-properties/properties/page-size.d.ts
1518
+ declare const PageOrientation: {
1519
+ readonly PORTRAIT: "portrait";
1520
+ readonly LANDSCAPE: "landscape";
1521
+ };
1522
+ interface IPageSizeAttributes {
1523
+ readonly width: number | PositiveUniversalMeasure;
1524
+ readonly height: number | PositiveUniversalMeasure;
1525
+ readonly orientation?: (typeof PageOrientation)[keyof typeof PageOrientation];
1526
+ readonly code?: number;
1527
+ }
1528
+ declare const createPageSize: ({
1529
+ width,
1530
+ height,
1531
+ orientation,
1532
+ code
1533
+ }: IPageSizeAttributes) => XmlComponent;
1534
+ //#endregion
1535
+ //#region src/file/document/body/section-properties/properties/page-text-direction.d.ts
1536
+ declare const PageTextDirectionType: {
1537
+ readonly LEFT_TO_RIGHT_TOP_TO_BOTTOM: "lrTb";
1538
+ readonly TOP_TO_BOTTOM_RIGHT_TO_LEFT: "tbRl";
1539
+ };
1540
+ declare class PageTextDirection extends XmlComponent {
1541
+ constructor(value: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType]);
1542
+ }
1543
+ //#endregion
1544
+ //#region src/file/document/body/section-properties/properties/section-type.d.ts
1545
+ declare const SectionType: {
1546
+ readonly NEXT_PAGE: "nextPage";
1547
+ readonly NEXT_COLUMN: "nextColumn";
1548
+ readonly CONTINUOUS: "continuous";
1549
+ readonly EVEN_PAGE: "evenPage";
1550
+ readonly ODD_PAGE: "oddPage";
1551
+ };
1552
+ declare const createSectionType: (value: (typeof SectionType)[keyof typeof SectionType]) => XmlComponent;
1553
+ //#endregion
1554
+ //#region src/file/document/body/section-properties/section-properties.d.ts
1555
+ interface IHeaderFooterGroup<T> {
1556
+ readonly default?: T;
1557
+ readonly first?: T;
1558
+ readonly even?: T;
1559
+ }
1560
+ interface ISectionPropertiesOptionsBase {
1561
+ readonly page?: {
1562
+ readonly size?: Partial<IPageSizeAttributes>;
1563
+ readonly margin?: IPageMarginAttributes;
1564
+ readonly pageNumbers?: IPageNumberTypeAttributes;
1565
+ readonly borders?: IPageBordersOptions;
1566
+ readonly textDirection?: (typeof PageTextDirectionType)[keyof typeof PageTextDirectionType];
1567
+ };
1568
+ readonly grid?: Partial<IDocGridAttributesProperties>;
1569
+ readonly headerWrapperGroup?: IHeaderFooterGroup<HeaderWrapper>;
1570
+ readonly footerWrapperGroup?: IHeaderFooterGroup<FooterWrapper>;
1571
+ readonly lineNumbers?: ILineNumberAttributes;
1572
+ readonly titlePage?: boolean;
1573
+ readonly verticalAlign?: SectionVerticalAlign;
1574
+ readonly column?: IColumnsAttributes;
1575
+ readonly type?: (typeof SectionType)[keyof typeof SectionType];
1576
+ }
1577
+ type ISectionPropertiesChangeOptions = IChangedAttributesProperties & ISectionPropertiesOptionsBase;
1578
+ type ISectionPropertiesOptions = {
1579
+ readonly revision?: ISectionPropertiesChangeOptions;
1580
+ } & ISectionPropertiesOptionsBase;
1581
+ declare const sectionMarginDefaults: {
1582
+ TOP: number;
1583
+ RIGHT: number;
1584
+ BOTTOM: number;
1585
+ LEFT: number;
1586
+ HEADER: number;
1587
+ FOOTER: number;
1588
+ GUTTER: number;
1589
+ };
1590
+ declare const sectionPageSizeDefaults: {
1591
+ WIDTH: number;
1592
+ HEIGHT: number;
1593
+ ORIENTATION: "portrait";
1594
+ };
1595
+ declare class SectionProperties extends XmlComponent {
1596
+ constructor({
1597
+ page: {
1598
+ size: {
1599
+ width,
1600
+ height,
1601
+ orientation
1602
+ },
1603
+ margin: {
1604
+ top,
1605
+ right,
1606
+ bottom,
1607
+ left,
1608
+ header,
1609
+ footer,
1610
+ gutter
1611
+ },
1612
+ pageNumbers,
1613
+ borders,
1614
+ textDirection
1615
+ },
1616
+ grid: {
1617
+ linePitch,
1618
+ charSpace,
1619
+ type: gridType
1620
+ },
1621
+ headerWrapperGroup,
1622
+ footerWrapperGroup,
1623
+ lineNumbers,
1624
+ titlePage,
1625
+ verticalAlign,
1626
+ column,
1627
+ type,
1628
+ revision
1629
+ }?: ISectionPropertiesOptions);
1630
+ private addHeaderFooterGroup;
1631
+ }
1632
+ declare class SectionPropertiesChange extends XmlComponent {
1633
+ constructor(options: ISectionPropertiesChangeOptions);
1634
+ }
1635
+ //#endregion
1636
+ //#region src/file/document/body/body.d.ts
1637
+ declare class Body extends XmlComponent {
1638
+ private readonly sections;
1639
+ constructor();
1640
+ addSection(options: ISectionPropertiesOptions): void;
1641
+ prepForXml(context: IContext): IXmlableObject | undefined;
1642
+ push(component: XmlComponent): void;
1643
+ private createSectionParagraph;
1644
+ }
1645
+ //#endregion
1646
+ //#region src/file/document/body/section-properties/properties/header-footer-reference.d.ts
1647
+ declare const HeaderFooterReferenceType: {
1648
+ readonly DEFAULT: "default";
1649
+ readonly FIRST: "first";
1650
+ readonly EVEN: "even";
1651
+ };
1652
+ interface IHeaderFooterOptions {
1653
+ readonly type?: (typeof HeaderFooterReferenceType)[keyof typeof HeaderFooterReferenceType];
1654
+ readonly id?: number;
1655
+ }
1656
+ declare const HeaderFooterType: {
1657
+ readonly FOOTER: "w:footerReference";
1658
+ readonly HEADER: "w:headerReference";
1659
+ };
1660
+ declare const createHeaderFooterReference: (type: (typeof HeaderFooterType)[keyof typeof HeaderFooterType], options: IHeaderFooterOptions) => XmlComponent;
1661
+ //#endregion
1662
+ //#region src/file/document/document-background/document-background.d.ts
1663
+ declare class DocumentBackgroundAttributes extends XmlAttributeComponent<{
1664
+ readonly color?: string;
1665
+ readonly themeColor?: string;
1666
+ readonly themeShade?: string;
1667
+ readonly themeTint?: string;
1668
+ }> {
1669
+ protected readonly xmlKeys: {
1670
+ color: string;
1671
+ themeColor: string;
1672
+ themeShade: string;
1673
+ themeTint: string;
1674
+ };
1675
+ }
1676
+ interface IDocumentBackgroundOptions {
1677
+ readonly color?: string;
1678
+ readonly themeColor?: string;
1679
+ readonly themeShade?: string;
1680
+ readonly themeTint?: string;
1681
+ }
1682
+ declare class DocumentBackground extends XmlComponent {
1683
+ constructor(options: IDocumentBackgroundOptions);
1684
+ }
1685
+ //#endregion
1686
+ //#region src/file/document/document.d.ts
1687
+ interface IDocumentOptions {
1688
+ readonly background?: IDocumentBackgroundOptions;
1689
+ }
1690
+ declare class Document extends XmlComponent {
1691
+ private readonly body;
1692
+ constructor(options: IDocumentOptions);
1693
+ add(item: Paragraph | Table | TableOfContents | ConcreteHyperlink): Document;
1694
+ get Body(): Body;
1695
+ }
1696
+ //#endregion
1697
+ //#region src/file/document/document-attributes.d.ts
1698
+ declare const DocumentAttributeNamespaces: {
1699
+ aink: string;
1700
+ am3d: string;
1701
+ cp: string;
1702
+ cx: string;
1703
+ cx1: string;
1704
+ cx2: string;
1705
+ cx3: string;
1706
+ cx4: string;
1707
+ cx5: string;
1708
+ cx6: string;
1709
+ cx7: string;
1710
+ cx8: string;
1711
+ dc: string;
1712
+ dcmitype: string;
1713
+ dcterms: string;
1714
+ m: string;
1715
+ mc: string;
1716
+ o: string;
1717
+ r: string;
1718
+ v: string;
1719
+ w: string;
1720
+ w10: string;
1721
+ w14: string;
1722
+ w15: string;
1723
+ w16: string;
1724
+ w16cex: string;
1725
+ w16cid: string;
1726
+ w16sdtdh: string;
1727
+ w16se: string;
1728
+ wne: string;
1729
+ wp: string;
1730
+ wp14: string;
1731
+ wpc: string;
1732
+ wpg: string;
1733
+ wpi: string;
1734
+ wps: string;
1735
+ xsi: string;
1736
+ };
1737
+ type DocumentAttributeNamespace = keyof typeof DocumentAttributeNamespaces;
1738
+ type IDocumentAttributesProperties = Partial<Record<DocumentAttributeNamespace, string>> & {
1739
+ readonly Ignorable?: string;
1740
+ };
1741
+ declare class DocumentAttributes extends XmlAttributeComponent<IDocumentAttributesProperties> {
1742
+ protected readonly xmlKeys: AttributeMap<IDocumentAttributesProperties>;
1743
+ constructor(ns: readonly DocumentAttributeNamespace[], Ignorable?: string);
1744
+ }
1745
+ //#endregion
1746
+ //#region src/file/endnotes/endnotes.d.ts
1747
+ declare class Endnotes extends XmlComponent {
1748
+ constructor();
1749
+ createEndnote(id: number, paragraph: readonly Paragraph[]): void;
1750
+ }
1751
+ //#endregion
1752
+ //#region src/file/endnotes/endnote/run/reference-run.d.ts
1753
+ declare class EndnoteReferenceRunAttributes extends XmlAttributeComponent<{
1754
+ readonly id: number;
1755
+ }> {
1756
+ protected readonly xmlKeys: {
1757
+ id: string;
1758
+ };
1759
+ }
1760
+ declare class EndnoteIdReference extends XmlComponent {
1761
+ constructor(id: number);
1762
+ }
1763
+ declare class EndnoteReferenceRun extends Run {
1764
+ constructor(id: number);
1765
+ }
1766
+ //#endregion
1767
+ //#region src/file/footnotes/footnotes.d.ts
1768
+ declare class FootNotes extends XmlComponent {
1769
+ constructor();
1770
+ createFootNote(id: number, paragraph: readonly Paragraph[]): void;
1771
+ }
1772
+ //#endregion
1773
+ //#region src/file/document-wrapper.d.ts
1774
+ interface IViewWrapper {
1775
+ readonly View: Document | Footer$1 | Header$1 | FootNotes | Endnotes | XmlComponent;
1776
+ readonly Relationships: Relationships;
1777
+ }
1778
+ declare class DocumentWrapper implements IViewWrapper {
1779
+ private readonly document;
1780
+ private readonly relationships;
1781
+ constructor(options: IDocumentOptions);
1782
+ get View(): Document;
1783
+ get Relationships(): Relationships;
1784
+ }
1785
+ //#endregion
1786
+ //#region src/file/app-properties/app-properties.d.ts
1787
+ declare class AppProperties extends XmlComponent {
1788
+ constructor();
1789
+ }
1790
+ //#endregion
1791
+ //#region src/file/content-types/content-types.d.ts
1792
+ declare class ContentTypes extends XmlComponent {
1793
+ constructor();
1794
+ addFooter(index: number): void;
1795
+ addHeader(index: number): void;
1796
+ }
1797
+ //#endregion
1798
+ //#region src/file/fonts/font.d.ts
1799
+ declare const CharacterSet: {
1800
+ readonly ANSI: "00";
1801
+ readonly ARABIC: "B2";
1802
+ readonly BALTIC: "BA";
1803
+ readonly CHINESEBIG5: "88";
1804
+ readonly DEFAULT: "01";
1805
+ readonly EASTEUROPE: "EE";
1806
+ readonly GB_2312: "86";
1807
+ readonly GREEK: "A1";
1808
+ readonly HANGUL: "81";
1809
+ readonly HEBREW: "B1";
1810
+ readonly JIS: "80";
1811
+ readonly JOHAB: "82";
1812
+ readonly MAC: "4D";
1813
+ readonly OEM: "FF";
1814
+ readonly RUSSIAN: "CC";
1815
+ readonly SYMBOL: "02";
1816
+ readonly THAI: "DE";
1817
+ readonly TURKISH: "A2";
1818
+ readonly VIETNAMESE: "A3";
1819
+ };
1820
+ //#endregion
1821
+ //#region src/file/fonts/font-wrapper.d.ts
1822
+ type FontOptionsWithKey = FontOptions & {
1823
+ readonly fontKey: string;
1824
+ };
1825
+ declare class FontWrapper implements IViewWrapper {
1826
+ readonly options: readonly FontOptions[];
1827
+ private readonly fontTable;
1828
+ private readonly relationships;
1829
+ readonly fontOptionsWithKey: readonly FontOptionsWithKey[];
1830
+ constructor(options: readonly FontOptions[]);
1831
+ get View(): XmlComponent;
1832
+ get Relationships(): Relationships;
1833
+ }
1834
+ //#endregion
1835
+ //#region src/file/fonts/font-table.d.ts
1836
+ interface FontOptions {
1837
+ readonly name: string;
1838
+ readonly data: Buffer;
1839
+ readonly characterSet?: (typeof CharacterSet)[keyof typeof CharacterSet];
1840
+ }
1841
+ //#endregion
1842
+ //#region src/file/settings/compatibility.d.ts
1843
+ interface ICompatibilityOptions {
1844
+ readonly version?: number;
1845
+ readonly useSingleBorderforContiguousCells?: boolean;
1846
+ readonly wordPerfectJustification?: boolean;
1847
+ readonly noTabStopForHangingIndent?: boolean;
1848
+ readonly noLeading?: boolean;
1849
+ readonly spaceForUnderline?: boolean;
1850
+ readonly noColumnBalance?: boolean;
1851
+ readonly balanceSingleByteDoubleByteWidth?: boolean;
1852
+ readonly noExtraLineSpacing?: boolean;
1853
+ readonly doNotLeaveBackslashAlone?: boolean;
1854
+ readonly underlineTrailingSpaces?: boolean;
1855
+ readonly doNotExpandShiftReturn?: boolean;
1856
+ readonly spacingInWholePoints?: boolean;
1857
+ readonly lineWrapLikeWord6?: boolean;
1858
+ readonly printBodyTextBeforeHeader?: boolean;
1859
+ readonly printColorsBlack?: boolean;
1860
+ readonly spaceWidth?: boolean;
1861
+ readonly showBreaksInFrames?: boolean;
1862
+ readonly subFontBySize?: boolean;
1863
+ readonly suppressBottomSpacing?: boolean;
1864
+ readonly suppressTopSpacing?: boolean;
1865
+ readonly suppressSpacingAtTopOfPage?: boolean;
1866
+ readonly suppressTopSpacingWP?: boolean;
1867
+ readonly suppressSpBfAfterPgBrk?: boolean;
1868
+ readonly swapBordersFacingPages?: boolean;
1869
+ readonly convertMailMergeEsc?: boolean;
1870
+ readonly truncateFontHeightsLikeWP6?: boolean;
1871
+ readonly macWordSmallCaps?: boolean;
1872
+ readonly usePrinterMetrics?: boolean;
1873
+ readonly doNotSuppressParagraphBorders?: boolean;
1874
+ readonly wrapTrailSpaces?: boolean;
1875
+ readonly footnoteLayoutLikeWW8?: boolean;
1876
+ readonly shapeLayoutLikeWW8?: boolean;
1877
+ readonly alignTablesRowByRow?: boolean;
1878
+ readonly forgetLastTabAlignment?: boolean;
1879
+ readonly adjustLineHeightInTable?: boolean;
1880
+ readonly autoSpaceLikeWord95?: boolean;
1881
+ readonly noSpaceRaiseLower?: boolean;
1882
+ readonly doNotUseHTMLParagraphAutoSpacing?: boolean;
1883
+ readonly layoutRawTableWidth?: boolean;
1884
+ readonly layoutTableRowsApart?: boolean;
1885
+ readonly useWord97LineBreakRules?: boolean;
1886
+ readonly doNotBreakWrappedTables?: boolean;
1887
+ readonly doNotSnapToGridInCell?: boolean;
1888
+ readonly selectFieldWithFirstOrLastCharacter?: boolean;
1889
+ readonly applyBreakingRules?: boolean;
1890
+ readonly doNotWrapTextWithPunctuation?: boolean;
1891
+ readonly doNotUseEastAsianBreakRules?: boolean;
1892
+ readonly useWord2002TableStyleRules?: boolean;
1893
+ readonly growAutofit?: boolean;
1894
+ readonly useFELayout?: boolean;
1895
+ readonly useNormalStyleForList?: boolean;
1896
+ readonly doNotUseIndentAsNumberingTabStop?: boolean;
1897
+ readonly useAlternateEastAsianLineBreakRules?: boolean;
1898
+ readonly allowSpaceOfSameStyleInTable?: boolean;
1899
+ readonly doNotSuppressIndentation?: boolean;
1900
+ readonly doNotAutofitConstrainedTables?: boolean;
1901
+ readonly autofitToFirstFixedWidthCell?: boolean;
1902
+ readonly underlineTabInNumberingList?: boolean;
1903
+ readonly displayHangulFixedWidth?: boolean;
1904
+ readonly splitPgBreakAndParaMark?: boolean;
1905
+ readonly doNotVerticallyAlignCellWithSp?: boolean;
1906
+ readonly doNotBreakConstrainedForcedTable?: boolean;
1907
+ readonly ignoreVerticalAlignmentInTextboxes?: boolean;
1908
+ readonly useAnsiKerningPairs?: boolean;
1909
+ readonly cachedColumnBalance?: boolean;
1910
+ }
1911
+ //#endregion
1912
+ //#region src/file/settings/settings.d.ts
1913
+ interface ISettingsOptions {
1914
+ readonly compatibilityModeVersion?: number;
1915
+ readonly evenAndOddHeaders?: boolean;
1916
+ readonly trackRevisions?: boolean;
1917
+ readonly updateFields?: boolean;
1918
+ readonly compatibility?: ICompatibilityOptions;
1919
+ readonly defaultTabStop?: number;
1920
+ readonly hyphenation?: IHyphenationOptions;
1921
+ }
1922
+ interface IHyphenationOptions {
1923
+ readonly autoHyphenation?: boolean;
1924
+ readonly hyphenationZone?: number;
1925
+ readonly consecutiveHyphenLimit?: number;
1926
+ readonly doNotHyphenateCaps?: boolean;
1927
+ }
1928
+ declare class Settings extends XmlComponent {
1929
+ constructor(options: ISettingsOptions);
1930
+ }
1931
+ //#endregion
1932
+ //#region src/file/custom-properties/custom-property.d.ts
1933
+ interface ICustomPropertyOptions {
1934
+ readonly name: string;
1935
+ readonly value: string;
1936
+ }
1937
+ //#endregion
1938
+ //#region src/file/custom-properties/custom-properties.d.ts
1939
+ declare class CustomProperties extends XmlComponent {
1940
+ private nextId;
1941
+ private readonly properties;
1942
+ constructor(properties: readonly ICustomPropertyOptions[]);
1943
+ prepForXml(context: IContext): IXmlableObject | undefined;
1944
+ addCustomProperty(property: ICustomPropertyOptions): void;
1945
+ }
1946
+ //#endregion
1947
+ //#region src/file/paragraph/formatting/border.d.ts
1948
+ interface IBordersOptions {
1949
+ readonly top?: IBorderOptions;
1950
+ readonly bottom?: IBorderOptions;
1951
+ readonly left?: IBorderOptions;
1952
+ readonly right?: IBorderOptions;
1953
+ readonly between?: IBorderOptions;
1954
+ }
1955
+ declare class Border extends IgnoreIfEmptyXmlComponent {
1956
+ constructor(options: IBordersOptions);
1957
+ }
1958
+ declare class ThematicBreak extends XmlComponent {
1959
+ constructor();
1960
+ }
1961
+ //#endregion
1962
+ //#region src/file/paragraph/formatting/indent.d.ts
1963
+ interface IIndentAttributesProperties {
1964
+ readonly start?: number | UniversalMeasure;
1965
+ readonly end?: number | UniversalMeasure;
1966
+ readonly left?: number | UniversalMeasure;
1967
+ readonly right?: number | UniversalMeasure;
1968
+ readonly hanging?: number | PositiveUniversalMeasure;
1969
+ readonly firstLine?: number | PositiveUniversalMeasure;
1970
+ }
1971
+ declare const createIndent: ({
1972
+ start,
1973
+ end,
1974
+ left,
1975
+ right,
1976
+ hanging,
1977
+ firstLine
1978
+ }: IIndentAttributesProperties) => XmlComponent;
1979
+ //#endregion
1980
+ //#region src/file/paragraph/formatting/spacing.d.ts
1981
+ declare const LineRuleType: {
1982
+ readonly AT_LEAST: "atLeast";
1983
+ readonly EXACTLY: "exactly";
1984
+ readonly EXACT: "exact";
1985
+ readonly AUTO: "auto";
1986
+ };
1987
+ interface ISpacingProperties {
1988
+ readonly after?: number;
1989
+ readonly before?: number;
1990
+ readonly line?: number;
1991
+ readonly lineRule?: (typeof LineRuleType)[keyof typeof LineRuleType];
1992
+ readonly beforeAutoSpacing?: boolean;
1993
+ readonly afterAutoSpacing?: boolean;
1994
+ }
1995
+ declare const createSpacing: ({
1996
+ after,
1997
+ before,
1998
+ line,
1999
+ lineRule,
2000
+ beforeAutoSpacing,
2001
+ afterAutoSpacing
2002
+ }: ISpacingProperties) => XmlComponent;
2003
+ //#endregion
2004
+ //#region src/file/paragraph/formatting/style.d.ts
2005
+ declare const HeadingLevel: {
2006
+ readonly HEADING_1: "Heading1";
2007
+ readonly HEADING_2: "Heading2";
2008
+ readonly HEADING_3: "Heading3";
2009
+ readonly HEADING_4: "Heading4";
2010
+ readonly HEADING_5: "Heading5";
2011
+ readonly HEADING_6: "Heading6";
2012
+ readonly TITLE: "Title";
2013
+ };
2014
+ declare const createParagraphStyle: (styleId: string) => XmlComponent;
2015
+ //#endregion
2016
+ //#region src/file/paragraph/formatting/tab-stop.d.ts
2017
+ interface TabStopDefinition {
2018
+ readonly type: (typeof TabStopType)[keyof typeof TabStopType];
2019
+ readonly position: number | (typeof TabStopPosition)[keyof typeof TabStopPosition];
2020
+ readonly leader?: (typeof LeaderType)[keyof typeof LeaderType];
2021
+ }
2022
+ declare const TabStopType: {
2023
+ readonly LEFT: "left";
2024
+ readonly RIGHT: "right";
2025
+ readonly CENTER: "center";
2026
+ readonly BAR: "bar";
2027
+ readonly CLEAR: "clear";
2028
+ readonly DECIMAL: "decimal";
2029
+ readonly END: "end";
2030
+ readonly NUM: "num";
2031
+ readonly START: "start";
2032
+ };
2033
+ declare const LeaderType: {
2034
+ readonly DOT: "dot";
2035
+ readonly HYPHEN: "hyphen";
2036
+ readonly MIDDLE_DOT: "middleDot";
2037
+ readonly NONE: "none";
2038
+ readonly UNDERSCORE: "underscore";
2039
+ };
2040
+ declare const TabStopPosition: {
2041
+ readonly MAX: 9026;
2042
+ };
2043
+ declare const createTabStopItem: ({
2044
+ type,
2045
+ position,
2046
+ leader
2047
+ }: TabStopDefinition) => XmlComponent;
2048
+ declare const createTabStop: (tabDefinitions: readonly TabStopDefinition[]) => XmlComponent;
2049
+ //#endregion
2050
+ //#region src/file/paragraph/frame/frame-properties.d.ts
2051
+ declare const DropCapType: {
2052
+ readonly NONE: "none";
2053
+ readonly DROP: "drop";
2054
+ readonly MARGIN: "margin";
2055
+ };
2056
+ declare const FrameAnchorType: {
2057
+ readonly MARGIN: "margin";
2058
+ readonly PAGE: "page";
2059
+ readonly TEXT: "text";
2060
+ };
2061
+ declare const FrameWrap: {
2062
+ readonly AROUND: "around";
2063
+ readonly AUTO: "auto";
2064
+ readonly NONE: "none";
2065
+ readonly NOT_BESIDE: "notBeside";
2066
+ readonly THROUGH: "through";
2067
+ readonly TIGHT: "tight";
2068
+ };
2069
+ interface IBaseFrameOptions {
2070
+ readonly anchorLock?: boolean;
2071
+ readonly dropCap?: (typeof DropCapType)[keyof typeof DropCapType];
2072
+ readonly width: number;
2073
+ readonly height: number;
2074
+ readonly wrap?: (typeof FrameWrap)[keyof typeof FrameWrap];
2075
+ readonly lines?: number;
2076
+ readonly anchor: {
2077
+ readonly horizontal: (typeof FrameAnchorType)[keyof typeof FrameAnchorType];
2078
+ readonly vertical: (typeof FrameAnchorType)[keyof typeof FrameAnchorType];
2079
+ };
2080
+ readonly space?: {
2081
+ readonly horizontal: number;
2082
+ readonly vertical: number;
2083
+ };
2084
+ readonly rule?: (typeof HeightRule)[keyof typeof HeightRule];
2085
+ }
2086
+ type IXYFrameOptions = {
2087
+ readonly type: "absolute";
2088
+ readonly position: {
2089
+ readonly x: number;
2090
+ readonly y: number;
2091
+ };
2092
+ } & IBaseFrameOptions;
2093
+ type IAlignmentFrameOptions = {
2094
+ readonly type: "alignment";
2095
+ readonly alignment: {
2096
+ readonly x: (typeof HorizontalPositionAlign)[keyof typeof HorizontalPositionAlign];
2097
+ readonly y: (typeof VerticalPositionAlign)[keyof typeof VerticalPositionAlign];
2098
+ };
2099
+ } & IBaseFrameOptions;
2100
+ type IFrameOptions = IXYFrameOptions | IAlignmentFrameOptions;
2101
+ declare const createFrameProperties: (options: IFrameOptions) => XmlComponent;
2102
+ //#endregion
2103
+ //#region src/file/paragraph/properties.d.ts
2104
+ interface ILevelParagraphStylePropertiesOptions {
2105
+ readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType];
2106
+ readonly thematicBreak?: boolean;
2107
+ readonly contextualSpacing?: boolean;
2108
+ readonly rightTabStop?: number;
2109
+ readonly leftTabStop?: number;
2110
+ readonly indent?: IIndentAttributesProperties;
2111
+ readonly spacing?: ISpacingProperties;
2112
+ readonly keepNext?: boolean;
2113
+ readonly keepLines?: boolean;
2114
+ readonly outlineLevel?: number;
2115
+ }
2116
+ type IParagraphStylePropertiesOptions = {
2117
+ readonly border?: IBordersOptions;
2118
+ readonly shading?: IShadingAttributesProperties;
2119
+ readonly numbering?: {
2120
+ readonly reference: string;
2121
+ readonly level: number;
2122
+ readonly instance?: number;
2123
+ readonly custom?: boolean;
2124
+ } | false;
2125
+ } & ILevelParagraphStylePropertiesOptions;
2126
+ type IParagraphPropertiesOptionsBase = {
2127
+ readonly heading?: (typeof HeadingLevel)[keyof typeof HeadingLevel];
2128
+ readonly bidirectional?: boolean;
2129
+ readonly pageBreakBefore?: boolean;
2130
+ readonly tabStops?: readonly TabStopDefinition[];
2131
+ readonly style?: string;
2132
+ readonly bullet?: {
2133
+ readonly level: number;
2134
+ };
2135
+ readonly widowControl?: boolean;
2136
+ readonly frame?: IFrameOptions;
2137
+ readonly suppressLineNumbers?: boolean;
2138
+ readonly wordWrap?: boolean;
2139
+ readonly overflowPunctuation?: boolean;
2140
+ readonly scale?: number;
2141
+ readonly autoSpaceEastAsianText?: boolean;
2142
+ readonly run?: IParagraphRunOptions;
2143
+ } & IParagraphStylePropertiesOptions;
2144
+ type IParagraphPropertiesChangeOptions = IChangedAttributesProperties & IParagraphPropertiesOptionsBase;
2145
+ type IParagraphPropertiesOptions = {
2146
+ readonly revision?: IParagraphPropertiesChangeOptions;
2147
+ readonly includeIfEmpty?: boolean;
2148
+ } & IParagraphPropertiesOptionsBase;
2149
+ declare class ParagraphProperties extends IgnoreIfEmptyXmlComponent {
2150
+ private readonly numberingReferences;
2151
+ constructor(options?: IParagraphPropertiesOptions);
2152
+ push(item: XmlComponent): void;
2153
+ prepForXml(context: IContext): IXmlableObject | undefined;
2154
+ }
2155
+ declare class ParagraphPropertiesChange extends XmlComponent {
2156
+ constructor(options: IParagraphPropertiesChangeOptions);
2157
+ }
2158
+ //#endregion
2159
+ //#region src/file/numbering/level.d.ts
2160
+ declare const LevelFormat: {
2161
+ readonly DECIMAL: "decimal";
2162
+ readonly UPPER_ROMAN: "upperRoman";
2163
+ readonly LOWER_ROMAN: "lowerRoman";
2164
+ readonly UPPER_LETTER: "upperLetter";
2165
+ readonly LOWER_LETTER: "lowerLetter";
2166
+ readonly ORDINAL: "ordinal";
2167
+ readonly CARDINAL_TEXT: "cardinalText";
2168
+ readonly ORDINAL_TEXT: "ordinalText";
2169
+ readonly HEX: "hex";
2170
+ readonly CHICAGO: "chicago";
2171
+ readonly IDEOGRAPH__DIGITAL: "ideographDigital";
2172
+ readonly JAPANESE_COUNTING: "japaneseCounting";
2173
+ readonly AIUEO: "aiueo";
2174
+ readonly IROHA: "iroha";
2175
+ readonly DECIMAL_FULL_WIDTH: "decimalFullWidth";
2176
+ readonly DECIMAL_HALF_WIDTH: "decimalHalfWidth";
2177
+ readonly JAPANESE_LEGAL: "japaneseLegal";
2178
+ readonly JAPANESE_DIGITAL_TEN_THOUSAND: "japaneseDigitalTenThousand";
2179
+ readonly DECIMAL_ENCLOSED_CIRCLE: "decimalEnclosedCircle";
2180
+ readonly DECIMAL_FULL_WIDTH2: "decimalFullWidth2";
2181
+ readonly AIUEO_FULL_WIDTH: "aiueoFullWidth";
2182
+ readonly IROHA_FULL_WIDTH: "irohaFullWidth";
2183
+ readonly DECIMAL_ZERO: "decimalZero";
2184
+ readonly BULLET: "bullet";
2185
+ readonly GANADA: "ganada";
2186
+ readonly CHOSUNG: "chosung";
2187
+ readonly DECIMAL_ENCLOSED_FULLSTOP: "decimalEnclosedFullstop";
2188
+ readonly DECIMAL_ENCLOSED_PARENTHESES: "decimalEnclosedParen";
2189
+ readonly DECIMAL_ENCLOSED_CIRCLE_CHINESE: "decimalEnclosedCircleChinese";
2190
+ readonly IDEOGRAPH_ENCLOSED_CIRCLE: "ideographEnclosedCircle";
2191
+ readonly IDEOGRAPH_TRADITIONAL: "ideographTraditional";
2192
+ readonly IDEOGRAPH_ZODIAC: "ideographZodiac";
2193
+ readonly IDEOGRAPH_ZODIAC_TRADITIONAL: "ideographZodiacTraditional";
2194
+ readonly TAIWANESE_COUNTING: "taiwaneseCounting";
2195
+ readonly IDEOGRAPH_LEGAL_TRADITIONAL: "ideographLegalTraditional";
2196
+ readonly TAIWANESE_COUNTING_THOUSAND: "taiwaneseCountingThousand";
2197
+ readonly TAIWANESE_DIGITAL: "taiwaneseDigital";
2198
+ readonly CHINESE_COUNTING: "chineseCounting";
2199
+ readonly CHINESE_LEGAL_SIMPLIFIED: "chineseLegalSimplified";
2200
+ readonly CHINESE_COUNTING_THOUSAND: "chineseCountingThousand";
2201
+ readonly KOREAN_DIGITAL: "koreanDigital";
2202
+ readonly KOREAN_COUNTING: "koreanCounting";
2203
+ readonly KOREAN_LEGAL: "koreanLegal";
2204
+ readonly KOREAN_DIGITAL2: "koreanDigital2";
2205
+ readonly VIETNAMESE_COUNTING: "vietnameseCounting";
2206
+ readonly RUSSIAN_LOWER: "russianLower";
2207
+ readonly RUSSIAN_UPPER: "russianUpper";
2208
+ readonly NONE: "none";
2209
+ readonly NUMBER_IN_DASH: "numberInDash";
2210
+ readonly HEBREW1: "hebrew1";
2211
+ readonly HEBREW2: "hebrew2";
2212
+ readonly ARABIC_ALPHA: "arabicAlpha";
2213
+ readonly ARABIC_ABJAD: "arabicAbjad";
2214
+ readonly HINDI_VOWELS: "hindiVowels";
2215
+ readonly HINDI_CONSONANTS: "hindiConsonants";
2216
+ readonly HINDI_NUMBERS: "hindiNumbers";
2217
+ readonly HINDI_COUNTING: "hindiCounting";
2218
+ readonly THAI_LETTERS: "thaiLetters";
2219
+ readonly THAI_NUMBERS: "thaiNumbers";
2220
+ readonly THAI_COUNTING: "thaiCounting";
2221
+ readonly BAHT_TEXT: "bahtText";
2222
+ readonly DOLLAR_TEXT: "dollarText";
2223
+ readonly CUSTOM: "custom";
2224
+ };
2225
+ declare const LevelSuffix: {
2226
+ readonly NOTHING: "nothing";
2227
+ readonly SPACE: "space";
2228
+ readonly TAB: "tab";
2229
+ };
2230
+ interface ILevelsOptions {
2231
+ readonly level: number;
2232
+ readonly format?: (typeof LevelFormat)[keyof typeof LevelFormat];
2233
+ readonly text?: string;
2234
+ readonly alignment?: (typeof AlignmentType)[keyof typeof AlignmentType];
2235
+ readonly start?: number;
2236
+ readonly suffix?: (typeof LevelSuffix)[keyof typeof LevelSuffix];
2237
+ readonly isLegalNumberingStyle?: boolean;
2238
+ readonly style?: {
2239
+ readonly run?: IRunStylePropertiesOptions;
2240
+ readonly paragraph?: ILevelParagraphStylePropertiesOptions;
2241
+ };
2242
+ }
2243
+ declare class LevelBase extends XmlComponent {
2244
+ private readonly paragraphProperties;
2245
+ private readonly runProperties;
2246
+ constructor({
2247
+ level,
2248
+ format,
2249
+ text,
2250
+ alignment,
2251
+ start,
2252
+ style,
2253
+ suffix,
2254
+ isLegalNumberingStyle
2255
+ }: ILevelsOptions);
2256
+ }
2257
+ declare class Level extends LevelBase {}
2258
+ declare class LevelForOverride extends LevelBase {}
2259
+ //#endregion
2260
+ //#region src/file/numbering/num.d.ts
2261
+ interface IOverrideLevel {
2262
+ readonly num: number;
2263
+ readonly start?: number;
2264
+ }
2265
+ interface IConcreteNumberingOptions {
2266
+ readonly numId: number;
2267
+ readonly abstractNumId: number;
2268
+ readonly reference: string;
2269
+ readonly instance: number;
2270
+ readonly overrideLevels?: readonly IOverrideLevel[];
2271
+ }
2272
+ declare class ConcreteNumbering extends XmlComponent {
2273
+ readonly numId: number;
2274
+ readonly reference: string;
2275
+ readonly instance: number;
2276
+ constructor(options: IConcreteNumberingOptions);
2277
+ }
2278
+ declare class LevelOverride extends XmlComponent {
2279
+ constructor(levelNum: number, start?: number);
2280
+ }
2281
+ //#endregion
2282
+ //#region src/file/numbering/numbering.d.ts
2283
+ interface INumberingOptions {
2284
+ readonly config: readonly {
2285
+ readonly levels: readonly ILevelsOptions[];
2286
+ readonly reference: string;
2287
+ }[];
2288
+ }
2289
+ declare class Numbering extends XmlComponent {
2290
+ private readonly abstractNumberingMap;
2291
+ private readonly concreteNumberingMap;
2292
+ private readonly referenceConfigMap;
2293
+ private readonly abstractNumUniqueNumericId;
2294
+ private readonly concreteNumUniqueNumericId;
2295
+ constructor(options: INumberingOptions);
2296
+ prepForXml(context: IContext): IXmlableObject | undefined;
2297
+ createConcreteNumberingInstance(reference: string, instance: number): void;
2298
+ get ConcreteNumbering(): readonly ConcreteNumbering[];
2299
+ get ReferenceConfig(): readonly Record<string, any>[];
2300
+ }
2301
+ //#endregion
2302
+ //#region src/file/numbering/abstract-numbering.d.ts
2303
+ declare class AbstractNumbering extends XmlComponent {
2304
+ readonly id: number;
2305
+ constructor(id: number, levelOptions: readonly ILevelsOptions[]);
2306
+ }
2307
+ //#endregion
2308
+ //#region src/file/styles/defaults/paragraph-properties.d.ts
2309
+ declare class ParagraphPropertiesDefaults extends XmlComponent {
2310
+ constructor(options?: IParagraphStylePropertiesOptions);
2311
+ }
2312
+ //#endregion
2313
+ //#region src/file/styles/defaults/run-properties.d.ts
2314
+ declare class RunPropertiesDefaults extends XmlComponent {
2315
+ constructor(options?: IRunStylePropertiesOptions);
2316
+ }
2317
+ //#endregion
2318
+ //#region src/file/styles/defaults/document-defaults.d.ts
2319
+ interface IDocumentDefaultsOptions {
2320
+ readonly paragraph?: IParagraphStylePropertiesOptions;
2321
+ readonly run?: IRunStylePropertiesOptions;
2322
+ }
2323
+ declare class DocumentDefaults extends XmlComponent {
2324
+ private readonly runPropertiesDefaults;
2325
+ private readonly paragraphPropertiesDefaults;
2326
+ constructor(options: IDocumentDefaultsOptions);
2327
+ }
2328
+ //#endregion
2329
+ //#region src/file/styles/style/style.d.ts
2330
+ interface IStyleAttributes {
2331
+ readonly type?: string;
2332
+ readonly styleId?: string;
2333
+ readonly default?: boolean;
2334
+ readonly customStyle?: string;
2335
+ }
2336
+ interface IStyleOptions {
2337
+ readonly name?: string;
2338
+ readonly basedOn?: string;
2339
+ readonly next?: string;
2340
+ readonly link?: string;
2341
+ readonly uiPriority?: number;
2342
+ readonly semiHidden?: boolean;
2343
+ readonly unhideWhenUsed?: boolean;
2344
+ readonly quickFormat?: boolean;
2345
+ }
2346
+ declare class Style extends XmlComponent {
2347
+ constructor(attributes: IStyleAttributes, options: IStyleOptions);
2348
+ }
2349
+ //#endregion
2350
+ //#region src/file/styles/style/paragraph-style.d.ts
2351
+ type IBaseParagraphStyleOptions = {
2352
+ readonly paragraph?: IParagraphStylePropertiesOptions;
2353
+ readonly run?: IRunStylePropertiesOptions;
2354
+ } & IStyleOptions;
2355
+ type IParagraphStyleOptions = {
2356
+ readonly id: string;
2357
+ } & IBaseParagraphStyleOptions;
2358
+ declare class StyleForParagraph extends Style {
2359
+ private readonly paragraphProperties;
2360
+ private readonly runProperties;
2361
+ constructor(options: IParagraphStyleOptions);
2362
+ }
2363
+ //#endregion
2364
+ //#region src/file/styles/style/character-style.d.ts
2365
+ type IBaseCharacterStyleOptions = {
2366
+ readonly run?: IRunStylePropertiesOptions;
2367
+ } & IStyleOptions;
2368
+ type ICharacterStyleOptions = {
2369
+ readonly id: string;
2370
+ } & IBaseCharacterStyleOptions;
2371
+ declare class StyleForCharacter extends Style {
2372
+ private readonly runProperties;
2373
+ constructor(options: ICharacterStyleOptions);
2374
+ }
2375
+ //#endregion
2376
+ //#region src/file/styles/factory.d.ts
2377
+ interface IDefaultStylesOptions {
2378
+ readonly document?: IDocumentDefaultsOptions;
2379
+ readonly title?: IBaseParagraphStyleOptions;
2380
+ readonly heading1?: IBaseParagraphStyleOptions;
2381
+ readonly heading2?: IBaseParagraphStyleOptions;
2382
+ readonly heading3?: IBaseParagraphStyleOptions;
2383
+ readonly heading4?: IBaseParagraphStyleOptions;
2384
+ readonly heading5?: IBaseParagraphStyleOptions;
2385
+ readonly heading6?: IBaseParagraphStyleOptions;
2386
+ readonly strong?: IBaseParagraphStyleOptions;
2387
+ readonly listParagraph?: IBaseParagraphStyleOptions;
2388
+ readonly hyperlink?: IBaseCharacterStyleOptions;
2389
+ readonly footnoteReference?: IBaseCharacterStyleOptions;
2390
+ readonly footnoteText?: IBaseParagraphStyleOptions;
2391
+ readonly footnoteTextChar?: IBaseCharacterStyleOptions;
2392
+ readonly endnoteReference?: IBaseCharacterStyleOptions;
2393
+ readonly endnoteText?: IBaseParagraphStyleOptions;
2394
+ readonly endnoteTextChar?: IBaseCharacterStyleOptions;
2395
+ }
2396
+ //#endregion
2397
+ //#region src/file/styles/styles.d.ts
2398
+ interface IStylesOptions {
2399
+ readonly default?: IDefaultStylesOptions;
2400
+ readonly initialStyles?: BaseXmlComponent;
2401
+ readonly paragraphStyles?: readonly IParagraphStyleOptions[];
2402
+ readonly characterStyles?: readonly ICharacterStyleOptions[];
2403
+ readonly importedStyles?: readonly (XmlComponent | StyleForParagraph | StyleForCharacter | ImportedXmlComponent)[];
2404
+ }
2405
+ declare class Styles extends XmlComponent {
2406
+ constructor(options: IStylesOptions);
2407
+ }
2408
+ //#endregion
2409
+ //#region src/file/core-properties/properties.d.ts
2410
+ interface IPropertiesOptions {
2411
+ readonly sections: readonly ISectionOptions[];
2412
+ readonly title?: string;
2413
+ readonly subject?: string;
2414
+ readonly creator?: string;
2415
+ readonly keywords?: string;
2416
+ readonly description?: string;
2417
+ readonly lastModifiedBy?: string;
2418
+ readonly revision?: number;
2419
+ readonly externalStyles?: string;
2420
+ readonly styles?: IStylesOptions;
2421
+ readonly numbering?: INumberingOptions;
2422
+ readonly comments?: ICommentsOptions;
2423
+ readonly footnotes?: Readonly<Record<string, {
2424
+ readonly children: readonly Paragraph[];
2425
+ }>>;
2426
+ readonly endnotes?: Readonly<Record<string, {
2427
+ readonly children: readonly Paragraph[];
2428
+ }>>;
2429
+ readonly background?: IDocumentBackgroundOptions;
2430
+ readonly features?: {
2431
+ readonly trackRevisions?: boolean;
2432
+ readonly updateFields?: boolean;
2433
+ };
2434
+ readonly compatabilityModeVersion?: number;
2435
+ readonly compatibility?: ICompatibilityOptions;
2436
+ readonly customProperties?: readonly ICustomPropertyOptions[];
2437
+ readonly evenAndOddHeaderAndFooters?: boolean;
2438
+ readonly defaultTabStop?: number;
2439
+ readonly fonts?: readonly FontOptions[];
2440
+ readonly hyphenation?: IHyphenationOptions;
2441
+ }
2442
+ declare class CoreProperties extends XmlComponent {
2443
+ constructor(options: Omit<IPropertiesOptions, "sections">);
2444
+ }
2445
+ //#endregion
2446
+ //#region src/file/endnotes-wrapper.d.ts
2447
+ declare class EndnotesWrapper implements IViewWrapper {
2448
+ private readonly endnotes;
2449
+ private readonly relationships;
2450
+ constructor();
2451
+ get View(): Endnotes;
2452
+ get Relationships(): Relationships;
2453
+ }
2454
+ //#endregion
2455
+ //#region src/file/footnotes-wrapper.d.ts
2456
+ declare class FootnotesWrapper implements IViewWrapper {
2457
+ private readonly footnotess;
2458
+ private readonly relationships;
2459
+ constructor();
2460
+ get View(): FootNotes;
2461
+ get Relationships(): Relationships;
2462
+ }
2463
+ //#endregion
2464
+ //#region src/file/header.d.ts
2465
+ interface IHeaderOptions {
2466
+ readonly children: readonly (Paragraph | Table)[];
2467
+ }
2468
+ declare class Header {
2469
+ readonly options: IHeaderOptions;
2470
+ constructor(options?: IHeaderOptions);
2471
+ }
2472
+ declare class Footer {
2473
+ readonly options: IHeaderOptions;
2474
+ constructor(options?: IHeaderOptions);
2475
+ }
2476
+ //#endregion
2477
+ //#region src/file/file.d.ts
2478
+ interface ISectionOptions {
2479
+ readonly headers?: {
2480
+ readonly default?: Header;
2481
+ readonly first?: Header;
2482
+ readonly even?: Header;
2483
+ };
2484
+ readonly footers?: {
2485
+ readonly default?: Footer;
2486
+ readonly first?: Footer;
2487
+ readonly even?: Footer;
2488
+ };
2489
+ readonly properties?: ISectionPropertiesOptions;
2490
+ readonly children: readonly FileChild[];
2491
+ }
2492
+ declare class File {
2493
+ private currentRelationshipId;
2494
+ private readonly documentWrapper;
2495
+ private readonly headers;
2496
+ private readonly footers;
2497
+ private readonly coreProperties;
2498
+ private readonly numbering;
2499
+ private readonly media;
2500
+ private readonly fileRelationships;
2501
+ private readonly footnotesWrapper;
2502
+ private readonly endnotesWrapper;
2503
+ private readonly settings;
2504
+ private readonly contentTypes;
2505
+ private readonly customProperties;
2506
+ private readonly appProperties;
2507
+ private readonly styles;
2508
+ private readonly comments;
2509
+ private readonly fontWrapper;
2510
+ constructor(options: IPropertiesOptions);
2511
+ private addSection;
2512
+ private createHeader;
2513
+ private createFooter;
2514
+ private addHeaderToDocument;
2515
+ private addFooterToDocument;
2516
+ private addDefaultRelationships;
2517
+ get Document(): DocumentWrapper;
2518
+ get Styles(): Styles;
2519
+ get CoreProperties(): CoreProperties;
2520
+ get Numbering(): Numbering;
2521
+ get Media(): Media;
2522
+ get FileRelationships(): Relationships;
2523
+ get Headers(): readonly HeaderWrapper[];
2524
+ get Footers(): readonly FooterWrapper[];
2525
+ get ContentTypes(): ContentTypes;
2526
+ get CustomProperties(): CustomProperties;
2527
+ get AppProperties(): AppProperties;
2528
+ get FootNotes(): FootnotesWrapper;
2529
+ get Endnotes(): EndnotesWrapper;
2530
+ get Settings(): Settings;
2531
+ get Comments(): Comments;
2532
+ get FontTable(): FontWrapper;
2533
+ }
2534
+ //#endregion
2535
+ //#region src/file/xml-components/xmlable-object.d.ts
2536
+ type IXmlAttribute = Readonly<Record<string, string | number | boolean>>;
2537
+ type IXmlableObject = Readonly<Record<string, any>>;
2538
+ declare const WORKAROUND3 = "";
2539
+ //#endregion
2540
+ //#region src/file/xml-components/base.d.ts
2541
+ interface IContext {
2542
+ readonly file: File;
2543
+ readonly viewWrapper: IViewWrapper;
2544
+ readonly stack: IXmlableObject[];
2545
+ }
2546
+ declare abstract class BaseXmlComponent {
2547
+ protected readonly rootKey: string;
2548
+ constructor(rootKey: string);
2549
+ abstract prepForXml(context: IContext): IXmlableObject | undefined;
2550
+ }
2551
+ //#endregion
2552
+ //#region src/file/xml-components/xml-component.d.ts
2553
+ declare const EMPTY_OBJECT: {};
2554
+ declare abstract class XmlComponent extends BaseXmlComponent {
2555
+ protected root: (BaseXmlComponent | IXmlableObject | string)[];
2556
+ constructor(rootKey: string);
2557
+ prepForXml(context: IContext): IXmlableObject | undefined;
2558
+ addChildElement(child: XmlComponent | string): XmlComponent;
2559
+ }
2560
+ declare abstract class IgnoreIfEmptyXmlComponent extends XmlComponent {
2561
+ private readonly includeIfEmpty;
2562
+ constructor(rootKey: string, includeIfEmpty?: boolean);
2563
+ prepForXml(context: IContext): IXmlableObject | undefined;
2564
+ }
2565
+ //#endregion
2566
+ //#region src/file/xml-components/default-attributes.d.ts
2567
+ type AttributeMap<T> = Record<keyof T, string>;
2568
+ type AttributeData = Record<string, boolean | number | string>;
2569
+ type AttributePayload<T> = { readonly [P in keyof T]: {
2570
+ readonly key: string;
2571
+ readonly value: T[P];
2572
+ } };
2573
+ declare abstract class XmlAttributeComponent<T extends Record<string, any>> extends BaseXmlComponent {
2574
+ private readonly root;
2575
+ protected readonly xmlKeys?: AttributeMap<T>;
2576
+ constructor(root: T);
2577
+ prepForXml(_: IContext): IXmlableObject;
2578
+ }
2579
+ declare class NextAttributeComponent<T> extends BaseXmlComponent {
2580
+ private readonly root;
2581
+ constructor(root: AttributePayload<T>);
2582
+ prepForXml(_: IContext): IXmlableObject;
2583
+ }
2584
+ //#endregion
2585
+ //#region src/file/xml-components/attributes.d.ts
2586
+ declare class Attributes extends XmlAttributeComponent<{
2587
+ readonly val?: string | number | boolean;
2588
+ readonly color?: string;
2589
+ readonly fill?: string;
2590
+ readonly space?: string;
2591
+ readonly sz?: string;
2592
+ readonly type?: string;
2593
+ readonly rsidR?: string;
2594
+ readonly rsidRPr?: string;
2595
+ readonly rsidSect?: string;
2596
+ readonly w?: string;
2597
+ readonly h?: string;
2598
+ readonly top?: string;
2599
+ readonly right?: string;
2600
+ readonly bottom?: string;
2601
+ readonly left?: string;
2602
+ readonly header?: string;
2603
+ readonly footer?: string;
2604
+ readonly gutter?: string;
2605
+ readonly linePitch?: string;
2606
+ readonly pos?: string | number;
2607
+ }> {
2608
+ protected readonly xmlKeys: {
2609
+ bottom: string;
2610
+ color: string;
2611
+ fill: string;
2612
+ footer: string;
2613
+ gutter: string;
2614
+ h: string;
2615
+ header: string;
2616
+ left: string;
2617
+ linePitch: string;
2618
+ pos: string;
2619
+ right: string;
2620
+ rsidR: string;
2621
+ rsidRPr: string;
2622
+ rsidSect: string;
2623
+ space: string;
2624
+ sz: string;
2625
+ top: string;
2626
+ type: string;
2627
+ val: string;
2628
+ w: string;
2629
+ };
2630
+ }
2631
+ //#endregion
2632
+ //#region src/file/xml-components/imported-xml-component.d.ts
2633
+ declare const convertToXmlComponent: (element: Element) => ImportedXmlComponent | string | undefined;
2634
+ declare class ImportedXmlComponent extends XmlComponent {
2635
+ static fromXmlString(importedContent: string): ImportedXmlComponent;
2636
+ constructor(rootKey: string, _attr?: any);
2637
+ push(xmlComponent: XmlComponent | string): void;
2638
+ }
2639
+ declare class ImportedRootElementAttributes extends XmlComponent {
2640
+ private readonly _attr;
2641
+ constructor(_attr: any);
2642
+ prepForXml(_: IContext): IXmlableObject;
2643
+ }
2644
+ //#endregion
2645
+ //#region src/file/xml-components/initializable-xml-component.d.ts
2646
+ declare abstract class InitializableXmlComponent extends XmlComponent {
2647
+ constructor(rootKey: string, initComponent?: InitializableXmlComponent);
2648
+ }
2649
+ //#endregion
2650
+ //#region src/file/xml-components/simple-elements.d.ts
2651
+ declare class OnOffElement extends XmlComponent {
2652
+ constructor(name: string, val?: boolean | undefined);
2653
+ }
2654
+ declare class HpsMeasureElement extends XmlComponent {
2655
+ constructor(name: string, val: number | PositiveUniversalMeasure);
2656
+ }
2657
+ declare class EmptyElement extends XmlComponent {}
2658
+ declare class StringValueElement extends XmlComponent {
2659
+ constructor(name: string, val: string);
2660
+ }
2661
+ declare const createStringElement: (name: string, value: string) => XmlComponent;
2662
+ declare class NumberValueElement extends XmlComponent {
2663
+ constructor(name: string, val: number);
2664
+ }
2665
+ declare class StringEnumValueElement<T extends string> extends XmlComponent {
2666
+ constructor(name: string, val: T);
2667
+ }
2668
+ declare class StringContainer extends XmlComponent {
2669
+ constructor(name: string, val: string);
2670
+ }
2671
+ declare class BuilderElement<T = {}> extends XmlComponent {
2672
+ constructor({
2673
+ name,
2674
+ attributes,
2675
+ children
2676
+ }: {
2677
+ readonly name: string;
2678
+ readonly attributes?: AttributePayload<T>;
2679
+ readonly children?: readonly XmlComponent[];
2680
+ });
2681
+ }
2682
+ //#endregion
2683
+ //#region src/file/paragraph/formatting/alignment.d.ts
2684
+ declare const AlignmentType: {
2685
+ readonly START: "start";
2686
+ readonly CENTER: "center";
2687
+ readonly END: "end";
2688
+ readonly BOTH: "both";
2689
+ readonly MEDIUM_KASHIDA: "mediumKashida";
2690
+ readonly DISTRIBUTE: "distribute";
2691
+ readonly NUM_TAB: "numTab";
2692
+ readonly HIGH_KASHIDA: "highKashida";
2693
+ readonly LOW_KASHIDA: "lowKashida";
2694
+ readonly THAI_DISTRIBUTE: "thaiDistribute";
2695
+ readonly LEFT: "left";
2696
+ readonly RIGHT: "right";
2697
+ readonly JUSTIFIED: "both";
2698
+ };
2699
+ declare const createAlignment: (type: (typeof AlignmentType)[keyof typeof AlignmentType]) => XmlComponent;
2700
+ //#endregion
2701
+ //#region src/file/paragraph/formatting/break.d.ts
2702
+ declare class PageBreak extends Run {
2703
+ constructor();
2704
+ }
2705
+ declare class ColumnBreak extends Run {
2706
+ constructor();
2707
+ }
2708
+ declare class PageBreakBefore extends XmlComponent {
2709
+ constructor();
2710
+ }
2711
+ //#endregion
2712
+ //#region src/file/paragraph/formatting/unordered-list.d.ts
2713
+ declare class NumberProperties extends XmlComponent {
2714
+ constructor(numberId: number | string, indentLevel: number);
2715
+ }
2716
+ //#endregion
2717
+ //#region src/file/checkbox/checkbox-util.d.ts
2718
+ interface ICheckboxSymbolProperties {
2719
+ readonly value?: string;
2720
+ readonly font?: string;
2721
+ }
2722
+ interface ICheckboxSymbolOptions {
2723
+ readonly alias?: string;
2724
+ readonly checked?: boolean;
2725
+ readonly checkedState?: ICheckboxSymbolProperties;
2726
+ readonly uncheckedState?: ICheckboxSymbolProperties;
2727
+ }
2728
+ declare class CheckBoxUtil extends XmlComponent {
2729
+ private readonly DEFAULT_UNCHECKED_SYMBOL;
2730
+ private readonly DEFAULT_CHECKED_SYMBOL;
2731
+ private readonly DEFAULT_FONT;
2732
+ constructor(options?: ICheckboxSymbolOptions);
2733
+ }
2734
+ //#endregion
2735
+ //#region src/file/checkbox/checkbox-symbol.d.ts
2736
+ declare class CheckBoxSymbolElement extends XmlComponent {
2737
+ constructor(name: string, val: string, font?: string);
2738
+ }
2739
+ //#endregion
2740
+ //#region src/file/checkbox/checkbox.d.ts
2741
+ declare class CheckBox extends XmlComponent {
2742
+ private readonly DEFAULT_UNCHECKED_SYMBOL;
2743
+ private readonly DEFAULT_CHECKED_SYMBOL;
2744
+ private readonly DEFAULT_FONT;
2745
+ constructor(options?: ICheckboxSymbolOptions);
2746
+ }
2747
+ //#endregion
2748
+ //#region src/file/paragraph/links/hyperlink.d.ts
2749
+ declare const HyperlinkType: {
2750
+ readonly INTERNAL: "INTERNAL";
2751
+ readonly EXTERNAL: "EXTERNAL";
2752
+ };
2753
+ interface IInternalHyperlinkOptions {
2754
+ readonly children: readonly ParagraphChild[];
2755
+ readonly anchor: string;
2756
+ }
2757
+ interface IExternalHyperlinkOptions {
2758
+ readonly children: readonly ParagraphChild[];
2759
+ readonly link: string;
2760
+ }
2761
+ declare class ConcreteHyperlink extends XmlComponent {
2762
+ readonly linkId: string;
2763
+ constructor(children: readonly ParagraphChild[], relationshipId: string, anchor?: string);
2764
+ }
2765
+ declare class InternalHyperlink extends ConcreteHyperlink {
2766
+ constructor(options: IInternalHyperlinkOptions);
2767
+ }
2768
+ declare class ExternalHyperlink extends XmlComponent {
2769
+ readonly options: IExternalHyperlinkOptions;
2770
+ constructor(options: IExternalHyperlinkOptions);
2771
+ }
2772
+ //#endregion
2773
+ //#region src/file/paragraph/links/bookmark.d.ts
2774
+ interface IBookmarkOptions {
2775
+ readonly id: string;
2776
+ readonly children: readonly ParagraphChild[];
2777
+ }
2778
+ declare class Bookmark {
2779
+ private readonly bookmarkUniqueNumericId;
2780
+ readonly start: BookmarkStart;
2781
+ readonly children: readonly ParagraphChild[];
2782
+ readonly end: BookmarkEnd;
2783
+ constructor(options: IBookmarkOptions);
2784
+ }
2785
+ declare class BookmarkStart extends XmlComponent {
2786
+ constructor(id: string, linkId: number);
2787
+ }
2788
+ declare class BookmarkEnd extends XmlComponent {
2789
+ constructor(linkId: number);
2790
+ }
2791
+ //#endregion
2792
+ //#region src/file/paragraph/links/numbered-item-ref.d.ts
2793
+ declare enum NumberedItemReferenceFormat {
2794
+ NONE = "none",
2795
+ RELATIVE = "relative",
2796
+ NO_CONTEXT = "no_context",
2797
+ FULL_CONTEXT = "full_context"
2798
+ }
2799
+ interface INumberedItemReferenceOptions {
2800
+ readonly hyperlink?: boolean;
2801
+ readonly referenceFormat?: NumberedItemReferenceFormat;
2802
+ }
2803
+ declare class NumberedItemReference extends SimpleField {
2804
+ constructor(bookmarkId: string, cachedValue?: string, options?: INumberedItemReferenceOptions);
2805
+ }
2806
+ //#endregion
2807
+ //#region src/file/paragraph/links/outline-level.d.ts
2808
+ declare const createOutlineLevel: (level: number) => XmlComponent;
2809
+ //#endregion
2810
+ //#region src/file/paragraph/links/pageref.d.ts
2811
+ interface IPageReferenceOptions {
2812
+ readonly hyperlink?: boolean;
2813
+ readonly useRelativePosition?: boolean;
2814
+ }
2815
+ declare class PageReference extends Run {
2816
+ constructor(bookmarkId: string, options?: IPageReferenceOptions);
2817
+ }
2818
+ //#endregion
2819
+ //#region src/file/paragraph/math/brackets/math-round-brackets.d.ts
2820
+ declare class MathRoundBrackets extends XmlComponent {
2821
+ constructor(options: {
2822
+ readonly children: readonly MathComponent[];
2823
+ });
2824
+ }
2825
+ //#endregion
2826
+ //#region src/file/paragraph/math/brackets/math-square-brackets.d.ts
2827
+ declare class MathSquareBrackets extends XmlComponent {
2828
+ constructor(options: {
2829
+ readonly children: readonly MathComponent[];
2830
+ });
2831
+ }
2832
+ //#endregion
2833
+ //#region src/file/paragraph/math/brackets/math-curly-brackets.d.ts
2834
+ declare class MathCurlyBrackets extends XmlComponent {
2835
+ constructor(options: {
2836
+ readonly children: readonly MathComponent[];
2837
+ });
2838
+ }
2839
+ //#endregion
2840
+ //#region src/file/paragraph/math/brackets/math-angled-brackets.d.ts
2841
+ interface MathAngledBracketsOptions {
2842
+ readonly children: readonly MathComponent[];
2843
+ }
2844
+ declare class MathAngledBrackets extends XmlComponent {
2845
+ constructor(options: MathAngledBracketsOptions);
2846
+ }
2847
+ //#endregion
2848
+ //#region src/file/paragraph/math/fraction/math-fraction.d.ts
2849
+ interface IMathFractionOptions {
2850
+ readonly numerator: readonly MathComponent[];
2851
+ readonly denominator: readonly MathComponent[];
2852
+ }
2853
+ declare class MathFraction extends XmlComponent {
2854
+ constructor(options: IMathFractionOptions);
2855
+ }
2856
+ //#endregion
2857
+ //#region src/file/paragraph/math/fraction/math-denominator.d.ts
2858
+ declare class MathDenominator extends XmlComponent {
2859
+ constructor(children: readonly MathComponent[]);
2860
+ }
2861
+ //#endregion
2862
+ //#region src/file/paragraph/math/fraction/math-numerator.d.ts
2863
+ declare class MathNumerator extends XmlComponent {
2864
+ constructor(children: readonly MathComponent[]);
2865
+ }
2866
+ //#endregion
2867
+ //#region src/file/paragraph/math/function/math-function.d.ts
2868
+ interface IMathFunctionOptions {
2869
+ readonly children: readonly MathComponent[];
2870
+ readonly name: readonly MathComponent[];
2871
+ }
2872
+ declare class MathFunction extends XmlComponent {
2873
+ constructor(options: IMathFunctionOptions);
2874
+ }
2875
+ //#endregion
2876
+ //#region src/file/paragraph/math/function/math-function-name.d.ts
2877
+ declare class MathFunctionName extends XmlComponent {
2878
+ constructor(children: readonly MathComponent[]);
2879
+ }
2880
+ //#endregion
2881
+ //#region src/file/paragraph/math/function/math-function-properties.d.ts
2882
+ declare class MathFunctionProperties extends XmlComponent {
2883
+ constructor();
2884
+ }
2885
+ //#endregion
2886
+ //#region src/file/paragraph/math/math-run.d.ts
2887
+ declare class MathRun extends XmlComponent {
2888
+ constructor(text: string);
2889
+ }
2890
+ //#endregion
2891
+ //#region src/file/paragraph/math/n-ary/math-accent-character.d.ts
2892
+ interface MathAccentCharacterOptions {
2893
+ readonly accent: string;
2894
+ }
2895
+ declare const createMathAccentCharacter: ({
2896
+ accent
2897
+ }: MathAccentCharacterOptions) => XmlComponent;
2898
+ //#endregion
2899
+ //#region src/file/paragraph/math/n-ary/math-base.d.ts
2900
+ interface MathBaseOptions {
2901
+ readonly children: readonly MathComponent[];
2902
+ }
2903
+ declare const createMathBase: ({
2904
+ children
2905
+ }: MathBaseOptions) => XmlComponent;
2906
+ //#endregion
2907
+ //#region src/file/paragraph/math/n-ary/math-limit-location.d.ts
2908
+ interface MathLimitLocationOptions {
2909
+ readonly value?: string;
2910
+ }
2911
+ declare const createMathLimitLocation: ({
2912
+ value
2913
+ }: MathLimitLocationOptions) => XmlComponent;
2914
+ //#endregion
2915
+ //#region src/file/paragraph/math/n-ary/math-n-ary-properties.d.ts
2916
+ interface MathNAryPropertiesOptions {
2917
+ readonly accent: string;
2918
+ readonly hasSuperScript: boolean;
2919
+ readonly hasSubScript: boolean;
2920
+ readonly limitLocationVal?: string;
2921
+ }
2922
+ declare const createMathNAryProperties: ({
2923
+ accent,
2924
+ hasSuperScript,
2925
+ hasSubScript,
2926
+ limitLocationVal
2927
+ }: MathNAryPropertiesOptions) => XmlComponent;
2928
+ //#endregion
2929
+ //#region src/file/paragraph/math/n-ary/math-sub-script.d.ts
2930
+ interface MathSubScriptElementOptions {
2931
+ readonly children: readonly MathComponent[];
2932
+ }
2933
+ declare const createMathSubScriptElement: ({
2934
+ children
2935
+ }: MathSubScriptElementOptions) => XmlComponent;
2936
+ //#endregion
2937
+ //#region src/file/paragraph/math/n-ary/math-sum.d.ts
2938
+ interface IMathSumOptions {
2939
+ readonly children: readonly MathComponent[];
2940
+ readonly subScript?: readonly MathComponent[];
2941
+ readonly superScript?: readonly MathComponent[];
2942
+ }
2943
+ declare class MathSum extends XmlComponent {
2944
+ constructor(options: IMathSumOptions);
2945
+ }
2946
+ //#endregion
2947
+ //#region src/file/paragraph/math/n-ary/math-integral.d.ts
2948
+ interface IMathIntegralOptions {
2949
+ readonly children: readonly MathComponent[];
2950
+ readonly subScript?: readonly MathComponent[];
2951
+ readonly superScript?: readonly MathComponent[];
2952
+ }
2953
+ declare class MathIntegral extends XmlComponent {
2954
+ constructor(options: IMathIntegralOptions);
2955
+ }
2956
+ //#endregion
2957
+ //#region src/file/paragraph/math/n-ary/math-super-script.d.ts
2958
+ interface MathSuperScriptElementOptions {
2959
+ readonly children: readonly MathComponent[];
2960
+ }
2961
+ declare const createMathSuperScriptElement: ({
2962
+ children
2963
+ }: MathSuperScriptElementOptions) => XmlComponent;
2964
+ //#endregion
2965
+ //#region src/file/paragraph/math/n-ary/math-limit.d.ts
2966
+ declare class MathLimit extends XmlComponent {
2967
+ constructor(children: readonly MathComponent[]);
2968
+ }
2969
+ //#endregion
2970
+ //#region src/file/paragraph/math/n-ary/math-limit-upper.d.ts
2971
+ interface IMathLimitUpperOptions {
2972
+ readonly children: readonly MathComponent[];
2973
+ readonly limit: readonly MathComponent[];
2974
+ }
2975
+ declare class MathLimitUpper extends XmlComponent {
2976
+ constructor(options: IMathLimitUpperOptions);
2977
+ }
2978
+ //#endregion
2979
+ //#region src/file/paragraph/math/n-ary/math-limit-lower.d.ts
2980
+ interface IMathLimitLowerOptions {
2981
+ readonly children: readonly MathComponent[];
2982
+ readonly limit: readonly MathComponent[];
2983
+ }
2984
+ declare class MathLimitLower extends XmlComponent {
2985
+ constructor(options: IMathLimitLowerOptions);
2986
+ }
2987
+ //#endregion
2988
+ //#region src/file/paragraph/math/radical/math-degree.d.ts
2989
+ declare class MathDegree extends XmlComponent {
2990
+ constructor(children?: readonly MathComponent[]);
2991
+ }
2992
+ //#endregion
2993
+ //#region src/file/paragraph/math/radical/math-radical.d.ts
2994
+ interface IMathRadicalOptions {
2995
+ readonly children: readonly MathComponent[];
2996
+ readonly degree?: readonly MathComponent[];
2997
+ }
2998
+ declare class MathRadical extends XmlComponent {
2999
+ constructor(options: IMathRadicalOptions);
3000
+ }
3001
+ //#endregion
3002
+ //#region src/file/paragraph/math/radical/math-radical-properties.d.ts
3003
+ declare class MathRadicalProperties extends XmlComponent {
3004
+ constructor(hasDegree: boolean);
3005
+ }
3006
+ //#endregion
3007
+ //#region src/file/paragraph/math/script/super-script/math-super-script-function.d.ts
3008
+ interface IMathSuperScriptOptions {
3009
+ readonly children: readonly MathComponent[];
3010
+ readonly superScript: readonly MathComponent[];
3011
+ }
3012
+ declare class MathSuperScript extends XmlComponent {
3013
+ constructor(options: IMathSuperScriptOptions);
3014
+ }
3015
+ //#endregion
3016
+ //#region src/file/paragraph/math/script/super-script/math-super-script-function-properties.d.ts
3017
+ declare const createMathSuperScriptProperties: () => XmlComponent;
3018
+ //#endregion
3019
+ //#region src/file/paragraph/math/script/sub-script/math-sub-script-function.d.ts
3020
+ interface IMathSubScriptOptions {
3021
+ readonly children: readonly MathComponent[];
3022
+ readonly subScript: readonly MathComponent[];
3023
+ }
3024
+ declare class MathSubScript extends XmlComponent {
3025
+ constructor(options: IMathSubScriptOptions);
3026
+ }
3027
+ //#endregion
3028
+ //#region src/file/paragraph/math/script/sub-script/math-sub-script-function-properties.d.ts
3029
+ declare const createMathSubScriptProperties: () => XmlComponent;
3030
+ //#endregion
3031
+ //#region src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function.d.ts
3032
+ interface IMathSubSuperScriptOptions {
3033
+ readonly children: readonly MathComponent[];
3034
+ readonly subScript: readonly MathComponent[];
3035
+ readonly superScript: readonly MathComponent[];
3036
+ }
3037
+ declare class MathSubSuperScript extends XmlComponent {
3038
+ constructor(options: IMathSubSuperScriptOptions);
3039
+ }
3040
+ //#endregion
3041
+ //#region src/file/paragraph/math/script/sub-super-script/math-sub-super-script-function-properties.d.ts
3042
+ declare const createMathSubSuperScriptProperties: () => XmlComponent;
3043
+ //#endregion
3044
+ //#region src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function.d.ts
3045
+ interface IMathPreSubSuperScriptOptions {
3046
+ readonly children: readonly MathComponent[];
3047
+ readonly subScript: readonly MathComponent[];
3048
+ readonly superScript: readonly MathComponent[];
3049
+ }
3050
+ declare class MathPreSubSuperScript extends BuilderElement {
3051
+ constructor({
3052
+ children,
3053
+ subScript,
3054
+ superScript
3055
+ }: IMathPreSubSuperScriptOptions);
3056
+ }
3057
+ //#endregion
3058
+ //#region src/file/paragraph/math/script/pre-sub-super-script/math-pre-sub-super-script-function-properties.d.ts
3059
+ declare const createMathPreSubSuperScriptProperties: () => XmlComponent;
3060
+ //#endregion
3061
+ //#region src/file/paragraph/math/math-component.d.ts
3062
+ type MathComponent = MathRun | MathFraction | MathSum | MathIntegral | MathSuperScript | MathSubScript | MathSubSuperScript | MathRadical | MathFunction | MathRoundBrackets | MathCurlyBrackets | MathAngledBrackets | MathSquareBrackets;
3063
+ declare const WORKAROUND4 = "";
3064
+ //#endregion
3065
+ //#region src/file/paragraph/math/math.d.ts
3066
+ interface IMathOptions {
3067
+ readonly children: readonly MathComponent[];
3068
+ }
3069
+ declare class Math extends XmlComponent {
3070
+ constructor(options: IMathOptions);
3071
+ }
3072
+ //#endregion
3073
+ //#region src/file/paragraph/paragraph.d.ts
3074
+ type ParagraphChild = TextRun | ImageRun | SymbolRun | Bookmark | PageBreak | ColumnBreak | SequentialIdentifier | FootnoteReferenceRun | InternalHyperlink | ExternalHyperlink | InsertedTextRun | DeletedTextRun | Math | SimpleField | SimpleMailMergeField | Comments | Comment | CommentRangeStart | CommentRangeEnd | CommentReference | CheckBox;
3075
+ type IParagraphOptions = {
3076
+ readonly text?: string;
3077
+ readonly children?: readonly ParagraphChild[];
3078
+ } & IParagraphPropertiesOptions;
3079
+ declare class Paragraph extends FileChild {
3080
+ private readonly properties;
3081
+ constructor(options: string | IParagraphOptions);
3082
+ prepForXml(context: IContext): IXmlableObject | undefined;
3083
+ addRunToFront(run: Run): Paragraph;
3084
+ }
3085
+ //#endregion
3086
+ //#region src/file/shared/space-type.d.ts
3087
+ declare const SpaceType: {
3088
+ readonly DEFAULT: "default";
3089
+ readonly PRESERVE: "preserve";
3090
+ };
3091
+ //#endregion
3092
+ //#region src/file/textbox/types.d.ts
3093
+ type LengthUnit = "auto" | number | Percentage | UniversalMeasure | RelativeMeasure;
3094
+ //#endregion
3095
+ //#region src/file/textbox/shape/shape.d.ts
3096
+ interface VmlShapeStyle {
3097
+ readonly flip?: "x" | "y" | "xy" | "yx";
3098
+ readonly height?: LengthUnit;
3099
+ readonly left?: LengthUnit;
3100
+ readonly marginBottom?: LengthUnit;
3101
+ readonly marginLeft?: LengthUnit;
3102
+ readonly marginRight?: LengthUnit;
3103
+ readonly marginTop?: LengthUnit;
3104
+ readonly positionHorizontal?: "absolute" | "left" | "center" | "right" | "inside" | "outside";
3105
+ readonly positionHorizontalRelative?: "margin" | "page" | "text" | "char";
3106
+ readonly positionVertical?: "absolute" | "left" | "center" | "right" | "inside" | "outside";
3107
+ readonly positionVerticalRelative?: "margin" | "page" | "text" | "char";
3108
+ readonly wrapDistanceBottom?: number;
3109
+ readonly wrapDistanceLeft?: number;
3110
+ readonly wrapDistanceRight?: number;
3111
+ readonly wrapDistanceTop?: number;
3112
+ readonly wrapEdited?: boolean;
3113
+ readonly wrapStyle?: "square" | "none";
3114
+ readonly position?: "static" | "absolute" | "relative";
3115
+ readonly rotation?: number;
3116
+ readonly top?: LengthUnit;
3117
+ readonly visibility?: "hidden" | "inherit";
3118
+ readonly width: LengthUnit;
3119
+ readonly zIndex?: "auto" | number;
3120
+ }
3121
+ //#endregion
3122
+ //#region src/file/textbox/textbox.d.ts
3123
+ type ITextboxOptions = Omit<IParagraphOptions, "style"> & {
3124
+ readonly style?: VmlShapeStyle;
3125
+ };
3126
+ declare class Textbox extends FileChild {
3127
+ constructor({
3128
+ style,
3129
+ children,
3130
+ ...rest
3131
+ }: ITextboxOptions);
3132
+ }
3133
+ //#endregion
3134
+ //#region src/util/output-type.d.ts
3135
+ interface OutputByType {
3136
+ readonly base64: string;
3137
+ readonly string: string;
3138
+ readonly text: string;
3139
+ readonly binarystring: string;
3140
+ readonly array: readonly number[];
3141
+ readonly uint8array: Uint8Array;
3142
+ readonly arraybuffer: ArrayBuffer;
3143
+ readonly blob: Blob;
3144
+ readonly nodebuffer: Buffer;
3145
+ }
3146
+ type OutputType = keyof OutputByType;
3147
+ declare const convertOutput: <T extends OutputType>(data: Uint8Array, type: T) => OutputByType[T];
3148
+ //#endregion
3149
+ //#region src/export/packer/next-compiler.d.ts
3150
+ interface IXmlifyedFile {
3151
+ readonly data: string;
3152
+ readonly path: string;
3153
+ }
3154
+ //#endregion
3155
+ //#region src/export/packer/packer.d.ts
3156
+ declare const PrettifyType: {
3157
+ readonly NONE: "";
3158
+ readonly WITH_2_BLANKS: " ";
3159
+ readonly WITH_4_BLANKS: " ";
3160
+ readonly WITH_TAB: "\t";
3161
+ };
3162
+ declare class Packer {
3163
+ static pack<T extends OutputType>(file: File, type: T, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType], overrides?: readonly IXmlifyedFile[]): Promise<OutputByType[T]>;
3164
+ static toString(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType], overrides?: readonly IXmlifyedFile[]): Promise<string>;
3165
+ static toBuffer(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType], overrides?: readonly IXmlifyedFile[]): Promise<Buffer>;
3166
+ static toBase64String(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType], overrides?: readonly IXmlifyedFile[]): Promise<string>;
3167
+ static toBlob(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType], overrides?: readonly IXmlifyedFile[]): Promise<Blob>;
3168
+ static toArrayBuffer(file: File, prettify?: boolean | (typeof PrettifyType)[keyof typeof PrettifyType], overrides?: readonly IXmlifyedFile[]): Promise<ArrayBuffer>;
3169
+ private static readonly compiler;
3170
+ }
3171
+ //#endregion
3172
+ //#region src/util/convenience-functions.d.ts
3173
+ declare const convertMillimetersToTwip: (millimeters: number) => number;
3174
+ declare const convertInchesToTwip: (inches: number) => number;
3175
+ type UniqueNumericIdCreator = () => number;
3176
+ declare const uniqueNumericIdCreator: (initial?: number) => UniqueNumericIdCreator;
3177
+ declare const abstractNumUniqueNumericIdGen: () => UniqueNumericIdCreator;
3178
+ declare const concreteNumUniqueNumericIdGen: () => UniqueNumericIdCreator;
3179
+ declare const docPropertiesUniqueNumericIdGen: () => UniqueNumericIdCreator;
3180
+ declare const bookmarkUniqueNumericIdGen: () => UniqueNumericIdCreator;
3181
+ declare const uniqueId: () => string;
3182
+ declare const hashedId: (data: Buffer | string | Uint8Array | ArrayBuffer) => string;
3183
+ declare const uniqueUuid: () => string;
3184
+ declare const encodeUtf8: (str: string) => Uint8Array;
3185
+ //#endregion
3186
+ //#region src/patcher/from-docx.d.ts
3187
+ type InputDataType = Buffer | string | number[] | Uint8Array | ArrayBuffer | Blob;
3188
+ declare const PatchType: {
3189
+ readonly DOCUMENT: "file";
3190
+ readonly PARAGRAPH: "paragraph";
3191
+ };
3192
+ interface ParagraphPatch {
3193
+ readonly type: typeof PatchType.PARAGRAPH;
3194
+ readonly children: readonly ParagraphChild[];
3195
+ }
3196
+ interface FilePatch {
3197
+ readonly type: typeof PatchType.DOCUMENT;
3198
+ readonly children: readonly FileChild[];
3199
+ }
3200
+ type IPatch = ParagraphPatch | FilePatch;
3201
+ type PatchDocumentOutputType = OutputType;
3202
+ interface PatchDocumentOptions<T extends PatchDocumentOutputType = PatchDocumentOutputType> {
3203
+ readonly outputType: T;
3204
+ readonly data: InputDataType;
3205
+ readonly patches: Readonly<Record<string, IPatch>>;
3206
+ readonly keepOriginalStyles?: boolean;
3207
+ readonly placeholderDelimiters?: Readonly<{
3208
+ readonly start: string;
3209
+ readonly end: string;
3210
+ }>;
3211
+ readonly recursive?: boolean;
3212
+ }
3213
+ declare const patchDocument: <T extends PatchDocumentOutputType = PatchDocumentOutputType>({
3214
+ outputType,
3215
+ data,
3216
+ patches,
3217
+ keepOriginalStyles,
3218
+ placeholderDelimiters,
3219
+ recursive
3220
+ }: PatchDocumentOptions<T>) => Promise<OutputByType[T]>;
3221
+ //#endregion
3222
+ //#region src/patcher/patch-detector.d.ts
3223
+ interface PatchDetectorOptions {
3224
+ readonly data: InputDataType;
3225
+ }
3226
+ declare const patchDetector: ({
3227
+ data
3228
+ }: PatchDetectorOptions) => Promise<readonly string[]>;
3229
+ //#endregion
3230
+ export { AbstractNumbering, AlignmentType, AnnotationReference, AttributeData, AttributeMap, AttributePayload, Attributes, BaseXmlComponent, Body, Bookmark, BookmarkEnd, BookmarkStart, Border, BorderStyle, BuilderElement, CarriageReturn, CellMerge, CellMergeAttributes, CharacterSet, CheckBox, CheckBoxSymbolElement, CheckBoxUtil, Column, ColumnBreak, Comment, CommentRangeEnd, CommentRangeStart, CommentReference, Comments, ConcreteHyperlink, ConcreteNumbering, ContinuationSeparator, DayLong, DayShort, DeletedTableCell, DeletedTableRow, DeletedTextRun, File as Document, File, DocumentAttributeNamespace, DocumentAttributeNamespaces, DocumentAttributes, DocumentBackground, DocumentBackgroundAttributes, DocumentDefaults, DocumentGridType, Drawing, DropCapType, EMPTY_OBJECT, EmphasisMarkType, EmptyElement, EndnoteIdReference, EndnoteReference, EndnoteReferenceRun, EndnoteReferenceRunAttributes, Endnotes, ExternalHyperlink, FileChild, FootNoteReferenceRunAttributes, FootNotes, Footer, FooterWrapper, FootnoteReference, FootnoteReferenceElement, FootnoteReferenceRun, FrameAnchorType, FrameWrap, GridSpan, Header, HeaderFooterReferenceType, HeaderFooterType, HeaderWrapper, HeadingLevel, HeightRule, HighlightColor, HorizontalPositionAlign, HorizontalPositionRelativeFrom, HpsMeasureElement, HyperlinkType, IAlignmentFrameOptions, IBaseCharacterStyleOptions, IBaseParagraphStyleOptions, IBodyPropertiesOptions, IBookmarkOptions, IBorderOptions, IBordersOptions, ICellMergeAttributes, ICharacterStyleOptions, ICheckboxSymbolOptions, ICheckboxSymbolProperties, IColumnAttributes, IColumnsAttributes, ICommentOptions, ICommentsOptions, IConcreteNumberingOptions, IContext, IDistance, IDocGridAttributesProperties, IDocumentAttributesProperties, IDocumentBackgroundOptions, IDocumentDefaultsOptions, IDocumentFooter, IDocumentHeader, IDocumentOptions, IDrawingOptions, IExtendedMediaData, IExternalHyperlinkOptions, IFloating, IFontAttributesProperties, IFrameOptions, IGroupChildMediaData, IHeaderFooterGroup, IHeaderFooterOptions, IHeaderOptions, IHorizontalPositionOptions, IImageOptions, IIndentAttributesProperties, IInternalHyperlinkOptions, ILevelParagraphStylePropertiesOptions, ILevelsOptions, ILineNumberAttributes, IMargins, IMathFractionOptions, IMathFunctionOptions, IMathIntegralOptions, IMathLimitLowerOptions, IMathLimitUpperOptions, IMathOptions, IMathPreSubSuperScriptOptions, IMathRadicalOptions, IMathSubScriptOptions, IMathSubSuperScriptOptions, IMathSumOptions, IMathSuperScriptOptions, IMediaData, IMediaDataTransformation, IMediaTransformation, INumberedItemReferenceOptions, INumberingOptions, IPageBorderAttributes, IPageBordersOptions, IPageMarginAttributes, IPageNumberTypeAttributes, IPageReferenceOptions, IPageSizeAttributes, IParagraphOptions, IParagraphPropertiesChangeOptions, IParagraphPropertiesOptions, IParagraphPropertiesOptionsBase, IParagraphRunOptions, IParagraphRunPropertiesOptions, IParagraphStyleOptions, IParagraphStylePropertiesOptions, IPatch, type IPropertiesOptions, IRunOptions, IRunPropertiesChangeOptions, IRunPropertiesOptions, IRunStylePropertiesOptions, ISectionOptions, ISectionPropertiesChangeOptions, ISectionPropertiesOptions, ISectionPropertiesOptionsBase, IShadingAttributesProperties, ISpacingProperties, IStylesOptions, ISymbolRunOptions, ITableBordersOptions, ITableCellBorders, ITableCellOptions, ITableFloatOptions, ITableLookOptions, ITableOfContentsOptions, ITableOptions, ITablePropertiesChangeOptions, ITablePropertiesOptions, ITablePropertiesOptionsBase, ITableRowOptions, ITableRowPropertiesChangeOptions, ITableRowPropertiesOptions, ITableRowPropertiesOptionsBase, ITableWidthProperties, ITextWrapping, IVerticalPositionOptions, IWpgGroupOptions, IWpsShapeOptions, IXYFrameOptions, IXmlAttribute, IXmlableObject, IgnoreIfEmptyXmlComponent, ImageRun, ImportedRootElementAttributes, ImportedXmlComponent, InitializableXmlComponent, InputDataType, InsertedTableCell, InsertedTableRow, InsertedTextRun, InternalHyperlink, LastRenderedPageBreak, LeaderType, Level, LevelBase, LevelForOverride, LevelFormat, LevelOverride, LevelSuffix, LineNumberRestartFormat, LineRuleType, Math, MathAngledBrackets, MathComponent, MathCurlyBrackets, MathDegree, MathDenominator, MathFraction, MathFunction, MathFunctionName, MathFunctionProperties, MathIntegral, MathLimit, MathLimitLower, MathLimitUpper, MathNumerator, MathPreSubSuperScript, MathRadical, MathRadicalProperties, MathRoundBrackets, MathRun, MathSquareBrackets, MathSubScript, MathSubSuperScript, MathSum, MathSuperScript, Media, MonthLong, MonthShort, NextAttributeComponent, NoBreakHyphen, NumberFormat, NumberProperties, NumberValueElement, NumberedItemReference, NumberedItemReferenceFormat, Numbering, OnOffElement, OutputByType, OutputType, OverlapType, Packer, PageBorderDisplay, PageBorderOffsetFrom, PageBorderZOrder, PageBorders, PageBreak, PageBreakBefore, PageNumber, PageNumberElement, PageNumberSeparator, PageOrientation, PageReference, PageTextDirection, PageTextDirectionType, Paragraph, ParagraphChild, ParagraphProperties, ParagraphPropertiesChange, ParagraphPropertiesDefaults, ParagraphRunProperties, PatchDocumentOptions, PatchDocumentOutputType, PatchType, Percentage, PositionalTab, PositionalTabAlignment, PositionalTabLeader, PositionalTabOptions, PositionalTabRelativeTo, PositivePercentage, PositiveUniversalMeasure, PrettifyType, RelativeHorizontalPosition, RelativeMeasure, RelativeVerticalPosition, Run, RunProperties, RunPropertiesChange, RunPropertiesDefaults, SectionProperties, SectionPropertiesChange, SectionType, SectionVerticalAlign, Separator, SequentialIdentifier, ShadingType, SimpleField, SimpleMailMergeField, SoftHyphen, SpaceType, StringContainer, StringEnumValueElement, StringValueElement, StyleForCharacter, StyleForParagraph, StyleLevel, Styles, SymbolRun, TDirection, Tab, TabStopDefinition, TabStopPosition, TabStopType, Table, TableAnchorType, TableBorders, TableCell, TableCellBorders, TableLayoutType, TableOfContents, TableProperties, TableRow, TableRowProperties, TableRowPropertiesChange, TableVerticalAlign, TextDirection, TextEffect, TextRun, TextWrappingSide, TextWrappingType, Textbox, ThematicBreak, UnderlineType, UniqueNumericIdCreator, UniversalMeasure, VerticalAlign, VerticalAlignSection, VerticalAlignTable, VerticalAnchor, VerticalMerge, VerticalMergeRevisionType, VerticalMergeType, VerticalPositionAlign, VerticalPositionRelativeFrom, WORKAROUND2, WORKAROUND3, WORKAROUND4, WidthType, WpgCommonMediaData, WpgGroupRun, WpgMediaData, WpsMediaData, WpsShapeRun, XmlAttributeComponent, XmlComponent, YearLong, YearShort, abstractNumUniqueNumericIdGen, bookmarkUniqueNumericIdGen, concreteNumUniqueNumericIdGen, convertInchesToTwip, convertMillimetersToTwip, convertOutput, convertToXmlComponent, createAlignment, createBodyProperties, createBorderElement, createColumns, createDocumentGrid, createDotEmphasisMark, createEmphasisMark, createFrameProperties, createHeaderFooterReference, createHorizontalPosition, createIndent, createLineNumberType, createMathAccentCharacter, createMathBase, createMathLimitLocation, createMathNAryProperties, createMathPreSubSuperScriptProperties, createMathSubScriptElement, createMathSubScriptProperties, createMathSubSuperScriptProperties, createMathSuperScriptElement, createMathSuperScriptProperties, createOutlineLevel, createPageMargin, createPageNumberType, createPageSize, createParagraphStyle, createRunFonts, createSectionType, createShading, createSimplePos, createSpacing, createStringElement, createTabStop, createTabStopItem, createTableFloatProperties, createTableLayout, createTableLook, createTableRowHeight, createTableWidthElement, createTransformation, createUnderline, createVerticalAlign, createVerticalPosition, createWrapNone, createWrapSquare, createWrapTight, createWrapTopAndBottom, dateTimeValue, decimalNumber, docPropertiesUniqueNumericIdGen, eighthPointMeasureValue, encodeUtf8, hashedId, hexColorValue, hpsMeasureValue, longHexNumber, measurementOrPercentValue, patchDetector, patchDocument, percentageValue, pointMeasureValue, positiveUniversalMeasureValue, sectionMarginDefaults, sectionPageSizeDefaults, shortHexNumber, signedHpsMeasureValue, signedTwipsMeasureValue, standardizeData, twipsMeasureValue, uCharHexNumber, uniqueId, uniqueNumericIdCreator, uniqueUuid, universalMeasureValue, unsignedDecimalNumber };