docx-plus 0.0.0 → 0.0.2

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