docx-wasm 0.4.20-rc1 → 0.4.20-rc2

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.
Files changed (45) hide show
  1. package/dist/node/json/bindings/FitText.d.ts +4 -0
  2. package/dist/node/json/bindings/FitText.js +4 -0
  3. package/dist/node/json/bindings/FitText.js.map +1 -0
  4. package/dist/node/json/bindings/RunProperty.d.ts +2 -0
  5. package/dist/node/json/run.d.ts +5 -0
  6. package/dist/node/paragraph-property.d.ts +1 -1
  7. package/dist/node/pkg/docx_wasm.d.ts +17 -14
  8. package/dist/node/pkg/docx_wasm.js +179 -150
  9. package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
  10. package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +205 -202
  11. package/dist/node/run-property.d.ts +6 -0
  12. package/dist/node/run-property.js +10 -0
  13. package/dist/node/run-property.js.map +1 -1
  14. package/dist/node/run.d.ts +1 -0
  15. package/dist/node/run.js +6 -0
  16. package/dist/node/run.js.map +1 -1
  17. package/dist/node/style.d.ts +1 -0
  18. package/dist/node/style.js +4 -0
  19. package/dist/node/style.js.map +1 -1
  20. package/dist/web/json/bindings/FitText.d.ts +4 -0
  21. package/dist/web/json/bindings/FitText.js +3 -0
  22. package/dist/web/json/bindings/FitText.js.map +1 -0
  23. package/dist/web/json/bindings/RunProperty.d.ts +2 -0
  24. package/dist/web/json/run.d.ts +5 -0
  25. package/dist/web/paragraph-property.d.ts +1 -1
  26. package/dist/web/pkg/docx_wasm.d.ts +17 -14
  27. package/dist/web/pkg/docx_wasm_bg.js +179 -150
  28. package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
  29. package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +205 -202
  30. package/dist/web/run-property.d.ts +6 -0
  31. package/dist/web/run-property.js +10 -0
  32. package/dist/web/run-property.js.map +1 -1
  33. package/dist/web/run.d.ts +1 -0
  34. package/dist/web/run.js +6 -0
  35. package/dist/web/run.js.map +1 -1
  36. package/dist/web/style.d.ts +1 -0
  37. package/dist/web/style.js +4 -0
  38. package/dist/web/style.js.map +1 -1
  39. package/js/json/bindings/FitText.ts +6 -0
  40. package/js/json/bindings/RunProperty.ts +2 -1
  41. package/js/json/run.ts +6 -0
  42. package/js/run-property.ts +19 -0
  43. package/js/run.ts +6 -0
  44. package/js/style.ts +5 -0
  45. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ export interface FitText {
2
+ val: number;
3
+ id?: number;
4
+ }
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=FitText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FitText.js","sourceRoot":"","sources":["../../../../js/json/bindings/FitText.ts"],"names":[],"mappings":";AAAA,4GAA4G"}
@@ -4,6 +4,7 @@ import type { Caps } from "./Caps";
4
4
  import type { CharacterSpacing } from "./CharacterSpacing";
5
5
  import type { Color } from "./Color";
6
6
  import type { Delete } from "./Delete";
7
+ import type { FitText } from "./FitText";
7
8
  import type { Highlight } from "./Highlight";
8
9
  import type { Insert } from "./Insert";
9
10
  import type { Italic } from "./Italic";
@@ -34,6 +35,7 @@ export interface RunProperty {
34
35
  vanish?: Vanish;
35
36
  specVanish?: SpecVanish;
36
37
  characterSpacing?: CharacterSpacing;
38
+ fitText?: FitText;
37
39
  fonts?: RunFonts;
38
40
  textBorder?: TextBorder;
39
41
  del?: Delete;
@@ -26,6 +26,10 @@ export type RunFontsJSON = {
26
26
  csTheme?: string;
27
27
  hint?: string;
28
28
  };
29
+ export type FitTextJSON = {
30
+ val: number;
31
+ id?: number;
32
+ };
29
33
  export type RunPropertyJSON = {
30
34
  style?: string | null;
31
35
  sz?: number | null;
@@ -43,6 +47,7 @@ export type RunPropertyJSON = {
43
47
  vanish?: boolean | null;
44
48
  specVanish?: boolean | null;
45
49
  characterSpacing?: number | null;
50
+ fitText?: FitTextJSON | null;
46
51
  textBorder?: TextBorderJSON | null;
47
52
  ins?: InsertJSONData | null;
48
53
  del?: DeleteJSONData | null;
@@ -91,5 +91,5 @@ export declare class ParagraphPropertyChange {
91
91
  numbering(id: number, level: number): this;
92
92
  }
93
93
  export declare const buildLineSpacing: (p: ParagraphProperty) => wasm.LineSpacing | null;
94
- export declare const setParagraphProperty: <T extends wasm.Paragraph | wasm.Style>(target: T, property: ParagraphProperty) => T;
94
+ export declare const setParagraphProperty: <T extends wasm.Style | wasm.Paragraph>(target: T, property: ParagraphProperty) => T;
95
95
  export declare const createParagraphProperty: (property: ParagraphProperty) => wasm.ParagraphProperty;
@@ -1,42 +1,42 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- export function createParagraph(): Paragraph;
4
- export function createPositionalTab(alignment: PositionalTabAlignmentType, relative_to: PositionalTabRelativeTo, leader: TabLeaderType): PositionalTab;
5
3
  export function createFrameProperty(): FrameProperty;
6
4
  export function createLevelOverride(level: number): LevelOverride;
7
- export function createLineSpacing(): LineSpacing;
8
5
  export function createParagraphPropertyChange(): ParagraphPropertyChange;
9
6
  export function createParagraphProperty(): ParagraphProperty;
7
+ export function createPositionalTab(alignment: PositionalTabAlignmentType, relative_to: PositionalTabRelativeTo, leader: TabLeaderType): PositionalTab;
8
+ export function createLineSpacing(): LineSpacing;
9
+ export function createStyle(style_id: string, style_type: StyleType): Style;
10
10
  export function createDocx(): Docx;
11
11
  export function createRunFonts(): RunFonts;
12
12
  export function createPageMargin(): PageMargin;
13
- export function createHeader(): Header;
13
+ export function createDelete(run: Run): Delete;
14
+ export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
14
15
  export function createPageNum(): PageNum;
16
+ export function createTable(): Table;
17
+ export function createTableOfContents(): TableOfContents;
18
+ export function createTableOfContentsWithInstrText(s: string): TableOfContents;
19
+ export function createHeader(): Header;
15
20
  export function readDocx(buf: Uint8Array): string;
16
21
  export function readXML(xml: string): string;
17
22
  export function createRunProperty(): RunProperty;
18
- export function createComment(id: number): Comment;
19
- export function createNumbering(id: number, abstract_num_id: number): Numbering;
20
- export function createPic(buf: Uint8Array): Pic;
21
- export function createFooter(): Footer;
22
- export function createStyle(style_id: string, style_type: StyleType): Style;
23
23
  export function createAbstractNumbering(id: number): AbstractNumbering;
24
24
  export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
25
25
  export function createNumPages(): NumPages;
26
26
  export function createTableCell(): TableCell;
27
27
  export function createTablePosition(): TablePositionProperty;
28
28
  export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
29
+ export function createFooter(): Footer;
30
+ export function createParagraph(): Paragraph;
31
+ export function createPic(buf: Uint8Array): Pic;
29
32
  export function createInsert(run: Run): Insert;
30
33
  export function createPageNumType(start?: number | null, chap_style?: string | null): PageNumType;
31
34
  export function createRun(): Run;
32
35
  export function createTableCellBorder(position: TableCellBorderPosition): TableCellBorder;
33
36
  export function createTableOfContentsItem(): TableOfContentsItem;
34
37
  export function createTableRow(): TableRow;
35
- export function createDelete(run: Run): Delete;
36
- export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
37
- export function createTable(): Table;
38
- export function createTableOfContents(): TableOfContents;
39
- export function createTableOfContentsWithInstrText(s: string): TableOfContents;
38
+ export function createNumbering(id: number, abstract_num_id: number): Numbering;
39
+ export function createComment(id: number): Comment;
40
40
  export enum AlignmentType {
41
41
  Both = 0,
42
42
  Center = 1,
@@ -656,6 +656,7 @@ export class Run {
656
656
  vanish(): Run;
657
657
  fonts(f: RunFonts): Run;
658
658
  character_spacing(spacing: number): Run;
659
+ fit_text(val: number, id?: number | null): Run;
659
660
  vert_align(a: VertAlignType): Run;
660
661
  shading(t: string, color: string, fill: string): Run;
661
662
  text_border(border_type: BorderType, size: number, space: number, color: string): Run;
@@ -691,6 +692,7 @@ export class RunProperty {
691
692
  vanish(): RunProperty;
692
693
  spec_vanish(): RunProperty;
693
694
  character_spacing(spacing: number): RunProperty;
695
+ fit_text(val: number, id?: number | null): RunProperty;
694
696
  vert_align(a: VertAlignType): RunProperty;
695
697
  delete(author: string, date: string): RunProperty;
696
698
  insert(author: string, date: string): RunProperty;
@@ -722,6 +724,7 @@ export class Style {
722
724
  caps(): Style;
723
725
  fonts(f: RunFonts): Style;
724
726
  character_spacing(spacing: number): Style;
727
+ fit_text(val: number, id?: number | null): Style;
725
728
  vert_align(a: VertAlignType): Style;
726
729
  text_border(border_type: BorderType, size: number, space: number, color: string): Style;
727
730
  align(alignment_type: AlignmentType): Style;
@@ -116,11 +116,20 @@ function takeObject(idx) {
116
116
  return ret;
117
117
  }
118
118
  /**
119
- * @returns {Paragraph}
119
+ * @returns {FrameProperty}
120
120
  */
121
- module.exports.createParagraph = function() {
122
- const ret = wasm.createParagraph();
123
- return Paragraph.__wrap(ret);
121
+ module.exports.createFrameProperty = function() {
122
+ const ret = wasm.createFrameProperty();
123
+ return FrameProperty.__wrap(ret);
124
+ };
125
+
126
+ /**
127
+ * @param {number} level
128
+ * @returns {LevelOverride}
129
+ */
130
+ module.exports.createLevelOverride = function(level) {
131
+ const ret = wasm.createLevelOverride(level);
132
+ return LevelOverride.__wrap(ret);
124
133
  };
125
134
 
126
135
  function _assertClass(instance, klass) {
@@ -128,6 +137,21 @@ function _assertClass(instance, klass) {
128
137
  throw new Error(`expected instance of ${klass.name}`);
129
138
  }
130
139
  }
140
+ /**
141
+ * @returns {ParagraphPropertyChange}
142
+ */
143
+ module.exports.createParagraphPropertyChange = function() {
144
+ const ret = wasm.createParagraphPropertyChange();
145
+ return ParagraphPropertyChange.__wrap(ret);
146
+ };
147
+
148
+ /**
149
+ * @returns {ParagraphProperty}
150
+ */
151
+ module.exports.createParagraphProperty = function() {
152
+ const ret = wasm.createParagraphProperty();
153
+ return ParagraphProperty.__wrap(ret);
154
+ };
131
155
 
132
156
  function isLikeNone(x) {
133
157
  return x === undefined || x === null;
@@ -143,23 +167,6 @@ module.exports.createPositionalTab = function(alignment, relative_to, leader) {
143
167
  return PositionalTab.__wrap(ret);
144
168
  };
145
169
 
146
- /**
147
- * @returns {FrameProperty}
148
- */
149
- module.exports.createFrameProperty = function() {
150
- const ret = wasm.createFrameProperty();
151
- return FrameProperty.__wrap(ret);
152
- };
153
-
154
- /**
155
- * @param {number} level
156
- * @returns {LevelOverride}
157
- */
158
- module.exports.createLevelOverride = function(level) {
159
- const ret = wasm.createLevelOverride(level);
160
- return LevelOverride.__wrap(ret);
161
- };
162
-
163
170
  /**
164
171
  * @returns {LineSpacing}
165
172
  */
@@ -169,19 +176,15 @@ module.exports.createLineSpacing = function() {
169
176
  };
170
177
 
171
178
  /**
172
- * @returns {ParagraphPropertyChange}
173
- */
174
- module.exports.createParagraphPropertyChange = function() {
175
- const ret = wasm.createParagraphPropertyChange();
176
- return ParagraphPropertyChange.__wrap(ret);
177
- };
178
-
179
- /**
180
- * @returns {ParagraphProperty}
179
+ * @param {string} style_id
180
+ * @param {StyleType} style_type
181
+ * @returns {Style}
181
182
  */
182
- module.exports.createParagraphProperty = function() {
183
- const ret = wasm.createParagraphProperty();
184
- return ParagraphProperty.__wrap(ret);
183
+ module.exports.createStyle = function(style_id, style_type) {
184
+ const ptr0 = passStringToWasm0(style_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
185
+ const len0 = WASM_VECTOR_LEN;
186
+ const ret = wasm.createStyle(ptr0, len0, style_type);
187
+ return Style.__wrap(ret);
185
188
  };
186
189
 
187
190
  /**
@@ -213,11 +216,33 @@ module.exports.createPageMargin = function() {
213
216
  };
214
217
 
215
218
  /**
216
- * @returns {Header}
219
+ * @param {Run} run
220
+ * @returns {Delete}
217
221
  */
218
- module.exports.createHeader = function() {
219
- const ret = wasm.createHeader();
220
- return Header.__wrap(ret);
222
+ module.exports.createDelete = function(run) {
223
+ _assertClass(run, Run);
224
+ var ptr0 = run.__destroy_into_raw();
225
+ const ret = wasm.createDelete(ptr0);
226
+ return Delete.__wrap(ret);
227
+ };
228
+
229
+ /**
230
+ * @param {number} id
231
+ * @param {number} start
232
+ * @param {string} format
233
+ * @param {string} text
234
+ * @param {string} jc
235
+ * @returns {Level}
236
+ */
237
+ module.exports.createLevel = function(id, start, format, text, jc) {
238
+ const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
239
+ const len0 = WASM_VECTOR_LEN;
240
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
241
+ const len1 = WASM_VECTOR_LEN;
242
+ const ptr2 = passStringToWasm0(jc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
243
+ const len2 = WASM_VECTOR_LEN;
244
+ const ret = wasm.createLevel(id, start, ptr0, len0, ptr1, len1, ptr2, len2);
245
+ return Level.__wrap(ret);
221
246
  };
222
247
 
223
248
  /**
@@ -228,6 +253,56 @@ module.exports.createPageNum = function() {
228
253
  return PageNum.__wrap(ret);
229
254
  };
230
255
 
256
+ /**
257
+ * @returns {Table}
258
+ */
259
+ module.exports.createTable = function() {
260
+ const ret = wasm.createTable();
261
+ return Table.__wrap(ret);
262
+ };
263
+
264
+ let cachedUint32ArrayMemory0 = null;
265
+
266
+ function getUint32ArrayMemory0() {
267
+ if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
268
+ cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
269
+ }
270
+ return cachedUint32ArrayMemory0;
271
+ }
272
+
273
+ function passArray32ToWasm0(arg, malloc) {
274
+ const ptr = malloc(arg.length * 4, 4) >>> 0;
275
+ getUint32ArrayMemory0().set(arg, ptr / 4);
276
+ WASM_VECTOR_LEN = arg.length;
277
+ return ptr;
278
+ }
279
+ /**
280
+ * @returns {TableOfContents}
281
+ */
282
+ module.exports.createTableOfContents = function() {
283
+ const ret = wasm.createTableOfContents();
284
+ return TableOfContents.__wrap(ret);
285
+ };
286
+
287
+ /**
288
+ * @param {string} s
289
+ * @returns {TableOfContents}
290
+ */
291
+ module.exports.createTableOfContentsWithInstrText = function(s) {
292
+ const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
293
+ const len0 = WASM_VECTOR_LEN;
294
+ const ret = wasm.createTableOfContentsWithInstrText(ptr0, len0);
295
+ return TableOfContents.__wrap(ret);
296
+ };
297
+
298
+ /**
299
+ * @returns {Header}
300
+ */
301
+ module.exports.createHeader = function() {
302
+ const ret = wasm.createHeader();
303
+ return Header.__wrap(ret);
304
+ };
305
+
231
306
  function passArray8ToWasm0(arg, malloc) {
232
307
  const ptr = malloc(arg.length * 1, 1) >>> 0;
233
308
  getUint8ArrayMemory0().set(arg, ptr / 1);
@@ -304,56 +379,6 @@ module.exports.createRunProperty = function() {
304
379
  return RunProperty.__wrap(ret);
305
380
  };
306
381
 
307
- /**
308
- * @param {number} id
309
- * @returns {Comment}
310
- */
311
- module.exports.createComment = function(id) {
312
- const ret = wasm.createComment(id);
313
- return Comment.__wrap(ret);
314
- };
315
-
316
- /**
317
- * @param {number} id
318
- * @param {number} abstract_num_id
319
- * @returns {Numbering}
320
- */
321
- module.exports.createNumbering = function(id, abstract_num_id) {
322
- const ret = wasm.createNumbering(id, abstract_num_id);
323
- return Numbering.__wrap(ret);
324
- };
325
-
326
- /**
327
- * @param {Uint8Array} buf
328
- * @returns {Pic}
329
- */
330
- module.exports.createPic = function(buf) {
331
- const ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
332
- const len0 = WASM_VECTOR_LEN;
333
- const ret = wasm.createPic(ptr0, len0);
334
- return Pic.__wrap(ret);
335
- };
336
-
337
- /**
338
- * @returns {Footer}
339
- */
340
- module.exports.createFooter = function() {
341
- const ret = wasm.createFooter();
342
- return Footer.__wrap(ret);
343
- };
344
-
345
- /**
346
- * @param {string} style_id
347
- * @param {StyleType} style_type
348
- * @returns {Style}
349
- */
350
- module.exports.createStyle = function(style_id, style_type) {
351
- const ptr0 = passStringToWasm0(style_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
352
- const len0 = WASM_VECTOR_LEN;
353
- const ret = wasm.createStyle(ptr0, len0, style_type);
354
- return Style.__wrap(ret);
355
- };
356
-
357
382
  /**
358
383
  * @param {number} id
359
384
  * @returns {AbstractNumbering}
@@ -422,6 +447,33 @@ module.exports.createWebExtension = function(id, reference_id, version, store, s
422
447
  return WebExtension.__wrap(ret);
423
448
  };
424
449
 
450
+ /**
451
+ * @returns {Footer}
452
+ */
453
+ module.exports.createFooter = function() {
454
+ const ret = wasm.createFooter();
455
+ return Footer.__wrap(ret);
456
+ };
457
+
458
+ /**
459
+ * @returns {Paragraph}
460
+ */
461
+ module.exports.createParagraph = function() {
462
+ const ret = wasm.createParagraph();
463
+ return Paragraph.__wrap(ret);
464
+ };
465
+
466
+ /**
467
+ * @param {Uint8Array} buf
468
+ * @returns {Pic}
469
+ */
470
+ module.exports.createPic = function(buf) {
471
+ const ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
472
+ const len0 = WASM_VECTOR_LEN;
473
+ const ret = wasm.createPic(ptr0, len0);
474
+ return Pic.__wrap(ret);
475
+ };
476
+
425
477
  /**
426
478
  * @param {Run} run
427
479
  * @returns {Insert}
@@ -478,76 +530,23 @@ module.exports.createTableRow = function() {
478
530
  return TableRow.__wrap(ret);
479
531
  };
480
532
 
481
- /**
482
- * @param {Run} run
483
- * @returns {Delete}
484
- */
485
- module.exports.createDelete = function(run) {
486
- _assertClass(run, Run);
487
- var ptr0 = run.__destroy_into_raw();
488
- const ret = wasm.createDelete(ptr0);
489
- return Delete.__wrap(ret);
490
- };
491
-
492
533
  /**
493
534
  * @param {number} id
494
- * @param {number} start
495
- * @param {string} format
496
- * @param {string} text
497
- * @param {string} jc
498
- * @returns {Level}
499
- */
500
- module.exports.createLevel = function(id, start, format, text, jc) {
501
- const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
502
- const len0 = WASM_VECTOR_LEN;
503
- const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
504
- const len1 = WASM_VECTOR_LEN;
505
- const ptr2 = passStringToWasm0(jc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
506
- const len2 = WASM_VECTOR_LEN;
507
- const ret = wasm.createLevel(id, start, ptr0, len0, ptr1, len1, ptr2, len2);
508
- return Level.__wrap(ret);
509
- };
510
-
511
- /**
512
- * @returns {Table}
513
- */
514
- module.exports.createTable = function() {
515
- const ret = wasm.createTable();
516
- return Table.__wrap(ret);
517
- };
518
-
519
- let cachedUint32ArrayMemory0 = null;
520
-
521
- function getUint32ArrayMemory0() {
522
- if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
523
- cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
524
- }
525
- return cachedUint32ArrayMemory0;
526
- }
527
-
528
- function passArray32ToWasm0(arg, malloc) {
529
- const ptr = malloc(arg.length * 4, 4) >>> 0;
530
- getUint32ArrayMemory0().set(arg, ptr / 4);
531
- WASM_VECTOR_LEN = arg.length;
532
- return ptr;
533
- }
534
- /**
535
- * @returns {TableOfContents}
535
+ * @param {number} abstract_num_id
536
+ * @returns {Numbering}
536
537
  */
537
- module.exports.createTableOfContents = function() {
538
- const ret = wasm.createTableOfContents();
539
- return TableOfContents.__wrap(ret);
538
+ module.exports.createNumbering = function(id, abstract_num_id) {
539
+ const ret = wasm.createNumbering(id, abstract_num_id);
540
+ return Numbering.__wrap(ret);
540
541
  };
541
542
 
542
543
  /**
543
- * @param {string} s
544
- * @returns {TableOfContents}
544
+ * @param {number} id
545
+ * @returns {Comment}
545
546
  */
546
- module.exports.createTableOfContentsWithInstrText = function(s) {
547
- const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
548
- const len0 = WASM_VECTOR_LEN;
549
- const ret = wasm.createTableOfContentsWithInstrText(ptr0, len0);
550
- return TableOfContents.__wrap(ret);
547
+ module.exports.createComment = function(id) {
548
+ const ret = wasm.createComment(id);
549
+ return Comment.__wrap(ret);
551
550
  };
552
551
 
553
552
  /**
@@ -3681,6 +3680,16 @@ class Run {
3681
3680
  const ret = wasm.run_character_spacing(ptr, spacing);
3682
3681
  return Run.__wrap(ret);
3683
3682
  }
3683
+ /**
3684
+ * @param {number} val
3685
+ * @param {number | null} [id]
3686
+ * @returns {Run}
3687
+ */
3688
+ fit_text(val, id) {
3689
+ const ptr = this.__destroy_into_raw();
3690
+ const ret = wasm.run_fit_text(ptr, val, isLikeNone(id) ? 0x100000001 : (id) >>> 0);
3691
+ return Run.__wrap(ret);
3692
+ }
3684
3693
  /**
3685
3694
  * @param {VertAlignType} a
3686
3695
  * @returns {Run}
@@ -4007,6 +4016,16 @@ class RunProperty {
4007
4016
  const ret = wasm.runproperty_character_spacing(ptr, spacing);
4008
4017
  return RunProperty.__wrap(ret);
4009
4018
  }
4019
+ /**
4020
+ * @param {number} val
4021
+ * @param {number | null} [id]
4022
+ * @returns {RunProperty}
4023
+ */
4024
+ fit_text(val, id) {
4025
+ const ptr = this.__destroy_into_raw();
4026
+ const ret = wasm.runproperty_fit_text(ptr, val, isLikeNone(id) ? 0x100000001 : (id) >>> 0);
4027
+ return RunProperty.__wrap(ret);
4028
+ }
4010
4029
  /**
4011
4030
  * @param {VertAlignType} a
4012
4031
  * @returns {RunProperty}
@@ -4319,6 +4338,16 @@ class Style {
4319
4338
  const ret = wasm.style_character_spacing(ptr, spacing);
4320
4339
  return Style.__wrap(ret);
4321
4340
  }
4341
+ /**
4342
+ * @param {number} val
4343
+ * @param {number | null} [id]
4344
+ * @returns {Style}
4345
+ */
4346
+ fit_text(val, id) {
4347
+ const ptr = this.__destroy_into_raw();
4348
+ const ret = wasm.style_fit_text(ptr, val, isLikeNone(id) ? 0x100000001 : (id) >>> 0);
4349
+ return Style.__wrap(ret);
4350
+ }
4322
4351
  /**
4323
4352
  * @param {VertAlignType} a
4324
4353
  * @returns {Style}
Binary file