docx-wasm 0.4.18-rc48 → 0.4.18-rc49

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.
@@ -1,2575 +1,866 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * @param {number} id
5
- * @returns {Comment}
6
- */
7
- export function createComment(id: number): Comment;
8
- /**
9
- * @returns {FrameProperty}
10
- */
11
- export function createFrameProperty(): FrameProperty;
12
- /**
13
- * @param {number} level
14
- * @returns {LevelOverride}
15
- */
3
+ export function createDelete(run: Run): Delete;
16
4
  export function createLevelOverride(level: number): LevelOverride;
17
- /**
18
- * @returns {ParagraphPropertyChange}
19
- */
20
- export function createParagraphPropertyChange(): ParagraphPropertyChange;
21
- /**
22
- * @returns {ParagraphProperty}
23
- */
24
- export function createParagraphProperty(): ParagraphProperty;
25
- /**
26
- * @param {string} id
27
- * @param {string} reference_id
28
- * @param {string} version
29
- * @param {string} store
30
- * @param {string} store_type
31
- * @returns {WebExtension}
32
- */
5
+ export function createPositionalTab(alignment: PositionalTabAlignmentType, relative_to: PositionalTabRelativeTo, leader: TabLeaderType): PositionalTab;
6
+ export function createTableOfContents(): TableOfContents;
7
+ export function createTableOfContentsWithInstrText(s: string): TableOfContents;
8
+ export function createTableOfContentsItem(): TableOfContentsItem;
33
9
  export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
34
- /**
35
- * @param {Uint8Array} buf
36
- * @returns {Pic}
37
- */
38
- export function createPic(buf: Uint8Array): Pic;
39
- /**
40
- * @param {Uint8Array} buf
41
- * @returns {string}
42
- */
43
- export function readDocx(buf: Uint8Array): string;
44
- /**
45
- * @returns {PageNum}
46
- */
47
- export function createPageNum(): PageNum;
48
- /**
49
- * @returns {Docx}
50
- */
51
- export function createDocx(): Docx;
52
- /**
53
- * @returns {Footer}
54
- */
55
- export function createFooter(): Footer;
56
- /**
57
- * @param {string} v
58
- * @param {number} t
59
- * @returns {Hyperlink}
60
- */
61
- export function createHyperlink(v: string, t: number): Hyperlink;
62
- /**
63
- * @param {Run} run
64
- * @returns {Insert}
65
- */
66
- export function createInsert(run: Run): Insert;
67
- /**
68
- * @returns {PageMargin}
69
- */
70
- export function createPageMargin(): PageMargin;
71
- /**
72
- * @returns {Paragraph}
73
- */
10
+ export function createNumPages(): NumPages;
74
11
  export function createParagraph(): Paragraph;
75
- /**
76
- * @param {number} id
77
- * @param {number} abstract_num_id
78
- * @returns {Numbering}
79
- */
80
- export function createNumbering(id: number, abstract_num_id: number): Numbering;
81
- /**
82
- * @returns {RunProperty}
83
- */
84
- export function createRunProperty(): RunProperty;
85
- /**
86
- * @returns {Table}
87
- */
12
+ export function createFrameProperty(): FrameProperty;
13
+ export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
14
+ export function createPageMargin(): PageMargin;
15
+ export function createTableCell(): TableCell;
16
+ export function createLineSpacing(): LineSpacing;
88
17
  export function createTable(): Table;
89
- /**
90
- * @returns {TablePositionProperty}
91
- */
18
+ export function createPageNum(): PageNum;
19
+ export function createRunFonts(): RunFonts;
20
+ export function createRunProperty(): RunProperty;
92
21
  export function createTablePosition(): TablePositionProperty;
93
- /**
94
- * @returns {TableRow}
95
- */
22
+ export function createStyle(style_id: string, style_type: StyleType): Style;
23
+ export function createHeader(): Header;
24
+ export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
25
+ export function readDocx(buf: Uint8Array): string;
96
26
  export function createTableRow(): TableRow;
97
- /**
98
- * @param {number} id
99
- * @returns {AbstractNumbering}
100
- */
101
27
  export function createAbstractNumbering(id: number): AbstractNumbering;
102
- /**
103
- * @param {number} id
104
- * @param {number} start
105
- * @param {string} format
106
- * @param {string} text
107
- * @param {string} jc
108
- * @returns {Level}
109
- */
110
- export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
111
- /**
112
- * @returns {NumPages}
113
- */
114
- export function createNumPages(): NumPages;
115
- /**
116
- * @param {number | undefined} start
117
- * @param {string | undefined} chap_style
118
- * @returns {PageNumType}
119
- */
120
- export function createPageNumType(start?: number, chap_style?: string): PageNumType;
121
- /**
122
- * @returns {TableOfContents}
123
- */
124
- export function createTableOfContents(): TableOfContents;
125
- /**
126
- * @param {string} s
127
- * @returns {TableOfContents}
128
- */
129
- export function createTableOfContentsWithInstrText(s: string): TableOfContents;
130
- /**
131
- * @returns {TableOfContentsItem}
132
- */
133
- export function createTableOfContentsItem(): TableOfContentsItem;
134
- /**
135
- * @returns {RunFonts}
136
- */
137
- export function createRunFonts(): RunFonts;
138
- /**
139
- * @param {Run} run
140
- * @returns {Delete}
141
- */
142
- export function createDelete(run: Run): Delete;
143
- /**
144
- * @returns {LineSpacing}
145
- */
146
- export function createLineSpacing(): LineSpacing;
147
- /**
148
- * @returns {Run}
149
- */
28
+ export function createFooter(): Footer;
29
+ export function createParagraphPropertyChange(): ParagraphPropertyChange;
30
+ export function createParagraphProperty(): ParagraphProperty;
31
+ export function createPic(buf: Uint8Array): Pic;
32
+ export function createInsert(run: Run): Insert;
33
+ export function createNumbering(id: number, abstract_num_id: number): Numbering;
34
+ export function createPageNumType(start?: number | null, chap_style?: string | null): PageNumType;
150
35
  export function createRun(): Run;
151
- /**
152
- * @returns {TableCell}
153
- */
154
- export function createTableCell(): TableCell;
155
- /**
156
- * @param {number} position
157
- * @returns {TableCellBorder}
158
- */
159
- export function createTableCellBorder(position: number): TableCellBorder;
160
- /**
161
- * @returns {Header}
162
- */
163
- export function createHeader(): Header;
164
- /**
165
- * @param {number} alignment
166
- * @param {number} relative_to
167
- * @param {number} leader
168
- * @returns {PositionalTab}
169
- */
170
- export function createPositionalTab(alignment: number, relative_to: number, leader: number): PositionalTab;
171
- /**
172
- * @param {string} style_id
173
- * @param {number} style_type
174
- * @returns {Style}
175
- */
176
- export function createStyle(style_id: string, style_type: number): Style;
177
- /**
178
- */
179
- export enum TableBorderPosition {
180
- Left,
181
- Right,
182
- Top,
183
- Bottom,
184
- InsideH,
185
- InsideV,
186
- }
187
- /**
188
- */
189
- export enum TableCellBorderPosition {
190
- Left,
191
- Right,
192
- Top,
193
- Bottom,
194
- InsideH,
195
- InsideV,
196
- Tl2br,
197
- Tr2bl,
198
- }
199
- /**
200
- */
201
- export enum ParagraphBorderPosition {
202
- Left,
203
- Right,
204
- Top,
205
- Bottom,
206
- Between,
207
- Bar,
208
- }
209
- /**
210
- */
211
- export enum FontPitchType {
212
- Default,
213
- Fixed,
214
- Variable,
215
- }
216
- /**
217
- */
218
- export enum TabLeaderType {
219
- Dot,
220
- Heavy,
221
- Hyphen,
222
- MiddleDot,
223
- None,
224
- Underscore,
225
- }
226
- /**
227
- */
228
- export enum VertAlignType {
229
- Baseline,
230
- SuperScript,
231
- SubScript,
232
- Unsupported,
233
- }
234
- /**
235
- */
36
+ export function createTableCellBorder(position: TableCellBorderPosition): TableCellBorder;
37
+ export function createComment(id: number): Comment;
38
+ export function createDocx(): Docx;
236
39
  export enum AlignmentType {
237
- Both,
238
- Center,
239
- Distribute,
240
- Start,
241
- End,
242
- Left,
243
- Right,
244
- Justified,
245
- }
246
- /**
247
- */
248
- export enum FieldCharType {
249
- Begin,
250
- Separate,
251
- End,
252
- Unsupported,
253
- }
254
- /**
255
- */
256
- export enum SpecialIndentKind {
257
- FirstLine,
258
- Hanging,
40
+ Both = 0,
41
+ Center = 1,
42
+ Distribute = 2,
43
+ Start = 3,
44
+ End = 4,
45
+ Left = 5,
46
+ Right = 6,
47
+ Justified = 7,
259
48
  }
260
- /**
261
- */
262
- export enum TableAlignmentType {
263
- Center,
264
- Left,
265
- Right,
49
+ export enum BorderType {
50
+ Nil = 0,
51
+ None = 1,
52
+ Single = 2,
53
+ Thick = 3,
54
+ Double = 4,
55
+ Dotted = 5,
56
+ Dashed = 6,
57
+ DotDash = 7,
58
+ DotDotDash = 8,
59
+ Triple = 9,
60
+ ThinThickSmallGap = 10,
61
+ ThickThinSmallGap = 11,
62
+ ThinThickThinSmallGap = 12,
63
+ ThinThickMediumGap = 13,
64
+ ThickThinMediumGap = 14,
65
+ ThinThickThinMediumGap = 15,
66
+ ThinThickLargeGap = 16,
67
+ ThickThinLargeGap = 17,
68
+ ThinThickThinLargeGap = 18,
69
+ Wave = 19,
70
+ DoubleWave = 20,
71
+ DashSmallGap = 21,
72
+ DashDotStroked = 22,
73
+ ThreeDEmboss = 23,
74
+ ThreeDEngrave = 24,
75
+ Outset = 25,
76
+ Inset = 26,
77
+ Apples = 27,
78
+ ArchedScallops = 28,
79
+ BabyPacifier = 29,
80
+ BabyRattle = 30,
266
81
  }
267
- /**
268
- */
269
82
  export enum BreakType {
270
- Page,
271
- Column,
272
- TextWrapping,
273
- Unsupported,
83
+ Page = 0,
84
+ Column = 1,
85
+ TextWrapping = 2,
86
+ Unsupported = 3,
87
+ }
88
+ export enum CharacterSpacingValues {
89
+ DoNotCompress = 0,
90
+ CompressPunctuation = 1,
91
+ CompressPunctuationAndJapaneseKana = 2,
92
+ Unsupported = 3,
274
93
  }
275
- /**
276
- */
277
- export enum BorderType {
278
- Nil,
279
- None,
280
- Single,
281
- Thick,
282
- Double,
283
- Dotted,
284
- Dashed,
285
- DotDash,
286
- DotDotDash,
287
- Triple,
288
- ThinThickSmallGap,
289
- ThickThinSmallGap,
290
- ThinThickThinSmallGap,
291
- ThinThickMediumGap,
292
- ThickThinMediumGap,
293
- ThinThickThinMediumGap,
294
- ThinThickLargeGap,
295
- ThickThinLargeGap,
296
- ThinThickThinLargeGap,
297
- Wave,
298
- DoubleWave,
299
- DashSmallGap,
300
- DashDotStroked,
301
- ThreeDEmboss,
302
- ThreeDEngrave,
303
- Outset,
304
- Inset,
305
- Apples,
306
- ArchedScallops,
307
- BabyPacifier,
308
- BabyRattle,
309
- }
310
- /**
311
- */
312
94
  export enum DocGridType {
313
- Default,
314
- Lines,
315
- LinesAndChars,
316
- SnapToChars,
95
+ Default = 0,
96
+ Lines = 1,
97
+ LinesAndChars = 2,
98
+ SnapToChars = 3,
317
99
  }
318
- /**
319
- */
320
100
  export enum DrawingPositionType {
321
- Anchor,
322
- Inline,
101
+ Anchor = 0,
102
+ Inline = 1,
103
+ }
104
+ export enum FieldCharType {
105
+ Begin = 0,
106
+ Separate = 1,
107
+ End = 2,
108
+ Unsupported = 3,
109
+ }
110
+ export enum FontPitchType {
111
+ Default = 0,
112
+ Fixed = 1,
113
+ Variable = 2,
114
+ }
115
+ export enum HeightRule {
116
+ Auto = 0,
117
+ AtLeast = 1,
118
+ Exact = 2,
323
119
  }
324
- /**
325
- */
326
- export enum PicAlign {
327
- Left,
328
- Right,
329
- Center,
330
- Bottom,
331
- Top,
332
- }
333
- /**
334
- */
335
120
  export enum HyperlinkType {
336
- Anchor,
337
- External,
121
+ Anchor = 0,
122
+ External = 1,
123
+ }
124
+ export enum LevelSuffixType {
125
+ Nothing = 0,
126
+ Space = 1,
127
+ Tab = 2,
338
128
  }
339
- /**
340
- */
341
129
  export enum LineSpacingType {
342
- Auto,
343
- AtLeast,
344
- Exact,
130
+ Auto = 0,
131
+ AtLeast = 1,
132
+ Exact = 2,
345
133
  }
346
- /**
347
- */
348
134
  export enum PageOrientationType {
349
- Landscape,
350
- Portrait,
135
+ Landscape = 0,
136
+ Portrait = 1,
137
+ }
138
+ export enum ParagraphBorderPosition {
139
+ Left = 0,
140
+ Right = 1,
141
+ Top = 2,
142
+ Bottom = 3,
143
+ Between = 4,
144
+ Bar = 5,
145
+ }
146
+ export enum PicAlign {
147
+ Left = 0,
148
+ Right = 1,
149
+ Center = 2,
150
+ Bottom = 3,
151
+ Top = 4,
152
+ }
153
+ export enum PositionalTabAlignmentType {
154
+ Center = 0,
155
+ Left = 1,
156
+ Right = 2,
157
+ }
158
+ export enum PositionalTabRelativeTo {
159
+ Indent = 0,
160
+ Margin = 1,
351
161
  }
352
- /**
353
- */
354
162
  export enum RelativeFromHType {
355
- /**
356
- * Specifies that the horizontal positioning shall be
357
- * relative to the position of the anchor within its run
358
- * content.
359
- */
360
- Character,
361
- /**
362
- * Specifies that the horizontal positioning shall be
363
- * relative to the extents of the column which contains its
364
- * anchor.
365
- */
366
- Column,
367
- /**
368
- * Specifies that the horizontal positioning shall be
369
- * relative to the inside margin of the current page (the
370
- * left margin on odd pages, right on even pages).
371
- */
372
- InsideMargin,
373
- /**
374
- * Specifies that the horizontal positioning shall be
375
- * relative to the left margin of the page.
376
- */
377
- LeftMargin,
378
- /**
379
- * Specifies that the horizontal positioning shall be
380
- * relative to the page margins.
381
- */
382
- Margin,
383
- /**
384
- * Specifies that the horizontal positioning shall be
385
- * relative to the outside margin of the current page (the
386
- * right margin on odd pages, left on even pages).
387
- */
388
- OutsizeMargin,
389
- /**
390
- * Specifies that the horizontal positioning shall be
391
- * relative to the edge of the page.
392
- */
393
- Page,
394
- /**
395
- * Specifies that the horizontal positioning shall be
396
- * relative to the right margin of the page.
397
- */
398
- RightMargin,
399
- }
400
- /**
401
- */
163
+ /**
164
+ * Specifies that the horizontal positioning shall be
165
+ * relative to the position of the anchor within its run
166
+ * content.
167
+ */
168
+ Character = 0,
169
+ /**
170
+ * Specifies that the horizontal positioning shall be
171
+ * relative to the extents of the column which contains its
172
+ * anchor.
173
+ */
174
+ Column = 1,
175
+ /**
176
+ * Specifies that the horizontal positioning shall be
177
+ * relative to the inside margin of the current page (the
178
+ * left margin on odd pages, right on even pages).
179
+ */
180
+ InsideMargin = 2,
181
+ /**
182
+ * Specifies that the horizontal positioning shall be
183
+ * relative to the left margin of the page.
184
+ */
185
+ LeftMargin = 3,
186
+ /**
187
+ * Specifies that the horizontal positioning shall be
188
+ * relative to the page margins.
189
+ */
190
+ Margin = 4,
191
+ /**
192
+ * Specifies that the horizontal positioning shall be
193
+ * relative to the outside margin of the current page (the
194
+ * right margin on odd pages, left on even pages).
195
+ */
196
+ OutsizeMargin = 5,
197
+ /**
198
+ * Specifies that the horizontal positioning shall be
199
+ * relative to the edge of the page.
200
+ */
201
+ Page = 6,
202
+ /**
203
+ * Specifies that the horizontal positioning shall be
204
+ * relative to the right margin of the page.
205
+ */
206
+ RightMargin = 7,
207
+ }
402
208
  export enum RelativeFromVType {
403
- BottomMargin,
404
- InsideMargin,
405
- Line,
406
- Margin,
407
- OutsizeMargin,
408
- Page,
409
- Paragraph,
410
- TopMargin,
411
- }
412
- /**
413
- */
414
- export enum SectionType {
415
- NextPage,
416
- NextColumn,
417
- Continuous,
418
- EvenPage,
419
- OddPage,
420
- }
421
- /**
422
- */
423
- export enum WidthType {
424
- Dxa,
425
- Auto,
426
- Pct,
427
- Nil,
428
- Unsupported,
429
- }
430
- /**
431
- */
432
- export enum CharacterSpacingValues {
433
- DoNotCompress,
434
- CompressPunctuation,
435
- CompressPunctuationAndJapaneseKana,
436
- Unsupported,
209
+ BottomMargin = 0,
210
+ InsideMargin = 1,
211
+ Line = 2,
212
+ Margin = 3,
213
+ OutsizeMargin = 4,
214
+ Page = 5,
215
+ Paragraph = 6,
216
+ TopMargin = 7,
437
217
  }
438
- /**
439
- */
440
- export enum HeightRule {
441
- Auto,
442
- AtLeast,
443
- Exact,
218
+ export enum SectionType {
219
+ NextPage = 0,
220
+ NextColumn = 1,
221
+ Continuous = 2,
222
+ EvenPage = 3,
223
+ OddPage = 4,
444
224
  }
445
- /**
446
- */
447
- export enum LevelSuffixType {
448
- Nothing,
449
- Space,
450
- Tab,
225
+ export enum ShdType {
226
+ Nil = 0,
227
+ Clear = 1,
228
+ Solid = 2,
229
+ HorzStripe = 3,
230
+ VertStripe = 4,
231
+ ReverseDiagStripe = 5,
232
+ DiagStripe = 6,
233
+ HorzCross = 7,
234
+ DiagCross = 8,
235
+ ThinHorzStripe = 9,
236
+ ThinVertStripe = 10,
237
+ ThinReverseDiagStripe = 11,
238
+ ThinDiagStripe = 12,
239
+ ThinHorzCross = 13,
240
+ ThinDiagCross = 14,
241
+ Pct5 = 15,
242
+ Pct10 = 16,
243
+ Pct12 = 17,
244
+ Pct15 = 18,
245
+ Pct20 = 19,
246
+ Pct25 = 20,
247
+ Pct30 = 21,
248
+ Pct35 = 22,
249
+ Pct37 = 23,
250
+ Pct40 = 24,
251
+ Pct45 = 25,
252
+ Pct50 = 26,
253
+ Pct55 = 27,
254
+ Pct60 = 28,
255
+ Pct62 = 29,
256
+ Pct65 = 30,
257
+ Pct70 = 31,
258
+ Pct75 = 32,
259
+ Pct80 = 33,
260
+ Pct85 = 34,
261
+ Pct87 = 35,
262
+ Pct90 = 36,
263
+ Pct95 = 37,
451
264
  }
452
- /**
453
- */
454
- export enum PositionalTabRelativeTo {
455
- Indent,
456
- Margin,
265
+ export enum SpecialIndentKind {
266
+ FirstLine = 0,
267
+ Hanging = 1,
457
268
  }
458
- /**
459
- */
460
269
  export enum StyleType {
461
- Paragraph,
462
- Character,
463
- Numbering,
464
- Table,
465
- Unsupported,
466
- }
467
- /**
468
- */
469
- export enum PositionalTabAlignmentType {
470
- Center,
471
- Left,
472
- Right,
270
+ Paragraph = 0,
271
+ Character = 1,
272
+ Numbering = 2,
273
+ Table = 3,
274
+ Unsupported = 4,
275
+ }
276
+ export enum TabLeaderType {
277
+ Dot = 0,
278
+ Heavy = 1,
279
+ Hyphen = 2,
280
+ MiddleDot = 3,
281
+ None = 4,
282
+ Underscore = 5,
473
283
  }
474
- /**
475
- */
476
- export enum ShdType {
477
- Nil,
478
- Clear,
479
- Solid,
480
- HorzStripe,
481
- VertStripe,
482
- ReverseDiagStripe,
483
- DiagStripe,
484
- HorzCross,
485
- DiagCross,
486
- ThinHorzStripe,
487
- ThinVertStripe,
488
- ThinReverseDiagStripe,
489
- ThinDiagStripe,
490
- ThinHorzCross,
491
- ThinDiagCross,
492
- Pct5,
493
- Pct10,
494
- Pct12,
495
- Pct15,
496
- Pct20,
497
- Pct25,
498
- Pct30,
499
- Pct35,
500
- Pct37,
501
- Pct40,
502
- Pct45,
503
- Pct50,
504
- Pct55,
505
- Pct60,
506
- Pct62,
507
- Pct65,
508
- Pct70,
509
- Pct75,
510
- Pct80,
511
- Pct85,
512
- Pct87,
513
- Pct90,
514
- Pct95,
515
- }
516
- /**
517
- */
518
284
  export enum TabValueType {
519
- Bar,
520
- Center,
521
- Clear,
522
- Decimal,
523
- End,
524
- Right,
525
- Num,
526
- Start,
527
- Left,
528
- }
529
- /**
530
- */
285
+ Bar = 0,
286
+ Center = 1,
287
+ Clear = 2,
288
+ Decimal = 3,
289
+ End = 4,
290
+ Right = 5,
291
+ Num = 6,
292
+ Start = 7,
293
+ Left = 8,
294
+ }
295
+ export enum TableAlignmentType {
296
+ Center = 0,
297
+ Left = 1,
298
+ Right = 2,
299
+ }
300
+ export enum TableBorderPosition {
301
+ Left = 0,
302
+ Right = 1,
303
+ Top = 2,
304
+ Bottom = 3,
305
+ InsideH = 4,
306
+ InsideV = 5,
307
+ }
308
+ export enum TableCellBorderPosition {
309
+ Left = 0,
310
+ Right = 1,
311
+ Top = 2,
312
+ Bottom = 3,
313
+ InsideH = 4,
314
+ InsideV = 5,
315
+ Tl2br = 6,
316
+ Tr2bl = 7,
317
+ }
318
+ export enum TableLayoutType {
319
+ Fixed = 0,
320
+ Autofit = 1,
321
+ }
531
322
  export enum TextAlignmentType {
532
- Auto,
533
- Baseline,
534
- Bottom,
535
- Center,
536
- Top,
537
- }
538
- /**
539
- */
323
+ Auto = 0,
324
+ Baseline = 1,
325
+ Bottom = 2,
326
+ Center = 3,
327
+ Top = 4,
328
+ }
540
329
  export enum TextDirectionType {
541
- Lr,
542
- LrV,
543
- Rl,
544
- RlV,
545
- Tb,
546
- TbV,
547
- TbRlV,
548
- TbRl,
549
- BtLr,
550
- LrTbV,
551
- }
552
- /**
553
- */
554
- export enum TableLayoutType {
555
- Fixed,
556
- Autofit,
330
+ Lr = 0,
331
+ LrV = 1,
332
+ Rl = 2,
333
+ RlV = 3,
334
+ Tb = 4,
335
+ TbV = 5,
336
+ TbRlV = 6,
337
+ TbRl = 7,
338
+ BtLr = 8,
339
+ LrTbV = 9,
557
340
  }
558
- /**
559
- */
560
341
  export enum VAlignType {
561
- Top,
562
- Center,
563
- Bottom,
564
- Unsupported,
342
+ Top = 0,
343
+ Center = 1,
344
+ Bottom = 2,
345
+ Unsupported = 3,
565
346
  }
566
- /**
567
- */
568
347
  export enum VMergeType {
569
- Continue,
570
- Restart,
571
- Unsupported,
348
+ Continue = 0,
349
+ Restart = 1,
350
+ Unsupported = 2,
351
+ }
352
+ export enum VertAlignType {
353
+ Baseline = 0,
354
+ SuperScript = 1,
355
+ SubScript = 2,
356
+ Unsupported = 3,
357
+ }
358
+ export enum WidthType {
359
+ Dxa = 0,
360
+ Auto = 1,
361
+ Pct = 2,
362
+ Nil = 3,
363
+ Unsupported = 4,
572
364
  }
573
- /**
574
- */
575
365
  export class AbstractNumbering {
366
+ private constructor();
576
367
  free(): void;
577
- /**
578
- * @param {Level} level
579
- * @returns {AbstractNumbering}
580
- */
581
368
  add_level(level: Level): AbstractNumbering;
582
369
  }
583
- /**
584
- */
585
370
  export class Comment {
371
+ private constructor();
586
372
  free(): void;
587
- /**
588
- * @param {string} author
589
- * @returns {Comment}
590
- */
591
373
  author(author: string): Comment;
592
- /**
593
- * @param {string} date
594
- * @returns {Comment}
595
- */
596
374
  date(date: string): Comment;
597
- /**
598
- * @param {Paragraph} p
599
- * @returns {Comment}
600
- */
601
375
  add_paragraph(p: Paragraph): Comment;
602
- /**
603
- * @param {number} id
604
- * @returns {Comment}
605
- */
606
376
  parent_comment_id(id: number): Comment;
607
- /**
608
- * @returns {number}
609
- */
610
377
  id(): number;
611
378
  }
612
- /**
613
- */
614
379
  export class Delete {
380
+ private constructor();
615
381
  free(): void;
616
- /**
617
- * @param {string} author
618
- * @returns {Delete}
619
- */
620
382
  author(author: string): Delete;
621
- /**
622
- * @param {string} date
623
- * @returns {Delete}
624
- */
625
383
  date(date: string): Delete;
626
384
  }
627
- /**
628
- */
629
385
  export class Docx {
386
+ private constructor();
630
387
  free(): void;
631
- /**
632
- * @param {Paragraph} p
633
- * @returns {Docx}
634
- */
635
388
  add_paragraph(p: Paragraph): Docx;
636
- /**
637
- * @param {TableOfContents} t
638
- * @returns {Docx}
639
- */
640
389
  add_table_of_contents(t: TableOfContents): Docx;
641
- /**
642
- * @param {number} id
643
- * @param {string} name
644
- * @returns {Docx}
645
- */
646
390
  add_bookmark_start(id: number, name: string): Docx;
647
- /**
648
- * @param {number} id
649
- * @returns {Docx}
650
- */
651
391
  add_bookmark_end(id: number): Docx;
652
- /**
653
- * @param {Table} t
654
- * @returns {Docx}
655
- */
656
392
  add_table(t: Table): Docx;
657
- /**
658
- * @param {AbstractNumbering} num
659
- * @returns {Docx}
660
- */
661
393
  add_abstract_numbering(num: AbstractNumbering): Docx;
662
- /**
663
- * @param {Numbering} num
664
- * @returns {Docx}
665
- */
666
394
  add_numbering(num: Numbering): Docx;
667
- /**
668
- * @param {string} date
669
- * @returns {Docx}
670
- */
671
395
  created_at(date: string): Docx;
672
- /**
673
- * @param {string} date
674
- * @returns {Docx}
675
- */
676
396
  updated_at(date: string): Docx;
677
- /**
678
- * @param {string} name
679
- * @param {string} item
680
- * @returns {Docx}
681
- */
682
397
  custom_property(name: string, item: string): Docx;
683
- /**
684
- * @param {string} id
685
- * @returns {Docx}
686
- */
687
398
  doc_id(id: string): Docx;
688
- /**
689
- * @param {string} name
690
- * @param {string} val
691
- * @returns {Docx}
692
- */
693
399
  add_doc_var(name: string, val: string): Docx;
694
- /**
695
- * @param {number} stop
696
- * @returns {Docx}
697
- */
698
400
  default_tab_stop(stop: number): Docx;
699
- /**
700
- * @returns {Docx}
701
- */
702
401
  set_adjust_line_height_in_table(): Docx;
703
- /**
704
- * @param {number} v
705
- * @returns {Docx}
706
- */
707
- character_spacing_control(v: number): Docx;
708
- /**
709
- * @param {Header} header
710
- * @returns {Docx}
711
- */
402
+ character_spacing_control(v: CharacterSpacingValues): Docx;
712
403
  header(header: Header): Docx;
713
- /**
714
- * @param {Header} header
715
- * @returns {Docx}
716
- */
717
404
  first_header(header: Header): Docx;
718
- /**
719
- * @param {Header} header
720
- * @returns {Docx}
721
- */
722
405
  even_header(header: Header): Docx;
723
- /**
724
- * @param {Footer} footer
725
- * @returns {Docx}
726
- */
727
406
  footer(footer: Footer): Docx;
728
- /**
729
- * @param {Footer} footer
730
- * @returns {Docx}
731
- */
732
407
  first_footer(footer: Footer): Docx;
733
- /**
734
- * @param {Footer} footer
735
- * @returns {Docx}
736
- */
737
408
  even_footer(footer: Footer): Docx;
738
- /**
739
- * @returns {Docx}
740
- */
741
409
  title_pg(): Docx;
742
- /**
743
- * @param {number} w
744
- * @param {number} h
745
- * @returns {Docx}
746
- */
747
410
  page_size(w: number, h: number): Docx;
748
- /**
749
- * @param {number} o
750
- * @returns {Docx}
751
- */
752
- page_orient(o: number): Docx;
753
- /**
754
- * @param {PageMargin} margin
755
- * @returns {Docx}
756
- */
411
+ page_orient(o: PageOrientationType): Docx;
757
412
  page_margin(margin: PageMargin): Docx;
758
- /**
759
- * @param {Style} s
760
- * @returns {Docx}
761
- */
762
413
  add_style(s: Style): Docx;
763
- /**
764
- * @param {number} size
765
- * @returns {Docx}
766
- */
767
414
  default_size(size: number): Docx;
768
- /**
769
- * @param {number} spacing
770
- * @returns {Docx}
771
- */
772
415
  default_spacing(spacing: number): Docx;
773
- /**
774
- * @param {RunFonts} font
775
- * @returns {Docx}
776
- */
777
416
  default_fonts(font: RunFonts): Docx;
778
- /**
779
- * @param {LineSpacing} spacing
780
- * @returns {Docx}
781
- */
782
417
  default_line_spacing(spacing: LineSpacing): Docx;
783
- /**
784
- * @returns {Docx}
785
- */
786
418
  taskpanes(): Docx;
787
- /**
788
- * @param {WebExtension} ext
789
- * @returns {Docx}
790
- */
791
419
  web_extension(ext: WebExtension): Docx;
792
- /**
793
- * @param {string} id
794
- * @param {string} xml
795
- * @returns {Docx}
796
- */
797
420
  add_custom_item(id: string, xml: string): Docx;
798
- /**
799
- * @param {PageNumType} p
800
- * @returns {Docx}
801
- */
802
421
  page_num_type(p: PageNumType): Docx;
803
- /**
804
- * @param {number} grid_type
805
- * @param {number | undefined} line_pitch
806
- * @param {number | undefined} char_space
807
- * @returns {Docx}
808
- */
809
- doc_grid(grid_type: number, line_pitch?: number, char_space?: number): Docx;
810
- /**
811
- * @param {boolean} has_numberings
812
- * @returns {Uint8Array}
813
- */
422
+ doc_grid(grid_type: DocGridType, line_pitch?: number | null, char_space?: number | null): Docx;
814
423
  build(has_numberings: boolean): Uint8Array;
815
- /**
816
- * @returns {string}
817
- */
818
424
  json_with_update_comments(): string;
819
- /**
820
- * @returns {string}
821
- */
822
425
  comments_json(): string;
823
426
  }
824
- /**
825
- */
826
427
  export class Footer {
428
+ private constructor();
827
429
  free(): void;
828
- /**
829
- * @param {Paragraph} p
830
- * @returns {Footer}
831
- */
832
430
  add_paragraph(p: Paragraph): Footer;
833
- /**
834
- * @param {Table} t
835
- * @returns {Footer}
836
- */
837
431
  add_table(t: Table): Footer;
838
432
  }
839
- /**
840
- */
841
433
  export class FrameProperty {
434
+ private constructor();
842
435
  free(): void;
843
- /**
844
- * @param {string} wrap
845
- * @returns {FrameProperty}
846
- */
847
436
  wrap(wrap: string): FrameProperty;
848
- /**
849
- * @param {string} anchor
850
- * @returns {FrameProperty}
851
- */
852
437
  v_anchor(anchor: string): FrameProperty;
853
- /**
854
- * @param {string} anchor
855
- * @returns {FrameProperty}
856
- */
857
438
  h_anchor(anchor: string): FrameProperty;
858
- /**
859
- * @param {string} r
860
- * @returns {FrameProperty}
861
- */
862
439
  h_rule(r: string): FrameProperty;
863
- /**
864
- * @param {string} align
865
- * @returns {FrameProperty}
866
- */
867
440
  x_align(align: string): FrameProperty;
868
- /**
869
- * @param {string} align
870
- * @returns {FrameProperty}
871
- */
872
441
  y_align(align: string): FrameProperty;
873
- /**
874
- * @param {number} x
875
- * @returns {FrameProperty}
876
- */
877
442
  h_space(x: number): FrameProperty;
878
- /**
879
- * @param {number} x
880
- * @returns {FrameProperty}
881
- */
882
443
  v_space(x: number): FrameProperty;
883
- /**
884
- * @param {number} x
885
- * @returns {FrameProperty}
886
- */
887
444
  x(x: number): FrameProperty;
888
- /**
889
- * @param {number} y
890
- * @returns {FrameProperty}
891
- */
892
445
  y(y: number): FrameProperty;
893
- /**
894
- * @param {number} n
895
- * @returns {FrameProperty}
896
- */
897
446
  width(n: number): FrameProperty;
898
- /**
899
- * @param {number} n
900
- * @returns {FrameProperty}
901
- */
902
447
  height(n: number): FrameProperty;
903
448
  }
904
- /**
905
- */
906
449
  export class Header {
450
+ private constructor();
907
451
  free(): void;
908
- /**
909
- * @param {Paragraph} p
910
- * @returns {Header}
911
- */
912
452
  add_paragraph(p: Paragraph): Header;
913
- /**
914
- * @param {Table} t
915
- * @returns {Header}
916
- */
917
453
  add_table(t: Table): Header;
918
454
  }
919
- /**
920
- */
921
455
  export class Hyperlink {
456
+ private constructor();
922
457
  free(): void;
923
- /**
924
- * @param {Run} run
925
- * @returns {Hyperlink}
926
- */
927
458
  add_run(run: Run): Hyperlink;
928
- /**
929
- * @param {Insert} i
930
- * @returns {Hyperlink}
931
- */
932
459
  add_insert(i: Insert): Hyperlink;
933
- /**
934
- * @param {Delete} d
935
- * @returns {Hyperlink}
936
- */
937
460
  add_delete(d: Delete): Hyperlink;
938
- /**
939
- * @param {number} id
940
- * @param {string} name
941
- * @returns {Hyperlink}
942
- */
943
461
  add_bookmark_start(id: number, name: string): Hyperlink;
944
- /**
945
- * @param {number} id
946
- * @returns {Hyperlink}
947
- */
948
462
  add_bookmark_end(id: number): Hyperlink;
949
- /**
950
- * @param {Comment} comment
951
- * @returns {Hyperlink}
952
- */
953
463
  add_comment_start(comment: Comment): Hyperlink;
954
- /**
955
- * @param {number} id
956
- * @returns {Hyperlink}
957
- */
958
464
  add_comment_end(id: number): Hyperlink;
959
465
  }
960
- /**
961
- */
962
466
  export class Insert {
467
+ private constructor();
963
468
  free(): void;
964
- /**
965
- * @param {string} author
966
- * @returns {Insert}
967
- */
968
469
  author(author: string): Insert;
969
- /**
970
- * @param {string} date
971
- * @returns {Insert}
972
- */
973
470
  date(date: string): Insert;
974
471
  }
975
- /**
976
- */
977
472
  export class Level {
473
+ private constructor();
978
474
  free(): void;
979
- /**
980
- * @param {number} left
981
- * @param {number | undefined} special_indent_kind
982
- * @param {number | undefined} special_indent_size
983
- * @returns {Level}
984
- */
985
- indent(left: number, special_indent_kind?: number, special_indent_size?: number): Level;
986
- /**
987
- * @param {number} s
988
- * @returns {Level}
989
- */
990
- suffix(s: number): Level;
991
- /**
992
- * @param {number} size
993
- * @returns {Level}
994
- */
475
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): Level;
476
+ suffix(s: LevelSuffixType): Level;
995
477
  size(size: number): Level;
996
- /**
997
- * @param {string} color
998
- * @returns {Level}
999
- */
1000
478
  color(color: string): Level;
1001
- /**
1002
- * @param {string} color
1003
- * @returns {Level}
1004
- */
1005
479
  highlight(color: string): Level;
1006
- /**
1007
- * @returns {Level}
1008
- */
1009
480
  bold(): Level;
1010
- /**
1011
- * @returns {Level}
1012
- */
1013
481
  disable_bold(): Level;
1014
- /**
1015
- * @returns {Level}
1016
- */
1017
482
  italic(): Level;
1018
- /**
1019
- * @returns {Level}
1020
- */
1021
483
  strike(): Level;
1022
- /**
1023
- * @returns {Level}
1024
- */
1025
484
  disable_strike(): Level;
1026
- /**
1027
- * @returns {Level}
1028
- */
1029
485
  dstrike(): Level;
1030
- /**
1031
- * @returns {Level}
1032
- */
1033
486
  disable_dstrike(): Level;
1034
- /**
1035
- * @returns {Level}
1036
- */
1037
487
  disable_italic(): Level;
1038
- /**
1039
- * @param {string} line_type
1040
- * @returns {Level}
1041
- */
1042
488
  underline(line_type: string): Level;
1043
- /**
1044
- * @returns {Level}
1045
- */
1046
489
  vanish(): Level;
1047
- /**
1048
- * @param {RunFonts} f
1049
- * @returns {Level}
1050
- */
1051
490
  fonts(f: RunFonts): Level;
1052
- /**
1053
- * @param {number} spacing
1054
- * @returns {Level}
1055
- */
1056
491
  spacing(spacing: number): Level;
1057
492
  }
1058
- /**
1059
- */
1060
493
  export class LevelOverride {
494
+ private constructor();
1061
495
  free(): void;
1062
- /**
1063
- * @param {number} start
1064
- * @returns {LevelOverride}
1065
- */
1066
496
  start(start: number): LevelOverride;
1067
- /**
1068
- * @param {Level} level
1069
- * @returns {LevelOverride}
1070
- */
1071
497
  level(level: Level): LevelOverride;
1072
498
  }
1073
- /**
1074
- */
1075
499
  export class LineSpacing {
500
+ private constructor();
1076
501
  free(): void;
1077
- /**
1078
- * @param {number} t
1079
- * @returns {LineSpacing}
1080
- */
1081
- line_rule(t: number): LineSpacing;
1082
- /**
1083
- * @param {number} before
1084
- * @returns {LineSpacing}
1085
- */
502
+ line_rule(t: LineSpacingType): LineSpacing;
1086
503
  before(before: number): LineSpacing;
1087
- /**
1088
- * @param {number} after
1089
- * @returns {LineSpacing}
1090
- */
1091
504
  after(after: number): LineSpacing;
1092
- /**
1093
- * @param {number} before
1094
- * @returns {LineSpacing}
1095
- */
1096
505
  before_lines(before: number): LineSpacing;
1097
- /**
1098
- * @param {number} after
1099
- * @returns {LineSpacing}
1100
- */
1101
506
  after_lines(after: number): LineSpacing;
1102
- /**
1103
- * @param {number} line
1104
- * @returns {LineSpacing}
1105
- */
1106
507
  line(line: number): LineSpacing;
1107
508
  }
1108
- /**
1109
- */
1110
509
  export class NumPages {
510
+ private constructor();
1111
511
  free(): void;
1112
512
  }
1113
- /**
1114
- */
1115
513
  export class Numbering {
514
+ private constructor();
1116
515
  free(): void;
1117
- /**
1118
- * @param {LevelOverride} o
1119
- * @returns {Numbering}
1120
- */
1121
516
  add_override(o: LevelOverride): Numbering;
1122
517
  }
1123
- /**
1124
- */
1125
518
  export class PageMargin {
519
+ private constructor();
1126
520
  free(): void;
1127
- /**
1128
- * @param {number} v
1129
- * @returns {PageMargin}
1130
- */
1131
521
  top(v: number): PageMargin;
1132
- /**
1133
- * @param {number} v
1134
- * @returns {PageMargin}
1135
- */
1136
522
  left(v: number): PageMargin;
1137
- /**
1138
- * @param {number} v
1139
- * @returns {PageMargin}
1140
- */
1141
523
  bottom(v: number): PageMargin;
1142
- /**
1143
- * @param {number} v
1144
- * @returns {PageMargin}
1145
- */
1146
524
  right(v: number): PageMargin;
1147
- /**
1148
- * @param {number} v
1149
- * @returns {PageMargin}
1150
- */
1151
525
  header(v: number): PageMargin;
1152
- /**
1153
- * @param {number} v
1154
- * @returns {PageMargin}
1155
- */
1156
526
  footer(v: number): PageMargin;
1157
- /**
1158
- * @param {number} v
1159
- * @returns {PageMargin}
1160
- */
1161
527
  gutter(v: number): PageMargin;
1162
528
  }
1163
- /**
1164
- */
1165
529
  export class PageNum {
530
+ private constructor();
1166
531
  free(): void;
1167
532
  }
1168
- /**
1169
- */
1170
533
  export class PageNumType {
534
+ private constructor();
1171
535
  free(): void;
1172
536
  }
1173
- /**
1174
- */
1175
537
  export class Paragraph {
538
+ private constructor();
1176
539
  free(): void;
1177
- /**
1178
- * @param {Run} run
1179
- * @returns {Paragraph}
1180
- */
1181
540
  add_run(run: Run): Paragraph;
1182
- /**
1183
- * @param {Hyperlink} link
1184
- * @returns {Paragraph}
1185
- */
1186
541
  add_hyperlink(link: Hyperlink): Paragraph;
1187
- /**
1188
- * @param {Insert} i
1189
- * @returns {Paragraph}
1190
- */
1191
542
  add_insert(i: Insert): Paragraph;
1192
- /**
1193
- * @param {Delete} d
1194
- * @returns {Paragraph}
1195
- */
1196
543
  add_delete(d: Delete): Paragraph;
1197
- /**
1198
- * @param {number} id
1199
- * @param {string} name
1200
- * @returns {Paragraph}
1201
- */
1202
544
  add_bookmark_start(id: number, name: string): Paragraph;
1203
- /**
1204
- * @param {number} id
1205
- * @returns {Paragraph}
1206
- */
1207
545
  add_bookmark_end(id: number): Paragraph;
1208
- /**
1209
- * @param {Comment} comment
1210
- * @returns {Paragraph}
1211
- */
1212
546
  add_comment_start(comment: Comment): Paragraph;
1213
- /**
1214
- * @param {number} id
1215
- * @returns {Paragraph}
1216
- */
1217
547
  add_comment_end(id: number): Paragraph;
1218
- /**
1219
- * @param {number} alignment_type
1220
- * @returns {Paragraph}
1221
- */
1222
- align(alignment_type: number): Paragraph;
1223
- /**
1224
- * @param {number} alignment_type
1225
- * @returns {Paragraph}
1226
- */
1227
- text_alignment(alignment_type: number): Paragraph;
1228
- /**
1229
- * @param {number} v
1230
- * @returns {Paragraph}
1231
- */
548
+ align(alignment_type: AlignmentType): Paragraph;
549
+ text_alignment(alignment_type: TextAlignmentType): Paragraph;
1232
550
  adjust_right_ind(v: number): Paragraph;
1233
- /**
1234
- * @param {number} level
1235
- * @returns {Paragraph}
1236
- */
1237
551
  outline_lvl(level: number): Paragraph;
1238
- /**
1239
- * @param {string} style_id
1240
- * @returns {Paragraph}
1241
- */
1242
552
  style(style_id: string): Paragraph;
1243
- /**
1244
- * @param {number} left
1245
- * @param {number | undefined} special_indent_kind
1246
- * @param {number | undefined} special_indent_size
1247
- * @param {number | undefined} right
1248
- * @returns {Paragraph}
1249
- */
1250
- indent(left: number, special_indent_kind?: number, special_indent_size?: number, right?: number): Paragraph;
1251
- /**
1252
- * @param {number} id
1253
- * @param {number} level
1254
- * @returns {Paragraph}
1255
- */
553
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null, right?: number | null): Paragraph;
1256
554
  numbering(id: number, level: number): Paragraph;
1257
- /**
1258
- * @param {number} size
1259
- * @returns {Paragraph}
1260
- */
1261
555
  size(size: number): Paragraph;
1262
- /**
1263
- * @param {string} c
1264
- * @returns {Paragraph}
1265
- */
1266
556
  color(c: string): Paragraph;
1267
- /**
1268
- * @returns {Paragraph}
1269
- */
1270
557
  bold(): Paragraph;
1271
- /**
1272
- * @returns {Paragraph}
1273
- */
1274
558
  italic(): Paragraph;
1275
- /**
1276
- * @param {RunFonts} f
1277
- * @returns {Paragraph}
1278
- */
1279
559
  fonts(f: RunFonts): Paragraph;
1280
- /**
1281
- * @param {LineSpacing} spacing
1282
- * @returns {Paragraph}
1283
- */
1284
560
  line_spacing(spacing: LineSpacing): Paragraph;
1285
- /**
1286
- * @param {number} spacing
1287
- * @returns {Paragraph}
1288
- */
1289
561
  character_spacing(spacing: number): Paragraph;
1290
- /**
1291
- * @param {boolean} v
1292
- * @returns {Paragraph}
1293
- */
1294
562
  keep_next(v: boolean): Paragraph;
1295
- /**
1296
- * @param {boolean} v
1297
- * @returns {Paragraph}
1298
- */
1299
563
  snap_to_grid(v: boolean): Paragraph;
1300
- /**
1301
- * @param {boolean} v
1302
- * @returns {Paragraph}
1303
- */
1304
564
  keep_lines(v: boolean): Paragraph;
1305
- /**
1306
- * @param {boolean} v
1307
- * @returns {Paragraph}
1308
- */
1309
565
  page_break_before(v: boolean): Paragraph;
1310
- /**
1311
- * @param {boolean} v
1312
- * @returns {Paragraph}
1313
- */
1314
566
  widow_control(v: boolean): Paragraph;
1315
- /**
1316
- * @param {string} author
1317
- * @param {string} date
1318
- * @returns {Paragraph}
1319
- */
1320
567
  delete(author: string, date: string): Paragraph;
1321
- /**
1322
- * @param {string} author
1323
- * @param {string} date
1324
- * @returns {Paragraph}
1325
- */
1326
568
  insert(author: string, date: string): Paragraph;
1327
- /**
1328
- * @param {number | undefined} val
1329
- * @param {number | undefined} leader
1330
- * @param {number | undefined} pos
1331
- * @returns {Paragraph}
1332
- */
1333
- add_tab(val?: number, leader?: number, pos?: number): Paragraph;
1334
- /**
1335
- * @param {ParagraphPropertyChange} p
1336
- * @returns {Paragraph}
1337
- */
569
+ add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): Paragraph;
1338
570
  paragraph_property_change(p: ParagraphPropertyChange): Paragraph;
1339
- /**
1340
- * @param {PageNum} p
1341
- * @returns {Paragraph}
1342
- */
1343
571
  add_page_num(p: PageNum): Paragraph;
1344
- /**
1345
- * @param {NumPages} p
1346
- * @returns {Paragraph}
1347
- */
1348
572
  add_num_pages(p: NumPages): Paragraph;
1349
- /**
1350
- * @param {string} wrap
1351
- * @returns {Paragraph}
1352
- */
1353
573
  wrap(wrap: string): Paragraph;
1354
- /**
1355
- * @param {string} anchor
1356
- * @returns {Paragraph}
1357
- */
1358
574
  v_anchor(anchor: string): Paragraph;
1359
- /**
1360
- * @param {string} anchor
1361
- * @returns {Paragraph}
1362
- */
1363
575
  h_anchor(anchor: string): Paragraph;
1364
- /**
1365
- * @param {string} r
1366
- * @returns {Paragraph}
1367
- */
1368
576
  h_rule(r: string): Paragraph;
1369
- /**
1370
- * @param {string} align
1371
- * @returns {Paragraph}
1372
- */
1373
577
  x_align(align: string): Paragraph;
1374
- /**
1375
- * @param {string} align
1376
- * @returns {Paragraph}
1377
- */
1378
578
  y_align(align: string): Paragraph;
1379
- /**
1380
- * @param {number} x
1381
- * @returns {Paragraph}
1382
- */
1383
579
  h_space(x: number): Paragraph;
1384
- /**
1385
- * @param {number} x
1386
- * @returns {Paragraph}
1387
- */
1388
580
  v_space(x: number): Paragraph;
1389
- /**
1390
- * @param {number} x
1391
- * @returns {Paragraph}
1392
- */
1393
581
  frame_x(x: number): Paragraph;
1394
- /**
1395
- * @param {number} y
1396
- * @returns {Paragraph}
1397
- */
1398
582
  frame_y(y: number): Paragraph;
1399
- /**
1400
- * @param {number} n
1401
- * @returns {Paragraph}
1402
- */
1403
583
  frame_width(n: number): Paragraph;
1404
- /**
1405
- * @param {number} n
1406
- * @returns {Paragraph}
1407
- */
1408
584
  frame_height(n: number): Paragraph;
1409
- /**
1410
- * @param {ParagraphProperty} p
1411
- * @returns {Paragraph}
1412
- */
1413
585
  paragraph_property(p: ParagraphProperty): Paragraph;
1414
586
  }
1415
- /**
1416
- */
1417
587
  export class ParagraphProperty {
588
+ private constructor();
1418
589
  free(): void;
1419
- /**
1420
- * @param {number} alignment_type
1421
- * @returns {ParagraphProperty}
1422
- */
1423
- align(alignment_type: number): ParagraphProperty;
1424
- /**
1425
- * @param {number} alignment_type
1426
- * @returns {ParagraphProperty}
1427
- */
1428
- text_alignment(alignment_type: number): ParagraphProperty;
1429
- /**
1430
- * @param {number} v
1431
- * @returns {ParagraphProperty}
1432
- */
590
+ align(alignment_type: AlignmentType): ParagraphProperty;
591
+ text_alignment(alignment_type: TextAlignmentType): ParagraphProperty;
1433
592
  adjust_right_ind(v: number): ParagraphProperty;
1434
- /**
1435
- * @param {number} level
1436
- * @returns {ParagraphProperty}
1437
- */
1438
593
  outline_lvl(level: number): ParagraphProperty;
1439
- /**
1440
- * @param {string} style_id
1441
- * @returns {ParagraphProperty}
1442
- */
1443
594
  style(style_id: string): ParagraphProperty;
1444
- /**
1445
- * @param {number} left
1446
- * @param {number | undefined} special_indent_kind
1447
- * @param {number | undefined} special_indent_size
1448
- * @param {number | undefined} right
1449
- * @returns {ParagraphProperty}
1450
- */
1451
- indent(left: number, special_indent_kind?: number, special_indent_size?: number, right?: number): ParagraphProperty;
1452
- /**
1453
- * @param {number} id
1454
- * @param {number} level
1455
- * @returns {ParagraphProperty}
1456
- */
595
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null, right?: number | null): ParagraphProperty;
1457
596
  numbering(id: number, level: number): ParagraphProperty;
1458
- /**
1459
- * @param {LineSpacing} spacing
1460
- * @returns {ParagraphProperty}
1461
- */
1462
597
  line_spacing(spacing: LineSpacing): ParagraphProperty;
1463
- /**
1464
- * @param {number} spacing
1465
- * @returns {ParagraphProperty}
1466
- */
1467
598
  character_spacing(spacing: number): ParagraphProperty;
1468
- /**
1469
- * @param {boolean} v
1470
- * @returns {ParagraphProperty}
1471
- */
1472
599
  keep_next(v: boolean): ParagraphProperty;
1473
- /**
1474
- * @param {boolean} v
1475
- * @returns {ParagraphProperty}
1476
- */
1477
600
  snap_to_grid(v: boolean): ParagraphProperty;
1478
- /**
1479
- * @param {boolean} v
1480
- * @returns {ParagraphProperty}
1481
- */
1482
601
  keep_lines(v: boolean): ParagraphProperty;
1483
- /**
1484
- * @param {boolean} v
1485
- * @returns {ParagraphProperty}
1486
- */
1487
602
  page_break_before(v: boolean): ParagraphProperty;
1488
- /**
1489
- * @param {boolean} v
1490
- * @returns {ParagraphProperty}
1491
- */
1492
603
  widow_control(v: boolean): ParagraphProperty;
1493
- /**
1494
- * @param {number | undefined} val
1495
- * @param {number | undefined} leader
1496
- * @param {number | undefined} pos
1497
- * @returns {ParagraphProperty}
1498
- */
1499
- add_tab(val?: number, leader?: number, pos?: number): ParagraphProperty;
1500
- /**
1501
- * @param {ParagraphPropertyChange} p
1502
- * @returns {ParagraphProperty}
1503
- */
604
+ add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): ParagraphProperty;
1504
605
  paragraph_property_change(p: ParagraphPropertyChange): ParagraphProperty;
1505
- /**
1506
- * @param {FrameProperty} p
1507
- * @returns {ParagraphProperty}
1508
- */
1509
606
  frame_property(p: FrameProperty): ParagraphProperty;
1510
- /**
1511
- * @param {RunProperty} p
1512
- * @returns {ParagraphProperty}
1513
- */
1514
607
  run_property(p: RunProperty): ParagraphProperty;
1515
608
  }
1516
- /**
1517
- */
1518
609
  export class ParagraphPropertyChange {
610
+ private constructor();
1519
611
  free(): void;
1520
- /**
1521
- * @param {string} author
1522
- * @returns {ParagraphPropertyChange}
1523
- */
1524
612
  author(author: string): ParagraphPropertyChange;
1525
- /**
1526
- * @param {string} date
1527
- * @returns {ParagraphPropertyChange}
1528
- */
1529
613
  date(date: string): ParagraphPropertyChange;
1530
- /**
1531
- * @param {number} id
1532
- * @param {number} level
1533
- * @returns {ParagraphPropertyChange}
1534
- */
1535
614
  numbering(id: number, level: number): ParagraphPropertyChange;
1536
- /**
1537
- * @param {number} alignment_type
1538
- * @returns {ParagraphPropertyChange}
1539
- */
1540
- align(alignment_type: number): ParagraphPropertyChange;
1541
- /**
1542
- * @param {string} style_id
1543
- * @returns {ParagraphPropertyChange}
1544
- */
615
+ align(alignment_type: AlignmentType): ParagraphPropertyChange;
1545
616
  style(style_id: string): ParagraphPropertyChange;
1546
- /**
1547
- * @param {number} left
1548
- * @param {number | undefined} special_indent_kind
1549
- * @param {number | undefined} special_indent_size
1550
- * @returns {ParagraphPropertyChange}
1551
- */
1552
- indent(left: number, special_indent_kind?: number, special_indent_size?: number): ParagraphPropertyChange;
1553
- }
1554
- /**
1555
- */
617
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): ParagraphPropertyChange;
618
+ }
1556
619
  export class Pic {
620
+ private constructor();
1557
621
  free(): void;
1558
- /**
1559
- * @param {number} w_emu
1560
- * @param {number} h_emu
1561
- * @returns {Pic}
1562
- */
1563
622
  size(w_emu: number, h_emu: number): Pic;
1564
- /**
1565
- * @param {number} deg
1566
- * @returns {Pic}
1567
- */
1568
623
  rotate(deg: number): Pic;
1569
- /**
1570
- * @returns {Pic}
1571
- */
1572
624
  floating(): Pic;
1573
- /**
1574
- * @param {number} x
1575
- * @returns {Pic}
1576
- */
1577
625
  offset_x(x: number): Pic;
1578
- /**
1579
- * @param {number} y
1580
- * @returns {Pic}
1581
- */
1582
626
  offset_y(y: number): Pic;
1583
627
  }
1584
- /**
1585
- */
1586
628
  export class PositionalTab {
629
+ private constructor();
1587
630
  free(): void;
1588
- /**
1589
- * @param {number} alignment
1590
- * @returns {PositionalTab}
1591
- */
1592
- alignment(alignment: number): PositionalTab;
1593
- /**
1594
- * @param {number} relative_to
1595
- * @returns {PositionalTab}
1596
- */
1597
- relative_to(relative_to: number): PositionalTab;
1598
- /**
1599
- * @param {number} leader
1600
- * @returns {PositionalTab}
1601
- */
1602
- leader(leader: number): PositionalTab;
1603
- }
1604
- /**
1605
- */
631
+ alignment(alignment: PositionalTabAlignmentType): PositionalTab;
632
+ relative_to(relative_to: PositionalTabRelativeTo): PositionalTab;
633
+ leader(leader: TabLeaderType): PositionalTab;
634
+ }
1606
635
  export class Run {
636
+ private constructor();
1607
637
  free(): void;
1608
- /**
1609
- * @param {string} text
1610
- * @returns {Run}
1611
- */
1612
638
  add_text(text: string): Run;
1613
- /**
1614
- * @param {Pic} pic
1615
- * @returns {Run}
1616
- */
1617
639
  add_image(pic: Pic): Run;
1618
- /**
1619
- * @param {string} text
1620
- * @returns {Run}
1621
- */
1622
640
  add_delete_text(text: string): Run;
1623
- /**
1624
- * @returns {Run}
1625
- */
1626
641
  add_tab(): Run;
1627
- /**
1628
- * @param {PositionalTab} ptab
1629
- * @returns {Run}
1630
- */
1631
642
  add_ptab(ptab: PositionalTab): Run;
1632
- /**
1633
- * @param {number} break_type
1634
- * @returns {Run}
1635
- */
1636
- add_break(break_type: number): Run;
1637
- /**
1638
- * @param {string} text
1639
- * @param {boolean} omits_page_number
1640
- * @param {number | undefined} level
1641
- * @param {string | undefined} id
1642
- * @returns {Run}
1643
- */
1644
- add_tc(text: string, omits_page_number: boolean, level?: number, id?: string): Run;
1645
- /**
1646
- * @param {string} style
1647
- * @returns {Run}
1648
- */
643
+ add_break(break_type: BreakType): Run;
644
+ add_tc(text: string, omits_page_number: boolean, level?: number | null, id?: string | null): Run;
1649
645
  style(style: string): Run;
1650
- /**
1651
- * @param {number} size
1652
- * @returns {Run}
1653
- */
1654
646
  size(size: number): Run;
1655
- /**
1656
- * @param {string} color
1657
- * @returns {Run}
1658
- */
1659
647
  color(color: string): Run;
1660
- /**
1661
- * @param {string} color
1662
- * @returns {Run}
1663
- */
1664
648
  highlight(color: string): Run;
1665
- /**
1666
- * @returns {Run}
1667
- */
1668
649
  bold(): Run;
1669
- /**
1670
- * @returns {Run}
1671
- */
1672
650
  italic(): Run;
1673
- /**
1674
- * @returns {Run}
1675
- */
1676
651
  strike(): Run;
1677
- /**
1678
- * @returns {Run}
1679
- */
1680
652
  dstrike(): Run;
1681
- /**
1682
- * @param {string} line_type
1683
- * @returns {Run}
1684
- */
1685
653
  underline(line_type: string): Run;
1686
- /**
1687
- * @returns {Run}
1688
- */
1689
654
  vanish(): Run;
1690
- /**
1691
- * @param {RunFonts} f
1692
- * @returns {Run}
1693
- */
1694
655
  fonts(f: RunFonts): Run;
1695
- /**
1696
- * @param {number} spacing
1697
- * @returns {Run}
1698
- */
1699
656
  character_spacing(spacing: number): Run;
1700
- /**
1701
- * @param {number} a
1702
- * @returns {Run}
1703
- */
1704
- vert_align(a: number): Run;
1705
- /**
1706
- * @param {string} t
1707
- * @param {string} color
1708
- * @param {string} fill
1709
- * @returns {Run}
1710
- */
657
+ vert_align(a: VertAlignType): Run;
1711
658
  shading(t: string, color: string, fill: string): Run;
1712
- /**
1713
- * @param {number} border_type
1714
- * @param {number} size
1715
- * @param {number} space
1716
- * @param {string} color
1717
- * @returns {Run}
1718
- */
1719
- text_border(border_type: number, size: number, space: number, color: string): Run;
1720
- }
1721
- /**
1722
- */
659
+ text_border(border_type: BorderType, size: number, space: number, color: string): Run;
660
+ }
1723
661
  export class RunFonts {
662
+ private constructor();
1724
663
  free(): void;
1725
- /**
1726
- * @param {string} f
1727
- * @returns {RunFonts}
1728
- */
1729
664
  ascii(f: string): RunFonts;
1730
- /**
1731
- * @param {string} f
1732
- * @returns {RunFonts}
1733
- */
1734
665
  hi_ansi(f: string): RunFonts;
1735
- /**
1736
- * @param {string} f
1737
- * @returns {RunFonts}
1738
- */
1739
666
  cs(f: string): RunFonts;
1740
- /**
1741
- * @param {string} f
1742
- * @returns {RunFonts}
1743
- */
1744
667
  east_asia(f: string): RunFonts;
1745
- /**
1746
- * @param {string} f
1747
- * @returns {RunFonts}
1748
- */
1749
668
  ascii_theme(f: string): RunFonts;
1750
- /**
1751
- * @param {string} f
1752
- * @returns {RunFonts}
1753
- */
1754
669
  hi_ansi_theme(f: string): RunFonts;
1755
- /**
1756
- * @param {string} f
1757
- * @returns {RunFonts}
1758
- */
1759
670
  cs_theme(f: string): RunFonts;
1760
- /**
1761
- * @param {string} f
1762
- * @returns {RunFonts}
1763
- */
1764
671
  east_asia_theme(f: string): RunFonts;
1765
- /**
1766
- * @param {string} f
1767
- * @returns {RunFonts}
1768
- */
1769
672
  hint(f: string): RunFonts;
1770
673
  }
1771
- /**
1772
- */
1773
674
  export class RunProperty {
675
+ private constructor();
1774
676
  free(): void;
1775
- /**
1776
- * @param {number} size
1777
- * @returns {RunProperty}
1778
- */
1779
677
  size(size: number): RunProperty;
1780
- /**
1781
- * @param {string} c
1782
- * @returns {RunProperty}
1783
- */
1784
678
  color(c: string): RunProperty;
1785
- /**
1786
- * @returns {RunProperty}
1787
- */
1788
679
  bold(): RunProperty;
1789
- /**
1790
- * @returns {RunProperty}
1791
- */
1792
680
  disable_bold(): RunProperty;
1793
- /**
1794
- * @returns {RunProperty}
1795
- */
1796
681
  italic(): RunProperty;
1797
- /**
1798
- * @returns {RunProperty}
1799
- */
1800
682
  disable_italic(): RunProperty;
1801
- /**
1802
- * @returns {RunProperty}
1803
- */
1804
683
  strike(): RunProperty;
1805
- /**
1806
- * @returns {RunProperty}
1807
- */
1808
684
  disable_strike(): RunProperty;
1809
- /**
1810
- * @returns {RunProperty}
1811
- */
1812
685
  dstrike(): RunProperty;
1813
- /**
1814
- * @returns {RunProperty}
1815
- */
1816
686
  disable_dstrike(): RunProperty;
1817
- /**
1818
- * @param {RunFonts} f
1819
- * @returns {RunProperty}
1820
- */
1821
687
  fonts(f: RunFonts): RunProperty;
1822
- /**
1823
- * @param {string} line_type
1824
- * @returns {RunProperty}
1825
- */
1826
688
  underline(line_type: string): RunProperty;
1827
- /**
1828
- * @returns {RunProperty}
1829
- */
1830
689
  vanish(): RunProperty;
1831
- /**
1832
- * @returns {RunProperty}
1833
- */
1834
690
  spec_vanish(): RunProperty;
1835
- /**
1836
- * @param {number} spacing
1837
- * @returns {RunProperty}
1838
- */
1839
691
  character_spacing(spacing: number): RunProperty;
1840
- /**
1841
- * @param {number} a
1842
- * @returns {RunProperty}
1843
- */
1844
- vert_align(a: number): RunProperty;
1845
- /**
1846
- * @param {string} author
1847
- * @param {string} date
1848
- * @returns {RunProperty}
1849
- */
692
+ vert_align(a: VertAlignType): RunProperty;
1850
693
  delete(author: string, date: string): RunProperty;
1851
- /**
1852
- * @param {string} author
1853
- * @param {string} date
1854
- * @returns {RunProperty}
1855
- */
1856
694
  insert(author: string, date: string): RunProperty;
1857
- /**
1858
- * @param {string} style_id
1859
- * @returns {RunProperty}
1860
- */
1861
695
  style(style_id: string): RunProperty;
1862
- /**
1863
- * @param {string} color
1864
- * @returns {RunProperty}
1865
- */
1866
696
  highlight(color: string): RunProperty;
1867
- /**
1868
- * @param {number} border_type
1869
- * @param {number} size
1870
- * @param {number} space
1871
- * @param {string} color
1872
- * @returns {RunProperty}
1873
- */
1874
- text_border(border_type: number, size: number, space: number, color: string): RunProperty;
1875
- /**
1876
- * @param {string} t
1877
- * @param {string} color
1878
- * @param {string} fill
1879
- * @returns {RunProperty}
1880
- */
697
+ text_border(border_type: BorderType, size: number, space: number, color: string): RunProperty;
1881
698
  shading(t: string, color: string, fill: string): RunProperty;
1882
699
  }
1883
- /**
1884
- */
1885
700
  export class Style {
701
+ private constructor();
1886
702
  free(): void;
1887
- /**
1888
- * @param {string} name
1889
- * @returns {Style}
1890
- */
1891
703
  name(name: string): Style;
1892
- /**
1893
- * @param {string} base
1894
- * @returns {Style}
1895
- */
1896
704
  based_on(base: string): Style;
1897
- /**
1898
- * @param {number} size
1899
- * @returns {Style}
1900
- */
1901
705
  size(size: number): Style;
1902
- /**
1903
- * @param {string} color
1904
- * @returns {Style}
1905
- */
1906
706
  color(color: string): Style;
1907
- /**
1908
- * @param {string} color
1909
- * @returns {Style}
1910
- */
1911
707
  highlight(color: string): Style;
1912
- /**
1913
- * @returns {Style}
1914
- */
1915
708
  bold(): Style;
1916
- /**
1917
- * @returns {Style}
1918
- */
1919
709
  italic(): Style;
1920
- /**
1921
- * @returns {Style}
1922
- */
1923
710
  strike(): Style;
1924
- /**
1925
- * @returns {Style}
1926
- */
1927
711
  dstrike(): Style;
1928
- /**
1929
- * @param {string} line_type
1930
- * @returns {Style}
1931
- */
1932
712
  underline(line_type: string): Style;
1933
- /**
1934
- * @param {string} t
1935
- * @param {string} color
1936
- * @param {string} fill
1937
- * @returns {Style}
1938
- */
1939
713
  shading(t: string, color: string, fill: string): Style;
1940
- /**
1941
- * @param {string} link
1942
- * @returns {Style}
1943
- */
1944
714
  link(link: string): Style;
1945
- /**
1946
- * @returns {Style}
1947
- */
1948
715
  vanish(): Style;
1949
- /**
1950
- * @param {RunFonts} f
1951
- * @returns {Style}
1952
- */
1953
716
  fonts(f: RunFonts): Style;
1954
- /**
1955
- * @param {number} spacing
1956
- * @returns {Style}
1957
- */
1958
717
  character_spacing(spacing: number): Style;
1959
- /**
1960
- * @param {number} a
1961
- * @returns {Style}
1962
- */
1963
- vert_align(a: number): Style;
1964
- /**
1965
- * @param {number} border_type
1966
- * @param {number} size
1967
- * @param {number} space
1968
- * @param {string} color
1969
- * @returns {Style}
1970
- */
1971
- text_border(border_type: number, size: number, space: number, color: string): Style;
1972
- /**
1973
- * @param {number} alignment_type
1974
- * @returns {Style}
1975
- */
1976
- align(alignment_type: number): Style;
1977
- /**
1978
- * @param {number} alignment_type
1979
- * @returns {Style}
1980
- */
1981
- text_alignment(alignment_type: number): Style;
1982
- /**
1983
- * @param {number} v
1984
- * @returns {Style}
1985
- */
718
+ vert_align(a: VertAlignType): Style;
719
+ text_border(border_type: BorderType, size: number, space: number, color: string): Style;
720
+ align(alignment_type: AlignmentType): Style;
721
+ text_alignment(alignment_type: TextAlignmentType): Style;
1986
722
  adjust_right_ind(v: number): Style;
1987
- /**
1988
- * @param {number | undefined} val
1989
- * @param {number | undefined} leader
1990
- * @param {number | undefined} pos
1991
- * @returns {Style}
1992
- */
1993
- add_tab(val?: number, leader?: number, pos?: number): Style;
1994
- /**
1995
- * @param {number} left
1996
- * @param {number | undefined} special_indent_kind
1997
- * @param {number | undefined} special_indent_size
1998
- * @returns {Style}
1999
- */
2000
- indent(left: number, special_indent_kind?: number, special_indent_size?: number): Style;
2001
- /**
2002
- * @param {number} l
2003
- * @returns {Style}
2004
- */
723
+ add_tab(val?: TabValueType | null, leader?: TabLeaderType | null, pos?: number | null): Style;
724
+ indent(left: number, special_indent_kind?: SpecialIndentKind | null, special_indent_size?: number | null): Style;
2005
725
  outline_lvl(l: number): Style;
2006
- /**
2007
- * @param {number} id
2008
- * @param {number} level
2009
- * @returns {Style}
2010
- */
2011
726
  numbering(id: number, level: number): Style;
2012
- /**
2013
- * @param {LineSpacing} spacing
2014
- * @returns {Style}
2015
- */
2016
727
  line_spacing(spacing: LineSpacing): Style;
2017
- /**
2018
- * @param {boolean} v
2019
- * @returns {Style}
2020
- */
2021
728
  snap_to_grid(v: boolean): Style;
2022
- /**
2023
- * @param {boolean} v
2024
- * @returns {Style}
2025
- */
2026
729
  keep_next(v: boolean): Style;
2027
- /**
2028
- * @param {boolean} v
2029
- * @returns {Style}
2030
- */
2031
730
  keep_lines(v: boolean): Style;
2032
- /**
2033
- * @param {boolean} v
2034
- * @returns {Style}
2035
- */
2036
731
  page_break_before(v: boolean): Style;
2037
- /**
2038
- * @param {boolean} v
2039
- * @returns {Style}
2040
- */
2041
732
  widow_control(v: boolean): Style;
2042
- /**
2043
- * @param {RunProperty} p
2044
- * @returns {Style}
2045
- */
2046
733
  run_property(p: RunProperty): Style;
2047
- /**
2048
- * @param {ParagraphProperty} p
2049
- * @returns {Style}
2050
- */
2051
734
  paragraph_property(p: ParagraphProperty): Style;
2052
- /**
2053
- * @param {TableProperty} p
2054
- * @returns {Style}
2055
- */
2056
735
  table_property(p: TableProperty): Style;
2057
- /**
2058
- * @param {TableCellProperty} p
2059
- * @returns {Style}
2060
- */
2061
736
  table_cell_property(p: TableCellProperty): Style;
2062
- /**
2063
- * @param {number} v
2064
- * @returns {Style}
2065
- */
2066
737
  table_indent(v: number): Style;
2067
- /**
2068
- * @param {number} v
2069
- * @returns {Style}
2070
- */
2071
- table_align(v: number): Style;
2072
- /**
2073
- * @param {number} top
2074
- * @param {number} right
2075
- * @param {number} bottom
2076
- * @param {number} left
2077
- * @returns {Style}
2078
- */
738
+ table_align(v: TableAlignmentType): Style;
2079
739
  set_cell_margins(top: number, right: number, bottom: number, left: number): Style;
2080
- /**
2081
- * @param {number} v
2082
- * @param {number} t
2083
- * @returns {Style}
2084
- */
2085
- cell_margin_top(v: number, t: number): Style;
2086
- /**
2087
- * @param {number} v
2088
- * @param {number} t
2089
- * @returns {Style}
2090
- */
2091
- cell_margin_right(v: number, t: number): Style;
2092
- /**
2093
- * @param {number} v
2094
- * @param {number} t
2095
- * @returns {Style}
2096
- */
2097
- cell_margin_bottom(v: number, t: number): Style;
2098
- /**
2099
- * @param {number} v
2100
- * @param {number} t
2101
- * @returns {Style}
2102
- */
2103
- cell_margin_left(v: number, t: number): Style;
2104
- /**
2105
- * @param {number} t
2106
- * @returns {Style}
2107
- */
2108
- layout(t: number): Style;
2109
- /**
2110
- * @param {string} wrap
2111
- * @returns {Style}
2112
- */
740
+ cell_margin_top(v: number, t: WidthType): Style;
741
+ cell_margin_right(v: number, t: WidthType): Style;
742
+ cell_margin_bottom(v: number, t: WidthType): Style;
743
+ cell_margin_left(v: number, t: WidthType): Style;
744
+ layout(t: TableLayoutType): Style;
2113
745
  wrap(wrap: string): Style;
2114
- /**
2115
- * @param {string} anchor
2116
- * @returns {Style}
2117
- */
2118
746
  v_anchor(anchor: string): Style;
2119
- /**
2120
- * @param {string} anchor
2121
- * @returns {Style}
2122
- */
2123
747
  h_anchor(anchor: string): Style;
2124
- /**
2125
- * @param {string} r
2126
- * @returns {Style}
2127
- */
2128
748
  h_rule(r: string): Style;
2129
- /**
2130
- * @param {string} align
2131
- * @returns {Style}
2132
- */
2133
749
  x_align(align: string): Style;
2134
- /**
2135
- * @param {string} align
2136
- * @returns {Style}
2137
- */
2138
750
  y_align(align: string): Style;
2139
- /**
2140
- * @param {number} x
2141
- * @returns {Style}
2142
- */
2143
751
  h_space(x: number): Style;
2144
- /**
2145
- * @param {number} x
2146
- * @returns {Style}
2147
- */
2148
752
  v_space(x: number): Style;
2149
- /**
2150
- * @param {number} x
2151
- * @returns {Style}
2152
- */
2153
753
  frame_x(x: number): Style;
2154
- /**
2155
- * @param {number} y
2156
- * @returns {Style}
2157
- */
2158
754
  frame_y(y: number): Style;
2159
- /**
2160
- * @param {number} n
2161
- * @returns {Style}
2162
- */
2163
755
  frame_width(n: number): Style;
2164
- /**
2165
- * @param {number} n
2166
- * @returns {Style}
2167
- */
2168
756
  frame_height(n: number): Style;
2169
757
  }
2170
- /**
2171
- */
2172
758
  export class Table {
759
+ private constructor();
2173
760
  free(): void;
2174
- /**
2175
- * @param {TableRow} row
2176
- * @returns {Table}
2177
- */
2178
761
  add_row(row: TableRow): Table;
2179
- /**
2180
- * @param {Uint32Array} grid
2181
- * @returns {Table}
2182
- */
2183
762
  set_grid(grid: Uint32Array): Table;
2184
- /**
2185
- * @param {string} style_id
2186
- * @returns {Table}
2187
- */
2188
763
  style(style_id: string): Table;
2189
- /**
2190
- * @param {number} v
2191
- * @returns {Table}
2192
- */
2193
764
  indent(v: number): Table;
2194
- /**
2195
- * @param {number} v
2196
- * @returns {Table}
2197
- */
2198
- align(v: number): Table;
2199
- /**
2200
- * @param {number} w
2201
- * @returns {Table}
2202
- */
765
+ align(v: TableAlignmentType): Table;
2203
766
  width(w: number): Table;
2204
- /**
2205
- * @param {number} t
2206
- * @returns {Table}
2207
- */
2208
- layout(t: number): Table;
2209
- /**
2210
- * @param {TablePositionProperty} p
2211
- * @returns {Table}
2212
- */
767
+ layout(t: TableLayoutType): Table;
2213
768
  position(p: TablePositionProperty): Table;
2214
- /**
2215
- * @param {number} top
2216
- * @param {number} right
2217
- * @param {number} bottom
2218
- * @param {number} left
2219
- * @returns {Table}
2220
- */
2221
769
  set_cell_margins(top: number, right: number, bottom: number, left: number): Table;
2222
- /**
2223
- * @param {number} v
2224
- * @param {number} t
2225
- * @returns {Table}
2226
- */
2227
- cell_margin_top(v: number, t: number): Table;
2228
- /**
2229
- * @param {number} v
2230
- * @param {number} t
2231
- * @returns {Table}
2232
- */
2233
- cell_margin_right(v: number, t: number): Table;
2234
- /**
2235
- * @param {number} v
2236
- * @param {number} t
2237
- * @returns {Table}
2238
- */
2239
- cell_margin_bottom(v: number, t: number): Table;
2240
- /**
2241
- * @param {number} v
2242
- * @param {number} t
2243
- * @returns {Table}
2244
- */
2245
- cell_margin_left(v: number, t: number): Table;
2246
- }
2247
- /**
2248
- */
770
+ cell_margin_top(v: number, t: WidthType): Table;
771
+ cell_margin_right(v: number, t: WidthType): Table;
772
+ cell_margin_bottom(v: number, t: WidthType): Table;
773
+ cell_margin_left(v: number, t: WidthType): Table;
774
+ }
2249
775
  export class TableCell {
776
+ private constructor();
2250
777
  free(): void;
2251
- /**
2252
- * @param {Paragraph} p
2253
- * @returns {TableCell}
2254
- */
2255
778
  add_paragraph(p: Paragraph): TableCell;
2256
- /**
2257
- * @param {Table} t
2258
- * @returns {TableCell}
2259
- */
2260
779
  add_table(t: Table): TableCell;
2261
- /**
2262
- * @param {TableOfContents} t
2263
- * @returns {TableCell}
2264
- */
2265
780
  add_table_of_contents(t: TableOfContents): TableCell;
2266
- /**
2267
- * @param {number} t
2268
- * @returns {TableCell}
2269
- */
2270
- vertical_merge(t: number): TableCell;
2271
- /**
2272
- * @param {number} t
2273
- * @returns {TableCell}
2274
- */
2275
- vertical_align(t: number): TableCell;
2276
- /**
2277
- * @param {number} v
2278
- * @returns {TableCell}
2279
- */
781
+ vertical_merge(t: VMergeType): TableCell;
782
+ vertical_align(t: VAlignType): TableCell;
2280
783
  grid_span(v: number): TableCell;
2281
- /**
2282
- * @param {number} v
2283
- * @returns {TableCell}
2284
- */
2285
784
  width(v: number): TableCell;
2286
- /**
2287
- * @param {string} t
2288
- * @param {string} color
2289
- * @param {string} fill
2290
- * @returns {TableCell}
2291
- */
2292
785
  shading(t: string, color: string, fill: string): TableCell;
2293
- /**
2294
- * @param {number} t
2295
- * @returns {TableCell}
2296
- */
2297
- text_direction(t: number): TableCell;
2298
- /**
2299
- * @param {TableCellBorder} border
2300
- * @returns {TableCell}
2301
- */
786
+ text_direction(t: TextDirectionType): TableCell;
2302
787
  set_border(border: TableCellBorder): TableCell;
2303
- /**
2304
- * @param {number} position
2305
- * @returns {TableCell}
2306
- */
2307
- clear_border(position: number): TableCell;
2308
- /**
2309
- * @returns {TableCell}
2310
- */
788
+ clear_border(position: TableCellBorderPosition): TableCell;
2311
789
  clear_all_border(): TableCell;
2312
- /**
2313
- * @param {number} v
2314
- * @param {number} t
2315
- * @returns {TableCell}
2316
- */
2317
- margin_top(v: number, t: number): TableCell;
2318
- /**
2319
- * @param {number} v
2320
- * @param {number} t
2321
- * @returns {TableCell}
2322
- */
2323
- margin_right(v: number, t: number): TableCell;
2324
- /**
2325
- * @param {number} v
2326
- * @param {number} t
2327
- * @returns {TableCell}
2328
- */
2329
- margin_bottom(v: number, t: number): TableCell;
2330
- /**
2331
- * @param {number} v
2332
- * @param {number} t
2333
- * @returns {TableCell}
2334
- */
2335
- margin_left(v: number, t: number): TableCell;
2336
- }
2337
- /**
2338
- */
790
+ margin_top(v: number, t: WidthType): TableCell;
791
+ margin_right(v: number, t: WidthType): TableCell;
792
+ margin_bottom(v: number, t: WidthType): TableCell;
793
+ margin_left(v: number, t: WidthType): TableCell;
794
+ }
2339
795
  export class TableCellBorder {
796
+ private constructor();
2340
797
  free(): void;
2341
- /**
2342
- * @param {number} size
2343
- * @returns {TableCellBorder}
2344
- */
2345
798
  size(size: number): TableCellBorder;
2346
- /**
2347
- * @param {string} color
2348
- * @returns {TableCellBorder}
2349
- */
2350
799
  color(color: string): TableCellBorder;
2351
- /**
2352
- * @param {number} border_type
2353
- * @returns {TableCellBorder}
2354
- */
2355
- border_type(border_type: number): TableCellBorder;
2356
- /**
2357
- * @returns {number}
2358
- */
800
+ border_type(border_type: BorderType): TableCellBorder;
2359
801
  get_size(): number;
2360
- /**
2361
- * @returns {string}
2362
- */
2363
802
  get_color(): string;
2364
- /**
2365
- * @returns {number}
2366
- */
2367
- get_border_type(): number;
803
+ get_border_type(): BorderType;
2368
804
  }
2369
- /**
2370
- */
2371
805
  export class TableCellProperty {
806
+ private constructor();
2372
807
  free(): void;
2373
808
  }
2374
- /**
2375
- */
2376
809
  export class TableOfContents {
810
+ private constructor();
2377
811
  free(): void;
2378
- /**
2379
- * @param {number} start
2380
- * @param {number} end
2381
- * @returns {TableOfContents}
2382
- */
2383
812
  heading_styles_range(start: number, end: number): TableOfContents;
2384
- /**
2385
- * @param {string | undefined} f
2386
- * @returns {TableOfContents}
2387
- */
2388
- tc_field_identifier(f?: string): TableOfContents;
2389
- /**
2390
- * @param {string} style
2391
- * @param {number} level
2392
- * @returns {TableOfContents}
2393
- */
813
+ tc_field_identifier(f?: string | null): TableOfContents;
2394
814
  add_style_with_level(style: string, level: number): TableOfContents;
2395
- /**
2396
- * @returns {TableOfContents}
2397
- */
2398
815
  hyperlink(): TableOfContents;
2399
- /**
2400
- * @param {string} a
2401
- * @returns {TableOfContents}
2402
- */
2403
816
  alias(a: string): TableOfContents;
2404
- /**
2405
- * @param {string} a
2406
- * @returns {TableOfContents}
2407
- */
2408
817
  page_ref_placeholder(a: string): TableOfContents;
2409
- /**
2410
- * @param {TableOfContentsItem} t
2411
- * @returns {TableOfContents}
2412
- */
2413
818
  add_item(t: TableOfContentsItem): TableOfContents;
2414
- /**
2415
- * @returns {TableOfContents}
2416
- */
2417
819
  auto(): TableOfContents;
2418
- /**
2419
- * @returns {TableOfContents}
2420
- */
2421
820
  dirty(): TableOfContents;
2422
- /**
2423
- * @returns {TableOfContents}
2424
- */
2425
821
  without_sdt(): TableOfContents;
2426
- /**
2427
- * @param {string} author
2428
- * @param {string} date
2429
- * @returns {TableOfContents}
2430
- */
2431
822
  delete(author: string, date: string): TableOfContents;
2432
- /**
2433
- * @param {Paragraph} p
2434
- * @returns {TableOfContents}
2435
- */
2436
823
  add_before_paragraph(p: Paragraph): TableOfContents;
2437
- /**
2438
- * @param {Paragraph} p
2439
- * @returns {TableOfContents}
2440
- */
2441
824
  add_after_paragraph(p: Paragraph): TableOfContents;
2442
- /**
2443
- * @param {Table} t
2444
- * @returns {TableOfContents}
2445
- */
2446
825
  add_before_table(t: Table): TableOfContents;
2447
- /**
2448
- * @param {Table} t
2449
- * @returns {TableOfContents}
2450
- */
2451
826
  add_after_table(t: Table): TableOfContents;
2452
- /**
2453
- * @param {ParagraphProperty} p
2454
- * @returns {TableOfContents}
2455
- */
2456
827
  paragraph_property(p: ParagraphProperty): TableOfContents;
2457
828
  }
2458
- /**
2459
- */
2460
829
  export class TableOfContentsItem {
830
+ private constructor();
2461
831
  free(): void;
2462
- /**
2463
- * @param {string} a
2464
- * @returns {TableOfContentsItem}
2465
- */
2466
832
  text(a: string): TableOfContentsItem;
2467
- /**
2468
- * @param {string} a
2469
- * @returns {TableOfContentsItem}
2470
- */
2471
833
  toc_key(a: string): TableOfContentsItem;
2472
- /**
2473
- * @param {number} l
2474
- * @returns {TableOfContentsItem}
2475
- */
2476
834
  level(l: number): TableOfContentsItem;
2477
- /**
2478
- * @param {string} a
2479
- * @returns {TableOfContentsItem}
2480
- */
2481
835
  page_ref(a: string): TableOfContentsItem;
2482
836
  }
2483
- /**
2484
- */
2485
837
  export class TablePositionProperty {
838
+ private constructor();
2486
839
  free(): void;
2487
- /**
2488
- * @param {number} v
2489
- * @returns {TablePositionProperty}
2490
- */
2491
840
  left_from_text(v: number): TablePositionProperty;
2492
- /**
2493
- * @param {number} v
2494
- * @returns {TablePositionProperty}
2495
- */
2496
841
  right_from_text(v: number): TablePositionProperty;
2497
- /**
2498
- * @param {string} v
2499
- * @returns {TablePositionProperty}
2500
- */
2501
842
  vertical_anchor(v: string): TablePositionProperty;
2502
- /**
2503
- * @param {string} v
2504
- * @returns {TablePositionProperty}
2505
- */
2506
843
  horizontal_anchor(v: string): TablePositionProperty;
2507
- /**
2508
- * @param {string} v
2509
- * @returns {TablePositionProperty}
2510
- */
2511
844
  position_x_alignment(v: string): TablePositionProperty;
2512
- /**
2513
- * @param {string} v
2514
- * @returns {TablePositionProperty}
2515
- */
2516
845
  position_y_alignment(v: string): TablePositionProperty;
2517
- /**
2518
- * @param {number} v
2519
- * @returns {TablePositionProperty}
2520
- */
2521
846
  position_x(v: number): TablePositionProperty;
2522
- /**
2523
- * @param {number} v
2524
- * @returns {TablePositionProperty}
2525
- */
2526
847
  position_y(v: number): TablePositionProperty;
2527
848
  }
2528
- /**
2529
- */
2530
849
  export class TableProperty {
850
+ private constructor();
2531
851
  free(): void;
2532
852
  }
2533
- /**
2534
- */
2535
853
  export class TableRow {
854
+ private constructor();
2536
855
  free(): void;
2537
- /**
2538
- * @param {TableCell} cell
2539
- * @returns {TableRow}
2540
- */
2541
856
  add_cell(cell: TableCell): TableRow;
2542
- /**
2543
- * @param {number} h
2544
- * @returns {TableRow}
2545
- */
2546
857
  row_height(h: number): TableRow;
2547
- /**
2548
- * @param {number} r
2549
- * @returns {TableRow}
2550
- */
2551
- height_rule(r: number): TableRow;
2552
- /**
2553
- * @param {string} author
2554
- * @param {string} date
2555
- * @returns {TableRow}
2556
- */
858
+ height_rule(r: HeightRule): TableRow;
2557
859
  delete(author: string, date: string): TableRow;
2558
- /**
2559
- * @param {string} author
2560
- * @param {string} date
2561
- * @returns {TableRow}
2562
- */
2563
860
  insert(author: string, date: string): TableRow;
2564
861
  }
2565
- /**
2566
- */
2567
862
  export class WebExtension {
863
+ private constructor();
2568
864
  free(): void;
2569
- /**
2570
- * @param {string} name
2571
- * @param {string} value
2572
- * @returns {WebExtension}
2573
- */
2574
865
  property(name: string, value: string): WebExtension;
2575
866
  }