docx-wasm 0.4.18-rc17 → 0.4.18-rc19

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.
@@ -78,4 +78,4 @@ export declare class ParagraphPropertyChange {
78
78
  numbering(id: number, level: number): this;
79
79
  }
80
80
  export declare const buildLineSpacing: (p: ParagraphProperty) => wasm.LineSpacing | null;
81
- export declare const setParagraphProperty: <T extends wasm.Paragraph | wasm.Style>(target: T, property: ParagraphProperty) => T;
81
+ export declare const setParagraphProperty: <T extends wasm.Style | wasm.Paragraph>(target: T, property: ParagraphProperty) => T;
@@ -1,6 +1,32 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
+ * @param {number} id
5
+ * @returns {AbstractNumbering}
6
+ */
7
+ export function createAbstractNumbering(id: number): AbstractNumbering;
8
+ /**
9
+ * @param {Run} run
10
+ * @returns {Delete}
11
+ */
12
+ export function createDelete(run: Run): Delete;
13
+ /**
14
+ * @param {number} id
15
+ * @param {number} abstract_num_id
16
+ * @returns {Numbering}
17
+ */
18
+ export function createNumbering(id: number, abstract_num_id: number): Numbering;
19
+ /**
20
+ * @param {Uint8Array} buf
21
+ * @returns {Pic}
22
+ */
23
+ export function createPic(buf: Uint8Array): Pic;
24
+ /**
25
+ * @param {Uint8Array} buf
26
+ * @returns {string}
27
+ */
28
+ export function readDocx(buf: Uint8Array): string;
29
+ /**
4
30
  * @returns {LineSpacing}
5
31
  */
6
32
  export function createLineSpacing(): LineSpacing;
@@ -22,46 +48,47 @@ export function createTablePosition(): TablePositionProperty;
22
48
  */
23
49
  export function createTableRow(): TableRow;
24
50
  /**
25
- * @param {number} id
26
- * @returns {Comment}
51
+ * @returns {PageNum}
27
52
  */
28
- export function createComment(id: number): Comment;
53
+ export function createPageNum(): PageNum;
29
54
  /**
30
- * @param {number | undefined} start
31
- * @param {string | undefined} chap_style
32
- * @returns {PageNumType}
55
+ * @param {number} alignment
56
+ * @param {number} relative_to
57
+ * @param {number} leader
58
+ * @returns {PositionalTab}
33
59
  */
34
- export function createPageNumType(start?: number, chap_style?: string): PageNumType;
60
+ export function createPositionalTab(alignment: number, relative_to: number, leader: number): PositionalTab;
35
61
  /**
36
- * @returns {RunFonts}
62
+ * @param {string} style_id
63
+ * @param {number} style_type
64
+ * @returns {Style}
37
65
  */
38
- export function createRunFonts(): RunFonts;
66
+ export function createStyle(style_id: string, style_type: number): Style;
39
67
  /**
40
- * @returns {Header}
68
+ * @param {string} v
69
+ * @param {number} t
70
+ * @returns {Hyperlink}
41
71
  */
42
- export function createHeader(): Header;
72
+ export function createHyperlink(v: string, t: number): Hyperlink;
43
73
  /**
44
- * @param {number} id
45
- * @param {number} start
46
- * @param {string} format
47
- * @param {string} text
48
- * @param {string} jc
49
- * @returns {Level}
74
+ * @returns {Table}
50
75
  */
51
- export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
76
+ export function createTable(): Table;
52
77
  /**
53
- * @param {number} level
54
- * @returns {LevelOverride}
78
+ * @param {number} id
79
+ * @returns {Comment}
55
80
  */
56
- export function createLevelOverride(level: number): LevelOverride;
81
+ export function createComment(id: number): Comment;
57
82
  /**
58
- * @returns {TableCell}
83
+ * @param {number | undefined} start
84
+ * @param {string | undefined} chap_style
85
+ * @returns {PageNumType}
59
86
  */
60
- export function createTableCell(): TableCell;
87
+ export function createPageNumType(start?: number, chap_style?: string): PageNumType;
61
88
  /**
62
- * @returns {TableOfContentsItem}
89
+ * @returns {RunFonts}
63
90
  */
64
- export function createTableOfContentsItem(): TableOfContentsItem;
91
+ export function createRunFonts(): RunFonts;
65
92
  /**
66
93
  * @returns {NumPages}
67
94
  */
@@ -85,44 +112,31 @@ export function createTableOfContentsWithInstrText(s: string): TableOfContents;
85
112
  */
86
113
  export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
87
114
  /**
88
- * @returns {PageMargin}
89
- */
90
- export function createPageMargin(): PageMargin;
91
- /**
92
- * @returns {ParagraphPropertyChange}
93
- */
94
- export function createParagraphPropertyChange(): ParagraphPropertyChange;
95
- /**
96
- * @returns {Paragraph}
97
- */
98
- export function createParagraph(): Paragraph;
99
- /**
100
- * @returns {PageNum}
115
+ * @returns {Header}
101
116
  */
102
- export function createPageNum(): PageNum;
117
+ export function createHeader(): Header;
103
118
  /**
104
- * @param {number} alignment
105
- * @param {number} relative_to
106
- * @param {number} leader
107
- * @returns {PositionalTab}
119
+ * @param {number} id
120
+ * @param {number} start
121
+ * @param {string} format
122
+ * @param {string} text
123
+ * @param {string} jc
124
+ * @returns {Level}
108
125
  */
109
- export function createPositionalTab(alignment: number, relative_to: number, leader: number): PositionalTab;
126
+ export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
110
127
  /**
111
- * @param {string} style_id
112
- * @param {number} style_type
113
- * @returns {Style}
128
+ * @param {number} level
129
+ * @returns {LevelOverride}
114
130
  */
115
- export function createStyle(style_id: string, style_type: number): Style;
131
+ export function createLevelOverride(level: number): LevelOverride;
116
132
  /**
117
- * @param {string} v
118
- * @param {number} t
119
- * @returns {Hyperlink}
133
+ * @returns {TableCell}
120
134
  */
121
- export function createHyperlink(v: string, t: number): Hyperlink;
135
+ export function createTableCell(): TableCell;
122
136
  /**
123
- * @returns {Table}
137
+ * @returns {TableOfContentsItem}
124
138
  */
125
- export function createTable(): Table;
139
+ export function createTableOfContentsItem(): TableOfContentsItem;
126
140
  /**
127
141
  * @returns {Docx}
128
142
  */
@@ -137,31 +151,17 @@ export function createFooter(): Footer;
137
151
  */
138
152
  export function createInsert(run: Run): Insert;
139
153
  /**
140
- * @param {number} id
141
- * @returns {AbstractNumbering}
142
- */
143
- export function createAbstractNumbering(id: number): AbstractNumbering;
144
- /**
145
- * @param {Run} run
146
- * @returns {Delete}
147
- */
148
- export function createDelete(run: Run): Delete;
149
- /**
150
- * @param {number} id
151
- * @param {number} abstract_num_id
152
- * @returns {Numbering}
154
+ * @returns {PageMargin}
153
155
  */
154
- export function createNumbering(id: number, abstract_num_id: number): Numbering;
156
+ export function createPageMargin(): PageMargin;
155
157
  /**
156
- * @param {Uint8Array} buf
157
- * @returns {Pic}
158
+ * @returns {ParagraphPropertyChange}
158
159
  */
159
- export function createPic(buf: Uint8Array): Pic;
160
+ export function createParagraphPropertyChange(): ParagraphPropertyChange;
160
161
  /**
161
- * @param {Uint8Array} buf
162
- * @returns {string}
162
+ * @returns {Paragraph}
163
163
  */
164
- export function readDocx(buf: Uint8Array): string;
164
+ export function createParagraph(): Paragraph;
165
165
  /**
166
166
  */
167
167
  export enum BorderType {
@@ -199,10 +199,34 @@ export enum BorderType {
199
199
  }
200
200
  /**
201
201
  */
202
- export enum HeightRule {
203
- Auto,
204
- AtLeast,
205
- Exact,
202
+ export enum CharacterSpacingValues {
203
+ DoNotCompress,
204
+ CompressPunctuation,
205
+ CompressPunctuationAndJapaneseKana,
206
+ Unsupported,
207
+ }
208
+ /**
209
+ */
210
+ export enum DocGridType {
211
+ Default,
212
+ Lines,
213
+ LinesAndChars,
214
+ SnapToChars,
215
+ }
216
+ /**
217
+ */
218
+ export enum DrawingPositionType {
219
+ Anchor,
220
+ Inline,
221
+ }
222
+ /**
223
+ */
224
+ export enum PicAlign {
225
+ Left,
226
+ Right,
227
+ Center,
228
+ Bottom,
229
+ Top,
206
230
  }
207
231
  /**
208
232
  */
@@ -222,20 +246,10 @@ export enum StyleType {
222
246
  }
223
247
  /**
224
248
  */
225
- export enum TextAlignmentType {
226
- Auto,
227
- Baseline,
228
- Bottom,
229
- Center,
230
- Top,
231
- }
232
- /**
233
- */
234
- export enum WidthType {
235
- Dxa,
236
- Auto,
237
- Pct,
238
- Nil,
249
+ export enum FieldCharType {
250
+ Begin,
251
+ Separate,
252
+ End,
239
253
  Unsupported,
240
254
  }
241
255
  /**
@@ -246,10 +260,30 @@ export enum HyperlinkType {
246
260
  }
247
261
  /**
248
262
  */
249
- export enum PositionalTabAlignmentType {
263
+ export enum VertAlignType {
264
+ Baseline,
265
+ SuperScript,
266
+ SubScript,
267
+ Unsupported,
268
+ }
269
+ /**
270
+ */
271
+ export enum VMergeType {
272
+ Continue,
273
+ Restart,
274
+ Unsupported,
275
+ }
276
+ /**
277
+ */
278
+ export enum AlignmentType {
279
+ Both,
250
280
  Center,
281
+ Distribute,
282
+ Start,
283
+ End,
251
284
  Left,
252
285
  Right,
286
+ Justified,
253
287
  }
254
288
  /**
255
289
  */
@@ -313,122 +347,6 @@ export enum RelativeFromVType {
313
347
  }
314
348
  /**
315
349
  */
316
- export enum VMergeType {
317
- Continue,
318
- Restart,
319
- Unsupported,
320
- }
321
- /**
322
- */
323
- export enum FontPitchType {
324
- Default,
325
- Fixed,
326
- Variable,
327
- }
328
- /**
329
- */
330
- export enum SpecialIndentKind {
331
- FirstLine,
332
- Hanging,
333
- }
334
- /**
335
- */
336
- export enum TableLayoutType {
337
- Fixed,
338
- Autofit,
339
- }
340
- /**
341
- */
342
- export enum BreakType {
343
- Page,
344
- Column,
345
- TextWrapping,
346
- Unsupported,
347
- }
348
- /**
349
- */
350
- export enum CharacterSpacingValues {
351
- DoNotCompress,
352
- CompressPunctuation,
353
- CompressPunctuationAndJapaneseKana,
354
- Unsupported,
355
- }
356
- /**
357
- */
358
- export enum LevelSuffixType {
359
- Nothing,
360
- Space,
361
- Tab,
362
- }
363
- /**
364
- */
365
- export enum DocGridType {
366
- Default,
367
- Lines,
368
- LinesAndChars,
369
- SnapToChars,
370
- }
371
- /**
372
- */
373
- export enum DrawingPositionType {
374
- Anchor,
375
- Inline,
376
- }
377
- /**
378
- */
379
- export enum PicAlign {
380
- Left,
381
- Right,
382
- Center,
383
- Bottom,
384
- Top,
385
- }
386
- /**
387
- */
388
- export enum FieldCharType {
389
- Begin,
390
- Separate,
391
- End,
392
- Unsupported,
393
- }
394
- /**
395
- */
396
- export enum SectionType {
397
- NextPage,
398
- NextColumn,
399
- Continuous,
400
- EvenPage,
401
- OddPage,
402
- }
403
- /**
404
- */
405
- export enum TabValueType {
406
- Bar,
407
- Center,
408
- Clear,
409
- Decimal,
410
- End,
411
- Right,
412
- Num,
413
- Start,
414
- Left,
415
- }
416
- /**
417
- */
418
- export enum VertAlignType {
419
- Baseline,
420
- SuperScript,
421
- SubScript,
422
- Unsupported,
423
- }
424
- /**
425
- */
426
- export enum PositionalTabRelativeTo {
427
- Indent,
428
- Margin,
429
- }
430
- /**
431
- */
432
350
  export enum ShdType {
433
351
  Nil,
434
352
  Clear,
@@ -471,30 +389,23 @@ export enum ShdType {
471
389
  }
472
390
  /**
473
391
  */
474
- export enum VAlignType {
475
- Top,
476
- Center,
477
- Bottom,
478
- Unsupported,
392
+ export enum SpecialIndentKind {
393
+ FirstLine,
394
+ Hanging,
479
395
  }
480
396
  /**
481
397
  */
482
- export enum TableAlignmentType {
483
- Center,
484
- Left,
485
- Right,
398
+ export enum BreakType {
399
+ Page,
400
+ Column,
401
+ TextWrapping,
402
+ Unsupported,
486
403
  }
487
404
  /**
488
405
  */
489
- export enum AlignmentType {
490
- Both,
491
- Center,
492
- Distribute,
493
- Start,
494
- End,
495
- Left,
496
- Right,
497
- Justified,
406
+ export enum TableLayoutType {
407
+ Fixed,
408
+ Autofit,
498
409
  }
499
410
  /**
500
411
  */
@@ -530,12 +441,6 @@ export enum ParagraphBorderPosition {
530
441
  }
531
442
  /**
532
443
  */
533
- export enum PageOrientationType {
534
- Landscape,
535
- Portrait,
536
- }
537
- /**
538
- */
539
444
  export enum TabLeaderType {
540
445
  Dot,
541
446
  Heavy,
@@ -546,6 +451,22 @@ export enum TabLeaderType {
546
451
  }
547
452
  /**
548
453
  */
454
+ export enum TableAlignmentType {
455
+ Center,
456
+ Left,
457
+ Right,
458
+ }
459
+ /**
460
+ */
461
+ export enum TextAlignmentType {
462
+ Auto,
463
+ Baseline,
464
+ Bottom,
465
+ Center,
466
+ Top,
467
+ }
468
+ /**
469
+ */
549
470
  export enum TextDirectionType {
550
471
  Lr,
551
472
  LrV,
@@ -560,6 +481,85 @@ export enum TextDirectionType {
560
481
  }
561
482
  /**
562
483
  */
484
+ export enum FontPitchType {
485
+ Default,
486
+ Fixed,
487
+ Variable,
488
+ }
489
+ /**
490
+ */
491
+ export enum PageOrientationType {
492
+ Landscape,
493
+ Portrait,
494
+ }
495
+ /**
496
+ */
497
+ export enum PositionalTabAlignmentType {
498
+ Center,
499
+ Left,
500
+ Right,
501
+ }
502
+ /**
503
+ */
504
+ export enum TabValueType {
505
+ Bar,
506
+ Center,
507
+ Clear,
508
+ Decimal,
509
+ End,
510
+ Right,
511
+ Num,
512
+ Start,
513
+ Left,
514
+ }
515
+ /**
516
+ */
517
+ export enum HeightRule {
518
+ Auto,
519
+ AtLeast,
520
+ Exact,
521
+ }
522
+ /**
523
+ */
524
+ export enum LevelSuffixType {
525
+ Nothing,
526
+ Space,
527
+ Tab,
528
+ }
529
+ /**
530
+ */
531
+ export enum PositionalTabRelativeTo {
532
+ Indent,
533
+ Margin,
534
+ }
535
+ /**
536
+ */
537
+ export enum SectionType {
538
+ NextPage,
539
+ NextColumn,
540
+ Continuous,
541
+ EvenPage,
542
+ OddPage,
543
+ }
544
+ /**
545
+ */
546
+ export enum VAlignType {
547
+ Top,
548
+ Center,
549
+ Bottom,
550
+ Unsupported,
551
+ }
552
+ /**
553
+ */
554
+ export enum WidthType {
555
+ Dxa,
556
+ Auto,
557
+ Pct,
558
+ Nil,
559
+ Unsupported,
560
+ }
561
+ /**
562
+ */
563
563
  export class AbstractNumbering {
564
564
  free(): void;
565
565
  /**