docx-wasm 0.4.20-rc1 → 0.4.20
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.
- package/dist/node/json/bindings/FitText.d.ts +4 -0
- package/dist/node/json/bindings/FitText.js +4 -0
- package/dist/node/json/bindings/FitText.js.map +1 -0
- package/dist/node/json/bindings/RunProperty.d.ts +2 -0
- package/dist/node/json/run.d.ts +5 -0
- package/dist/node/paragraph-property.d.ts +1 -1
- package/dist/node/pkg/docx_wasm.d.ts +19 -16
- package/dist/node/pkg/docx_wasm.js +187 -158
- package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +230 -227
- package/dist/node/run-property.d.ts +6 -0
- package/dist/node/run-property.js +10 -0
- package/dist/node/run-property.js.map +1 -1
- package/dist/node/run.d.ts +1 -0
- package/dist/node/run.js +6 -0
- package/dist/node/run.js.map +1 -1
- package/dist/node/style.d.ts +1 -0
- package/dist/node/style.js +4 -0
- package/dist/node/style.js.map +1 -1
- package/dist/web/json/bindings/FitText.d.ts +4 -0
- package/dist/web/json/bindings/FitText.js +3 -0
- package/dist/web/json/bindings/FitText.js.map +1 -0
- package/dist/web/json/bindings/RunProperty.d.ts +2 -0
- package/dist/web/json/run.d.ts +5 -0
- package/dist/web/paragraph-property.d.ts +1 -1
- package/dist/web/pkg/docx_wasm.d.ts +19 -16
- package/dist/web/pkg/docx_wasm_bg.js +186 -157
- package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +230 -227
- package/dist/web/run-property.d.ts +6 -0
- package/dist/web/run-property.js +10 -0
- package/dist/web/run-property.js.map +1 -1
- package/dist/web/run.d.ts +1 -0
- package/dist/web/run.js +6 -0
- package/dist/web/run.js.map +1 -1
- package/dist/web/style.d.ts +1 -0
- package/dist/web/style.js +4 -0
- package/dist/web/style.js.map +1 -1
- package/js/json/bindings/FitText.ts +6 -0
- package/js/json/bindings/RunProperty.ts +2 -1
- package/js/json/run.ts +6 -0
- package/js/run-property.ts +19 -0
- package/js/run.ts +6 -0
- package/js/style.ts +5 -0
- package/package.json +1 -1
|
@@ -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;
|
package/dist/node/json/run.d.ts
CHANGED
|
@@ -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.
|
|
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,38 +1,38 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
3
|
+
export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
|
|
4
4
|
export function createPositionalTab(alignment: PositionalTabAlignmentType, relative_to: PositionalTabRelativeTo, leader: TabLeaderType): PositionalTab;
|
|
5
|
+
export function createTableCell(): TableCell;
|
|
6
|
+
export function createTablePosition(): TablePositionProperty;
|
|
7
|
+
export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
|
|
8
|
+
export function createLineSpacing(): LineSpacing;
|
|
9
|
+
export function createStyle(style_id: string, style_type: StyleType): Style;
|
|
10
|
+
export function createDocx(): Docx;
|
|
11
|
+
export function createRunFonts(): RunFonts;
|
|
5
12
|
export function createFrameProperty(): FrameProperty;
|
|
6
13
|
export function createLevelOverride(level: number): LevelOverride;
|
|
7
|
-
export function
|
|
14
|
+
export function createNumbering(id: number, abstract_num_id: number): Numbering;
|
|
8
15
|
export function createParagraphPropertyChange(): ParagraphPropertyChange;
|
|
9
16
|
export function createParagraphProperty(): ParagraphProperty;
|
|
10
|
-
export function createDocx(): Docx;
|
|
11
|
-
export function createRunFonts(): RunFonts;
|
|
12
17
|
export function createPageMargin(): PageMargin;
|
|
13
18
|
export function createHeader(): Header;
|
|
19
|
+
export function createParagraph(): Paragraph;
|
|
20
|
+
export function createPic(buf: Uint8Array): Pic;
|
|
21
|
+
export function createAbstractNumbering(id: number): AbstractNumbering;
|
|
22
|
+
export function createDelete(run: Run): Delete;
|
|
14
23
|
export function createPageNum(): PageNum;
|
|
24
|
+
export function createFooter(): Footer;
|
|
15
25
|
export function readDocx(buf: Uint8Array): string;
|
|
16
26
|
export function readXML(xml: string): string;
|
|
17
27
|
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
|
-
export function createAbstractNumbering(id: number): AbstractNumbering;
|
|
24
|
-
export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
|
|
25
28
|
export function createNumPages(): NumPages;
|
|
26
|
-
export function createTableCell(): TableCell;
|
|
27
|
-
export function createTablePosition(): TablePositionProperty;
|
|
28
|
-
export function createWebExtension(id: string, reference_id: string, version: string, store: string, store_type: string): WebExtension;
|
|
29
|
-
export function createInsert(run: Run): Insert;
|
|
30
29
|
export function createPageNumType(start?: number | null, chap_style?: string | null): PageNumType;
|
|
31
30
|
export function createRun(): Run;
|
|
32
31
|
export function createTableCellBorder(position: TableCellBorderPosition): TableCellBorder;
|
|
33
32
|
export function createTableOfContentsItem(): TableOfContentsItem;
|
|
34
33
|
export function createTableRow(): TableRow;
|
|
35
|
-
export function
|
|
34
|
+
export function createComment(id: number): Comment;
|
|
35
|
+
export function createInsert(run: Run): Insert;
|
|
36
36
|
export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
|
|
37
37
|
export function createTable(): Table;
|
|
38
38
|
export function createTableOfContents(): TableOfContents;
|
|
@@ -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,15 @@ function takeObject(idx) {
|
|
|
116
116
|
return ret;
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
|
-
* @
|
|
119
|
+
* @param {string} v
|
|
120
|
+
* @param {HyperlinkType} t
|
|
121
|
+
* @returns {Hyperlink}
|
|
120
122
|
*/
|
|
121
|
-
module.exports.
|
|
122
|
-
const
|
|
123
|
-
|
|
123
|
+
module.exports.createHyperlink = function(v, t) {
|
|
124
|
+
const ptr0 = passStringToWasm0(v, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
125
|
+
const len0 = WASM_VECTOR_LEN;
|
|
126
|
+
const ret = wasm.createHyperlink(ptr0, len0, t);
|
|
127
|
+
return Hyperlink.__wrap(ret);
|
|
124
128
|
};
|
|
125
129
|
|
|
126
130
|
function _assertClass(instance, klass) {
|
|
@@ -128,10 +132,6 @@ function _assertClass(instance, klass) {
|
|
|
128
132
|
throw new Error(`expected instance of ${klass.name}`);
|
|
129
133
|
}
|
|
130
134
|
}
|
|
131
|
-
|
|
132
|
-
function isLikeNone(x) {
|
|
133
|
-
return x === undefined || x === null;
|
|
134
|
-
}
|
|
135
135
|
/**
|
|
136
136
|
* @param {PositionalTabAlignmentType} alignment
|
|
137
137
|
* @param {PositionalTabRelativeTo} relative_to
|
|
@@ -144,46 +144,67 @@ module.exports.createPositionalTab = function(alignment, relative_to, leader) {
|
|
|
144
144
|
};
|
|
145
145
|
|
|
146
146
|
/**
|
|
147
|
-
* @returns {
|
|
147
|
+
* @returns {TableCell}
|
|
148
148
|
*/
|
|
149
|
-
module.exports.
|
|
150
|
-
const ret = wasm.
|
|
151
|
-
return
|
|
149
|
+
module.exports.createTableCell = function() {
|
|
150
|
+
const ret = wasm.createTableCell();
|
|
151
|
+
return TableCell.__wrap(ret);
|
|
152
152
|
};
|
|
153
153
|
|
|
154
154
|
/**
|
|
155
|
-
* @
|
|
156
|
-
* @returns {LevelOverride}
|
|
155
|
+
* @returns {TablePositionProperty}
|
|
157
156
|
*/
|
|
158
|
-
module.exports.
|
|
159
|
-
const ret = wasm.
|
|
160
|
-
return
|
|
157
|
+
module.exports.createTablePosition = function() {
|
|
158
|
+
const ret = wasm.createTablePosition();
|
|
159
|
+
return TablePositionProperty.__wrap(ret);
|
|
161
160
|
};
|
|
162
161
|
|
|
163
162
|
/**
|
|
164
|
-
* @
|
|
163
|
+
* @param {string} id
|
|
164
|
+
* @param {string} reference_id
|
|
165
|
+
* @param {string} version
|
|
166
|
+
* @param {string} store
|
|
167
|
+
* @param {string} store_type
|
|
168
|
+
* @returns {WebExtension}
|
|
165
169
|
*/
|
|
166
|
-
module.exports.
|
|
167
|
-
const
|
|
168
|
-
|
|
170
|
+
module.exports.createWebExtension = function(id, reference_id, version, store, store_type) {
|
|
171
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
172
|
+
const len0 = WASM_VECTOR_LEN;
|
|
173
|
+
const ptr1 = passStringToWasm0(reference_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
174
|
+
const len1 = WASM_VECTOR_LEN;
|
|
175
|
+
const ptr2 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
176
|
+
const len2 = WASM_VECTOR_LEN;
|
|
177
|
+
const ptr3 = passStringToWasm0(store, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
178
|
+
const len3 = WASM_VECTOR_LEN;
|
|
179
|
+
const ptr4 = passStringToWasm0(store_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
180
|
+
const len4 = WASM_VECTOR_LEN;
|
|
181
|
+
const ret = wasm.createWebExtension(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
182
|
+
return WebExtension.__wrap(ret);
|
|
169
183
|
};
|
|
170
184
|
|
|
171
185
|
/**
|
|
172
|
-
* @returns {
|
|
186
|
+
* @returns {LineSpacing}
|
|
173
187
|
*/
|
|
174
|
-
module.exports.
|
|
175
|
-
const ret = wasm.
|
|
176
|
-
return
|
|
188
|
+
module.exports.createLineSpacing = function() {
|
|
189
|
+
const ret = wasm.createLineSpacing();
|
|
190
|
+
return LineSpacing.__wrap(ret);
|
|
177
191
|
};
|
|
178
192
|
|
|
179
193
|
/**
|
|
180
|
-
* @
|
|
194
|
+
* @param {string} style_id
|
|
195
|
+
* @param {StyleType} style_type
|
|
196
|
+
* @returns {Style}
|
|
181
197
|
*/
|
|
182
|
-
module.exports.
|
|
183
|
-
const
|
|
184
|
-
|
|
198
|
+
module.exports.createStyle = function(style_id, style_type) {
|
|
199
|
+
const ptr0 = passStringToWasm0(style_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
200
|
+
const len0 = WASM_VECTOR_LEN;
|
|
201
|
+
const ret = wasm.createStyle(ptr0, len0, style_type);
|
|
202
|
+
return Style.__wrap(ret);
|
|
185
203
|
};
|
|
186
204
|
|
|
205
|
+
function isLikeNone(x) {
|
|
206
|
+
return x === undefined || x === null;
|
|
207
|
+
}
|
|
187
208
|
/**
|
|
188
209
|
* @returns {Docx}
|
|
189
210
|
*/
|
|
@@ -204,6 +225,49 @@ module.exports.createRunFonts = function() {
|
|
|
204
225
|
return RunFonts.__wrap(ret);
|
|
205
226
|
};
|
|
206
227
|
|
|
228
|
+
/**
|
|
229
|
+
* @returns {FrameProperty}
|
|
230
|
+
*/
|
|
231
|
+
module.exports.createFrameProperty = function() {
|
|
232
|
+
const ret = wasm.createFrameProperty();
|
|
233
|
+
return FrameProperty.__wrap(ret);
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @param {number} level
|
|
238
|
+
* @returns {LevelOverride}
|
|
239
|
+
*/
|
|
240
|
+
module.exports.createLevelOverride = function(level) {
|
|
241
|
+
const ret = wasm.createLevelOverride(level);
|
|
242
|
+
return LevelOverride.__wrap(ret);
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* @param {number} id
|
|
247
|
+
* @param {number} abstract_num_id
|
|
248
|
+
* @returns {Numbering}
|
|
249
|
+
*/
|
|
250
|
+
module.exports.createNumbering = function(id, abstract_num_id) {
|
|
251
|
+
const ret = wasm.createNumbering(id, abstract_num_id);
|
|
252
|
+
return Numbering.__wrap(ret);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* @returns {ParagraphPropertyChange}
|
|
257
|
+
*/
|
|
258
|
+
module.exports.createParagraphPropertyChange = function() {
|
|
259
|
+
const ret = wasm.createParagraphPropertyChange();
|
|
260
|
+
return ParagraphPropertyChange.__wrap(ret);
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* @returns {ParagraphProperty}
|
|
265
|
+
*/
|
|
266
|
+
module.exports.createParagraphProperty = function() {
|
|
267
|
+
const ret = wasm.createParagraphProperty();
|
|
268
|
+
return ParagraphProperty.__wrap(ret);
|
|
269
|
+
};
|
|
270
|
+
|
|
207
271
|
/**
|
|
208
272
|
* @returns {PageMargin}
|
|
209
273
|
*/
|
|
@@ -221,11 +285,11 @@ module.exports.createHeader = function() {
|
|
|
221
285
|
};
|
|
222
286
|
|
|
223
287
|
/**
|
|
224
|
-
* @returns {
|
|
288
|
+
* @returns {Paragraph}
|
|
225
289
|
*/
|
|
226
|
-
module.exports.
|
|
227
|
-
const ret = wasm.
|
|
228
|
-
return
|
|
290
|
+
module.exports.createParagraph = function() {
|
|
291
|
+
const ret = wasm.createParagraph();
|
|
292
|
+
return Paragraph.__wrap(ret);
|
|
229
293
|
};
|
|
230
294
|
|
|
231
295
|
function passArray8ToWasm0(arg, malloc) {
|
|
@@ -234,6 +298,53 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
234
298
|
WASM_VECTOR_LEN = arg.length;
|
|
235
299
|
return ptr;
|
|
236
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* @param {Uint8Array} buf
|
|
303
|
+
* @returns {Pic}
|
|
304
|
+
*/
|
|
305
|
+
module.exports.createPic = function(buf) {
|
|
306
|
+
const ptr0 = passArray8ToWasm0(buf, wasm.__wbindgen_malloc);
|
|
307
|
+
const len0 = WASM_VECTOR_LEN;
|
|
308
|
+
const ret = wasm.createPic(ptr0, len0);
|
|
309
|
+
return Pic.__wrap(ret);
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @param {number} id
|
|
314
|
+
* @returns {AbstractNumbering}
|
|
315
|
+
*/
|
|
316
|
+
module.exports.createAbstractNumbering = function(id) {
|
|
317
|
+
const ret = wasm.createAbstractNumbering(id);
|
|
318
|
+
return AbstractNumbering.__wrap(ret);
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* @param {Run} run
|
|
323
|
+
* @returns {Delete}
|
|
324
|
+
*/
|
|
325
|
+
module.exports.createDelete = function(run) {
|
|
326
|
+
_assertClass(run, Run);
|
|
327
|
+
var ptr0 = run.__destroy_into_raw();
|
|
328
|
+
const ret = wasm.createDelete(ptr0);
|
|
329
|
+
return Delete.__wrap(ret);
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* @returns {PageNum}
|
|
334
|
+
*/
|
|
335
|
+
module.exports.createPageNum = function() {
|
|
336
|
+
const ret = wasm.createPageNum();
|
|
337
|
+
return PageNum.__wrap(ret);
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @returns {Footer}
|
|
342
|
+
*/
|
|
343
|
+
module.exports.createFooter = function() {
|
|
344
|
+
const ret = wasm.createFooter();
|
|
345
|
+
return Footer.__wrap(ret);
|
|
346
|
+
};
|
|
347
|
+
|
|
237
348
|
/**
|
|
238
349
|
* @param {Uint8Array} buf
|
|
239
350
|
* @returns {string}
|
|
@@ -304,77 +415,6 @@ module.exports.createRunProperty = function() {
|
|
|
304
415
|
return RunProperty.__wrap(ret);
|
|
305
416
|
};
|
|
306
417
|
|
|
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
|
-
/**
|
|
358
|
-
* @param {number} id
|
|
359
|
-
* @returns {AbstractNumbering}
|
|
360
|
-
*/
|
|
361
|
-
module.exports.createAbstractNumbering = function(id) {
|
|
362
|
-
const ret = wasm.createAbstractNumbering(id);
|
|
363
|
-
return AbstractNumbering.__wrap(ret);
|
|
364
|
-
};
|
|
365
|
-
|
|
366
|
-
/**
|
|
367
|
-
* @param {string} v
|
|
368
|
-
* @param {HyperlinkType} t
|
|
369
|
-
* @returns {Hyperlink}
|
|
370
|
-
*/
|
|
371
|
-
module.exports.createHyperlink = function(v, t) {
|
|
372
|
-
const ptr0 = passStringToWasm0(v, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
373
|
-
const len0 = WASM_VECTOR_LEN;
|
|
374
|
-
const ret = wasm.createHyperlink(ptr0, len0, t);
|
|
375
|
-
return Hyperlink.__wrap(ret);
|
|
376
|
-
};
|
|
377
|
-
|
|
378
418
|
/**
|
|
379
419
|
* @returns {NumPages}
|
|
380
420
|
*/
|
|
@@ -383,56 +423,6 @@ module.exports.createNumPages = function() {
|
|
|
383
423
|
return NumPages.__wrap(ret);
|
|
384
424
|
};
|
|
385
425
|
|
|
386
|
-
/**
|
|
387
|
-
* @returns {TableCell}
|
|
388
|
-
*/
|
|
389
|
-
module.exports.createTableCell = function() {
|
|
390
|
-
const ret = wasm.createTableCell();
|
|
391
|
-
return TableCell.__wrap(ret);
|
|
392
|
-
};
|
|
393
|
-
|
|
394
|
-
/**
|
|
395
|
-
* @returns {TablePositionProperty}
|
|
396
|
-
*/
|
|
397
|
-
module.exports.createTablePosition = function() {
|
|
398
|
-
const ret = wasm.createTablePosition();
|
|
399
|
-
return TablePositionProperty.__wrap(ret);
|
|
400
|
-
};
|
|
401
|
-
|
|
402
|
-
/**
|
|
403
|
-
* @param {string} id
|
|
404
|
-
* @param {string} reference_id
|
|
405
|
-
* @param {string} version
|
|
406
|
-
* @param {string} store
|
|
407
|
-
* @param {string} store_type
|
|
408
|
-
* @returns {WebExtension}
|
|
409
|
-
*/
|
|
410
|
-
module.exports.createWebExtension = function(id, reference_id, version, store, store_type) {
|
|
411
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
412
|
-
const len0 = WASM_VECTOR_LEN;
|
|
413
|
-
const ptr1 = passStringToWasm0(reference_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
414
|
-
const len1 = WASM_VECTOR_LEN;
|
|
415
|
-
const ptr2 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
416
|
-
const len2 = WASM_VECTOR_LEN;
|
|
417
|
-
const ptr3 = passStringToWasm0(store, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
418
|
-
const len3 = WASM_VECTOR_LEN;
|
|
419
|
-
const ptr4 = passStringToWasm0(store_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
420
|
-
const len4 = WASM_VECTOR_LEN;
|
|
421
|
-
const ret = wasm.createWebExtension(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
422
|
-
return WebExtension.__wrap(ret);
|
|
423
|
-
};
|
|
424
|
-
|
|
425
|
-
/**
|
|
426
|
-
* @param {Run} run
|
|
427
|
-
* @returns {Insert}
|
|
428
|
-
*/
|
|
429
|
-
module.exports.createInsert = function(run) {
|
|
430
|
-
_assertClass(run, Run);
|
|
431
|
-
var ptr0 = run.__destroy_into_raw();
|
|
432
|
-
const ret = wasm.createInsert(ptr0);
|
|
433
|
-
return Insert.__wrap(ret);
|
|
434
|
-
};
|
|
435
|
-
|
|
436
426
|
/**
|
|
437
427
|
* @param {number | null} [start]
|
|
438
428
|
* @param {string | null} [chap_style]
|
|
@@ -478,15 +468,24 @@ module.exports.createTableRow = function() {
|
|
|
478
468
|
return TableRow.__wrap(ret);
|
|
479
469
|
};
|
|
480
470
|
|
|
471
|
+
/**
|
|
472
|
+
* @param {number} id
|
|
473
|
+
* @returns {Comment}
|
|
474
|
+
*/
|
|
475
|
+
module.exports.createComment = function(id) {
|
|
476
|
+
const ret = wasm.createComment(id);
|
|
477
|
+
return Comment.__wrap(ret);
|
|
478
|
+
};
|
|
479
|
+
|
|
481
480
|
/**
|
|
482
481
|
* @param {Run} run
|
|
483
|
-
* @returns {
|
|
482
|
+
* @returns {Insert}
|
|
484
483
|
*/
|
|
485
|
-
module.exports.
|
|
484
|
+
module.exports.createInsert = function(run) {
|
|
486
485
|
_assertClass(run, Run);
|
|
487
486
|
var ptr0 = run.__destroy_into_raw();
|
|
488
|
-
const ret = wasm.
|
|
489
|
-
return
|
|
487
|
+
const ret = wasm.createInsert(ptr0);
|
|
488
|
+
return Insert.__wrap(ret);
|
|
490
489
|
};
|
|
491
490
|
|
|
492
491
|
/**
|
|
@@ -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
|