docx-wasm 0.4.20-rc2 → 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/pkg/docx_wasm.d.ts +19 -19
- package/dist/node/pkg/docx_wasm.js +201 -201
- package/dist/node/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/node/pkg/docx_wasm_bg.wasm.d.ts +188 -188
- package/dist/web/pkg/docx_wasm.d.ts +19 -19
- package/dist/web/pkg/docx_wasm_bg.js +199 -199
- package/dist/web/pkg/docx_wasm_bg.wasm +0 -0
- package/dist/web/pkg/docx_wasm_bg.wasm.d.ts +188 -188
- package/package.json +1 -1
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function
|
|
4
|
-
export function createLevelOverride(level: number): LevelOverride;
|
|
5
|
-
export function createParagraphPropertyChange(): ParagraphPropertyChange;
|
|
6
|
-
export function createParagraphProperty(): ParagraphProperty;
|
|
3
|
+
export function createHyperlink(v: string, t: HyperlinkType): Hyperlink;
|
|
7
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
8
|
export function createLineSpacing(): LineSpacing;
|
|
9
9
|
export function createStyle(style_id: string, style_type: StyleType): Style;
|
|
10
10
|
export function createDocx(): Docx;
|
|
11
11
|
export function createRunFonts(): RunFonts;
|
|
12
|
+
export function createFrameProperty(): FrameProperty;
|
|
13
|
+
export function createLevelOverride(level: number): LevelOverride;
|
|
14
|
+
export function createNumbering(id: number, abstract_num_id: number): Numbering;
|
|
15
|
+
export function createParagraphPropertyChange(): ParagraphPropertyChange;
|
|
16
|
+
export function createParagraphProperty(): ParagraphProperty;
|
|
12
17
|
export function createPageMargin(): PageMargin;
|
|
18
|
+
export function createHeader(): Header;
|
|
19
|
+
export function createParagraph(): Paragraph;
|
|
20
|
+
export function createPic(buf: Uint8Array): Pic;
|
|
21
|
+
export function createAbstractNumbering(id: number): AbstractNumbering;
|
|
13
22
|
export function createDelete(run: Run): Delete;
|
|
14
|
-
export function createLevel(id: number, start: number, format: string, text: string, jc: string): Level;
|
|
15
23
|
export function createPageNum(): PageNum;
|
|
16
|
-
export function
|
|
17
|
-
export function createTableOfContents(): TableOfContents;
|
|
18
|
-
export function createTableOfContentsWithInstrText(s: string): TableOfContents;
|
|
19
|
-
export function createHeader(): Header;
|
|
24
|
+
export function createFooter(): Footer;
|
|
20
25
|
export function readDocx(buf: Uint8Array): string;
|
|
21
26
|
export function readXML(xml: string): string;
|
|
22
27
|
export function createRunProperty(): RunProperty;
|
|
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 createFooter(): Footer;
|
|
30
|
-
export function createParagraph(): Paragraph;
|
|
31
|
-
export function createPic(buf: Uint8Array): Pic;
|
|
32
|
-
export function createInsert(run: Run): Insert;
|
|
33
29
|
export function createPageNumType(start?: number | null, chap_style?: string | null): PageNumType;
|
|
34
30
|
export function createRun(): Run;
|
|
35
31
|
export function createTableCellBorder(position: TableCellBorderPosition): TableCellBorder;
|
|
36
32
|
export function createTableOfContentsItem(): TableOfContentsItem;
|
|
37
33
|
export function createTableRow(): TableRow;
|
|
38
|
-
export function createNumbering(id: number, abstract_num_id: number): Numbering;
|
|
39
34
|
export function createComment(id: number): Comment;
|
|
35
|
+
export function createInsert(run: Run): Insert;
|
|
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;
|
|
40
40
|
export enum AlignmentType {
|
|
41
41
|
Both = 0,
|
|
42
42
|
Center = 1,
|
|
@@ -116,20 +116,15 @@ function takeObject(idx) {
|
|
|
116
116
|
return ret;
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
|
-
* @
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const ret = wasm.createFrameProperty();
|
|
123
|
-
return FrameProperty.__wrap(ret);
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* @param {number} level
|
|
128
|
-
* @returns {LevelOverride}
|
|
119
|
+
* @param {string} v
|
|
120
|
+
* @param {HyperlinkType} t
|
|
121
|
+
* @returns {Hyperlink}
|
|
129
122
|
*/
|
|
130
|
-
module.exports.
|
|
131
|
-
const
|
|
132
|
-
|
|
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);
|
|
133
128
|
};
|
|
134
129
|
|
|
135
130
|
function _assertClass(instance, klass) {
|
|
@@ -138,33 +133,53 @@ function _assertClass(instance, klass) {
|
|
|
138
133
|
}
|
|
139
134
|
}
|
|
140
135
|
/**
|
|
141
|
-
* @
|
|
136
|
+
* @param {PositionalTabAlignmentType} alignment
|
|
137
|
+
* @param {PositionalTabRelativeTo} relative_to
|
|
138
|
+
* @param {TabLeaderType} leader
|
|
139
|
+
* @returns {PositionalTab}
|
|
142
140
|
*/
|
|
143
|
-
module.exports.
|
|
144
|
-
const ret = wasm.
|
|
145
|
-
return
|
|
141
|
+
module.exports.createPositionalTab = function(alignment, relative_to, leader) {
|
|
142
|
+
const ret = wasm.createPositionalTab(alignment, relative_to, leader);
|
|
143
|
+
return PositionalTab.__wrap(ret);
|
|
146
144
|
};
|
|
147
145
|
|
|
148
146
|
/**
|
|
149
|
-
* @returns {
|
|
147
|
+
* @returns {TableCell}
|
|
150
148
|
*/
|
|
151
|
-
module.exports.
|
|
152
|
-
const ret = wasm.
|
|
153
|
-
return
|
|
149
|
+
module.exports.createTableCell = function() {
|
|
150
|
+
const ret = wasm.createTableCell();
|
|
151
|
+
return TableCell.__wrap(ret);
|
|
154
152
|
};
|
|
155
153
|
|
|
156
|
-
function isLikeNone(x) {
|
|
157
|
-
return x === undefined || x === null;
|
|
158
|
-
}
|
|
159
154
|
/**
|
|
160
|
-
* @
|
|
161
|
-
* @param {PositionalTabRelativeTo} relative_to
|
|
162
|
-
* @param {TabLeaderType} leader
|
|
163
|
-
* @returns {PositionalTab}
|
|
155
|
+
* @returns {TablePositionProperty}
|
|
164
156
|
*/
|
|
165
|
-
module.exports.
|
|
166
|
-
const ret = wasm.
|
|
167
|
-
return
|
|
157
|
+
module.exports.createTablePosition = function() {
|
|
158
|
+
const ret = wasm.createTablePosition();
|
|
159
|
+
return TablePositionProperty.__wrap(ret);
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
/**
|
|
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}
|
|
169
|
+
*/
|
|
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);
|
|
168
183
|
};
|
|
169
184
|
|
|
170
185
|
/**
|
|
@@ -187,6 +202,9 @@ module.exports.createStyle = function(style_id, style_type) {
|
|
|
187
202
|
return Style.__wrap(ret);
|
|
188
203
|
};
|
|
189
204
|
|
|
205
|
+
function isLikeNone(x) {
|
|
206
|
+
return x === undefined || x === null;
|
|
207
|
+
}
|
|
190
208
|
/**
|
|
191
209
|
* @returns {Docx}
|
|
192
210
|
*/
|
|
@@ -208,91 +226,54 @@ module.exports.createRunFonts = function() {
|
|
|
208
226
|
};
|
|
209
227
|
|
|
210
228
|
/**
|
|
211
|
-
* @returns {
|
|
229
|
+
* @returns {FrameProperty}
|
|
212
230
|
*/
|
|
213
|
-
module.exports.
|
|
214
|
-
const ret = wasm.
|
|
215
|
-
return
|
|
231
|
+
module.exports.createFrameProperty = function() {
|
|
232
|
+
const ret = wasm.createFrameProperty();
|
|
233
|
+
return FrameProperty.__wrap(ret);
|
|
216
234
|
};
|
|
217
235
|
|
|
218
236
|
/**
|
|
219
|
-
* @param {
|
|
220
|
-
* @returns {
|
|
237
|
+
* @param {number} level
|
|
238
|
+
* @returns {LevelOverride}
|
|
221
239
|
*/
|
|
222
|
-
module.exports.
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
const ret = wasm.createDelete(ptr0);
|
|
226
|
-
return Delete.__wrap(ret);
|
|
240
|
+
module.exports.createLevelOverride = function(level) {
|
|
241
|
+
const ret = wasm.createLevelOverride(level);
|
|
242
|
+
return LevelOverride.__wrap(ret);
|
|
227
243
|
};
|
|
228
244
|
|
|
229
245
|
/**
|
|
230
246
|
* @param {number} id
|
|
231
|
-
* @param {number}
|
|
232
|
-
* @
|
|
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);
|
|
246
|
-
};
|
|
247
|
-
|
|
248
|
-
/**
|
|
249
|
-
* @returns {PageNum}
|
|
247
|
+
* @param {number} abstract_num_id
|
|
248
|
+
* @returns {Numbering}
|
|
250
249
|
*/
|
|
251
|
-
module.exports.
|
|
252
|
-
const ret = wasm.
|
|
253
|
-
return
|
|
250
|
+
module.exports.createNumbering = function(id, abstract_num_id) {
|
|
251
|
+
const ret = wasm.createNumbering(id, abstract_num_id);
|
|
252
|
+
return Numbering.__wrap(ret);
|
|
254
253
|
};
|
|
255
254
|
|
|
256
255
|
/**
|
|
257
|
-
* @returns {
|
|
256
|
+
* @returns {ParagraphPropertyChange}
|
|
258
257
|
*/
|
|
259
|
-
module.exports.
|
|
260
|
-
const ret = wasm.
|
|
261
|
-
return
|
|
258
|
+
module.exports.createParagraphPropertyChange = function() {
|
|
259
|
+
const ret = wasm.createParagraphPropertyChange();
|
|
260
|
+
return ParagraphPropertyChange.__wrap(ret);
|
|
262
261
|
};
|
|
263
262
|
|
|
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
263
|
/**
|
|
280
|
-
* @returns {
|
|
264
|
+
* @returns {ParagraphProperty}
|
|
281
265
|
*/
|
|
282
|
-
module.exports.
|
|
283
|
-
const ret = wasm.
|
|
284
|
-
return
|
|
266
|
+
module.exports.createParagraphProperty = function() {
|
|
267
|
+
const ret = wasm.createParagraphProperty();
|
|
268
|
+
return ParagraphProperty.__wrap(ret);
|
|
285
269
|
};
|
|
286
270
|
|
|
287
271
|
/**
|
|
288
|
-
* @
|
|
289
|
-
* @returns {TableOfContents}
|
|
272
|
+
* @returns {PageMargin}
|
|
290
273
|
*/
|
|
291
|
-
module.exports.
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
const ret = wasm.createTableOfContentsWithInstrText(ptr0, len0);
|
|
295
|
-
return TableOfContents.__wrap(ret);
|
|
274
|
+
module.exports.createPageMargin = function() {
|
|
275
|
+
const ret = wasm.createPageMargin();
|
|
276
|
+
return PageMargin.__wrap(ret);
|
|
296
277
|
};
|
|
297
278
|
|
|
298
279
|
/**
|
|
@@ -303,12 +284,67 @@ module.exports.createHeader = function() {
|
|
|
303
284
|
return Header.__wrap(ret);
|
|
304
285
|
};
|
|
305
286
|
|
|
287
|
+
/**
|
|
288
|
+
* @returns {Paragraph}
|
|
289
|
+
*/
|
|
290
|
+
module.exports.createParagraph = function() {
|
|
291
|
+
const ret = wasm.createParagraph();
|
|
292
|
+
return Paragraph.__wrap(ret);
|
|
293
|
+
};
|
|
294
|
+
|
|
306
295
|
function passArray8ToWasm0(arg, malloc) {
|
|
307
296
|
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
308
297
|
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
309
298
|
WASM_VECTOR_LEN = arg.length;
|
|
310
299
|
return ptr;
|
|
311
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
|
+
|
|
312
348
|
/**
|
|
313
349
|
* @param {Uint8Array} buf
|
|
314
350
|
* @returns {string}
|
|
@@ -379,27 +415,6 @@ module.exports.createRunProperty = function() {
|
|
|
379
415
|
return RunProperty.__wrap(ret);
|
|
380
416
|
};
|
|
381
417
|
|
|
382
|
-
/**
|
|
383
|
-
* @param {number} id
|
|
384
|
-
* @returns {AbstractNumbering}
|
|
385
|
-
*/
|
|
386
|
-
module.exports.createAbstractNumbering = function(id) {
|
|
387
|
-
const ret = wasm.createAbstractNumbering(id);
|
|
388
|
-
return AbstractNumbering.__wrap(ret);
|
|
389
|
-
};
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* @param {string} v
|
|
393
|
-
* @param {HyperlinkType} t
|
|
394
|
-
* @returns {Hyperlink}
|
|
395
|
-
*/
|
|
396
|
-
module.exports.createHyperlink = function(v, t) {
|
|
397
|
-
const ptr0 = passStringToWasm0(v, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
398
|
-
const len0 = WASM_VECTOR_LEN;
|
|
399
|
-
const ret = wasm.createHyperlink(ptr0, len0, t);
|
|
400
|
-
return Hyperlink.__wrap(ret);
|
|
401
|
-
};
|
|
402
|
-
|
|
403
418
|
/**
|
|
404
419
|
* @returns {NumPages}
|
|
405
420
|
*/
|
|
@@ -408,83 +423,6 @@ module.exports.createNumPages = function() {
|
|
|
408
423
|
return NumPages.__wrap(ret);
|
|
409
424
|
};
|
|
410
425
|
|
|
411
|
-
/**
|
|
412
|
-
* @returns {TableCell}
|
|
413
|
-
*/
|
|
414
|
-
module.exports.createTableCell = function() {
|
|
415
|
-
const ret = wasm.createTableCell();
|
|
416
|
-
return TableCell.__wrap(ret);
|
|
417
|
-
};
|
|
418
|
-
|
|
419
|
-
/**
|
|
420
|
-
* @returns {TablePositionProperty}
|
|
421
|
-
*/
|
|
422
|
-
module.exports.createTablePosition = function() {
|
|
423
|
-
const ret = wasm.createTablePosition();
|
|
424
|
-
return TablePositionProperty.__wrap(ret);
|
|
425
|
-
};
|
|
426
|
-
|
|
427
|
-
/**
|
|
428
|
-
* @param {string} id
|
|
429
|
-
* @param {string} reference_id
|
|
430
|
-
* @param {string} version
|
|
431
|
-
* @param {string} store
|
|
432
|
-
* @param {string} store_type
|
|
433
|
-
* @returns {WebExtension}
|
|
434
|
-
*/
|
|
435
|
-
module.exports.createWebExtension = function(id, reference_id, version, store, store_type) {
|
|
436
|
-
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
437
|
-
const len0 = WASM_VECTOR_LEN;
|
|
438
|
-
const ptr1 = passStringToWasm0(reference_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
439
|
-
const len1 = WASM_VECTOR_LEN;
|
|
440
|
-
const ptr2 = passStringToWasm0(version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
441
|
-
const len2 = WASM_VECTOR_LEN;
|
|
442
|
-
const ptr3 = passStringToWasm0(store, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
443
|
-
const len3 = WASM_VECTOR_LEN;
|
|
444
|
-
const ptr4 = passStringToWasm0(store_type, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
445
|
-
const len4 = WASM_VECTOR_LEN;
|
|
446
|
-
const ret = wasm.createWebExtension(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
447
|
-
return WebExtension.__wrap(ret);
|
|
448
|
-
};
|
|
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
|
-
|
|
477
|
-
/**
|
|
478
|
-
* @param {Run} run
|
|
479
|
-
* @returns {Insert}
|
|
480
|
-
*/
|
|
481
|
-
module.exports.createInsert = function(run) {
|
|
482
|
-
_assertClass(run, Run);
|
|
483
|
-
var ptr0 = run.__destroy_into_raw();
|
|
484
|
-
const ret = wasm.createInsert(ptr0);
|
|
485
|
-
return Insert.__wrap(ret);
|
|
486
|
-
};
|
|
487
|
-
|
|
488
426
|
/**
|
|
489
427
|
* @param {number | null} [start]
|
|
490
428
|
* @param {string | null} [chap_style]
|
|
@@ -532,21 +470,83 @@ module.exports.createTableRow = function() {
|
|
|
532
470
|
|
|
533
471
|
/**
|
|
534
472
|
* @param {number} id
|
|
535
|
-
* @
|
|
536
|
-
* @returns {Numbering}
|
|
473
|
+
* @returns {Comment}
|
|
537
474
|
*/
|
|
538
|
-
module.exports.
|
|
539
|
-
const ret = wasm.
|
|
540
|
-
return
|
|
475
|
+
module.exports.createComment = function(id) {
|
|
476
|
+
const ret = wasm.createComment(id);
|
|
477
|
+
return Comment.__wrap(ret);
|
|
478
|
+
};
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* @param {Run} run
|
|
482
|
+
* @returns {Insert}
|
|
483
|
+
*/
|
|
484
|
+
module.exports.createInsert = function(run) {
|
|
485
|
+
_assertClass(run, Run);
|
|
486
|
+
var ptr0 = run.__destroy_into_raw();
|
|
487
|
+
const ret = wasm.createInsert(ptr0);
|
|
488
|
+
return Insert.__wrap(ret);
|
|
541
489
|
};
|
|
542
490
|
|
|
543
491
|
/**
|
|
544
492
|
* @param {number} id
|
|
545
|
-
* @
|
|
493
|
+
* @param {number} start
|
|
494
|
+
* @param {string} format
|
|
495
|
+
* @param {string} text
|
|
496
|
+
* @param {string} jc
|
|
497
|
+
* @returns {Level}
|
|
546
498
|
*/
|
|
547
|
-
module.exports.
|
|
548
|
-
const
|
|
549
|
-
|
|
499
|
+
module.exports.createLevel = function(id, start, format, text, jc) {
|
|
500
|
+
const ptr0 = passStringToWasm0(format, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
501
|
+
const len0 = WASM_VECTOR_LEN;
|
|
502
|
+
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
503
|
+
const len1 = WASM_VECTOR_LEN;
|
|
504
|
+
const ptr2 = passStringToWasm0(jc, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
505
|
+
const len2 = WASM_VECTOR_LEN;
|
|
506
|
+
const ret = wasm.createLevel(id, start, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
507
|
+
return Level.__wrap(ret);
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @returns {Table}
|
|
512
|
+
*/
|
|
513
|
+
module.exports.createTable = function() {
|
|
514
|
+
const ret = wasm.createTable();
|
|
515
|
+
return Table.__wrap(ret);
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
let cachedUint32ArrayMemory0 = null;
|
|
519
|
+
|
|
520
|
+
function getUint32ArrayMemory0() {
|
|
521
|
+
if (cachedUint32ArrayMemory0 === null || cachedUint32ArrayMemory0.byteLength === 0) {
|
|
522
|
+
cachedUint32ArrayMemory0 = new Uint32Array(wasm.memory.buffer);
|
|
523
|
+
}
|
|
524
|
+
return cachedUint32ArrayMemory0;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
528
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
529
|
+
getUint32ArrayMemory0().set(arg, ptr / 4);
|
|
530
|
+
WASM_VECTOR_LEN = arg.length;
|
|
531
|
+
return ptr;
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* @returns {TableOfContents}
|
|
535
|
+
*/
|
|
536
|
+
module.exports.createTableOfContents = function() {
|
|
537
|
+
const ret = wasm.createTableOfContents();
|
|
538
|
+
return TableOfContents.__wrap(ret);
|
|
539
|
+
};
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* @param {string} s
|
|
543
|
+
* @returns {TableOfContents}
|
|
544
|
+
*/
|
|
545
|
+
module.exports.createTableOfContentsWithInstrText = function(s) {
|
|
546
|
+
const ptr0 = passStringToWasm0(s, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
547
|
+
const len0 = WASM_VECTOR_LEN;
|
|
548
|
+
const ret = wasm.createTableOfContentsWithInstrText(ptr0, len0);
|
|
549
|
+
return TableOfContents.__wrap(ret);
|
|
550
550
|
};
|
|
551
551
|
|
|
552
552
|
/**
|
|
Binary file
|