docx-wasm 0.4.18-rc13 → 0.4.18-rc15

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,22 +1,34 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * @returns {Docx}
4
+ * @returns {ParagraphPropertyChange}
5
5
  */
6
- export function createDocx(): Docx;
6
+ export function createParagraphPropertyChange(): ParagraphPropertyChange;
7
7
  /**
8
- * @returns {Header}
8
+ * @returns {Paragraph}
9
9
  */
10
- export function createHeader(): Header;
10
+ export function createParagraph(): Paragraph;
11
11
  /**
12
- * @param {Run} run
13
- * @returns {Insert}
12
+ * @param {Uint8Array} buf
13
+ * @returns {string}
14
14
  */
15
- export function createInsert(run: Run): Insert;
15
+ export function readDocx(buf: Uint8Array): string;
16
16
  /**
17
- * @returns {NumPages}
17
+ * @param {number} id
18
+ * @param {number} abstract_num_id
19
+ * @returns {Numbering}
18
20
  */
19
- export function createNumPages(): NumPages;
21
+ export function createNumbering(id: number, abstract_num_id: number): Numbering;
22
+ /**
23
+ * @returns {PageNum}
24
+ */
25
+ export function createPageNum(): PageNum;
26
+ /**
27
+ * @param {number | undefined} start
28
+ * @param {string | undefined} chap_style
29
+ * @returns {PageNumType}
30
+ */
31
+ export function createPageNumType(start?: number, chap_style?: string): PageNumType;
20
32
  /**
21
33
  * @returns {TableOfContents}
22
34
  */
@@ -27,6 +39,14 @@ export function createTableOfContents(): TableOfContents;
27
39
  */
28
40
  export function createTableOfContentsWithInstrText(s: string): TableOfContents;
29
41
  /**
42
+ * @returns {TableOfContentsItem}
43
+ */
44
+ export function createTableOfContentsItem(): TableOfContentsItem;
45
+ /**
46
+ * @returns {TablePositionProperty}
47
+ */
48
+ export function createTablePosition(): TablePositionProperty;
49
+ /**
30
50
  * @param {string} id
31
51
  * @param {string} reference_id
32
52
  * @param {string} version
@@ -36,62 +56,16 @@ export function createTableOfContentsWithInstrText(s: string): TableOfContents;
36
56
  */
37
57
  export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
38
58
  /**
39
- * @returns {Footer}
40
- */
41
- export function createFooter(): Footer;
42
- /**
43
- * @param {number} id
44
- * @param {number} start
45
- * @param {string} format
46
- * @param {string} text
47
- * @param {string} jc
48
- * @returns {Level}
49
- */
50
- export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
51
- /**
52
- * @param {number} level
53
- * @returns {LevelOverride}
54
- */
55
- export function createLevelOverride(level: number): LevelOverride;
56
- /**
57
- * @returns {TableCell}
58
- */
59
- export function createTableCell(): TableCell;
60
- /**
61
- * @returns {TableOfContentsItem}
59
+ * @param {string} style_id
60
+ * @param {number} style_type
61
+ * @returns {Style}
62
62
  */
63
- export function createTableOfContentsItem(): TableOfContentsItem;
63
+ export function createStyle(style_id: string, style_type: number): Style;
64
64
  /**
65
65
  * @param {number} id
66
- * @returns {Comment}
67
- */
68
- export function createComment(id: number): Comment;
69
- /**
70
- * @param {number | undefined} start
71
- * @param {string | undefined} chap_style
72
- * @returns {PageNumType}
73
- */
74
- export function createPageNumType(start?: number, chap_style?: string): PageNumType;
75
- /**
76
- * @returns {RunFonts}
77
- */
78
- export function createRunFonts(): RunFonts;
79
- /**
80
- * @returns {PageMargin}
81
- */
82
- export function createPageMargin(): PageMargin;
83
- /**
84
- * @returns {ParagraphPropertyChange}
85
- */
86
- export function createParagraphPropertyChange(): ParagraphPropertyChange;
87
- /**
88
- * @returns {Paragraph}
89
- */
90
- export function createParagraph(): Paragraph;
91
- /**
92
- * @returns {PageNum}
66
+ * @returns {AbstractNumbering}
93
67
  */
94
- export function createPageNum(): PageNum;
68
+ export function createAbstractNumbering(id: number): AbstractNumbering;
95
69
  /**
96
70
  * @param {number} alignment
97
71
  * @param {number} relative_to
@@ -100,150 +74,101 @@ export function createPageNum(): PageNum;
100
74
  */
101
75
  export function createPositionalTab(alignment: number, relative_to: number, leader: number): PositionalTab;
102
76
  /**
103
- * @param {string} style_id
104
- * @param {number} style_type
105
- * @returns {Style}
77
+ * @returns {Run}
106
78
  */
107
- export function createStyle(style_id: string, style_type: number): Style;
79
+ export function createRun(): Run;
108
80
  /**
109
- * @param {string} v
110
- * @param {number} t
111
- * @returns {Hyperlink}
81
+ * @param {number} position
82
+ * @returns {TableCellBorder}
112
83
  */
113
- export function createHyperlink(v: string, t: number): Hyperlink;
84
+ export function createTableCellBorder(position: number): TableCellBorder;
114
85
  /**
115
- * @returns {Table}
86
+ * @returns {TableRow}
116
87
  */
117
- export function createTable(): Table;
88
+ export function createTableRow(): TableRow;
118
89
  /**
119
90
  * @returns {LineSpacing}
120
91
  */
121
92
  export function createLineSpacing(): LineSpacing;
122
93
  /**
123
- * @returns {Run}
94
+ * @returns {Header}
124
95
  */
125
- export function createRun(): Run;
96
+ export function createHeader(): Header;
126
97
  /**
127
- * @param {number} position
128
- * @returns {TableCellBorder}
98
+ * @param {Run} run
99
+ * @returns {Insert}
129
100
  */
130
- export function createTableCellBorder(position: number): TableCellBorder;
101
+ export function createInsert(run: Run): Insert;
131
102
  /**
132
- * @returns {TablePositionProperty}
103
+ * @param {number} id
104
+ * @param {number} start
105
+ * @param {string} format
106
+ * @param {string} text
107
+ * @param {string} jc
108
+ * @returns {Level}
133
109
  */
134
- export function createTablePosition(): TablePositionProperty;
110
+ export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
135
111
  /**
136
- * @returns {TableRow}
112
+ * @param {number} level
113
+ * @returns {LevelOverride}
137
114
  */
138
- export function createTableRow(): TableRow;
115
+ export function createLevelOverride(level: number): LevelOverride;
139
116
  /**
140
- * @param {number} id
141
- * @returns {AbstractNumbering}
117
+ * @returns {Table}
142
118
  */
143
- export function createAbstractNumbering(id: number): AbstractNumbering;
119
+ export function createTable(): Table;
144
120
  /**
145
- * @param {Run} run
146
- * @returns {Delete}
121
+ * @param {string} v
122
+ * @param {number} t
123
+ * @returns {Hyperlink}
147
124
  */
148
- export function createDelete(run: Run): Delete;
125
+ export function createHyperlink(v: string, t: number): Hyperlink;
149
126
  /**
150
- * @param {number} id
151
- * @param {number} abstract_num_id
152
- * @returns {Numbering}
127
+ * @returns {NumPages}
153
128
  */
154
- export function createNumbering(id: number, abstract_num_id: number): Numbering;
129
+ export function createNumPages(): NumPages;
155
130
  /**
156
131
  * @param {Uint8Array} buf
157
132
  * @returns {Pic}
158
133
  */
159
134
  export function createPic(buf: Uint8Array): Pic;
160
135
  /**
161
- * @param {Uint8Array} buf
162
- * @returns {string}
136
+ * @returns {RunFonts}
163
137
  */
164
- export function readDocx(buf: Uint8Array): string;
138
+ export function createRunFonts(): RunFonts;
165
139
  /**
140
+ * @returns {TableCell}
166
141
  */
167
- export enum TableBorderPosition {
168
- Left,
169
- Right,
170
- Top,
171
- Bottom,
172
- InsideH,
173
- InsideV,
174
- }
142
+ export function createTableCell(): TableCell;
175
143
  /**
144
+ * @returns {Docx}
176
145
  */
177
- export enum TableCellBorderPosition {
178
- Left,
179
- Right,
180
- Top,
181
- Bottom,
182
- InsideH,
183
- InsideV,
184
- Tl2br,
185
- Tr2bl,
186
- }
146
+ export function createDocx(): Docx;
187
147
  /**
148
+ * @returns {Footer}
188
149
  */
189
- export enum ParagraphBorderPosition {
190
- Left,
191
- Right,
192
- Top,
193
- Bottom,
194
- Between,
195
- Bar,
196
- }
150
+ export function createFooter(): Footer;
197
151
  /**
152
+ * @param {number} id
153
+ * @returns {Comment}
198
154
  */
199
- export enum PositionalTabRelativeTo {
200
- Indent,
201
- Margin,
202
- }
155
+ export function createComment(id: number): Comment;
203
156
  /**
157
+ * @returns {PageMargin}
204
158
  */
205
- export enum TabLeaderType {
206
- Dot,
207
- Heavy,
208
- Hyphen,
209
- MiddleDot,
210
- None,
211
- Underscore,
212
- }
159
+ export function createPageMargin(): PageMargin;
213
160
  /**
161
+ * @param {Run} run
162
+ * @returns {Delete}
214
163
  */
215
- export enum BorderType {
216
- Nil,
217
- None,
218
- Single,
219
- Thick,
220
- Double,
221
- Dotted,
222
- Dashed,
223
- DotDash,
224
- DotDotDash,
225
- Triple,
226
- ThinThickSmallGap,
227
- ThickThinSmallGap,
228
- ThinThickThinSmallGap,
229
- ThinThickMediumGap,
230
- ThickThinMediumGap,
231
- ThinThickThinMediumGap,
232
- ThinThickLargeGap,
233
- ThickThinLargeGap,
234
- ThinThickThinLargeGap,
235
- Wave,
236
- DoubleWave,
237
- DashSmallGap,
238
- DashDotStroked,
239
- ThreeDEmboss,
240
- ThreeDEngrave,
241
- Outset,
242
- Inset,
243
- Apples,
244
- ArchedScallops,
245
- BabyPacifier,
246
- BabyRattle,
164
+ export function createDelete(run: Run): Delete;
165
+ /**
166
+ */
167
+ export enum BreakType {
168
+ Page,
169
+ Column,
170
+ TextWrapping,
171
+ Unsupported,
247
172
  }
248
173
  /**
249
174
  */
@@ -262,44 +187,10 @@ export enum PicAlign {
262
187
  }
263
188
  /**
264
189
  */
265
- export enum HeightRule {
266
- Auto,
267
- AtLeast,
268
- Exact,
269
- }
270
- /**
271
- */
272
- export enum SpecialIndentKind {
273
- FirstLine,
274
- Hanging,
275
- }
276
- /**
277
- */
278
- export enum StyleType {
279
- Paragraph,
280
- Character,
281
- Numbering,
282
- Table,
283
- Unsupported,
284
- }
285
- /**
286
- */
287
- export enum PageOrientationType {
288
- Landscape,
289
- Portrait,
290
- }
291
- /**
292
- */
293
- export enum TableLayoutType {
294
- Fixed,
295
- Autofit,
296
- }
297
- /**
298
- */
299
- export enum VAlignType {
300
- Top,
301
- Center,
302
- Bottom,
190
+ export enum FieldCharType {
191
+ Begin,
192
+ Separate,
193
+ End,
303
194
  Unsupported,
304
195
  }
305
196
  /**
@@ -311,60 +202,16 @@ export enum FontPitchType {
311
202
  }
312
203
  /**
313
204
  */
314
- export enum TextDirectionType {
315
- Lr,
316
- LrV,
317
- Rl,
318
- RlV,
319
- Tb,
320
- TbV,
321
- TbRlV,
322
- TbRl,
323
- BtLr,
324
- LrTbV,
325
- }
326
- /**
327
- */
328
- export enum VertAlignType {
329
- Baseline,
330
- SuperScript,
331
- SubScript,
332
- Unsupported,
333
- }
334
- /**
335
- */
336
- export enum BreakType {
337
- Page,
338
- Column,
339
- TextWrapping,
340
- Unsupported,
341
- }
342
- /**
343
- */
344
- export enum LevelSuffixType {
345
- Nothing,
346
- Space,
347
- Tab,
348
- }
349
- /**
350
- */
351
- export enum TableAlignmentType {
352
- Center,
353
- Left,
354
- Right,
355
- }
356
- /**
357
- */
358
- export enum HyperlinkType {
359
- Anchor,
360
- External,
205
+ export enum LineSpacingType {
206
+ Auto,
207
+ AtLeast,
208
+ Exact,
361
209
  }
362
210
  /**
363
211
  */
364
- export enum PositionalTabAlignmentType {
365
- Center,
366
- Left,
367
- Right,
212
+ export enum PositionalTabRelativeTo {
213
+ Indent,
214
+ Margin,
368
215
  }
369
216
  /**
370
217
  */
@@ -410,10 +257,38 @@ export enum ShdType {
410
257
  }
411
258
  /**
412
259
  */
413
- export enum LineSpacingType {
414
- Auto,
415
- AtLeast,
416
- Exact,
260
+ export enum AlignmentType {
261
+ Both,
262
+ Center,
263
+ Distribute,
264
+ Start,
265
+ End,
266
+ Left,
267
+ Right,
268
+ Justified,
269
+ }
270
+ /**
271
+ */
272
+ export enum CharacterSpacingValues {
273
+ DoNotCompress,
274
+ CompressPunctuation,
275
+ CompressPunctuationAndJapaneseKana,
276
+ Unsupported,
277
+ }
278
+ /**
279
+ */
280
+ export enum DocGridType {
281
+ Default,
282
+ Lines,
283
+ LinesAndChars,
284
+ SnapToChars,
285
+ }
286
+ /**
287
+ */
288
+ export enum LevelSuffixType {
289
+ Nothing,
290
+ Space,
291
+ Tab,
417
292
  }
418
293
  /**
419
294
  */
@@ -477,57 +352,34 @@ export enum RelativeFromVType {
477
352
  }
478
353
  /**
479
354
  */
480
- export enum TextAlignmentType {
481
- Auto,
482
- Baseline,
483
- Bottom,
484
- Center,
485
- Top,
486
- }
487
- /**
488
- */
489
- export enum AlignmentType {
490
- Both,
491
- Center,
492
- Distribute,
493
- Start,
494
- End,
495
- Left,
496
- Right,
497
- Justified,
355
+ export enum SectionType {
356
+ NextPage,
357
+ NextColumn,
358
+ Continuous,
359
+ EvenPage,
360
+ OddPage,
498
361
  }
499
362
  /**
500
363
  */
501
- export enum CharacterSpacingValues {
502
- DoNotCompress,
503
- CompressPunctuation,
504
- CompressPunctuationAndJapaneseKana,
364
+ export enum WidthType {
365
+ Dxa,
366
+ Auto,
367
+ Pct,
368
+ Nil,
505
369
  Unsupported,
506
370
  }
507
371
  /**
508
372
  */
509
- export enum DocGridType {
510
- Default,
511
- Lines,
512
- LinesAndChars,
513
- SnapToChars,
514
- }
515
- /**
516
- */
517
- export enum FieldCharType {
518
- Begin,
519
- Separate,
520
- End,
521
- Unsupported,
373
+ export enum HyperlinkType {
374
+ Anchor,
375
+ External,
522
376
  }
523
377
  /**
524
378
  */
525
- export enum SectionType {
526
- NextPage,
527
- NextColumn,
528
- Continuous,
529
- EvenPage,
530
- OddPage,
379
+ export enum PositionalTabAlignmentType {
380
+ Center,
381
+ Left,
382
+ Right,
531
383
  }
532
384
  /**
533
385
  */
@@ -544,6 +396,14 @@ export enum TabValueType {
544
396
  }
545
397
  /**
546
398
  */
399
+ export enum VertAlignType {
400
+ Baseline,
401
+ SuperScript,
402
+ SubScript,
403
+ Unsupported,
404
+ }
405
+ /**
406
+ */
547
407
  export enum VMergeType {
548
408
  Continue,
549
409
  Restart,
@@ -551,15 +411,155 @@ export enum VMergeType {
551
411
  }
552
412
  /**
553
413
  */
554
- export enum WidthType {
555
- Dxa,
414
+ export enum TableLayoutType {
415
+ Fixed,
416
+ Autofit,
417
+ }
418
+ /**
419
+ */
420
+ export enum VAlignType {
421
+ Top,
422
+ Center,
423
+ Bottom,
424
+ Unsupported,
425
+ }
426
+ /**
427
+ */
428
+ export enum HeightRule {
556
429
  Auto,
557
- Pct,
558
- Nil,
430
+ AtLeast,
431
+ Exact,
432
+ }
433
+ /**
434
+ */
435
+ export enum PageOrientationType {
436
+ Landscape,
437
+ Portrait,
438
+ }
439
+ /**
440
+ */
441
+ export enum StyleType {
442
+ Paragraph,
443
+ Character,
444
+ Numbering,
445
+ Table,
559
446
  Unsupported,
560
447
  }
561
448
  /**
562
449
  */
450
+ export enum TabLeaderType {
451
+ Dot,
452
+ Heavy,
453
+ Hyphen,
454
+ MiddleDot,
455
+ None,
456
+ Underscore,
457
+ }
458
+ /**
459
+ */
460
+ export enum TableAlignmentType {
461
+ Center,
462
+ Left,
463
+ Right,
464
+ }
465
+ /**
466
+ */
467
+ export enum TextAlignmentType {
468
+ Auto,
469
+ Baseline,
470
+ Bottom,
471
+ Center,
472
+ Top,
473
+ }
474
+ /**
475
+ */
476
+ export enum SpecialIndentKind {
477
+ FirstLine,
478
+ Hanging,
479
+ }
480
+ /**
481
+ */
482
+ export enum TableBorderPosition {
483
+ Left,
484
+ Right,
485
+ Top,
486
+ Bottom,
487
+ InsideH,
488
+ InsideV,
489
+ }
490
+ /**
491
+ */
492
+ export enum TableCellBorderPosition {
493
+ Left,
494
+ Right,
495
+ Top,
496
+ Bottom,
497
+ InsideH,
498
+ InsideV,
499
+ Tl2br,
500
+ Tr2bl,
501
+ }
502
+ /**
503
+ */
504
+ export enum ParagraphBorderPosition {
505
+ Left,
506
+ Right,
507
+ Top,
508
+ Bottom,
509
+ Between,
510
+ Bar,
511
+ }
512
+ /**
513
+ */
514
+ export enum BorderType {
515
+ Nil,
516
+ None,
517
+ Single,
518
+ Thick,
519
+ Double,
520
+ Dotted,
521
+ Dashed,
522
+ DotDash,
523
+ DotDotDash,
524
+ Triple,
525
+ ThinThickSmallGap,
526
+ ThickThinSmallGap,
527
+ ThinThickThinSmallGap,
528
+ ThinThickMediumGap,
529
+ ThickThinMediumGap,
530
+ ThinThickThinMediumGap,
531
+ ThinThickLargeGap,
532
+ ThickThinLargeGap,
533
+ ThinThickThinLargeGap,
534
+ Wave,
535
+ DoubleWave,
536
+ DashSmallGap,
537
+ DashDotStroked,
538
+ ThreeDEmboss,
539
+ ThreeDEngrave,
540
+ Outset,
541
+ Inset,
542
+ Apples,
543
+ ArchedScallops,
544
+ BabyPacifier,
545
+ BabyRattle,
546
+ }
547
+ /**
548
+ */
549
+ export enum TextDirectionType {
550
+ Lr,
551
+ LrV,
552
+ Rl,
553
+ RlV,
554
+ Tb,
555
+ TbV,
556
+ TbRlV,
557
+ TbRl,
558
+ BtLr,
559
+ LrTbV,
560
+ }
561
+ /**
562
+ */
563
563
  export class AbstractNumbering {
564
564
  free(): void;
565
565
  /**
@@ -800,6 +800,10 @@ export class Docx {
800
800
  * @returns {string}
801
801
  */
802
802
  json_with_update_comments(): string;
803
+ /**
804
+ * @returns {string}
805
+ */
806
+ comments_json(): string;
803
807
  }
804
808
  /**
805
809
  */