@kreuzberg/html-to-markdown-wasm 3.4.0 → 3.5.0-rc.1
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/LICENSE +21 -0
- package/README.md +233 -0
- package/package.json +4 -4
- package/pkg/bundler/LICENSE +21 -0
- package/pkg/bundler/README.md +233 -0
- package/pkg/bundler/html_to_markdown_wasm.d.ts +163 -287
- package/pkg/bundler/html_to_markdown_wasm.js +1 -1
- package/pkg/bundler/html_to_markdown_wasm_bg.js +1345 -711
- package/pkg/bundler/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/bundler/html_to_markdown_wasm_bg.wasm.d.ts +94 -43
- package/pkg/bundler/package.json +1 -1
- package/pkg/deno/LICENSE +21 -0
- package/pkg/deno/README.md +233 -0
- package/pkg/deno/html_to_markdown_wasm.d.ts +163 -287
- package/pkg/deno/html_to_markdown_wasm.js +1345 -711
- package/pkg/deno/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/deno/html_to_markdown_wasm_bg.wasm.d.ts +94 -43
- package/pkg/nodejs/LICENSE +21 -0
- package/pkg/nodejs/README.md +233 -0
- package/pkg/nodejs/html_to_markdown_wasm.d.ts +163 -287
- package/pkg/nodejs/html_to_markdown_wasm.js +1350 -717
- package/pkg/nodejs/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/nodejs/html_to_markdown_wasm_bg.wasm.d.ts +94 -43
- package/pkg/nodejs/package.json +1 -1
- package/pkg/web/LICENSE +21 -0
- package/pkg/web/README.md +233 -0
- package/pkg/web/html_to_markdown_wasm.d.ts +257 -330
- package/pkg/web/html_to_markdown_wasm.js +1345 -711
- package/pkg/web/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/web/html_to_markdown_wasm_bg.wasm.d.ts +94 -43
- package/pkg/web/package.json +1 -1
|
@@ -4,19 +4,120 @@
|
|
|
4
4
|
* The type of an inline text annotation.
|
|
5
5
|
*
|
|
6
6
|
* Uses internally tagged representation (`"annotation_type": "bold"`) for JSON serialization.
|
|
7
|
-
* @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8}
|
|
8
7
|
*/
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
8
|
+
export class WasmAnnotationKind {
|
|
9
|
+
static __wrap(ptr) {
|
|
10
|
+
const obj = Object.create(WasmAnnotationKind.prototype);
|
|
11
|
+
obj.__wbg_ptr = ptr;
|
|
12
|
+
WasmAnnotationKindFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
13
|
+
return obj;
|
|
14
|
+
}
|
|
15
|
+
__destroy_into_raw() {
|
|
16
|
+
const ptr = this.__wbg_ptr;
|
|
17
|
+
this.__wbg_ptr = 0;
|
|
18
|
+
WasmAnnotationKindFinalization.unregister(this);
|
|
19
|
+
return ptr;
|
|
20
|
+
}
|
|
21
|
+
free() {
|
|
22
|
+
const ptr = this.__destroy_into_raw();
|
|
23
|
+
wasm.__wbg_wasmannotationkind_free(ptr, 0);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @returns {string}
|
|
27
|
+
*/
|
|
28
|
+
get annotationType() {
|
|
29
|
+
let deferred1_0;
|
|
30
|
+
let deferred1_1;
|
|
31
|
+
try {
|
|
32
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
33
|
+
wasm.wasmannotationkind_annotationType(retptr, this.__wbg_ptr);
|
|
34
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
35
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
36
|
+
deferred1_0 = r0;
|
|
37
|
+
deferred1_1 = r1;
|
|
38
|
+
return getStringFromWasm0(r0, r1);
|
|
39
|
+
} finally {
|
|
40
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
41
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @returns {WasmAnnotationKind}
|
|
46
|
+
*/
|
|
47
|
+
static default() {
|
|
48
|
+
const ret = wasm.wasmannotationkind_default();
|
|
49
|
+
return WasmAnnotationKind.__wrap(ret);
|
|
50
|
+
}
|
|
51
|
+
constructor() {
|
|
52
|
+
const ret = wasm.wasmannotationkind_new();
|
|
53
|
+
this.__wbg_ptr = ret;
|
|
54
|
+
WasmAnnotationKindFinalization.register(this, this.__wbg_ptr, this);
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @param {string} value
|
|
59
|
+
*/
|
|
60
|
+
set annotationType(value) {
|
|
61
|
+
const ptr0 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
62
|
+
const len0 = WASM_VECTOR_LEN;
|
|
63
|
+
wasm.wasmannotationkind_set_annotationType(this.__wbg_ptr, ptr0, len0);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @param {string | null} [value]
|
|
67
|
+
*/
|
|
68
|
+
set title(value) {
|
|
69
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
70
|
+
var len0 = WASM_VECTOR_LEN;
|
|
71
|
+
wasm.wasmannotationkind_set_title(this.__wbg_ptr, ptr0, len0);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @param {string | null} [value]
|
|
75
|
+
*/
|
|
76
|
+
set url(value) {
|
|
77
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
78
|
+
var len0 = WASM_VECTOR_LEN;
|
|
79
|
+
wasm.wasmannotationkind_set_url(this.__wbg_ptr, ptr0, len0);
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @returns {string | undefined}
|
|
83
|
+
*/
|
|
84
|
+
get title() {
|
|
85
|
+
try {
|
|
86
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
87
|
+
wasm.wasmannotationkind_title(retptr, this.__wbg_ptr);
|
|
88
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
89
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
90
|
+
let v1;
|
|
91
|
+
if (r0 !== 0) {
|
|
92
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
93
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
94
|
+
}
|
|
95
|
+
return v1;
|
|
96
|
+
} finally {
|
|
97
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* @returns {string | undefined}
|
|
102
|
+
*/
|
|
103
|
+
get url() {
|
|
104
|
+
try {
|
|
105
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
106
|
+
wasm.wasmannotationkind_url(retptr, this.__wbg_ptr);
|
|
107
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
108
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
109
|
+
let v1;
|
|
110
|
+
if (r0 !== 0) {
|
|
111
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
112
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
113
|
+
}
|
|
114
|
+
return v1;
|
|
115
|
+
} finally {
|
|
116
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (Symbol.dispose) WasmAnnotationKind.prototype[Symbol.dispose] = WasmAnnotationKind.prototype.free;
|
|
20
121
|
|
|
21
122
|
/**
|
|
22
123
|
* Code block fence style in Markdown output.
|
|
@@ -33,19 +134,9 @@ export const WasmCodeBlockStyle = Object.freeze({
|
|
|
33
134
|
/**
|
|
34
135
|
* Main conversion options for HTML to Markdown conversion.
|
|
35
136
|
*
|
|
36
|
-
* Use
|
|
137
|
+
* Use `ConversionOptions.builder()` to construct, or `Default.default()` for defaults.
|
|
37
138
|
*
|
|
38
139
|
* # Example
|
|
39
|
-
*
|
|
40
|
-
* ```text
|
|
41
|
-
* use html_to_markdown_rs::ConversionOptions;
|
|
42
|
-
*
|
|
43
|
-
* let options = ConversionOptions::builder()
|
|
44
|
-
* .heading_style(HeadingStyle::Atx)
|
|
45
|
-
* .wrap(true)
|
|
46
|
-
* .wrap_width(100)
|
|
47
|
-
* .build();
|
|
48
|
-
* ```
|
|
49
140
|
*/
|
|
50
141
|
export class WasmConversionOptions {
|
|
51
142
|
static __wrap(ptr) {
|
|
@@ -64,15 +155,6 @@ export class WasmConversionOptions {
|
|
|
64
155
|
const ptr = this.__destroy_into_raw();
|
|
65
156
|
wasm.__wbg_wasmconversionoptions_free(ptr, 0);
|
|
66
157
|
}
|
|
67
|
-
/**
|
|
68
|
-
* Apply a partial update to these conversion options.
|
|
69
|
-
* @param {WasmConversionOptionsUpdate} _update
|
|
70
|
-
*/
|
|
71
|
-
applyUpdate(_update) {
|
|
72
|
-
_assertClass(_update, WasmConversionOptionsUpdate);
|
|
73
|
-
var ptr0 = _update.__destroy_into_raw();
|
|
74
|
-
wasm.wasmconversionoptions_applyUpdate(this.__wbg_ptr, ptr0);
|
|
75
|
-
}
|
|
76
158
|
/**
|
|
77
159
|
* @returns {boolean}
|
|
78
160
|
*/
|
|
@@ -87,14 +169,6 @@ export class WasmConversionOptions {
|
|
|
87
169
|
const ret = wasm.wasmconversionoptions_brInTables(this.__wbg_ptr);
|
|
88
170
|
return ret !== 0;
|
|
89
171
|
}
|
|
90
|
-
/**
|
|
91
|
-
* Create a new builder with default values.
|
|
92
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
93
|
-
*/
|
|
94
|
-
static builder() {
|
|
95
|
-
const ret = wasm.wasmconversionoptions_builder();
|
|
96
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
97
|
-
}
|
|
98
172
|
/**
|
|
99
173
|
* @returns {string}
|
|
100
174
|
*/
|
|
@@ -122,11 +196,23 @@ export class WasmConversionOptions {
|
|
|
122
196
|
return ret !== 0;
|
|
123
197
|
}
|
|
124
198
|
/**
|
|
125
|
-
* @returns {
|
|
199
|
+
* @returns {string}
|
|
126
200
|
*/
|
|
127
201
|
get codeBlockStyle() {
|
|
128
|
-
|
|
129
|
-
|
|
202
|
+
let deferred1_0;
|
|
203
|
+
let deferred1_1;
|
|
204
|
+
try {
|
|
205
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
206
|
+
wasm.wasmconversionoptions_codeBlockStyle(retptr, this.__wbg_ptr);
|
|
207
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
208
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
209
|
+
deferred1_0 = r0;
|
|
210
|
+
deferred1_1 = r1;
|
|
211
|
+
return getStringFromWasm0(r0, r1);
|
|
212
|
+
} finally {
|
|
213
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
214
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
215
|
+
}
|
|
130
216
|
}
|
|
131
217
|
/**
|
|
132
218
|
* @returns {string}
|
|
@@ -147,6 +233,13 @@ export class WasmConversionOptions {
|
|
|
147
233
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
148
234
|
}
|
|
149
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
* @returns {boolean}
|
|
238
|
+
*/
|
|
239
|
+
get compactTables() {
|
|
240
|
+
const ret = wasm.wasmconversionoptions_compactTables(this.__wbg_ptr);
|
|
241
|
+
return ret !== 0;
|
|
242
|
+
}
|
|
150
243
|
/**
|
|
151
244
|
* @returns {boolean}
|
|
152
245
|
*/
|
|
@@ -253,39 +346,42 @@ export class WasmConversionOptions {
|
|
|
253
346
|
return ret !== 0;
|
|
254
347
|
}
|
|
255
348
|
/**
|
|
256
|
-
* @
|
|
257
|
-
* @returns {WasmConversionOptions}
|
|
258
|
-
*/
|
|
259
|
-
static from(update) {
|
|
260
|
-
_assertClass(update, WasmConversionOptionsUpdate);
|
|
261
|
-
var ptr0 = update.__destroy_into_raw();
|
|
262
|
-
const ret = wasm.wasmconversionoptions_from(ptr0);
|
|
263
|
-
return WasmConversionOptions.__wrap(ret);
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Create from a partial update, applying to defaults.
|
|
267
|
-
* @param {WasmConversionOptionsUpdate} update
|
|
268
|
-
* @returns {WasmConversionOptions}
|
|
269
|
-
*/
|
|
270
|
-
static fromUpdate(update) {
|
|
271
|
-
_assertClass(update, WasmConversionOptionsUpdate);
|
|
272
|
-
var ptr0 = update.__destroy_into_raw();
|
|
273
|
-
const ret = wasm.wasmconversionoptions_fromUpdate(ptr0);
|
|
274
|
-
return WasmConversionOptions.__wrap(ret);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* @returns {WasmHeadingStyle}
|
|
349
|
+
* @returns {string}
|
|
278
350
|
*/
|
|
279
351
|
get headingStyle() {
|
|
280
|
-
|
|
281
|
-
|
|
352
|
+
let deferred1_0;
|
|
353
|
+
let deferred1_1;
|
|
354
|
+
try {
|
|
355
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
356
|
+
wasm.wasmconversionoptions_headingStyle(retptr, this.__wbg_ptr);
|
|
357
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
358
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
359
|
+
deferred1_0 = r0;
|
|
360
|
+
deferred1_1 = r1;
|
|
361
|
+
return getStringFromWasm0(r0, r1);
|
|
362
|
+
} finally {
|
|
363
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
364
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
365
|
+
}
|
|
282
366
|
}
|
|
283
367
|
/**
|
|
284
|
-
* @returns {
|
|
368
|
+
* @returns {string}
|
|
285
369
|
*/
|
|
286
370
|
get highlightStyle() {
|
|
287
|
-
|
|
288
|
-
|
|
371
|
+
let deferred1_0;
|
|
372
|
+
let deferred1_1;
|
|
373
|
+
try {
|
|
374
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
375
|
+
wasm.wasmconversionoptions_highlightStyle(retptr, this.__wbg_ptr);
|
|
376
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
377
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
378
|
+
deferred1_0 = r0;
|
|
379
|
+
deferred1_1 = r1;
|
|
380
|
+
return getStringFromWasm0(r0, r1);
|
|
381
|
+
} finally {
|
|
382
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
383
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
384
|
+
}
|
|
289
385
|
}
|
|
290
386
|
/**
|
|
291
387
|
* @returns {boolean}
|
|
@@ -318,18 +414,42 @@ export class WasmConversionOptions {
|
|
|
318
414
|
}
|
|
319
415
|
}
|
|
320
416
|
/**
|
|
321
|
-
* @returns {
|
|
417
|
+
* @returns {string}
|
|
322
418
|
*/
|
|
323
419
|
get linkStyle() {
|
|
324
|
-
|
|
325
|
-
|
|
420
|
+
let deferred1_0;
|
|
421
|
+
let deferred1_1;
|
|
422
|
+
try {
|
|
423
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
424
|
+
wasm.wasmconversionoptions_linkStyle(retptr, this.__wbg_ptr);
|
|
425
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
426
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
427
|
+
deferred1_0 = r0;
|
|
428
|
+
deferred1_1 = r1;
|
|
429
|
+
return getStringFromWasm0(r0, r1);
|
|
430
|
+
} finally {
|
|
431
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
432
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
433
|
+
}
|
|
326
434
|
}
|
|
327
435
|
/**
|
|
328
|
-
* @returns {
|
|
436
|
+
* @returns {string}
|
|
329
437
|
*/
|
|
330
438
|
get listIndentType() {
|
|
331
|
-
|
|
332
|
-
|
|
439
|
+
let deferred1_0;
|
|
440
|
+
let deferred1_1;
|
|
441
|
+
try {
|
|
442
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
443
|
+
wasm.wasmconversionoptions_listIndentType(retptr, this.__wbg_ptr);
|
|
444
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
445
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
446
|
+
deferred1_0 = r0;
|
|
447
|
+
deferred1_1 = r1;
|
|
448
|
+
return getStringFromWasm0(r0, r1);
|
|
449
|
+
} finally {
|
|
450
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
451
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
452
|
+
}
|
|
333
453
|
}
|
|
334
454
|
/**
|
|
335
455
|
* @returns {number}
|
|
@@ -353,60 +473,60 @@ export class WasmConversionOptions {
|
|
|
353
473
|
return BigInt.asUintN(64, ret);
|
|
354
474
|
}
|
|
355
475
|
/**
|
|
356
|
-
* @param {WasmHeadingStyle | null} [
|
|
357
|
-
* @param {WasmListIndentType | null} [
|
|
358
|
-
* @param {number | null} [
|
|
476
|
+
* @param {WasmHeadingStyle | null} [headingStyle]
|
|
477
|
+
* @param {WasmListIndentType | null} [listIndentType]
|
|
478
|
+
* @param {number | null} [listIndentWidth]
|
|
359
479
|
* @param {string | null} [bullets]
|
|
360
|
-
* @param {string | null} [
|
|
361
|
-
* @param {boolean | null} [
|
|
362
|
-
* @param {boolean | null} [
|
|
363
|
-
* @param {boolean | null} [
|
|
364
|
-
* @param {boolean | null} [
|
|
365
|
-
* @param {string | null} [
|
|
480
|
+
* @param {string | null} [strongEmSymbol]
|
|
481
|
+
* @param {boolean | null} [escapeAsterisks]
|
|
482
|
+
* @param {boolean | null} [escapeUnderscores]
|
|
483
|
+
* @param {boolean | null} [escapeMisc]
|
|
484
|
+
* @param {boolean | null} [escapeAscii]
|
|
485
|
+
* @param {string | null} [codeLanguage]
|
|
366
486
|
* @param {boolean | null} [autolinks]
|
|
367
|
-
* @param {boolean | null} [
|
|
368
|
-
* @param {boolean | null} [
|
|
369
|
-
* @param {
|
|
370
|
-
* @param {
|
|
371
|
-
* @param {
|
|
372
|
-
* @param {
|
|
487
|
+
* @param {boolean | null} [defaultTitle]
|
|
488
|
+
* @param {boolean | null} [brInTables]
|
|
489
|
+
* @param {boolean | null} [compactTables]
|
|
490
|
+
* @param {WasmHighlightStyle | null} [highlightStyle]
|
|
491
|
+
* @param {boolean | null} [extractMetadata]
|
|
492
|
+
* @param {WasmWhitespaceMode | null} [whitespaceMode]
|
|
493
|
+
* @param {boolean | null} [stripNewlines]
|
|
373
494
|
* @param {boolean | null} [wrap]
|
|
374
|
-
* @param {number | null} [
|
|
375
|
-
* @param {boolean | null} [
|
|
376
|
-
* @param {string | null} [
|
|
377
|
-
* @param {string | null} [
|
|
378
|
-
* @param {WasmNewlineStyle | null} [
|
|
379
|
-
* @param {WasmCodeBlockStyle | null} [
|
|
380
|
-
* @param {string[] | null} [
|
|
495
|
+
* @param {number | null} [wrapWidth]
|
|
496
|
+
* @param {boolean | null} [convertAsInline]
|
|
497
|
+
* @param {string | null} [subSymbol]
|
|
498
|
+
* @param {string | null} [supSymbol]
|
|
499
|
+
* @param {WasmNewlineStyle | null} [newlineStyle]
|
|
500
|
+
* @param {WasmCodeBlockStyle | null} [codeBlockStyle]
|
|
501
|
+
* @param {string[] | null} [keepInlineImagesIn]
|
|
381
502
|
* @param {WasmPreprocessingOptions | null} [preprocessing]
|
|
382
503
|
* @param {string | null} [encoding]
|
|
383
504
|
* @param {boolean | null} [debug]
|
|
384
|
-
* @param {string[] | null} [
|
|
385
|
-
* @param {string[] | null} [
|
|
386
|
-
* @param {boolean | null} [
|
|
387
|
-
* @param {WasmLinkStyle | null} [
|
|
388
|
-
* @param {WasmOutputFormat | null} [
|
|
389
|
-
* @param {boolean | null} [
|
|
390
|
-
* @param {boolean | null} [
|
|
391
|
-
* @param {bigint | null} [
|
|
392
|
-
* @param {boolean | null} [
|
|
393
|
-
* @param {boolean | null} [
|
|
394
|
-
* @param {string[] | null} [
|
|
395
|
-
* @param {number | null} [
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
constructor(heading_style, list_indent_type, list_indent_width, bullets, strong_em_symbol, escape_asterisks, escape_underscores, escape_misc, escape_ascii, code_language, autolinks, default_title, br_in_tables, highlight_style, extract_metadata, whitespace_mode, strip_newlines, wrap, wrap_width, convert_as_inline, sub_symbol, sup_symbol, newline_style, code_block_style, keep_inline_images_in, preprocessing, encoding, debug, strip_tags, preserve_tags, skip_images, link_style, output_format, include_document_structure, extract_images, max_image_size, capture_svg, infer_dimensions, exclude_selectors, max_depth, visitor) {
|
|
505
|
+
* @param {string[] | null} [stripTags]
|
|
506
|
+
* @param {string[] | null} [preserveTags]
|
|
507
|
+
* @param {boolean | null} [skipImages]
|
|
508
|
+
* @param {WasmLinkStyle | null} [linkStyle]
|
|
509
|
+
* @param {WasmOutputFormat | null} [outputFormat]
|
|
510
|
+
* @param {boolean | null} [includeDocumentStructure]
|
|
511
|
+
* @param {boolean | null} [extractImages]
|
|
512
|
+
* @param {bigint | null} [maxImageSize]
|
|
513
|
+
* @param {boolean | null} [captureSvg]
|
|
514
|
+
* @param {boolean | null} [inferDimensions]
|
|
515
|
+
* @param {string[] | null} [excludeSelectors]
|
|
516
|
+
* @param {number | null} [maxDepth]
|
|
517
|
+
*/
|
|
518
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, maxDepth) {
|
|
399
519
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
400
520
|
var len0 = WASM_VECTOR_LEN;
|
|
401
|
-
var ptr1 = isLikeNone(
|
|
521
|
+
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
402
522
|
var len1 = WASM_VECTOR_LEN;
|
|
403
|
-
var ptr2 = isLikeNone(
|
|
523
|
+
var ptr2 = isLikeNone(codeLanguage) ? 0 : passStringToWasm0(codeLanguage, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
404
524
|
var len2 = WASM_VECTOR_LEN;
|
|
405
|
-
var ptr3 = isLikeNone(
|
|
525
|
+
var ptr3 = isLikeNone(subSymbol) ? 0 : passStringToWasm0(subSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
406
526
|
var len3 = WASM_VECTOR_LEN;
|
|
407
|
-
var ptr4 = isLikeNone(
|
|
527
|
+
var ptr4 = isLikeNone(supSymbol) ? 0 : passStringToWasm0(supSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
408
528
|
var len4 = WASM_VECTOR_LEN;
|
|
409
|
-
var ptr5 = isLikeNone(
|
|
529
|
+
var ptr5 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_export);
|
|
410
530
|
var len5 = WASM_VECTOR_LEN;
|
|
411
531
|
let ptr6 = 0;
|
|
412
532
|
if (!isLikeNone(preprocessing)) {
|
|
@@ -415,35 +535,54 @@ export class WasmConversionOptions {
|
|
|
415
535
|
}
|
|
416
536
|
var ptr7 = isLikeNone(encoding) ? 0 : passStringToWasm0(encoding, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
417
537
|
var len7 = WASM_VECTOR_LEN;
|
|
418
|
-
var ptr8 = isLikeNone(
|
|
538
|
+
var ptr8 = isLikeNone(stripTags) ? 0 : passArrayJsValueToWasm0(stripTags, wasm.__wbindgen_export);
|
|
419
539
|
var len8 = WASM_VECTOR_LEN;
|
|
420
|
-
var ptr9 = isLikeNone(
|
|
540
|
+
var ptr9 = isLikeNone(preserveTags) ? 0 : passArrayJsValueToWasm0(preserveTags, wasm.__wbindgen_export);
|
|
421
541
|
var len9 = WASM_VECTOR_LEN;
|
|
422
|
-
var ptr10 = isLikeNone(
|
|
542
|
+
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
423
543
|
var len10 = WASM_VECTOR_LEN;
|
|
424
|
-
|
|
425
|
-
if (!isLikeNone(visitor)) {
|
|
426
|
-
_assertClass(visitor, WasmVisitorHandle);
|
|
427
|
-
ptr11 = visitor.__destroy_into_raw();
|
|
428
|
-
}
|
|
429
|
-
const ret = wasm.wasmconversionoptions_new(isLikeNone(heading_style) ? 3 : heading_style, isLikeNone(list_indent_type) ? 2 : list_indent_type, isLikeNone(list_indent_width) ? Number.MAX_SAFE_INTEGER : (list_indent_width) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escape_asterisks) ? 0xFFFFFF : escape_asterisks ? 1 : 0, isLikeNone(escape_underscores) ? 0xFFFFFF : escape_underscores ? 1 : 0, isLikeNone(escape_misc) ? 0xFFFFFF : escape_misc ? 1 : 0, isLikeNone(escape_ascii) ? 0xFFFFFF : escape_ascii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(default_title) ? 0xFFFFFF : default_title ? 1 : 0, isLikeNone(br_in_tables) ? 0xFFFFFF : br_in_tables ? 1 : 0, isLikeNone(highlight_style) ? 4 : highlight_style, isLikeNone(extract_metadata) ? 0xFFFFFF : extract_metadata ? 1 : 0, isLikeNone(whitespace_mode) ? 2 : whitespace_mode, isLikeNone(strip_newlines) ? 0xFFFFFF : strip_newlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrap_width) ? Number.MAX_SAFE_INTEGER : (wrap_width) >>> 0, isLikeNone(convert_as_inline) ? 0xFFFFFF : convert_as_inline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newline_style) ? 2 : newline_style, isLikeNone(code_block_style) ? 3 : code_block_style, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skip_images) ? 0xFFFFFF : skip_images ? 1 : 0, isLikeNone(link_style) ? 2 : link_style, isLikeNone(output_format) ? 3 : output_format, isLikeNone(include_document_structure) ? 0xFFFFFF : include_document_structure ? 1 : 0, isLikeNone(extract_images) ? 0xFFFFFF : extract_images ? 1 : 0, !isLikeNone(max_image_size), isLikeNone(max_image_size) ? BigInt(0) : max_image_size, isLikeNone(capture_svg) ? 0xFFFFFF : capture_svg ? 1 : 0, isLikeNone(infer_dimensions) ? 0xFFFFFF : infer_dimensions ? 1 : 0, ptr10, len10, isLikeNone(max_depth) ? Number.MAX_SAFE_INTEGER : (max_depth) >>> 0, ptr11);
|
|
544
|
+
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
430
545
|
this.__wbg_ptr = ret;
|
|
431
546
|
WasmConversionOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
432
547
|
return this;
|
|
433
548
|
}
|
|
434
549
|
/**
|
|
435
|
-
* @returns {
|
|
550
|
+
* @returns {string}
|
|
436
551
|
*/
|
|
437
552
|
get newlineStyle() {
|
|
438
|
-
|
|
439
|
-
|
|
553
|
+
let deferred1_0;
|
|
554
|
+
let deferred1_1;
|
|
555
|
+
try {
|
|
556
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
557
|
+
wasm.wasmconversionoptions_newlineStyle(retptr, this.__wbg_ptr);
|
|
558
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
559
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
560
|
+
deferred1_0 = r0;
|
|
561
|
+
deferred1_1 = r1;
|
|
562
|
+
return getStringFromWasm0(r0, r1);
|
|
563
|
+
} finally {
|
|
564
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
565
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
566
|
+
}
|
|
440
567
|
}
|
|
441
568
|
/**
|
|
442
|
-
* @returns {
|
|
569
|
+
* @returns {string}
|
|
443
570
|
*/
|
|
444
571
|
get outputFormat() {
|
|
445
|
-
|
|
446
|
-
|
|
572
|
+
let deferred1_0;
|
|
573
|
+
let deferred1_1;
|
|
574
|
+
try {
|
|
575
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
576
|
+
wasm.wasmconversionoptions_outputFormat(retptr, this.__wbg_ptr);
|
|
577
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
578
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
579
|
+
deferred1_0 = r0;
|
|
580
|
+
deferred1_1 = r1;
|
|
581
|
+
return getStringFromWasm0(r0, r1);
|
|
582
|
+
} finally {
|
|
583
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
584
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
585
|
+
}
|
|
447
586
|
}
|
|
448
587
|
/**
|
|
449
588
|
* @returns {WasmPreprocessingOptions}
|
|
@@ -508,6 +647,12 @@ export class WasmConversionOptions {
|
|
|
508
647
|
const len0 = WASM_VECTOR_LEN;
|
|
509
648
|
wasm.wasmconversionoptions_set_codeLanguage(this.__wbg_ptr, ptr0, len0);
|
|
510
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* @param {boolean} value
|
|
652
|
+
*/
|
|
653
|
+
set compactTables(value) {
|
|
654
|
+
wasm.wasmconversionoptions_set_compactTables(this.__wbg_ptr, value);
|
|
655
|
+
}
|
|
511
656
|
/**
|
|
512
657
|
* @param {boolean} value
|
|
513
658
|
*/
|
|
@@ -836,11 +981,23 @@ export class WasmConversionOptions {
|
|
|
836
981
|
return ret === 0 ? undefined : WasmVisitorHandle.__wrap(ret);
|
|
837
982
|
}
|
|
838
983
|
/**
|
|
839
|
-
* @returns {
|
|
984
|
+
* @returns {string}
|
|
840
985
|
*/
|
|
841
986
|
get whitespaceMode() {
|
|
842
|
-
|
|
843
|
-
|
|
987
|
+
let deferred1_0;
|
|
988
|
+
let deferred1_1;
|
|
989
|
+
try {
|
|
990
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
991
|
+
wasm.wasmconversionoptions_whitespaceMode(retptr, this.__wbg_ptr);
|
|
992
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
993
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
994
|
+
deferred1_0 = r0;
|
|
995
|
+
deferred1_1 = r1;
|
|
996
|
+
return getStringFromWasm0(r0, r1);
|
|
997
|
+
} finally {
|
|
998
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
999
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1000
|
+
}
|
|
844
1001
|
}
|
|
845
1002
|
/**
|
|
846
1003
|
* @returns {boolean}
|
|
@@ -860,133 +1017,37 @@ export class WasmConversionOptions {
|
|
|
860
1017
|
if (Symbol.dispose) WasmConversionOptions.prototype[Symbol.dispose] = WasmConversionOptions.prototype.free;
|
|
861
1018
|
|
|
862
1019
|
/**
|
|
863
|
-
*
|
|
1020
|
+
* Partial update for `ConversionOptions`.
|
|
864
1021
|
*
|
|
865
|
-
*
|
|
1022
|
+
* Uses `Option<T>` fields for selective updates. Bindings use this to construct
|
|
1023
|
+
* options from language-native types. Prefer `ConversionOptionsBuilder` for Rust code.
|
|
866
1024
|
*/
|
|
867
|
-
export class
|
|
1025
|
+
export class WasmConversionOptionsUpdate {
|
|
868
1026
|
static __wrap(ptr) {
|
|
869
|
-
const obj = Object.create(
|
|
1027
|
+
const obj = Object.create(WasmConversionOptionsUpdate.prototype);
|
|
870
1028
|
obj.__wbg_ptr = ptr;
|
|
871
|
-
|
|
1029
|
+
WasmConversionOptionsUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
872
1030
|
return obj;
|
|
873
1031
|
}
|
|
874
1032
|
__destroy_into_raw() {
|
|
875
1033
|
const ptr = this.__wbg_ptr;
|
|
876
1034
|
this.__wbg_ptr = 0;
|
|
877
|
-
|
|
1035
|
+
WasmConversionOptionsUpdateFinalization.unregister(this);
|
|
878
1036
|
return ptr;
|
|
879
1037
|
}
|
|
880
1038
|
free() {
|
|
881
1039
|
const ptr = this.__destroy_into_raw();
|
|
882
|
-
wasm.
|
|
1040
|
+
wasm.__wbg_wasmconversionoptionsupdate_free(ptr, 0);
|
|
883
1041
|
}
|
|
884
1042
|
/**
|
|
885
|
-
*
|
|
886
|
-
* @returns {WasmConversionOptions}
|
|
1043
|
+
* @returns {boolean | undefined}
|
|
887
1044
|
*/
|
|
888
|
-
|
|
889
|
-
const ret = wasm.
|
|
890
|
-
return
|
|
1045
|
+
get autolinks() {
|
|
1046
|
+
const ret = wasm.wasmconversionoptionsupdate_autolinks(this.__wbg_ptr);
|
|
1047
|
+
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
891
1048
|
}
|
|
892
1049
|
/**
|
|
893
|
-
*
|
|
894
|
-
* @param {string[]} selectors
|
|
895
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
896
|
-
*/
|
|
897
|
-
excludeSelectors(selectors) {
|
|
898
|
-
const ptr0 = passArrayJsValueToWasm0(selectors, wasm.__wbindgen_export);
|
|
899
|
-
const len0 = WASM_VECTOR_LEN;
|
|
900
|
-
const ret = wasm.wasmconversionoptionsbuilder_excludeSelectors(this.__wbg_ptr, ptr0, len0);
|
|
901
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
902
|
-
}
|
|
903
|
-
/**
|
|
904
|
-
* Set the list of HTML tag names whose `<img>` children are kept inline.
|
|
905
|
-
* @param {string[]} tags
|
|
906
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
907
|
-
*/
|
|
908
|
-
keepInlineImagesIn(tags) {
|
|
909
|
-
const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
|
|
910
|
-
const len0 = WASM_VECTOR_LEN;
|
|
911
|
-
const ret = wasm.wasmconversionoptionsbuilder_keepInlineImagesIn(this.__wbg_ptr, ptr0, len0);
|
|
912
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
913
|
-
}
|
|
914
|
-
/**
|
|
915
|
-
* Set the pre-processing options applied to the HTML before conversion.
|
|
916
|
-
* @param {WasmPreprocessingOptions} preprocessing
|
|
917
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
918
|
-
*/
|
|
919
|
-
preprocessing(preprocessing) {
|
|
920
|
-
_assertClass(preprocessing, WasmPreprocessingOptions);
|
|
921
|
-
var ptr0 = preprocessing.__destroy_into_raw();
|
|
922
|
-
const ret = wasm.wasmconversionoptionsbuilder_preprocessing(this.__wbg_ptr, ptr0);
|
|
923
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
924
|
-
}
|
|
925
|
-
/**
|
|
926
|
-
* Set the list of HTML tag names that are preserved verbatim in output.
|
|
927
|
-
* @param {string[]} tags
|
|
928
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
929
|
-
*/
|
|
930
|
-
preserveTags(tags) {
|
|
931
|
-
const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
|
|
932
|
-
const len0 = WASM_VECTOR_LEN;
|
|
933
|
-
const ret = wasm.wasmconversionoptionsbuilder_preserveTags(this.__wbg_ptr, ptr0, len0);
|
|
934
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
935
|
-
}
|
|
936
|
-
/**
|
|
937
|
-
* Set the list of HTML tag names whose content is stripped from output.
|
|
938
|
-
* @param {string[]} tags
|
|
939
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
940
|
-
*/
|
|
941
|
-
stripTags(tags) {
|
|
942
|
-
const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
|
|
943
|
-
const len0 = WASM_VECTOR_LEN;
|
|
944
|
-
const ret = wasm.wasmconversionoptionsbuilder_stripTags(this.__wbg_ptr, ptr0, len0);
|
|
945
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
946
|
-
}
|
|
947
|
-
/**
|
|
948
|
-
* Set the visitor used during conversion.
|
|
949
|
-
* @param {WasmVisitorHandle | null} [visitor]
|
|
950
|
-
* @returns {WasmConversionOptionsBuilder}
|
|
951
|
-
*/
|
|
952
|
-
visitor(visitor) {
|
|
953
|
-
let ptr0 = 0;
|
|
954
|
-
if (!isLikeNone(visitor)) {
|
|
955
|
-
_assertClass(visitor, WasmVisitorHandle);
|
|
956
|
-
ptr0 = visitor.__destroy_into_raw();
|
|
957
|
-
}
|
|
958
|
-
const ret = wasm.wasmconversionoptionsbuilder_visitor(this.__wbg_ptr, ptr0);
|
|
959
|
-
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
960
|
-
}
|
|
961
|
-
}
|
|
962
|
-
if (Symbol.dispose) WasmConversionOptionsBuilder.prototype[Symbol.dispose] = WasmConversionOptionsBuilder.prototype.free;
|
|
963
|
-
|
|
964
|
-
/**
|
|
965
|
-
* Partial update for `ConversionOptions`.
|
|
966
|
-
*
|
|
967
|
-
* Uses `Option<T>` fields for selective updates. Bindings use this to construct
|
|
968
|
-
* options from language-native types. Prefer [`ConversionOptionsBuilder`] for Rust code.
|
|
969
|
-
*/
|
|
970
|
-
export class WasmConversionOptionsUpdate {
|
|
971
|
-
__destroy_into_raw() {
|
|
972
|
-
const ptr = this.__wbg_ptr;
|
|
973
|
-
this.__wbg_ptr = 0;
|
|
974
|
-
WasmConversionOptionsUpdateFinalization.unregister(this);
|
|
975
|
-
return ptr;
|
|
976
|
-
}
|
|
977
|
-
free() {
|
|
978
|
-
const ptr = this.__destroy_into_raw();
|
|
979
|
-
wasm.__wbg_wasmconversionoptionsupdate_free(ptr, 0);
|
|
980
|
-
}
|
|
981
|
-
/**
|
|
982
|
-
* @returns {boolean | undefined}
|
|
983
|
-
*/
|
|
984
|
-
get autolinks() {
|
|
985
|
-
const ret = wasm.wasmconversionoptionsupdate_autolinks(this.__wbg_ptr);
|
|
986
|
-
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
987
|
-
}
|
|
988
|
-
/**
|
|
989
|
-
* @returns {boolean | undefined}
|
|
1050
|
+
* @returns {boolean | undefined}
|
|
990
1051
|
*/
|
|
991
1052
|
get brInTables() {
|
|
992
1053
|
const ret = wasm.wasmconversionoptionsupdate_brInTables(this.__wbg_ptr);
|
|
@@ -1019,11 +1080,23 @@ export class WasmConversionOptionsUpdate {
|
|
|
1019
1080
|
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1020
1081
|
}
|
|
1021
1082
|
/**
|
|
1022
|
-
* @returns {
|
|
1083
|
+
* @returns {string | undefined}
|
|
1023
1084
|
*/
|
|
1024
1085
|
get codeBlockStyle() {
|
|
1025
|
-
|
|
1026
|
-
|
|
1086
|
+
try {
|
|
1087
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1088
|
+
wasm.wasmconversionoptionsupdate_codeBlockStyle(retptr, this.__wbg_ptr);
|
|
1089
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1090
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1091
|
+
let v1;
|
|
1092
|
+
if (r0 !== 0) {
|
|
1093
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1094
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1095
|
+
}
|
|
1096
|
+
return v1;
|
|
1097
|
+
} finally {
|
|
1098
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1099
|
+
}
|
|
1027
1100
|
}
|
|
1028
1101
|
/**
|
|
1029
1102
|
* @returns {string | undefined}
|
|
@@ -1044,6 +1117,13 @@ export class WasmConversionOptionsUpdate {
|
|
|
1044
1117
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1045
1118
|
}
|
|
1046
1119
|
}
|
|
1120
|
+
/**
|
|
1121
|
+
* @returns {boolean | undefined}
|
|
1122
|
+
*/
|
|
1123
|
+
get compactTables() {
|
|
1124
|
+
const ret = wasm.wasmconversionoptionsupdate_compactTables(this.__wbg_ptr);
|
|
1125
|
+
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1126
|
+
}
|
|
1047
1127
|
/**
|
|
1048
1128
|
* @returns {boolean | undefined}
|
|
1049
1129
|
*/
|
|
@@ -1058,6 +1138,13 @@ export class WasmConversionOptionsUpdate {
|
|
|
1058
1138
|
const ret = wasm.wasmconversionoptionsupdate_debug(this.__wbg_ptr);
|
|
1059
1139
|
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1060
1140
|
}
|
|
1141
|
+
/**
|
|
1142
|
+
* @returns {WasmConversionOptionsUpdate}
|
|
1143
|
+
*/
|
|
1144
|
+
static default() {
|
|
1145
|
+
const ret = wasm.wasmconversionoptionsupdate_default();
|
|
1146
|
+
return WasmConversionOptionsUpdate.__wrap(ret);
|
|
1147
|
+
}
|
|
1061
1148
|
/**
|
|
1062
1149
|
* @returns {boolean | undefined}
|
|
1063
1150
|
*/
|
|
@@ -1146,18 +1233,42 @@ export class WasmConversionOptionsUpdate {
|
|
|
1146
1233
|
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1147
1234
|
}
|
|
1148
1235
|
/**
|
|
1149
|
-
* @returns {
|
|
1236
|
+
* @returns {string | undefined}
|
|
1150
1237
|
*/
|
|
1151
1238
|
get headingStyle() {
|
|
1152
|
-
|
|
1153
|
-
|
|
1239
|
+
try {
|
|
1240
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1241
|
+
wasm.wasmconversionoptionsupdate_headingStyle(retptr, this.__wbg_ptr);
|
|
1242
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1243
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1244
|
+
let v1;
|
|
1245
|
+
if (r0 !== 0) {
|
|
1246
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1247
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1248
|
+
}
|
|
1249
|
+
return v1;
|
|
1250
|
+
} finally {
|
|
1251
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1252
|
+
}
|
|
1154
1253
|
}
|
|
1155
1254
|
/**
|
|
1156
|
-
* @returns {
|
|
1255
|
+
* @returns {string | undefined}
|
|
1157
1256
|
*/
|
|
1158
1257
|
get highlightStyle() {
|
|
1159
|
-
|
|
1160
|
-
|
|
1258
|
+
try {
|
|
1259
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1260
|
+
wasm.wasmconversionoptionsupdate_highlightStyle(retptr, this.__wbg_ptr);
|
|
1261
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1262
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1263
|
+
let v1;
|
|
1264
|
+
if (r0 !== 0) {
|
|
1265
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1266
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1267
|
+
}
|
|
1268
|
+
return v1;
|
|
1269
|
+
} finally {
|
|
1270
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1271
|
+
}
|
|
1161
1272
|
}
|
|
1162
1273
|
/**
|
|
1163
1274
|
* @returns {boolean | undefined}
|
|
@@ -1193,18 +1304,42 @@ export class WasmConversionOptionsUpdate {
|
|
|
1193
1304
|
}
|
|
1194
1305
|
}
|
|
1195
1306
|
/**
|
|
1196
|
-
* @returns {
|
|
1307
|
+
* @returns {string | undefined}
|
|
1197
1308
|
*/
|
|
1198
1309
|
get linkStyle() {
|
|
1199
|
-
|
|
1200
|
-
|
|
1310
|
+
try {
|
|
1311
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1312
|
+
wasm.wasmconversionoptionsupdate_linkStyle(retptr, this.__wbg_ptr);
|
|
1313
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1314
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1315
|
+
let v1;
|
|
1316
|
+
if (r0 !== 0) {
|
|
1317
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1318
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1319
|
+
}
|
|
1320
|
+
return v1;
|
|
1321
|
+
} finally {
|
|
1322
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1323
|
+
}
|
|
1201
1324
|
}
|
|
1202
1325
|
/**
|
|
1203
|
-
* @returns {
|
|
1326
|
+
* @returns {string | undefined}
|
|
1204
1327
|
*/
|
|
1205
1328
|
get listIndentType() {
|
|
1206
|
-
|
|
1207
|
-
|
|
1329
|
+
try {
|
|
1330
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1331
|
+
wasm.wasmconversionoptionsupdate_listIndentType(retptr, this.__wbg_ptr);
|
|
1332
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1333
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1334
|
+
let v1;
|
|
1335
|
+
if (r0 !== 0) {
|
|
1336
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1337
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1338
|
+
}
|
|
1339
|
+
return v1;
|
|
1340
|
+
} finally {
|
|
1341
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1342
|
+
}
|
|
1208
1343
|
}
|
|
1209
1344
|
/**
|
|
1210
1345
|
* @returns {number | undefined}
|
|
@@ -1235,60 +1370,60 @@ export class WasmConversionOptionsUpdate {
|
|
|
1235
1370
|
}
|
|
1236
1371
|
}
|
|
1237
1372
|
/**
|
|
1238
|
-
* @param {WasmHeadingStyle | null} [
|
|
1239
|
-
* @param {WasmListIndentType | null} [
|
|
1240
|
-
* @param {number | null} [
|
|
1373
|
+
* @param {WasmHeadingStyle | null} [headingStyle]
|
|
1374
|
+
* @param {WasmListIndentType | null} [listIndentType]
|
|
1375
|
+
* @param {number | null} [listIndentWidth]
|
|
1241
1376
|
* @param {string | null} [bullets]
|
|
1242
|
-
* @param {string | null} [
|
|
1243
|
-
* @param {boolean | null} [
|
|
1244
|
-
* @param {boolean | null} [
|
|
1245
|
-
* @param {boolean | null} [
|
|
1246
|
-
* @param {boolean | null} [
|
|
1247
|
-
* @param {string | null} [
|
|
1377
|
+
* @param {string | null} [strongEmSymbol]
|
|
1378
|
+
* @param {boolean | null} [escapeAsterisks]
|
|
1379
|
+
* @param {boolean | null} [escapeUnderscores]
|
|
1380
|
+
* @param {boolean | null} [escapeMisc]
|
|
1381
|
+
* @param {boolean | null} [escapeAscii]
|
|
1382
|
+
* @param {string | null} [codeLanguage]
|
|
1248
1383
|
* @param {boolean | null} [autolinks]
|
|
1249
|
-
* @param {boolean | null} [
|
|
1250
|
-
* @param {boolean | null} [
|
|
1251
|
-
* @param {
|
|
1252
|
-
* @param {
|
|
1253
|
-
* @param {
|
|
1254
|
-
* @param {
|
|
1384
|
+
* @param {boolean | null} [defaultTitle]
|
|
1385
|
+
* @param {boolean | null} [brInTables]
|
|
1386
|
+
* @param {boolean | null} [compactTables]
|
|
1387
|
+
* @param {WasmHighlightStyle | null} [highlightStyle]
|
|
1388
|
+
* @param {boolean | null} [extractMetadata]
|
|
1389
|
+
* @param {WasmWhitespaceMode | null} [whitespaceMode]
|
|
1390
|
+
* @param {boolean | null} [stripNewlines]
|
|
1255
1391
|
* @param {boolean | null} [wrap]
|
|
1256
|
-
* @param {number | null} [
|
|
1257
|
-
* @param {boolean | null} [
|
|
1258
|
-
* @param {string | null} [
|
|
1259
|
-
* @param {string | null} [
|
|
1260
|
-
* @param {WasmNewlineStyle | null} [
|
|
1261
|
-
* @param {WasmCodeBlockStyle | null} [
|
|
1262
|
-
* @param {string[] | null} [
|
|
1392
|
+
* @param {number | null} [wrapWidth]
|
|
1393
|
+
* @param {boolean | null} [convertAsInline]
|
|
1394
|
+
* @param {string | null} [subSymbol]
|
|
1395
|
+
* @param {string | null} [supSymbol]
|
|
1396
|
+
* @param {WasmNewlineStyle | null} [newlineStyle]
|
|
1397
|
+
* @param {WasmCodeBlockStyle | null} [codeBlockStyle]
|
|
1398
|
+
* @param {string[] | null} [keepInlineImagesIn]
|
|
1263
1399
|
* @param {WasmPreprocessingOptionsUpdate | null} [preprocessing]
|
|
1264
1400
|
* @param {string | null} [encoding]
|
|
1265
1401
|
* @param {boolean | null} [debug]
|
|
1266
|
-
* @param {string[] | null} [
|
|
1267
|
-
* @param {string[] | null} [
|
|
1268
|
-
* @param {boolean | null} [
|
|
1269
|
-
* @param {WasmLinkStyle | null} [
|
|
1270
|
-
* @param {WasmOutputFormat | null} [
|
|
1271
|
-
* @param {boolean | null} [
|
|
1272
|
-
* @param {boolean | null} [
|
|
1273
|
-
* @param {bigint | null} [
|
|
1274
|
-
* @param {boolean | null} [
|
|
1275
|
-
* @param {boolean | null} [
|
|
1276
|
-
* @param {number | null} [
|
|
1277
|
-
* @param {string[] | null} [
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
constructor(heading_style, list_indent_type, list_indent_width, bullets, strong_em_symbol, escape_asterisks, escape_underscores, escape_misc, escape_ascii, code_language, autolinks, default_title, br_in_tables, highlight_style, extract_metadata, whitespace_mode, strip_newlines, wrap, wrap_width, convert_as_inline, sub_symbol, sup_symbol, newline_style, code_block_style, keep_inline_images_in, preprocessing, encoding, debug, strip_tags, preserve_tags, skip_images, link_style, output_format, include_document_structure, extract_images, max_image_size, capture_svg, infer_dimensions, max_depth, exclude_selectors, visitor) {
|
|
1402
|
+
* @param {string[] | null} [stripTags]
|
|
1403
|
+
* @param {string[] | null} [preserveTags]
|
|
1404
|
+
* @param {boolean | null} [skipImages]
|
|
1405
|
+
* @param {WasmLinkStyle | null} [linkStyle]
|
|
1406
|
+
* @param {WasmOutputFormat | null} [outputFormat]
|
|
1407
|
+
* @param {boolean | null} [includeDocumentStructure]
|
|
1408
|
+
* @param {boolean | null} [extractImages]
|
|
1409
|
+
* @param {bigint | null} [maxImageSize]
|
|
1410
|
+
* @param {boolean | null} [captureSvg]
|
|
1411
|
+
* @param {boolean | null} [inferDimensions]
|
|
1412
|
+
* @param {number | null} [maxDepth]
|
|
1413
|
+
* @param {string[] | null} [excludeSelectors]
|
|
1414
|
+
*/
|
|
1415
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors) {
|
|
1281
1416
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1282
1417
|
var len0 = WASM_VECTOR_LEN;
|
|
1283
|
-
var ptr1 = isLikeNone(
|
|
1418
|
+
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1284
1419
|
var len1 = WASM_VECTOR_LEN;
|
|
1285
|
-
var ptr2 = isLikeNone(
|
|
1420
|
+
var ptr2 = isLikeNone(codeLanguage) ? 0 : passStringToWasm0(codeLanguage, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1286
1421
|
var len2 = WASM_VECTOR_LEN;
|
|
1287
|
-
var ptr3 = isLikeNone(
|
|
1422
|
+
var ptr3 = isLikeNone(subSymbol) ? 0 : passStringToWasm0(subSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1288
1423
|
var len3 = WASM_VECTOR_LEN;
|
|
1289
|
-
var ptr4 = isLikeNone(
|
|
1424
|
+
var ptr4 = isLikeNone(supSymbol) ? 0 : passStringToWasm0(supSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1290
1425
|
var len4 = WASM_VECTOR_LEN;
|
|
1291
|
-
var ptr5 = isLikeNone(
|
|
1426
|
+
var ptr5 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_export);
|
|
1292
1427
|
var len5 = WASM_VECTOR_LEN;
|
|
1293
1428
|
let ptr6 = 0;
|
|
1294
1429
|
if (!isLikeNone(preprocessing)) {
|
|
@@ -1297,35 +1432,54 @@ export class WasmConversionOptionsUpdate {
|
|
|
1297
1432
|
}
|
|
1298
1433
|
var ptr7 = isLikeNone(encoding) ? 0 : passStringToWasm0(encoding, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1299
1434
|
var len7 = WASM_VECTOR_LEN;
|
|
1300
|
-
var ptr8 = isLikeNone(
|
|
1435
|
+
var ptr8 = isLikeNone(stripTags) ? 0 : passArrayJsValueToWasm0(stripTags, wasm.__wbindgen_export);
|
|
1301
1436
|
var len8 = WASM_VECTOR_LEN;
|
|
1302
|
-
var ptr9 = isLikeNone(
|
|
1437
|
+
var ptr9 = isLikeNone(preserveTags) ? 0 : passArrayJsValueToWasm0(preserveTags, wasm.__wbindgen_export);
|
|
1303
1438
|
var len9 = WASM_VECTOR_LEN;
|
|
1304
|
-
var ptr10 = isLikeNone(
|
|
1439
|
+
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
1305
1440
|
var len10 = WASM_VECTOR_LEN;
|
|
1306
|
-
|
|
1307
|
-
if (!isLikeNone(visitor)) {
|
|
1308
|
-
_assertClass(visitor, WasmVisitorHandle);
|
|
1309
|
-
ptr11 = visitor.__destroy_into_raw();
|
|
1310
|
-
}
|
|
1311
|
-
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(heading_style) ? 3 : heading_style, isLikeNone(list_indent_type) ? 2 : list_indent_type, isLikeNone(list_indent_width) ? Number.MAX_SAFE_INTEGER : (list_indent_width) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escape_asterisks) ? 0xFFFFFF : escape_asterisks ? 1 : 0, isLikeNone(escape_underscores) ? 0xFFFFFF : escape_underscores ? 1 : 0, isLikeNone(escape_misc) ? 0xFFFFFF : escape_misc ? 1 : 0, isLikeNone(escape_ascii) ? 0xFFFFFF : escape_ascii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(default_title) ? 0xFFFFFF : default_title ? 1 : 0, isLikeNone(br_in_tables) ? 0xFFFFFF : br_in_tables ? 1 : 0, isLikeNone(highlight_style) ? 4 : highlight_style, isLikeNone(extract_metadata) ? 0xFFFFFF : extract_metadata ? 1 : 0, isLikeNone(whitespace_mode) ? 2 : whitespace_mode, isLikeNone(strip_newlines) ? 0xFFFFFF : strip_newlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrap_width) ? Number.MAX_SAFE_INTEGER : (wrap_width) >>> 0, isLikeNone(convert_as_inline) ? 0xFFFFFF : convert_as_inline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newline_style) ? 2 : newline_style, isLikeNone(code_block_style) ? 3 : code_block_style, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skip_images) ? 0xFFFFFF : skip_images ? 1 : 0, isLikeNone(link_style) ? 2 : link_style, isLikeNone(output_format) ? 3 : output_format, isLikeNone(include_document_structure) ? 0xFFFFFF : include_document_structure ? 1 : 0, isLikeNone(extract_images) ? 0xFFFFFF : extract_images ? 1 : 0, !isLikeNone(max_image_size), isLikeNone(max_image_size) ? BigInt(0) : max_image_size, isLikeNone(capture_svg) ? 0xFFFFFF : capture_svg ? 1 : 0, isLikeNone(infer_dimensions) ? 0xFFFFFF : infer_dimensions ? 1 : 0, isLikeNone(max_depth) ? Number.MAX_SAFE_INTEGER : (max_depth) >>> 0, ptr10, len10, ptr11);
|
|
1441
|
+
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10);
|
|
1312
1442
|
this.__wbg_ptr = ret;
|
|
1313
1443
|
WasmConversionOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
|
|
1314
1444
|
return this;
|
|
1315
1445
|
}
|
|
1316
1446
|
/**
|
|
1317
|
-
* @returns {
|
|
1447
|
+
* @returns {string | undefined}
|
|
1318
1448
|
*/
|
|
1319
1449
|
get newlineStyle() {
|
|
1320
|
-
|
|
1321
|
-
|
|
1450
|
+
try {
|
|
1451
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1452
|
+
wasm.wasmconversionoptionsupdate_newlineStyle(retptr, this.__wbg_ptr);
|
|
1453
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1454
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1455
|
+
let v1;
|
|
1456
|
+
if (r0 !== 0) {
|
|
1457
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1458
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1459
|
+
}
|
|
1460
|
+
return v1;
|
|
1461
|
+
} finally {
|
|
1462
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1463
|
+
}
|
|
1322
1464
|
}
|
|
1323
1465
|
/**
|
|
1324
|
-
* @returns {
|
|
1466
|
+
* @returns {string | undefined}
|
|
1325
1467
|
*/
|
|
1326
1468
|
get outputFormat() {
|
|
1327
|
-
|
|
1328
|
-
|
|
1469
|
+
try {
|
|
1470
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1471
|
+
wasm.wasmconversionoptionsupdate_outputFormat(retptr, this.__wbg_ptr);
|
|
1472
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1473
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1474
|
+
let v1;
|
|
1475
|
+
if (r0 !== 0) {
|
|
1476
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1477
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1478
|
+
}
|
|
1479
|
+
return v1;
|
|
1480
|
+
} finally {
|
|
1481
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1482
|
+
}
|
|
1329
1483
|
}
|
|
1330
1484
|
/**
|
|
1331
1485
|
* @returns {WasmPreprocessingOptionsUpdate | undefined}
|
|
@@ -1393,6 +1547,12 @@ export class WasmConversionOptionsUpdate {
|
|
|
1393
1547
|
var len0 = WASM_VECTOR_LEN;
|
|
1394
1548
|
wasm.wasmconversionoptionsupdate_set_codeLanguage(this.__wbg_ptr, ptr0, len0);
|
|
1395
1549
|
}
|
|
1550
|
+
/**
|
|
1551
|
+
* @param {boolean | null} [value]
|
|
1552
|
+
*/
|
|
1553
|
+
set compactTables(value) {
|
|
1554
|
+
wasm.wasmconversionoptionsupdate_set_compactTables(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value ? 1 : 0);
|
|
1555
|
+
}
|
|
1396
1556
|
/**
|
|
1397
1557
|
* @param {boolean | null} [value]
|
|
1398
1558
|
*/
|
|
@@ -1727,11 +1887,23 @@ export class WasmConversionOptionsUpdate {
|
|
|
1727
1887
|
return ret === 0 ? undefined : WasmVisitorHandle.__wrap(ret);
|
|
1728
1888
|
}
|
|
1729
1889
|
/**
|
|
1730
|
-
* @returns {
|
|
1890
|
+
* @returns {string | undefined}
|
|
1731
1891
|
*/
|
|
1732
1892
|
get whitespaceMode() {
|
|
1733
|
-
|
|
1734
|
-
|
|
1893
|
+
try {
|
|
1894
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1895
|
+
wasm.wasmconversionoptionsupdate_whitespaceMode(retptr, this.__wbg_ptr);
|
|
1896
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1897
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1898
|
+
let v1;
|
|
1899
|
+
if (r0 !== 0) {
|
|
1900
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1901
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1902
|
+
}
|
|
1903
|
+
return v1;
|
|
1904
|
+
} finally {
|
|
1905
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1906
|
+
}
|
|
1735
1907
|
}
|
|
1736
1908
|
/**
|
|
1737
1909
|
* @returns {boolean | undefined}
|
|
@@ -1802,6 +1974,13 @@ export class WasmConversionResult {
|
|
|
1802
1974
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1803
1975
|
}
|
|
1804
1976
|
}
|
|
1977
|
+
/**
|
|
1978
|
+
* @returns {WasmConversionResult}
|
|
1979
|
+
*/
|
|
1980
|
+
static default() {
|
|
1981
|
+
const ret = wasm.wasmconversionresult_default();
|
|
1982
|
+
return WasmConversionResult.__wrap(ret);
|
|
1983
|
+
}
|
|
1805
1984
|
/**
|
|
1806
1985
|
* @returns {WasmDocumentStructure | undefined}
|
|
1807
1986
|
*/
|
|
@@ -1833,33 +2012,24 @@ export class WasmConversionResult {
|
|
|
1833
2012
|
return WasmHtmlMetadata.__wrap(ret);
|
|
1834
2013
|
}
|
|
1835
2014
|
/**
|
|
1836
|
-
* @param {WasmHtmlMetadata | null} [metadata]
|
|
1837
2015
|
* @param {WasmTableData[] | null} [tables]
|
|
1838
|
-
* @param {string[] | null} [images]
|
|
1839
2016
|
* @param {WasmProcessingWarning[] | null} [warnings]
|
|
1840
2017
|
* @param {string | null} [content]
|
|
1841
2018
|
* @param {WasmDocumentStructure | null} [document]
|
|
1842
2019
|
*/
|
|
1843
|
-
constructor(
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
ptr0 = metadata.__destroy_into_raw();
|
|
1848
|
-
}
|
|
1849
|
-
var ptr1 = isLikeNone(tables) ? 0 : passArrayJsValueToWasm0(tables, wasm.__wbindgen_export);
|
|
2020
|
+
constructor(tables, warnings, content, document) {
|
|
2021
|
+
var ptr0 = isLikeNone(tables) ? 0 : passArrayJsValueToWasm0(tables, wasm.__wbindgen_export);
|
|
2022
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2023
|
+
var ptr1 = isLikeNone(warnings) ? 0 : passArrayJsValueToWasm0(warnings, wasm.__wbindgen_export);
|
|
1850
2024
|
var len1 = WASM_VECTOR_LEN;
|
|
1851
|
-
var ptr2 = isLikeNone(
|
|
2025
|
+
var ptr2 = isLikeNone(content) ? 0 : passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1852
2026
|
var len2 = WASM_VECTOR_LEN;
|
|
1853
|
-
|
|
1854
|
-
var len3 = WASM_VECTOR_LEN;
|
|
1855
|
-
var ptr4 = isLikeNone(content) ? 0 : passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1856
|
-
var len4 = WASM_VECTOR_LEN;
|
|
1857
|
-
let ptr5 = 0;
|
|
2027
|
+
let ptr3 = 0;
|
|
1858
2028
|
if (!isLikeNone(document)) {
|
|
1859
2029
|
_assertClass(document, WasmDocumentStructure);
|
|
1860
|
-
|
|
2030
|
+
ptr3 = document.__destroy_into_raw();
|
|
1861
2031
|
}
|
|
1862
|
-
const ret = wasm.wasmconversionresult_new(ptr0, ptr1, len1, ptr2, len2, ptr3
|
|
2032
|
+
const ret = wasm.wasmconversionresult_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3);
|
|
1863
2033
|
this.__wbg_ptr = ret;
|
|
1864
2034
|
WasmConversionResultFinalization.register(this, this.__wbg_ptr, this);
|
|
1865
2035
|
return this;
|
|
@@ -1957,17 +2127,6 @@ if (Symbol.dispose) WasmConversionResult.prototype[Symbol.dispose] = WasmConvers
|
|
|
1957
2127
|
* and browsers for document indexing and presentation.
|
|
1958
2128
|
*
|
|
1959
2129
|
* # Examples
|
|
1960
|
-
*
|
|
1961
|
-
* ```
|
|
1962
|
-
* let doc = DocumentMetadata {
|
|
1963
|
-
* title: Some("My Article".to_string()),
|
|
1964
|
-
* description: Some("A great article about Rust".to_string()),
|
|
1965
|
-
* keywords: vec!["rust".to_string(), "programming".to_string()],
|
|
1966
|
-
* ..Default::default()
|
|
1967
|
-
* };
|
|
1968
|
-
*
|
|
1969
|
-
* assert_eq!(doc.title, Some("My Article".to_string()));
|
|
1970
|
-
* ```
|
|
1971
2130
|
*/
|
|
1972
2131
|
export class WasmDocumentMetadata {
|
|
1973
2132
|
static __wrap(ptr) {
|
|
@@ -2043,6 +2202,13 @@ export class WasmDocumentMetadata {
|
|
|
2043
2202
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2044
2203
|
}
|
|
2045
2204
|
}
|
|
2205
|
+
/**
|
|
2206
|
+
* @returns {WasmDocumentMetadata}
|
|
2207
|
+
*/
|
|
2208
|
+
static default() {
|
|
2209
|
+
const ret = wasm.wasmdocumentmetadata_default();
|
|
2210
|
+
return WasmDocumentMetadata.__wrap(ret);
|
|
2211
|
+
}
|
|
2046
2212
|
/**
|
|
2047
2213
|
* @returns {string | undefined}
|
|
2048
2214
|
*/
|
|
@@ -2106,18 +2272,18 @@ export class WasmDocumentMetadata {
|
|
|
2106
2272
|
}
|
|
2107
2273
|
/**
|
|
2108
2274
|
* @param {string[] | null} [keywords]
|
|
2109
|
-
* @param {any | null} [
|
|
2110
|
-
* @param {any | null} [
|
|
2111
|
-
* @param {any | null} [
|
|
2275
|
+
* @param {any | null} [openGraph]
|
|
2276
|
+
* @param {any | null} [twitterCard]
|
|
2277
|
+
* @param {any | null} [metaTags]
|
|
2112
2278
|
* @param {string | null} [title]
|
|
2113
2279
|
* @param {string | null} [description]
|
|
2114
2280
|
* @param {string | null} [author]
|
|
2115
|
-
* @param {string | null} [
|
|
2116
|
-
* @param {string | null} [
|
|
2281
|
+
* @param {string | null} [canonicalUrl]
|
|
2282
|
+
* @param {string | null} [baseHref]
|
|
2117
2283
|
* @param {string | null} [language]
|
|
2118
|
-
* @param {WasmTextDirection | null} [
|
|
2284
|
+
* @param {WasmTextDirection | null} [textDirection]
|
|
2119
2285
|
*/
|
|
2120
|
-
constructor(keywords,
|
|
2286
|
+
constructor(keywords, openGraph, twitterCard, metaTags, title, description, author, canonicalUrl, baseHref, language, textDirection) {
|
|
2121
2287
|
var ptr0 = isLikeNone(keywords) ? 0 : passArrayJsValueToWasm0(keywords, wasm.__wbindgen_export);
|
|
2122
2288
|
var len0 = WASM_VECTOR_LEN;
|
|
2123
2289
|
var ptr1 = isLikeNone(title) ? 0 : passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -2126,13 +2292,13 @@ export class WasmDocumentMetadata {
|
|
|
2126
2292
|
var len2 = WASM_VECTOR_LEN;
|
|
2127
2293
|
var ptr3 = isLikeNone(author) ? 0 : passStringToWasm0(author, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2128
2294
|
var len3 = WASM_VECTOR_LEN;
|
|
2129
|
-
var ptr4 = isLikeNone(
|
|
2295
|
+
var ptr4 = isLikeNone(canonicalUrl) ? 0 : passStringToWasm0(canonicalUrl, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2130
2296
|
var len4 = WASM_VECTOR_LEN;
|
|
2131
|
-
var ptr5 = isLikeNone(
|
|
2297
|
+
var ptr5 = isLikeNone(baseHref) ? 0 : passStringToWasm0(baseHref, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2132
2298
|
var len5 = WASM_VECTOR_LEN;
|
|
2133
2299
|
var ptr6 = isLikeNone(language) ? 0 : passStringToWasm0(language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2134
2300
|
var len6 = WASM_VECTOR_LEN;
|
|
2135
|
-
const ret = wasm.wasmdocumentmetadata_new(ptr0, len0, isLikeNone(
|
|
2301
|
+
const ret = wasm.wasmdocumentmetadata_new(ptr0, len0, isLikeNone(openGraph) ? 0 : addHeapObject(openGraph), isLikeNone(twitterCard) ? 0 : addHeapObject(twitterCard), isLikeNone(metaTags) ? 0 : addHeapObject(metaTags), ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(textDirection) ? 3 : textDirection);
|
|
2136
2302
|
this.__wbg_ptr = ret;
|
|
2137
2303
|
WasmDocumentMetadataFinalization.register(this, this.__wbg_ptr, this);
|
|
2138
2304
|
return this;
|
|
@@ -2225,11 +2391,23 @@ export class WasmDocumentMetadata {
|
|
|
2225
2391
|
wasm.wasmdocumentmetadata_set_twitterCard(this.__wbg_ptr, addHeapObject(value));
|
|
2226
2392
|
}
|
|
2227
2393
|
/**
|
|
2228
|
-
* @returns {
|
|
2394
|
+
* @returns {string | undefined}
|
|
2229
2395
|
*/
|
|
2230
2396
|
get textDirection() {
|
|
2231
|
-
|
|
2232
|
-
|
|
2397
|
+
try {
|
|
2398
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2399
|
+
wasm.wasmdocumentmetadata_textDirection(retptr, this.__wbg_ptr);
|
|
2400
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2401
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2402
|
+
let v1;
|
|
2403
|
+
if (r0 !== 0) {
|
|
2404
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
2405
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2406
|
+
}
|
|
2407
|
+
return v1;
|
|
2408
|
+
} finally {
|
|
2409
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2410
|
+
}
|
|
2233
2411
|
}
|
|
2234
2412
|
/**
|
|
2235
2413
|
* @returns {string | undefined}
|
|
@@ -2326,11 +2504,18 @@ export class WasmDocumentNode {
|
|
|
2326
2504
|
}
|
|
2327
2505
|
}
|
|
2328
2506
|
/**
|
|
2329
|
-
* @returns {
|
|
2507
|
+
* @returns {any}
|
|
2330
2508
|
*/
|
|
2331
2509
|
get content() {
|
|
2332
2510
|
const ret = wasm.wasmdocumentnode_content(this.__wbg_ptr);
|
|
2333
|
-
return ret;
|
|
2511
|
+
return takeObject(ret);
|
|
2512
|
+
}
|
|
2513
|
+
/**
|
|
2514
|
+
* @returns {WasmDocumentNode}
|
|
2515
|
+
*/
|
|
2516
|
+
static default() {
|
|
2517
|
+
const ret = wasm.wasmdocumentnode_default();
|
|
2518
|
+
return WasmDocumentNode.__wrap(ret);
|
|
2334
2519
|
}
|
|
2335
2520
|
/**
|
|
2336
2521
|
* @returns {string}
|
|
@@ -2353,7 +2538,7 @@ export class WasmDocumentNode {
|
|
|
2353
2538
|
}
|
|
2354
2539
|
/**
|
|
2355
2540
|
* @param {string} id
|
|
2356
|
-
* @param {
|
|
2541
|
+
* @param {any} content
|
|
2357
2542
|
* @param {Uint32Array} children
|
|
2358
2543
|
* @param {WasmTextAnnotation[]} annotations
|
|
2359
2544
|
* @param {number | null} [parent]
|
|
@@ -2366,7 +2551,7 @@ export class WasmDocumentNode {
|
|
|
2366
2551
|
const len1 = WASM_VECTOR_LEN;
|
|
2367
2552
|
const ptr2 = passArrayJsValueToWasm0(annotations, wasm.__wbindgen_export);
|
|
2368
2553
|
const len2 = WASM_VECTOR_LEN;
|
|
2369
|
-
const ret = wasm.wasmdocumentnode_new(ptr0, len0, content, ptr1, len1, ptr2, len2, isLikeNone(parent) ? Number.MAX_SAFE_INTEGER : (parent) >>> 0, isLikeNone(attributes) ? 0 : addHeapObject(attributes));
|
|
2554
|
+
const ret = wasm.wasmdocumentnode_new(ptr0, len0, addHeapObject(content), ptr1, len1, ptr2, len2, isLikeNone(parent) ? Number.MAX_SAFE_INTEGER : (parent) >>> 0, isLikeNone(attributes) ? 0 : addHeapObject(attributes));
|
|
2370
2555
|
this.__wbg_ptr = ret;
|
|
2371
2556
|
WasmDocumentNodeFinalization.register(this, this.__wbg_ptr, this);
|
|
2372
2557
|
return this;
|
|
@@ -2401,10 +2586,10 @@ export class WasmDocumentNode {
|
|
|
2401
2586
|
wasm.wasmdocumentnode_set_children(this.__wbg_ptr, ptr0, len0);
|
|
2402
2587
|
}
|
|
2403
2588
|
/**
|
|
2404
|
-
* @param {
|
|
2589
|
+
* @param {any} value
|
|
2405
2590
|
*/
|
|
2406
2591
|
set content(value) {
|
|
2407
|
-
wasm.wasmdocumentnode_set_content(this.__wbg_ptr, value);
|
|
2592
|
+
wasm.wasmdocumentnode_set_content(this.__wbg_ptr, addHeapObject(value));
|
|
2408
2593
|
}
|
|
2409
2594
|
/**
|
|
2410
2595
|
* @param {string} value
|
|
@@ -2445,14 +2630,21 @@ export class WasmDocumentStructure {
|
|
|
2445
2630
|
const ptr = this.__destroy_into_raw();
|
|
2446
2631
|
wasm.__wbg_wasmdocumentstructure_free(ptr, 0);
|
|
2447
2632
|
}
|
|
2633
|
+
/**
|
|
2634
|
+
* @returns {WasmDocumentStructure}
|
|
2635
|
+
*/
|
|
2636
|
+
static default() {
|
|
2637
|
+
const ret = wasm.wasmdocumentstructure_default();
|
|
2638
|
+
return WasmDocumentStructure.__wrap(ret);
|
|
2639
|
+
}
|
|
2448
2640
|
/**
|
|
2449
2641
|
* @param {WasmDocumentNode[]} nodes
|
|
2450
|
-
* @param {string | null} [
|
|
2642
|
+
* @param {string | null} [sourceFormat]
|
|
2451
2643
|
*/
|
|
2452
|
-
constructor(nodes,
|
|
2644
|
+
constructor(nodes, sourceFormat) {
|
|
2453
2645
|
const ptr0 = passArrayJsValueToWasm0(nodes, wasm.__wbindgen_export);
|
|
2454
2646
|
const len0 = WASM_VECTOR_LEN;
|
|
2455
|
-
var ptr1 = isLikeNone(
|
|
2647
|
+
var ptr1 = isLikeNone(sourceFormat) ? 0 : passStringToWasm0(sourceFormat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2456
2648
|
var len1 = WASM_VECTOR_LEN;
|
|
2457
2649
|
const ret = wasm.wasmdocumentstructure_new(ptr0, len0, ptr1, len1);
|
|
2458
2650
|
this.__wbg_ptr = ret;
|
|
@@ -2572,6 +2764,13 @@ export class WasmGridCell {
|
|
|
2572
2764
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2573
2765
|
}
|
|
2574
2766
|
}
|
|
2767
|
+
/**
|
|
2768
|
+
* @returns {WasmGridCell}
|
|
2769
|
+
*/
|
|
2770
|
+
static default() {
|
|
2771
|
+
const ret = wasm.wasmgridcell_default();
|
|
2772
|
+
return WasmGridCell.__wrap(ret);
|
|
2773
|
+
}
|
|
2575
2774
|
/**
|
|
2576
2775
|
* @returns {boolean}
|
|
2577
2776
|
*/
|
|
@@ -2583,14 +2782,14 @@ export class WasmGridCell {
|
|
|
2583
2782
|
* @param {string} content
|
|
2584
2783
|
* @param {number} row
|
|
2585
2784
|
* @param {number} col
|
|
2586
|
-
* @param {number}
|
|
2587
|
-
* @param {number}
|
|
2588
|
-
* @param {boolean}
|
|
2785
|
+
* @param {number} rowSpan
|
|
2786
|
+
* @param {number} colSpan
|
|
2787
|
+
* @param {boolean} isHeader
|
|
2589
2788
|
*/
|
|
2590
|
-
constructor(content, row, col,
|
|
2789
|
+
constructor(content, row, col, rowSpan, colSpan, isHeader) {
|
|
2591
2790
|
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2592
2791
|
const len0 = WASM_VECTOR_LEN;
|
|
2593
|
-
const ret = wasm.wasmgridcell_new(ptr0, len0, row, col,
|
|
2792
|
+
const ret = wasm.wasmgridcell_new(ptr0, len0, row, col, rowSpan, colSpan, isHeader);
|
|
2594
2793
|
this.__wbg_ptr = ret;
|
|
2595
2794
|
WasmGridCellFinalization.register(this, this.__wbg_ptr, this);
|
|
2596
2795
|
return this;
|
|
@@ -2657,19 +2856,6 @@ if (Symbol.dispose) WasmGridCell.prototype[Symbol.dispose] = WasmGridCell.protot
|
|
|
2657
2856
|
* and position in the document structure.
|
|
2658
2857
|
*
|
|
2659
2858
|
* # Examples
|
|
2660
|
-
*
|
|
2661
|
-
* ```
|
|
2662
|
-
* let header = HeaderMetadata {
|
|
2663
|
-
* level: 1,
|
|
2664
|
-
* text: "Main Title".to_string(),
|
|
2665
|
-
* id: Some("main-title".to_string()),
|
|
2666
|
-
* depth: 0,
|
|
2667
|
-
* html_offset: 145,
|
|
2668
|
-
* };
|
|
2669
|
-
*
|
|
2670
|
-
* assert_eq!(header.level, 1);
|
|
2671
|
-
* assert!(header.is_valid());
|
|
2672
|
-
* ```
|
|
2673
2859
|
*/
|
|
2674
2860
|
export class WasmHeaderMetadata {
|
|
2675
2861
|
static __wrap(ptr) {
|
|
@@ -2694,6 +2880,13 @@ export class WasmHeaderMetadata {
|
|
|
2694
2880
|
const ptr = this.__destroy_into_raw();
|
|
2695
2881
|
wasm.__wbg_wasmheadermetadata_free(ptr, 0);
|
|
2696
2882
|
}
|
|
2883
|
+
/**
|
|
2884
|
+
* @returns {WasmHeaderMetadata}
|
|
2885
|
+
*/
|
|
2886
|
+
static default() {
|
|
2887
|
+
const ret = wasm.wasmheadermetadata_default();
|
|
2888
|
+
return WasmHeaderMetadata.__wrap(ret);
|
|
2889
|
+
}
|
|
2697
2890
|
/**
|
|
2698
2891
|
* @returns {number}
|
|
2699
2892
|
*/
|
|
@@ -2735,26 +2928,6 @@ export class WasmHeaderMetadata {
|
|
|
2735
2928
|
* `true` if level is 1-6, `false` otherwise.
|
|
2736
2929
|
*
|
|
2737
2930
|
* # Examples
|
|
2738
|
-
*
|
|
2739
|
-
* ```
|
|
2740
|
-
* let valid = HeaderMetadata {
|
|
2741
|
-
* level: 3,
|
|
2742
|
-
* text: "Title".to_string(),
|
|
2743
|
-
* id: None,
|
|
2744
|
-
* depth: 2,
|
|
2745
|
-
* html_offset: 100,
|
|
2746
|
-
* };
|
|
2747
|
-
* assert!(valid.is_valid());
|
|
2748
|
-
*
|
|
2749
|
-
* let invalid = HeaderMetadata {
|
|
2750
|
-
* level: 7, // Invalid
|
|
2751
|
-
* text: "Title".to_string(),
|
|
2752
|
-
* id: None,
|
|
2753
|
-
* depth: 2,
|
|
2754
|
-
* html_offset: 100,
|
|
2755
|
-
* };
|
|
2756
|
-
* assert!(!invalid.is_valid());
|
|
2757
|
-
* ```
|
|
2758
2931
|
* @returns {boolean}
|
|
2759
2932
|
*/
|
|
2760
2933
|
isValid() {
|
|
@@ -2772,15 +2945,15 @@ export class WasmHeaderMetadata {
|
|
|
2772
2945
|
* @param {number} level
|
|
2773
2946
|
* @param {string} text
|
|
2774
2947
|
* @param {number} depth
|
|
2775
|
-
* @param {number}
|
|
2948
|
+
* @param {number} htmlOffset
|
|
2776
2949
|
* @param {string | null} [id]
|
|
2777
2950
|
*/
|
|
2778
|
-
constructor(level, text, depth,
|
|
2951
|
+
constructor(level, text, depth, htmlOffset, id) {
|
|
2779
2952
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2780
2953
|
const len0 = WASM_VECTOR_LEN;
|
|
2781
2954
|
var ptr1 = isLikeNone(id) ? 0 : passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2782
2955
|
var len1 = WASM_VECTOR_LEN;
|
|
2783
|
-
const ret = wasm.wasmheadermetadata_new(level, ptr0, len0, depth,
|
|
2956
|
+
const ret = wasm.wasmheadermetadata_new(level, ptr0, len0, depth, htmlOffset, ptr1, len1);
|
|
2784
2957
|
this.__wbg_ptr = ret;
|
|
2785
2958
|
WasmHeaderMetadataFinalization.register(this, this.__wbg_ptr, this);
|
|
2786
2959
|
return this;
|
|
@@ -2873,18 +3046,6 @@ export const WasmHighlightStyle = Object.freeze({
|
|
|
2873
3046
|
* suitable for serialization and transmission across language boundaries.
|
|
2874
3047
|
*
|
|
2875
3048
|
* # Examples
|
|
2876
|
-
*
|
|
2877
|
-
* ```
|
|
2878
|
-
* let metadata = HtmlMetadata {
|
|
2879
|
-
* document: Default::default(),
|
|
2880
|
-
* headers: Vec::new(),
|
|
2881
|
-
* links: Vec::new(),
|
|
2882
|
-
* images: Vec::new(),
|
|
2883
|
-
* structured_data: Vec::new(),
|
|
2884
|
-
* };
|
|
2885
|
-
*
|
|
2886
|
-
* assert!(metadata.headers.is_empty());
|
|
2887
|
-
* ```
|
|
2888
3049
|
*/
|
|
2889
3050
|
export class WasmHtmlMetadata {
|
|
2890
3051
|
static __wrap(ptr) {
|
|
@@ -2903,6 +3064,13 @@ export class WasmHtmlMetadata {
|
|
|
2903
3064
|
const ptr = this.__destroy_into_raw();
|
|
2904
3065
|
wasm.__wbg_wasmhtmlmetadata_free(ptr, 0);
|
|
2905
3066
|
}
|
|
3067
|
+
/**
|
|
3068
|
+
* @returns {WasmHtmlMetadata}
|
|
3069
|
+
*/
|
|
3070
|
+
static default() {
|
|
3071
|
+
const ret = wasm.wasmhtmlmetadata_default();
|
|
3072
|
+
return WasmHtmlMetadata.__wrap(ret);
|
|
3073
|
+
}
|
|
2906
3074
|
/**
|
|
2907
3075
|
* @returns {WasmDocumentMetadata}
|
|
2908
3076
|
*/
|
|
@@ -2963,9 +3131,9 @@ export class WasmHtmlMetadata {
|
|
|
2963
3131
|
* @param {WasmHeaderMetadata[] | null} [headers]
|
|
2964
3132
|
* @param {WasmLinkMetadata[] | null} [links]
|
|
2965
3133
|
* @param {WasmImageMetadata[] | null} [images]
|
|
2966
|
-
* @param {WasmStructuredData[] | null} [
|
|
3134
|
+
* @param {WasmStructuredData[] | null} [structuredData]
|
|
2967
3135
|
*/
|
|
2968
|
-
constructor(document, headers, links, images,
|
|
3136
|
+
constructor(document, headers, links, images, structuredData) {
|
|
2969
3137
|
let ptr0 = 0;
|
|
2970
3138
|
if (!isLikeNone(document)) {
|
|
2971
3139
|
_assertClass(document, WasmDocumentMetadata);
|
|
@@ -2977,7 +3145,7 @@ export class WasmHtmlMetadata {
|
|
|
2977
3145
|
var len2 = WASM_VECTOR_LEN;
|
|
2978
3146
|
var ptr3 = isLikeNone(images) ? 0 : passArrayJsValueToWasm0(images, wasm.__wbindgen_export);
|
|
2979
3147
|
var len3 = WASM_VECTOR_LEN;
|
|
2980
|
-
var ptr4 = isLikeNone(
|
|
3148
|
+
var ptr4 = isLikeNone(structuredData) ? 0 : passArrayJsValueToWasm0(structuredData, wasm.__wbindgen_export);
|
|
2981
3149
|
var len4 = WASM_VECTOR_LEN;
|
|
2982
3150
|
const ret = wasm.wasmhtmlmetadata_new(ptr0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
2983
3151
|
this.__wbg_ptr = ret;
|
|
@@ -3050,19 +3218,6 @@ if (Symbol.dispose) WasmHtmlMetadata.prototype[Symbol.dispose] = WasmHtmlMetadat
|
|
|
3050
3218
|
* for image analysis and optimization.
|
|
3051
3219
|
*
|
|
3052
3220
|
* # Examples
|
|
3053
|
-
*
|
|
3054
|
-
* ```
|
|
3055
|
-
* let img = ImageMetadata {
|
|
3056
|
-
* src: "https://example.com/image.jpg".to_string(),
|
|
3057
|
-
* alt: Some("An example image".to_string()),
|
|
3058
|
-
* title: Some("Example".to_string()),
|
|
3059
|
-
* dimensions: Some((800, 600)),
|
|
3060
|
-
* image_type: ImageType::External,
|
|
3061
|
-
* attributes: Default::default(),
|
|
3062
|
-
* };
|
|
3063
|
-
*
|
|
3064
|
-
* assert_eq!(img.image_type, ImageType::External);
|
|
3065
|
-
* ```
|
|
3066
3221
|
*/
|
|
3067
3222
|
export class WasmImageMetadata {
|
|
3068
3223
|
static __wrap(ptr) {
|
|
@@ -3113,6 +3268,13 @@ export class WasmImageMetadata {
|
|
|
3113
3268
|
const ret = wasm.wasmimagemetadata_attributes(this.__wbg_ptr);
|
|
3114
3269
|
return takeObject(ret);
|
|
3115
3270
|
}
|
|
3271
|
+
/**
|
|
3272
|
+
* @returns {WasmImageMetadata}
|
|
3273
|
+
*/
|
|
3274
|
+
static default() {
|
|
3275
|
+
const ret = wasm.wasmimagemetadata_default();
|
|
3276
|
+
return WasmImageMetadata.__wrap(ret);
|
|
3277
|
+
}
|
|
3116
3278
|
/**
|
|
3117
3279
|
* @returns {Uint32Array | undefined}
|
|
3118
3280
|
*/
|
|
@@ -3133,21 +3295,33 @@ export class WasmImageMetadata {
|
|
|
3133
3295
|
}
|
|
3134
3296
|
}
|
|
3135
3297
|
/**
|
|
3136
|
-
* @returns {
|
|
3298
|
+
* @returns {string}
|
|
3137
3299
|
*/
|
|
3138
3300
|
get imageType() {
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3301
|
+
let deferred1_0;
|
|
3302
|
+
let deferred1_1;
|
|
3303
|
+
try {
|
|
3304
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3305
|
+
wasm.wasmimagemetadata_imageType(retptr, this.__wbg_ptr);
|
|
3306
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3307
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3308
|
+
deferred1_0 = r0;
|
|
3309
|
+
deferred1_1 = r1;
|
|
3310
|
+
return getStringFromWasm0(r0, r1);
|
|
3311
|
+
} finally {
|
|
3312
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3313
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3314
|
+
}
|
|
3315
|
+
}
|
|
3142
3316
|
/**
|
|
3143
3317
|
* @param {string} src
|
|
3144
|
-
* @param {WasmImageType}
|
|
3318
|
+
* @param {WasmImageType} imageType
|
|
3145
3319
|
* @param {any} attributes
|
|
3146
3320
|
* @param {string | null} [alt]
|
|
3147
3321
|
* @param {string | null} [title]
|
|
3148
3322
|
* @param {Uint32Array | null} [dimensions]
|
|
3149
3323
|
*/
|
|
3150
|
-
constructor(src,
|
|
3324
|
+
constructor(src, imageType, attributes, alt, title, dimensions) {
|
|
3151
3325
|
const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3152
3326
|
const len0 = WASM_VECTOR_LEN;
|
|
3153
3327
|
var ptr1 = isLikeNone(alt) ? 0 : passStringToWasm0(alt, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -3156,7 +3330,7 @@ export class WasmImageMetadata {
|
|
|
3156
3330
|
var len2 = WASM_VECTOR_LEN;
|
|
3157
3331
|
var ptr3 = isLikeNone(dimensions) ? 0 : passArray32ToWasm0(dimensions, wasm.__wbindgen_export);
|
|
3158
3332
|
var len3 = WASM_VECTOR_LEN;
|
|
3159
|
-
const ret = wasm.wasmimagemetadata_new(ptr0, len0,
|
|
3333
|
+
const ret = wasm.wasmimagemetadata_new(ptr0, len0, imageType, addHeapObject(attributes), ptr1, len1, ptr2, len2, ptr3, len3);
|
|
3160
3334
|
this.__wbg_ptr = ret;
|
|
3161
3335
|
WasmImageMetadataFinalization.register(this, this.__wbg_ptr, this);
|
|
3162
3336
|
return this;
|
|
@@ -3265,20 +3439,6 @@ export const WasmImageType = Object.freeze({
|
|
|
3265
3439
|
* Represents `<a>` elements with parsed href values, text content, and link type classification.
|
|
3266
3440
|
*
|
|
3267
3441
|
* # Examples
|
|
3268
|
-
*
|
|
3269
|
-
* ```
|
|
3270
|
-
* let link = LinkMetadata {
|
|
3271
|
-
* href: "https://example.com".to_string(),
|
|
3272
|
-
* text: "Example".to_string(),
|
|
3273
|
-
* title: Some("Visit Example".to_string()),
|
|
3274
|
-
* link_type: LinkType::External,
|
|
3275
|
-
* rel: vec!["nofollow".to_string()],
|
|
3276
|
-
* attributes: Default::default(),
|
|
3277
|
-
* };
|
|
3278
|
-
*
|
|
3279
|
-
* assert_eq!(link.link_type, LinkType::External);
|
|
3280
|
-
* assert_eq!(link.text, "Example");
|
|
3281
|
-
* ```
|
|
3282
3442
|
*/
|
|
3283
3443
|
export class WasmLinkMetadata {
|
|
3284
3444
|
static __wrap(ptr) {
|
|
@@ -3311,32 +3471,11 @@ export class WasmLinkMetadata {
|
|
|
3311
3471
|
return takeObject(ret);
|
|
3312
3472
|
}
|
|
3313
3473
|
/**
|
|
3314
|
-
*
|
|
3315
|
-
*
|
|
3316
|
-
* # Arguments
|
|
3317
|
-
*
|
|
3318
|
-
* * `href` - The href attribute value
|
|
3319
|
-
*
|
|
3320
|
-
* # Returns
|
|
3321
|
-
*
|
|
3322
|
-
* Appropriate [`LinkType`] based on protocol and content.
|
|
3323
|
-
*
|
|
3324
|
-
* # Examples
|
|
3325
|
-
*
|
|
3326
|
-
* ```
|
|
3327
|
-
* assert_eq!(LinkMetadata::classify_link("#section"), LinkType::Anchor);
|
|
3328
|
-
* assert_eq!(LinkMetadata::classify_link("mailto:test@example.com"), LinkType::Email);
|
|
3329
|
-
* assert_eq!(LinkMetadata::classify_link("tel:+1234567890"), LinkType::Phone);
|
|
3330
|
-
* assert_eq!(LinkMetadata::classify_link("https://example.com"), LinkType::External);
|
|
3331
|
-
* ```
|
|
3332
|
-
* @param {string} href
|
|
3333
|
-
* @returns {WasmLinkType}
|
|
3474
|
+
* @returns {WasmLinkMetadata}
|
|
3334
3475
|
*/
|
|
3335
|
-
static
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3338
|
-
const ret = wasm.wasmlinkmetadata_classifyLink(ptr0, len0);
|
|
3339
|
-
return ret;
|
|
3476
|
+
static default() {
|
|
3477
|
+
const ret = wasm.wasmlinkmetadata_default();
|
|
3478
|
+
return WasmLinkMetadata.__wrap(ret);
|
|
3340
3479
|
}
|
|
3341
3480
|
/**
|
|
3342
3481
|
* @returns {string}
|
|
@@ -3358,21 +3497,33 @@ export class WasmLinkMetadata {
|
|
|
3358
3497
|
}
|
|
3359
3498
|
}
|
|
3360
3499
|
/**
|
|
3361
|
-
* @returns {
|
|
3500
|
+
* @returns {string}
|
|
3362
3501
|
*/
|
|
3363
3502
|
get linkType() {
|
|
3364
|
-
|
|
3365
|
-
|
|
3503
|
+
let deferred1_0;
|
|
3504
|
+
let deferred1_1;
|
|
3505
|
+
try {
|
|
3506
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3507
|
+
wasm.wasmlinkmetadata_linkType(retptr, this.__wbg_ptr);
|
|
3508
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3509
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3510
|
+
deferred1_0 = r0;
|
|
3511
|
+
deferred1_1 = r1;
|
|
3512
|
+
return getStringFromWasm0(r0, r1);
|
|
3513
|
+
} finally {
|
|
3514
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3515
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3516
|
+
}
|
|
3366
3517
|
}
|
|
3367
3518
|
/**
|
|
3368
3519
|
* @param {string} href
|
|
3369
3520
|
* @param {string} text
|
|
3370
|
-
* @param {WasmLinkType}
|
|
3521
|
+
* @param {WasmLinkType} linkType
|
|
3371
3522
|
* @param {string[]} rel
|
|
3372
3523
|
* @param {any} attributes
|
|
3373
3524
|
* @param {string | null} [title]
|
|
3374
3525
|
*/
|
|
3375
|
-
constructor(href, text,
|
|
3526
|
+
constructor(href, text, linkType, rel, attributes, title) {
|
|
3376
3527
|
const ptr0 = passStringToWasm0(href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3377
3528
|
const len0 = WASM_VECTOR_LEN;
|
|
3378
3529
|
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -3381,7 +3532,7 @@ export class WasmLinkMetadata {
|
|
|
3381
3532
|
const len2 = WASM_VECTOR_LEN;
|
|
3382
3533
|
var ptr3 = isLikeNone(title) ? 0 : passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3383
3534
|
var len3 = WASM_VECTOR_LEN;
|
|
3384
|
-
const ret = wasm.wasmlinkmetadata_new(ptr0, len0, ptr1, len1,
|
|
3535
|
+
const ret = wasm.wasmlinkmetadata_new(ptr0, len0, ptr1, len1, linkType, ptr2, len2, addHeapObject(attributes), ptr3, len3);
|
|
3385
3536
|
this.__wbg_ptr = ret;
|
|
3386
3537
|
WasmLinkMetadataFinalization.register(this, this.__wbg_ptr, this);
|
|
3387
3538
|
return this;
|
|
@@ -3441,37 +3592,504 @@ export class WasmLinkMetadata {
|
|
|
3441
3592
|
/**
|
|
3442
3593
|
* @param {string | null} [value]
|
|
3443
3594
|
*/
|
|
3444
|
-
set title(value) {
|
|
3595
|
+
set title(value) {
|
|
3596
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3597
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3598
|
+
wasm.wasmlinkmetadata_set_title(this.__wbg_ptr, ptr0, len0);
|
|
3599
|
+
}
|
|
3600
|
+
/**
|
|
3601
|
+
* @returns {string}
|
|
3602
|
+
*/
|
|
3603
|
+
get text() {
|
|
3604
|
+
let deferred1_0;
|
|
3605
|
+
let deferred1_1;
|
|
3606
|
+
try {
|
|
3607
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3608
|
+
wasm.wasmlinkmetadata_text(retptr, this.__wbg_ptr);
|
|
3609
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3610
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3611
|
+
deferred1_0 = r0;
|
|
3612
|
+
deferred1_1 = r1;
|
|
3613
|
+
return getStringFromWasm0(r0, r1);
|
|
3614
|
+
} finally {
|
|
3615
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3616
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3617
|
+
}
|
|
3618
|
+
}
|
|
3619
|
+
/**
|
|
3620
|
+
* @returns {string | undefined}
|
|
3621
|
+
*/
|
|
3622
|
+
get title() {
|
|
3623
|
+
try {
|
|
3624
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3625
|
+
wasm.wasmlinkmetadata_title(retptr, this.__wbg_ptr);
|
|
3626
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3627
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3628
|
+
let v1;
|
|
3629
|
+
if (r0 !== 0) {
|
|
3630
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3631
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3632
|
+
}
|
|
3633
|
+
return v1;
|
|
3634
|
+
} finally {
|
|
3635
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3636
|
+
}
|
|
3637
|
+
}
|
|
3638
|
+
}
|
|
3639
|
+
if (Symbol.dispose) WasmLinkMetadata.prototype[Symbol.dispose] = WasmLinkMetadata.prototype.free;
|
|
3640
|
+
|
|
3641
|
+
/**
|
|
3642
|
+
* Link rendering style in Markdown output.
|
|
3643
|
+
*
|
|
3644
|
+
* Controls whether links and images use inline `[text](url)` syntax or
|
|
3645
|
+
* reference-style `[text][1]` syntax with definitions collected at the end.
|
|
3646
|
+
* @enum {0 | 1}
|
|
3647
|
+
*/
|
|
3648
|
+
export const WasmLinkStyle = Object.freeze({
|
|
3649
|
+
Inline: 0, "0": "Inline",
|
|
3650
|
+
Reference: 1, "1": "Reference",
|
|
3651
|
+
});
|
|
3652
|
+
|
|
3653
|
+
/**
|
|
3654
|
+
* Link classification based on href value and document context.
|
|
3655
|
+
*
|
|
3656
|
+
* Used to categorize links during extraction for filtering and analysis.
|
|
3657
|
+
* @enum {0 | 1 | 2 | 3 | 4 | 5}
|
|
3658
|
+
*/
|
|
3659
|
+
export const WasmLinkType = Object.freeze({
|
|
3660
|
+
Anchor: 0, "0": "Anchor",
|
|
3661
|
+
Internal: 1, "1": "Internal",
|
|
3662
|
+
External: 2, "2": "External",
|
|
3663
|
+
Email: 3, "3": "Email",
|
|
3664
|
+
Phone: 4, "4": "Phone",
|
|
3665
|
+
Other: 5, "5": "Other",
|
|
3666
|
+
});
|
|
3667
|
+
|
|
3668
|
+
/**
|
|
3669
|
+
* List indentation character type.
|
|
3670
|
+
*
|
|
3671
|
+
* Controls whether list items are indented with spaces or tabs.
|
|
3672
|
+
* @enum {0 | 1}
|
|
3673
|
+
*/
|
|
3674
|
+
export const WasmListIndentType = Object.freeze({
|
|
3675
|
+
Spaces: 0, "0": "Spaces",
|
|
3676
|
+
Tabs: 1, "1": "Tabs",
|
|
3677
|
+
});
|
|
3678
|
+
|
|
3679
|
+
/**
|
|
3680
|
+
* Line break syntax in Markdown output.
|
|
3681
|
+
*
|
|
3682
|
+
* Controls how soft line breaks (from `<br>` or line breaks in source) are rendered.
|
|
3683
|
+
* @enum {0 | 1}
|
|
3684
|
+
*/
|
|
3685
|
+
export const WasmNewlineStyle = Object.freeze({
|
|
3686
|
+
Spaces: 0, "0": "Spaces",
|
|
3687
|
+
Backslash: 1, "1": "Backslash",
|
|
3688
|
+
});
|
|
3689
|
+
|
|
3690
|
+
/**
|
|
3691
|
+
* The semantic content type of a document node.
|
|
3692
|
+
*
|
|
3693
|
+
* Uses internally tagged representation (`"node_type": "heading"`) for JSON serialization.
|
|
3694
|
+
*/
|
|
3695
|
+
export class WasmNodeContent {
|
|
3696
|
+
static __wrap(ptr) {
|
|
3697
|
+
const obj = Object.create(WasmNodeContent.prototype);
|
|
3698
|
+
obj.__wbg_ptr = ptr;
|
|
3699
|
+
WasmNodeContentFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3700
|
+
return obj;
|
|
3701
|
+
}
|
|
3702
|
+
__destroy_into_raw() {
|
|
3703
|
+
const ptr = this.__wbg_ptr;
|
|
3704
|
+
this.__wbg_ptr = 0;
|
|
3705
|
+
WasmNodeContentFinalization.unregister(this);
|
|
3706
|
+
return ptr;
|
|
3707
|
+
}
|
|
3708
|
+
free() {
|
|
3709
|
+
const ptr = this.__destroy_into_raw();
|
|
3710
|
+
wasm.__wbg_wasmnodecontent_free(ptr, 0);
|
|
3711
|
+
}
|
|
3712
|
+
/**
|
|
3713
|
+
* @returns {string | undefined}
|
|
3714
|
+
*/
|
|
3715
|
+
get content() {
|
|
3716
|
+
try {
|
|
3717
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3718
|
+
wasm.wasmnodecontent_content(retptr, this.__wbg_ptr);
|
|
3719
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3720
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3721
|
+
let v1;
|
|
3722
|
+
if (r0 !== 0) {
|
|
3723
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3724
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3725
|
+
}
|
|
3726
|
+
return v1;
|
|
3727
|
+
} finally {
|
|
3728
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
/**
|
|
3732
|
+
* @returns {WasmNodeContent}
|
|
3733
|
+
*/
|
|
3734
|
+
static default() {
|
|
3735
|
+
const ret = wasm.wasmnodecontent_default();
|
|
3736
|
+
return WasmNodeContent.__wrap(ret);
|
|
3737
|
+
}
|
|
3738
|
+
/**
|
|
3739
|
+
* @returns {string | undefined}
|
|
3740
|
+
*/
|
|
3741
|
+
get definition() {
|
|
3742
|
+
try {
|
|
3743
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3744
|
+
wasm.wasmnodecontent_definition(retptr, this.__wbg_ptr);
|
|
3745
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3746
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3747
|
+
let v1;
|
|
3748
|
+
if (r0 !== 0) {
|
|
3749
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3750
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3751
|
+
}
|
|
3752
|
+
return v1;
|
|
3753
|
+
} finally {
|
|
3754
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3755
|
+
}
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* @returns {string | undefined}
|
|
3759
|
+
*/
|
|
3760
|
+
get description() {
|
|
3761
|
+
try {
|
|
3762
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3763
|
+
wasm.wasmnodecontent_description(retptr, this.__wbg_ptr);
|
|
3764
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3765
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3766
|
+
let v1;
|
|
3767
|
+
if (r0 !== 0) {
|
|
3768
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3769
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3770
|
+
}
|
|
3771
|
+
return v1;
|
|
3772
|
+
} finally {
|
|
3773
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3774
|
+
}
|
|
3775
|
+
}
|
|
3776
|
+
/**
|
|
3777
|
+
* @returns {any | undefined}
|
|
3778
|
+
*/
|
|
3779
|
+
get entries() {
|
|
3780
|
+
const ret = wasm.wasmnodecontent_entries(this.__wbg_ptr);
|
|
3781
|
+
return takeObject(ret);
|
|
3782
|
+
}
|
|
3783
|
+
/**
|
|
3784
|
+
* @returns {string | undefined}
|
|
3785
|
+
*/
|
|
3786
|
+
get format() {
|
|
3787
|
+
try {
|
|
3788
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3789
|
+
wasm.wasmnodecontent_format(retptr, this.__wbg_ptr);
|
|
3790
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3791
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3792
|
+
let v1;
|
|
3793
|
+
if (r0 !== 0) {
|
|
3794
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3795
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3796
|
+
}
|
|
3797
|
+
return v1;
|
|
3798
|
+
} finally {
|
|
3799
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
/**
|
|
3803
|
+
* @returns {WasmTableGrid | undefined}
|
|
3804
|
+
*/
|
|
3805
|
+
get grid() {
|
|
3806
|
+
const ret = wasm.wasmnodecontent_grid(this.__wbg_ptr);
|
|
3807
|
+
return ret === 0 ? undefined : WasmTableGrid.__wrap(ret);
|
|
3808
|
+
}
|
|
3809
|
+
/**
|
|
3810
|
+
* @returns {number | undefined}
|
|
3811
|
+
*/
|
|
3812
|
+
get headingLevel() {
|
|
3813
|
+
const ret = wasm.wasmnodecontent_headingLevel(this.__wbg_ptr);
|
|
3814
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
3815
|
+
}
|
|
3816
|
+
/**
|
|
3817
|
+
* @returns {string | undefined}
|
|
3818
|
+
*/
|
|
3819
|
+
get headingText() {
|
|
3820
|
+
try {
|
|
3821
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3822
|
+
wasm.wasmnodecontent_headingText(retptr, this.__wbg_ptr);
|
|
3823
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3824
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3825
|
+
let v1;
|
|
3826
|
+
if (r0 !== 0) {
|
|
3827
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3828
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3829
|
+
}
|
|
3830
|
+
return v1;
|
|
3831
|
+
} finally {
|
|
3832
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3833
|
+
}
|
|
3834
|
+
}
|
|
3835
|
+
/**
|
|
3836
|
+
* @returns {number | undefined}
|
|
3837
|
+
*/
|
|
3838
|
+
get imageIndex() {
|
|
3839
|
+
const ret = wasm.wasmnodecontent_imageIndex(this.__wbg_ptr);
|
|
3840
|
+
return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
|
|
3841
|
+
}
|
|
3842
|
+
/**
|
|
3843
|
+
* @returns {string | undefined}
|
|
3844
|
+
*/
|
|
3845
|
+
get label() {
|
|
3846
|
+
try {
|
|
3847
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3848
|
+
wasm.wasmnodecontent_label(retptr, this.__wbg_ptr);
|
|
3849
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3850
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3851
|
+
let v1;
|
|
3852
|
+
if (r0 !== 0) {
|
|
3853
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3854
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3855
|
+
}
|
|
3856
|
+
return v1;
|
|
3857
|
+
} finally {
|
|
3858
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3859
|
+
}
|
|
3860
|
+
}
|
|
3861
|
+
/**
|
|
3862
|
+
* @returns {string | undefined}
|
|
3863
|
+
*/
|
|
3864
|
+
get language() {
|
|
3865
|
+
try {
|
|
3866
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3867
|
+
wasm.wasmnodecontent_language(retptr, this.__wbg_ptr);
|
|
3868
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3869
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3870
|
+
let v1;
|
|
3871
|
+
if (r0 !== 0) {
|
|
3872
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
3873
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
3874
|
+
}
|
|
3875
|
+
return v1;
|
|
3876
|
+
} finally {
|
|
3877
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3878
|
+
}
|
|
3879
|
+
}
|
|
3880
|
+
/**
|
|
3881
|
+
* @returns {number | undefined}
|
|
3882
|
+
*/
|
|
3883
|
+
get level() {
|
|
3884
|
+
const ret = wasm.wasmnodecontent_level(this.__wbg_ptr);
|
|
3885
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
3886
|
+
}
|
|
3887
|
+
constructor() {
|
|
3888
|
+
const ret = wasm.wasmnodecontent_new();
|
|
3889
|
+
this.__wbg_ptr = ret;
|
|
3890
|
+
WasmNodeContentFinalization.register(this, this.__wbg_ptr, this);
|
|
3891
|
+
return this;
|
|
3892
|
+
}
|
|
3893
|
+
/**
|
|
3894
|
+
* @returns {string}
|
|
3895
|
+
*/
|
|
3896
|
+
get nodeType() {
|
|
3897
|
+
let deferred1_0;
|
|
3898
|
+
let deferred1_1;
|
|
3899
|
+
try {
|
|
3900
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3901
|
+
wasm.wasmnodecontent_nodeType(retptr, this.__wbg_ptr);
|
|
3902
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3903
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3904
|
+
deferred1_0 = r0;
|
|
3905
|
+
deferred1_1 = r1;
|
|
3906
|
+
return getStringFromWasm0(r0, r1);
|
|
3907
|
+
} finally {
|
|
3908
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3909
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3912
|
+
/**
|
|
3913
|
+
* @returns {boolean | undefined}
|
|
3914
|
+
*/
|
|
3915
|
+
get ordered() {
|
|
3916
|
+
const ret = wasm.wasmnodecontent_ordered(this.__wbg_ptr);
|
|
3917
|
+
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
3918
|
+
}
|
|
3919
|
+
/**
|
|
3920
|
+
* @param {string | null} [value]
|
|
3921
|
+
*/
|
|
3922
|
+
set content(value) {
|
|
3923
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3924
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3925
|
+
wasm.wasmnodecontent_set_content(this.__wbg_ptr, ptr0, len0);
|
|
3926
|
+
}
|
|
3927
|
+
/**
|
|
3928
|
+
* @param {string | null} [value]
|
|
3929
|
+
*/
|
|
3930
|
+
set definition(value) {
|
|
3931
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3932
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3933
|
+
wasm.wasmnodecontent_set_definition(this.__wbg_ptr, ptr0, len0);
|
|
3934
|
+
}
|
|
3935
|
+
/**
|
|
3936
|
+
* @param {string | null} [value]
|
|
3937
|
+
*/
|
|
3938
|
+
set description(value) {
|
|
3939
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3940
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3941
|
+
wasm.wasmnodecontent_set_description(this.__wbg_ptr, ptr0, len0);
|
|
3942
|
+
}
|
|
3943
|
+
/**
|
|
3944
|
+
* @param {any | null} [value]
|
|
3945
|
+
*/
|
|
3946
|
+
set entries(value) {
|
|
3947
|
+
wasm.wasmnodecontent_set_entries(this.__wbg_ptr, isLikeNone(value) ? 0 : addHeapObject(value));
|
|
3948
|
+
}
|
|
3949
|
+
/**
|
|
3950
|
+
* @param {string | null} [value]
|
|
3951
|
+
*/
|
|
3952
|
+
set format(value) {
|
|
3953
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3954
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3955
|
+
wasm.wasmnodecontent_set_format(this.__wbg_ptr, ptr0, len0);
|
|
3956
|
+
}
|
|
3957
|
+
/**
|
|
3958
|
+
* @param {WasmTableGrid | null} [value]
|
|
3959
|
+
*/
|
|
3960
|
+
set grid(value) {
|
|
3961
|
+
let ptr0 = 0;
|
|
3962
|
+
if (!isLikeNone(value)) {
|
|
3963
|
+
_assertClass(value, WasmTableGrid);
|
|
3964
|
+
ptr0 = value.__destroy_into_raw();
|
|
3965
|
+
}
|
|
3966
|
+
wasm.wasmnodecontent_set_grid(this.__wbg_ptr, ptr0);
|
|
3967
|
+
}
|
|
3968
|
+
/**
|
|
3969
|
+
* @param {number | null} [value]
|
|
3970
|
+
*/
|
|
3971
|
+
set headingLevel(value) {
|
|
3972
|
+
wasm.wasmnodecontent_set_headingLevel(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value);
|
|
3973
|
+
}
|
|
3974
|
+
/**
|
|
3975
|
+
* @param {string | null} [value]
|
|
3976
|
+
*/
|
|
3977
|
+
set headingText(value) {
|
|
3978
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3979
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3980
|
+
wasm.wasmnodecontent_set_headingText(this.__wbg_ptr, ptr0, len0);
|
|
3981
|
+
}
|
|
3982
|
+
/**
|
|
3983
|
+
* @param {number | null} [value]
|
|
3984
|
+
*/
|
|
3985
|
+
set imageIndex(value) {
|
|
3986
|
+
wasm.wasmnodecontent_set_imageIndex(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
|
|
3987
|
+
}
|
|
3988
|
+
/**
|
|
3989
|
+
* @param {string | null} [value]
|
|
3990
|
+
*/
|
|
3991
|
+
set label(value) {
|
|
3992
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3993
|
+
var len0 = WASM_VECTOR_LEN;
|
|
3994
|
+
wasm.wasmnodecontent_set_label(this.__wbg_ptr, ptr0, len0);
|
|
3995
|
+
}
|
|
3996
|
+
/**
|
|
3997
|
+
* @param {string | null} [value]
|
|
3998
|
+
*/
|
|
3999
|
+
set language(value) {
|
|
4000
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4001
|
+
var len0 = WASM_VECTOR_LEN;
|
|
4002
|
+
wasm.wasmnodecontent_set_language(this.__wbg_ptr, ptr0, len0);
|
|
4003
|
+
}
|
|
4004
|
+
/**
|
|
4005
|
+
* @param {number | null} [value]
|
|
4006
|
+
*/
|
|
4007
|
+
set level(value) {
|
|
4008
|
+
wasm.wasmnodecontent_set_level(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value);
|
|
4009
|
+
}
|
|
4010
|
+
/**
|
|
4011
|
+
* @param {string} value
|
|
4012
|
+
*/
|
|
4013
|
+
set nodeType(value) {
|
|
4014
|
+
const ptr0 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4015
|
+
const len0 = WASM_VECTOR_LEN;
|
|
4016
|
+
wasm.wasmnodecontent_set_nodeType(this.__wbg_ptr, ptr0, len0);
|
|
4017
|
+
}
|
|
4018
|
+
/**
|
|
4019
|
+
* @param {boolean | null} [value]
|
|
4020
|
+
*/
|
|
4021
|
+
set ordered(value) {
|
|
4022
|
+
wasm.wasmnodecontent_set_ordered(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value ? 1 : 0);
|
|
4023
|
+
}
|
|
4024
|
+
/**
|
|
4025
|
+
* @param {string | null} [value]
|
|
4026
|
+
*/
|
|
4027
|
+
set src(value) {
|
|
4028
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4029
|
+
var len0 = WASM_VECTOR_LEN;
|
|
4030
|
+
wasm.wasmnodecontent_set_src(this.__wbg_ptr, ptr0, len0);
|
|
4031
|
+
}
|
|
4032
|
+
/**
|
|
4033
|
+
* @param {string | null} [value]
|
|
4034
|
+
*/
|
|
4035
|
+
set term(value) {
|
|
4036
|
+
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4037
|
+
var len0 = WASM_VECTOR_LEN;
|
|
4038
|
+
wasm.wasmnodecontent_set_term(this.__wbg_ptr, ptr0, len0);
|
|
4039
|
+
}
|
|
4040
|
+
/**
|
|
4041
|
+
* @param {string | null} [value]
|
|
4042
|
+
*/
|
|
4043
|
+
set text(value) {
|
|
3445
4044
|
var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3446
4045
|
var len0 = WASM_VECTOR_LEN;
|
|
3447
|
-
wasm.
|
|
4046
|
+
wasm.wasmnodecontent_set_text(this.__wbg_ptr, ptr0, len0);
|
|
3448
4047
|
}
|
|
3449
4048
|
/**
|
|
3450
|
-
* @returns {string}
|
|
4049
|
+
* @returns {string | undefined}
|
|
3451
4050
|
*/
|
|
3452
|
-
get
|
|
3453
|
-
let deferred1_0;
|
|
3454
|
-
let deferred1_1;
|
|
4051
|
+
get src() {
|
|
3455
4052
|
try {
|
|
3456
4053
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3457
|
-
wasm.
|
|
4054
|
+
wasm.wasmnodecontent_src(retptr, this.__wbg_ptr);
|
|
3458
4055
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3459
4056
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
4057
|
+
let v1;
|
|
4058
|
+
if (r0 !== 0) {
|
|
4059
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
4060
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
4061
|
+
}
|
|
4062
|
+
return v1;
|
|
3463
4063
|
} finally {
|
|
3464
4064
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3465
|
-
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3466
4065
|
}
|
|
3467
4066
|
}
|
|
3468
4067
|
/**
|
|
3469
4068
|
* @returns {string | undefined}
|
|
3470
4069
|
*/
|
|
3471
|
-
get
|
|
4070
|
+
get term() {
|
|
3472
4071
|
try {
|
|
3473
4072
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3474
|
-
wasm.
|
|
4073
|
+
wasm.wasmnodecontent_term(retptr, this.__wbg_ptr);
|
|
4074
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4075
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4076
|
+
let v1;
|
|
4077
|
+
if (r0 !== 0) {
|
|
4078
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
4079
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
4080
|
+
}
|
|
4081
|
+
return v1;
|
|
4082
|
+
} finally {
|
|
4083
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4084
|
+
}
|
|
4085
|
+
}
|
|
4086
|
+
/**
|
|
4087
|
+
* @returns {string | undefined}
|
|
4088
|
+
*/
|
|
4089
|
+
get text() {
|
|
4090
|
+
try {
|
|
4091
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4092
|
+
wasm.wasmnodecontent_text(retptr, this.__wbg_ptr);
|
|
3475
4093
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3476
4094
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3477
4095
|
let v1;
|
|
@@ -3485,78 +4103,7 @@ export class WasmLinkMetadata {
|
|
|
3485
4103
|
}
|
|
3486
4104
|
}
|
|
3487
4105
|
}
|
|
3488
|
-
if (Symbol.dispose)
|
|
3489
|
-
|
|
3490
|
-
/**
|
|
3491
|
-
* Link rendering style in Markdown output.
|
|
3492
|
-
*
|
|
3493
|
-
* Controls whether links and images use inline `[text](url)` syntax or
|
|
3494
|
-
* reference-style `[text][1]` syntax with definitions collected at the end.
|
|
3495
|
-
* @enum {0 | 1}
|
|
3496
|
-
*/
|
|
3497
|
-
export const WasmLinkStyle = Object.freeze({
|
|
3498
|
-
Inline: 0, "0": "Inline",
|
|
3499
|
-
Reference: 1, "1": "Reference",
|
|
3500
|
-
});
|
|
3501
|
-
|
|
3502
|
-
/**
|
|
3503
|
-
* Link classification based on href value and document context.
|
|
3504
|
-
*
|
|
3505
|
-
* Used to categorize links during extraction for filtering and analysis.
|
|
3506
|
-
* @enum {0 | 1 | 2 | 3 | 4 | 5}
|
|
3507
|
-
*/
|
|
3508
|
-
export const WasmLinkType = Object.freeze({
|
|
3509
|
-
Anchor: 0, "0": "Anchor",
|
|
3510
|
-
Internal: 1, "1": "Internal",
|
|
3511
|
-
External: 2, "2": "External",
|
|
3512
|
-
Email: 3, "3": "Email",
|
|
3513
|
-
Phone: 4, "4": "Phone",
|
|
3514
|
-
Other: 5, "5": "Other",
|
|
3515
|
-
});
|
|
3516
|
-
|
|
3517
|
-
/**
|
|
3518
|
-
* List indentation character type.
|
|
3519
|
-
*
|
|
3520
|
-
* Controls whether list items are indented with spaces or tabs.
|
|
3521
|
-
* @enum {0 | 1}
|
|
3522
|
-
*/
|
|
3523
|
-
export const WasmListIndentType = Object.freeze({
|
|
3524
|
-
Spaces: 0, "0": "Spaces",
|
|
3525
|
-
Tabs: 1, "1": "Tabs",
|
|
3526
|
-
});
|
|
3527
|
-
|
|
3528
|
-
/**
|
|
3529
|
-
* Line break syntax in Markdown output.
|
|
3530
|
-
*
|
|
3531
|
-
* Controls how soft line breaks (from `<br>` or line breaks in source) are rendered.
|
|
3532
|
-
* @enum {0 | 1}
|
|
3533
|
-
*/
|
|
3534
|
-
export const WasmNewlineStyle = Object.freeze({
|
|
3535
|
-
Spaces: 0, "0": "Spaces",
|
|
3536
|
-
Backslash: 1, "1": "Backslash",
|
|
3537
|
-
});
|
|
3538
|
-
|
|
3539
|
-
/**
|
|
3540
|
-
* The semantic content type of a document node.
|
|
3541
|
-
*
|
|
3542
|
-
* Uses internally tagged representation (`"node_type": "heading"`) for JSON serialization.
|
|
3543
|
-
* @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}
|
|
3544
|
-
*/
|
|
3545
|
-
export const WasmNodeContent = Object.freeze({
|
|
3546
|
-
Heading: 0, "0": "Heading",
|
|
3547
|
-
Paragraph: 1, "1": "Paragraph",
|
|
3548
|
-
List: 2, "2": "List",
|
|
3549
|
-
ListItem: 3, "3": "ListItem",
|
|
3550
|
-
Table: 4, "4": "Table",
|
|
3551
|
-
Image: 5, "5": "Image",
|
|
3552
|
-
Code: 6, "6": "Code",
|
|
3553
|
-
Quote: 7, "7": "Quote",
|
|
3554
|
-
DefinitionList: 8, "8": "DefinitionList",
|
|
3555
|
-
DefinitionItem: 9, "9": "DefinitionItem",
|
|
3556
|
-
RawBlock: 10, "10": "RawBlock",
|
|
3557
|
-
MetadataBlock: 11, "11": "MetadataBlock",
|
|
3558
|
-
Group: 12, "12": "Group",
|
|
3559
|
-
});
|
|
4106
|
+
if (Symbol.dispose) WasmNodeContent.prototype[Symbol.dispose] = WasmNodeContent.prototype.free;
|
|
3560
4107
|
|
|
3561
4108
|
/**
|
|
3562
4109
|
* Context information passed to all visitor methods.
|
|
@@ -3565,6 +4112,12 @@ export const WasmNodeContent = Object.freeze({
|
|
|
3565
4112
|
* including its type, attributes, position in the DOM tree, and parent context.
|
|
3566
4113
|
*/
|
|
3567
4114
|
export class WasmNodeContext {
|
|
4115
|
+
static __wrap(ptr) {
|
|
4116
|
+
const obj = Object.create(WasmNodeContext.prototype);
|
|
4117
|
+
obj.__wbg_ptr = ptr;
|
|
4118
|
+
WasmNodeContextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
4119
|
+
return obj;
|
|
4120
|
+
}
|
|
3568
4121
|
__destroy_into_raw() {
|
|
3569
4122
|
const ptr = this.__wbg_ptr;
|
|
3570
4123
|
this.__wbg_ptr = 0;
|
|
@@ -3582,6 +4135,13 @@ export class WasmNodeContext {
|
|
|
3582
4135
|
const ret = wasm.wasmnodecontext_attributes(this.__wbg_ptr);
|
|
3583
4136
|
return takeObject(ret);
|
|
3584
4137
|
}
|
|
4138
|
+
/**
|
|
4139
|
+
* @returns {WasmNodeContext}
|
|
4140
|
+
*/
|
|
4141
|
+
static default() {
|
|
4142
|
+
const ret = wasm.wasmnodecontext_default();
|
|
4143
|
+
return WasmNodeContext.__wrap(ret);
|
|
4144
|
+
}
|
|
3585
4145
|
/**
|
|
3586
4146
|
* @returns {number}
|
|
3587
4147
|
*/
|
|
@@ -3604,30 +4164,42 @@ export class WasmNodeContext {
|
|
|
3604
4164
|
return ret !== 0;
|
|
3605
4165
|
}
|
|
3606
4166
|
/**
|
|
3607
|
-
* @param {WasmNodeType}
|
|
3608
|
-
* @param {string}
|
|
4167
|
+
* @param {WasmNodeType} nodeType
|
|
4168
|
+
* @param {string} tagName
|
|
3609
4169
|
* @param {any} attributes
|
|
3610
4170
|
* @param {number} depth
|
|
3611
|
-
* @param {number}
|
|
3612
|
-
* @param {boolean}
|
|
3613
|
-
* @param {string | null} [
|
|
4171
|
+
* @param {number} indexInParent
|
|
4172
|
+
* @param {boolean} isInline
|
|
4173
|
+
* @param {string | null} [parentTag]
|
|
3614
4174
|
*/
|
|
3615
|
-
constructor(
|
|
3616
|
-
const ptr0 = passStringToWasm0(
|
|
4175
|
+
constructor(nodeType, tagName, attributes, depth, indexInParent, isInline, parentTag) {
|
|
4176
|
+
const ptr0 = passStringToWasm0(tagName, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3617
4177
|
const len0 = WASM_VECTOR_LEN;
|
|
3618
|
-
var ptr1 = isLikeNone(
|
|
4178
|
+
var ptr1 = isLikeNone(parentTag) ? 0 : passStringToWasm0(parentTag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
3619
4179
|
var len1 = WASM_VECTOR_LEN;
|
|
3620
|
-
const ret = wasm.wasmnodecontext_new(
|
|
4180
|
+
const ret = wasm.wasmnodecontext_new(nodeType, ptr0, len0, addHeapObject(attributes), depth, indexInParent, isInline, ptr1, len1);
|
|
3621
4181
|
this.__wbg_ptr = ret;
|
|
3622
4182
|
WasmNodeContextFinalization.register(this, this.__wbg_ptr, this);
|
|
3623
4183
|
return this;
|
|
3624
4184
|
}
|
|
3625
4185
|
/**
|
|
3626
|
-
* @returns {
|
|
4186
|
+
* @returns {string}
|
|
3627
4187
|
*/
|
|
3628
4188
|
get nodeType() {
|
|
3629
|
-
|
|
3630
|
-
|
|
4189
|
+
let deferred1_0;
|
|
4190
|
+
let deferred1_1;
|
|
4191
|
+
try {
|
|
4192
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4193
|
+
wasm.wasmnodecontext_nodeType(retptr, this.__wbg_ptr);
|
|
4194
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4195
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4196
|
+
deferred1_0 = r0;
|
|
4197
|
+
deferred1_1 = r1;
|
|
4198
|
+
return getStringFromWasm0(r0, r1);
|
|
4199
|
+
} finally {
|
|
4200
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4201
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4202
|
+
}
|
|
3631
4203
|
}
|
|
3632
4204
|
/**
|
|
3633
4205
|
* @returns {string | undefined}
|
|
@@ -3846,22 +4418,6 @@ export class WasmPreprocessingOptions {
|
|
|
3846
4418
|
const ptr = this.__destroy_into_raw();
|
|
3847
4419
|
wasm.__wbg_wasmpreprocessingoptions_free(ptr, 0);
|
|
3848
4420
|
}
|
|
3849
|
-
/**
|
|
3850
|
-
* Apply a partial update to these preprocessing options.
|
|
3851
|
-
*
|
|
3852
|
-
* Any specified fields in the update will override the current values.
|
|
3853
|
-
* Unspecified fields (None) are left unchanged.
|
|
3854
|
-
*
|
|
3855
|
-
* # Arguments
|
|
3856
|
-
*
|
|
3857
|
-
* * `update` - Partial preprocessing options update
|
|
3858
|
-
* @param {WasmPreprocessingOptionsUpdate} _update
|
|
3859
|
-
*/
|
|
3860
|
-
applyUpdate(_update) {
|
|
3861
|
-
_assertClass(_update, WasmPreprocessingOptionsUpdate);
|
|
3862
|
-
var ptr0 = _update.__destroy_into_raw();
|
|
3863
|
-
wasm.wasmpreprocessingoptions_applyUpdate(this.__wbg_ptr, ptr0);
|
|
3864
|
-
}
|
|
3865
4421
|
/**
|
|
3866
4422
|
* @returns {WasmPreprocessingOptions}
|
|
3867
4423
|
*/
|
|
@@ -3876,56 +4432,36 @@ export class WasmPreprocessingOptions {
|
|
|
3876
4432
|
const ret = wasm.wasmpreprocessingoptions_enabled(this.__wbg_ptr);
|
|
3877
4433
|
return ret !== 0;
|
|
3878
4434
|
}
|
|
3879
|
-
/**
|
|
3880
|
-
* @param {WasmPreprocessingOptionsUpdate} update
|
|
3881
|
-
* @returns {WasmPreprocessingOptions}
|
|
3882
|
-
*/
|
|
3883
|
-
static from(update) {
|
|
3884
|
-
_assertClass(update, WasmPreprocessingOptionsUpdate);
|
|
3885
|
-
var ptr0 = update.__destroy_into_raw();
|
|
3886
|
-
const ret = wasm.wasmpreprocessingoptions_from(ptr0);
|
|
3887
|
-
return WasmPreprocessingOptions.__wrap(ret);
|
|
3888
|
-
}
|
|
3889
|
-
/**
|
|
3890
|
-
* Create new preprocessing options from a partial update.
|
|
3891
|
-
*
|
|
3892
|
-
* Creates a new `PreprocessingOptions` struct with defaults, then applies the update.
|
|
3893
|
-
* Fields not specified in the update keep their default values.
|
|
3894
|
-
*
|
|
3895
|
-
* # Arguments
|
|
3896
|
-
*
|
|
3897
|
-
* * `update` - Partial preprocessing options update
|
|
3898
|
-
*
|
|
3899
|
-
* # Returns
|
|
3900
|
-
*
|
|
3901
|
-
* New `PreprocessingOptions` with specified updates applied to defaults
|
|
3902
|
-
* @param {WasmPreprocessingOptionsUpdate} update
|
|
3903
|
-
* @returns {WasmPreprocessingOptions}
|
|
3904
|
-
*/
|
|
3905
|
-
static fromUpdate(update) {
|
|
3906
|
-
_assertClass(update, WasmPreprocessingOptionsUpdate);
|
|
3907
|
-
var ptr0 = update.__destroy_into_raw();
|
|
3908
|
-
const ret = wasm.wasmpreprocessingoptions_fromUpdate(ptr0);
|
|
3909
|
-
return WasmPreprocessingOptions.__wrap(ret);
|
|
3910
|
-
}
|
|
3911
4435
|
/**
|
|
3912
4436
|
* @param {boolean | null} [enabled]
|
|
3913
4437
|
* @param {WasmPreprocessingPreset | null} [preset]
|
|
3914
|
-
* @param {boolean | null} [
|
|
3915
|
-
* @param {boolean | null} [
|
|
4438
|
+
* @param {boolean | null} [removeNavigation]
|
|
4439
|
+
* @param {boolean | null} [removeForms]
|
|
3916
4440
|
*/
|
|
3917
|
-
constructor(enabled, preset,
|
|
3918
|
-
const ret = wasm.wasmpreprocessingoptions_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(
|
|
4441
|
+
constructor(enabled, preset, removeNavigation, removeForms) {
|
|
4442
|
+
const ret = wasm.wasmpreprocessingoptions_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(removeNavigation) ? 0xFFFFFF : removeNavigation ? 1 : 0, isLikeNone(removeForms) ? 0xFFFFFF : removeForms ? 1 : 0);
|
|
3919
4443
|
this.__wbg_ptr = ret;
|
|
3920
4444
|
WasmPreprocessingOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
3921
4445
|
return this;
|
|
3922
4446
|
}
|
|
3923
4447
|
/**
|
|
3924
|
-
* @returns {
|
|
4448
|
+
* @returns {string}
|
|
3925
4449
|
*/
|
|
3926
4450
|
get preset() {
|
|
3927
|
-
|
|
3928
|
-
|
|
4451
|
+
let deferred1_0;
|
|
4452
|
+
let deferred1_1;
|
|
4453
|
+
try {
|
|
4454
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4455
|
+
wasm.wasmpreprocessingoptions_preset(retptr, this.__wbg_ptr);
|
|
4456
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4457
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4458
|
+
deferred1_0 = r0;
|
|
4459
|
+
deferred1_1 = r1;
|
|
4460
|
+
return getStringFromWasm0(r0, r1);
|
|
4461
|
+
} finally {
|
|
4462
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4463
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4464
|
+
}
|
|
3929
4465
|
}
|
|
3930
4466
|
/**
|
|
3931
4467
|
* @returns {boolean}
|
|
@@ -3972,8 +4508,8 @@ if (Symbol.dispose) WasmPreprocessingOptions.prototype[Symbol.dispose] = WasmPre
|
|
|
3972
4508
|
* Partial update for `PreprocessingOptions`.
|
|
3973
4509
|
*
|
|
3974
4510
|
* This struct uses `Option<T>` to represent optional fields that can be selectively updated.
|
|
3975
|
-
* Only specified fields (
|
|
3976
|
-
* corresponding fields unchanged when applied via
|
|
4511
|
+
* Only specified fields (values) will override existing options; undefined values leave the
|
|
4512
|
+
* corresponding fields unchanged when applied via `PreprocessingOptions.apply_update`.
|
|
3977
4513
|
*/
|
|
3978
4514
|
export class WasmPreprocessingOptionsUpdate {
|
|
3979
4515
|
static __wrap(ptr) {
|
|
@@ -3992,6 +4528,13 @@ export class WasmPreprocessingOptionsUpdate {
|
|
|
3992
4528
|
const ptr = this.__destroy_into_raw();
|
|
3993
4529
|
wasm.__wbg_wasmpreprocessingoptionsupdate_free(ptr, 0);
|
|
3994
4530
|
}
|
|
4531
|
+
/**
|
|
4532
|
+
* @returns {WasmPreprocessingOptionsUpdate}
|
|
4533
|
+
*/
|
|
4534
|
+
static default() {
|
|
4535
|
+
const ret = wasm.wasmpreprocessingoptionsupdate_default();
|
|
4536
|
+
return WasmPreprocessingOptionsUpdate.__wrap(ret);
|
|
4537
|
+
}
|
|
3995
4538
|
/**
|
|
3996
4539
|
* @returns {boolean | undefined}
|
|
3997
4540
|
*/
|
|
@@ -4002,21 +4545,33 @@ export class WasmPreprocessingOptionsUpdate {
|
|
|
4002
4545
|
/**
|
|
4003
4546
|
* @param {boolean | null} [enabled]
|
|
4004
4547
|
* @param {WasmPreprocessingPreset | null} [preset]
|
|
4005
|
-
* @param {boolean | null} [
|
|
4006
|
-
* @param {boolean | null} [
|
|
4548
|
+
* @param {boolean | null} [removeNavigation]
|
|
4549
|
+
* @param {boolean | null} [removeForms]
|
|
4007
4550
|
*/
|
|
4008
|
-
constructor(enabled, preset,
|
|
4009
|
-
const ret = wasm.wasmpreprocessingoptionsupdate_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(
|
|
4551
|
+
constructor(enabled, preset, removeNavigation, removeForms) {
|
|
4552
|
+
const ret = wasm.wasmpreprocessingoptionsupdate_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(removeNavigation) ? 0xFFFFFF : removeNavigation ? 1 : 0, isLikeNone(removeForms) ? 0xFFFFFF : removeForms ? 1 : 0);
|
|
4010
4553
|
this.__wbg_ptr = ret;
|
|
4011
4554
|
WasmPreprocessingOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
|
|
4012
4555
|
return this;
|
|
4013
4556
|
}
|
|
4014
4557
|
/**
|
|
4015
|
-
* @returns {
|
|
4558
|
+
* @returns {string | undefined}
|
|
4016
4559
|
*/
|
|
4017
4560
|
get preset() {
|
|
4018
|
-
|
|
4019
|
-
|
|
4561
|
+
try {
|
|
4562
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4563
|
+
wasm.wasmpreprocessingoptionsupdate_preset(retptr, this.__wbg_ptr);
|
|
4564
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4565
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4566
|
+
let v1;
|
|
4567
|
+
if (r0 !== 0) {
|
|
4568
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
4569
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
4570
|
+
}
|
|
4571
|
+
return v1;
|
|
4572
|
+
} finally {
|
|
4573
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4574
|
+
}
|
|
4020
4575
|
}
|
|
4021
4576
|
/**
|
|
4022
4577
|
* @returns {boolean | undefined}
|
|
@@ -4072,7 +4627,21 @@ export const WasmPreprocessingPreset = Object.freeze({
|
|
|
4072
4627
|
});
|
|
4073
4628
|
|
|
4074
4629
|
/**
|
|
4075
|
-
* A non-fatal
|
|
4630
|
+
* A non-fatal diagnostic produced during HTML conversion.
|
|
4631
|
+
*
|
|
4632
|
+
* Warnings indicate that conversion completed but some content may have been handled
|
|
4633
|
+
* differently than expected — for example, an image that could not be extracted, a truncated
|
|
4634
|
+
* input, or malformed HTML that was repaired with best-effort parsing.
|
|
4635
|
+
*
|
|
4636
|
+
* Conversion always succeeds (returns `ConversionResult`) even when warnings are
|
|
4637
|
+
* present. Callers should inspect `warnings` and decide how to
|
|
4638
|
+
* handle them based on their tolerance for partial results:
|
|
4639
|
+
*
|
|
4640
|
+
* - **Logging pipelines**: emit each warning at `WARN` level and continue.
|
|
4641
|
+
* - **Strict pipelines**: treat any warning as a hard error by checking
|
|
4642
|
+
* `result.warnings.is_empty()` before using the output.
|
|
4643
|
+
*
|
|
4644
|
+
* See `WarningKind` for the full taxonomy of warning categories.
|
|
4076
4645
|
*/
|
|
4077
4646
|
export class WasmProcessingWarning {
|
|
4078
4647
|
static __wrap(ptr) {
|
|
@@ -4098,11 +4667,30 @@ export class WasmProcessingWarning {
|
|
|
4098
4667
|
wasm.__wbg_wasmprocessingwarning_free(ptr, 0);
|
|
4099
4668
|
}
|
|
4100
4669
|
/**
|
|
4101
|
-
* @returns {
|
|
4670
|
+
* @returns {WasmProcessingWarning}
|
|
4671
|
+
*/
|
|
4672
|
+
static default() {
|
|
4673
|
+
const ret = wasm.wasmprocessingwarning_default();
|
|
4674
|
+
return WasmProcessingWarning.__wrap(ret);
|
|
4675
|
+
}
|
|
4676
|
+
/**
|
|
4677
|
+
* @returns {string}
|
|
4102
4678
|
*/
|
|
4103
4679
|
get kind() {
|
|
4104
|
-
|
|
4105
|
-
|
|
4680
|
+
let deferred1_0;
|
|
4681
|
+
let deferred1_1;
|
|
4682
|
+
try {
|
|
4683
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4684
|
+
wasm.wasmprocessingwarning_kind(retptr, this.__wbg_ptr);
|
|
4685
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4686
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4687
|
+
deferred1_0 = r0;
|
|
4688
|
+
deferred1_1 = r1;
|
|
4689
|
+
return getStringFromWasm0(r0, r1);
|
|
4690
|
+
} finally {
|
|
4691
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4692
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4693
|
+
}
|
|
4106
4694
|
}
|
|
4107
4695
|
/**
|
|
4108
4696
|
* @returns {string}
|
|
@@ -4159,16 +4747,6 @@ if (Symbol.dispose) WasmProcessingWarning.prototype[Symbol.dispose] = WasmProces
|
|
|
4159
4747
|
* JSON-LD blocks are collected as raw JSON strings for flexibility.
|
|
4160
4748
|
*
|
|
4161
4749
|
* # Examples
|
|
4162
|
-
*
|
|
4163
|
-
* ```
|
|
4164
|
-
* let schema = StructuredData {
|
|
4165
|
-
* data_type: StructuredDataType::JsonLd,
|
|
4166
|
-
* raw_json: r#"{"@context":"https://schema.org","@type":"Article"}"#.to_string(),
|
|
4167
|
-
* schema_type: Some("Article".to_string()),
|
|
4168
|
-
* };
|
|
4169
|
-
*
|
|
4170
|
-
* assert_eq!(schema.data_type, StructuredDataType::JsonLd);
|
|
4171
|
-
* ```
|
|
4172
4750
|
*/
|
|
4173
4751
|
export class WasmStructuredData {
|
|
4174
4752
|
static __wrap(ptr) {
|
|
@@ -4194,23 +4772,42 @@ export class WasmStructuredData {
|
|
|
4194
4772
|
wasm.__wbg_wasmstructureddata_free(ptr, 0);
|
|
4195
4773
|
}
|
|
4196
4774
|
/**
|
|
4197
|
-
* @returns {
|
|
4775
|
+
* @returns {string}
|
|
4198
4776
|
*/
|
|
4199
4777
|
get dataType() {
|
|
4200
|
-
|
|
4201
|
-
|
|
4778
|
+
let deferred1_0;
|
|
4779
|
+
let deferred1_1;
|
|
4780
|
+
try {
|
|
4781
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4782
|
+
wasm.wasmstructureddata_dataType(retptr, this.__wbg_ptr);
|
|
4783
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4784
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4785
|
+
deferred1_0 = r0;
|
|
4786
|
+
deferred1_1 = r1;
|
|
4787
|
+
return getStringFromWasm0(r0, r1);
|
|
4788
|
+
} finally {
|
|
4789
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4790
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4791
|
+
}
|
|
4792
|
+
}
|
|
4793
|
+
/**
|
|
4794
|
+
* @returns {WasmStructuredData}
|
|
4795
|
+
*/
|
|
4796
|
+
static default() {
|
|
4797
|
+
const ret = wasm.wasmstructureddata_default();
|
|
4798
|
+
return WasmStructuredData.__wrap(ret);
|
|
4202
4799
|
}
|
|
4203
4800
|
/**
|
|
4204
|
-
* @param {WasmStructuredDataType}
|
|
4205
|
-
* @param {string}
|
|
4206
|
-
* @param {string | null} [
|
|
4801
|
+
* @param {WasmStructuredDataType} dataType
|
|
4802
|
+
* @param {string} rawJson
|
|
4803
|
+
* @param {string | null} [schemaType]
|
|
4207
4804
|
*/
|
|
4208
|
-
constructor(
|
|
4209
|
-
const ptr0 = passStringToWasm0(
|
|
4805
|
+
constructor(dataType, rawJson, schemaType) {
|
|
4806
|
+
const ptr0 = passStringToWasm0(rawJson, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4210
4807
|
const len0 = WASM_VECTOR_LEN;
|
|
4211
|
-
var ptr1 = isLikeNone(
|
|
4808
|
+
var ptr1 = isLikeNone(schemaType) ? 0 : passStringToWasm0(schemaType, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
4212
4809
|
var len1 = WASM_VECTOR_LEN;
|
|
4213
|
-
const ret = wasm.wasmstructureddata_new(
|
|
4810
|
+
const ret = wasm.wasmstructureddata_new(dataType, ptr0, len0, ptr1, len1);
|
|
4214
4811
|
this.__wbg_ptr = ret;
|
|
4215
4812
|
WasmStructuredDataFinalization.register(this, this.__wbg_ptr, this);
|
|
4216
4813
|
return this;
|
|
@@ -4316,6 +4913,13 @@ export class WasmTableData {
|
|
|
4316
4913
|
const ptr = this.__destroy_into_raw();
|
|
4317
4914
|
wasm.__wbg_wasmtabledata_free(ptr, 0);
|
|
4318
4915
|
}
|
|
4916
|
+
/**
|
|
4917
|
+
* @returns {WasmTableData}
|
|
4918
|
+
*/
|
|
4919
|
+
static default() {
|
|
4920
|
+
const ret = wasm.wasmtabledata_default();
|
|
4921
|
+
return WasmTableData.__wrap(ret);
|
|
4922
|
+
}
|
|
4319
4923
|
/**
|
|
4320
4924
|
* @returns {WasmTableGrid}
|
|
4321
4925
|
*/
|
|
@@ -4418,6 +5022,13 @@ export class WasmTableGrid {
|
|
|
4418
5022
|
const ret = wasm.wasmtablegrid_cols(this.__wbg_ptr);
|
|
4419
5023
|
return ret >>> 0;
|
|
4420
5024
|
}
|
|
5025
|
+
/**
|
|
5026
|
+
* @returns {WasmTableGrid}
|
|
5027
|
+
*/
|
|
5028
|
+
static default() {
|
|
5029
|
+
const ret = wasm.wasmtablegrid_default();
|
|
5030
|
+
return WasmTableGrid.__wrap(ret);
|
|
5031
|
+
}
|
|
4421
5032
|
/**
|
|
4422
5033
|
* @param {number | null} [rows]
|
|
4423
5034
|
* @param {number | null} [cols]
|
|
@@ -4462,9 +5073,20 @@ export class WasmTableGrid {
|
|
|
4462
5073
|
if (Symbol.dispose) WasmTableGrid.prototype[Symbol.dispose] = WasmTableGrid.prototype.free;
|
|
4463
5074
|
|
|
4464
5075
|
/**
|
|
4465
|
-
*
|
|
5076
|
+
* A styling or semantic annotation that applies to a byte range within a node's text.
|
|
4466
5077
|
*
|
|
4467
|
-
*
|
|
5078
|
+
* Unlike `DocumentNode`, which captures block-level structure (headings, paragraphs, etc.),
|
|
5079
|
+
* a `TextAnnotation` describes inline-level markup — bold, italic, links, code spans, and
|
|
5080
|
+
* similar — that spans a contiguous run of bytes inside `DocumentNode.content`'s text field.
|
|
5081
|
+
*
|
|
5082
|
+
* Byte offsets (`start`..`end`) are into the UTF-8 encoded text of the parent node. The range
|
|
5083
|
+
* follows Rust slice conventions: `start` is inclusive and `end` is exclusive, so the annotated
|
|
5084
|
+
* text is `text[start as usize..end as usize]`.
|
|
5085
|
+
*
|
|
5086
|
+
* Multiple annotations on the same node can overlap (e.g. bold-italic text), and they are
|
|
5087
|
+
* stored in the order they are encountered during DOM traversal.
|
|
5088
|
+
*
|
|
5089
|
+
* See `AnnotationKind` for the full list of supported annotation types.
|
|
4468
5090
|
*/
|
|
4469
5091
|
export class WasmTextAnnotation {
|
|
4470
5092
|
static __wrap(ptr) {
|
|
@@ -4489,6 +5111,13 @@ export class WasmTextAnnotation {
|
|
|
4489
5111
|
const ptr = this.__destroy_into_raw();
|
|
4490
5112
|
wasm.__wbg_wasmtextannotation_free(ptr, 0);
|
|
4491
5113
|
}
|
|
5114
|
+
/**
|
|
5115
|
+
* @returns {WasmTextAnnotation}
|
|
5116
|
+
*/
|
|
5117
|
+
static default() {
|
|
5118
|
+
const ret = wasm.wasmtextannotation_default();
|
|
5119
|
+
return WasmTextAnnotation.__wrap(ret);
|
|
5120
|
+
}
|
|
4492
5121
|
/**
|
|
4493
5122
|
* @returns {number}
|
|
4494
5123
|
*/
|
|
@@ -4497,19 +5126,19 @@ export class WasmTextAnnotation {
|
|
|
4497
5126
|
return ret >>> 0;
|
|
4498
5127
|
}
|
|
4499
5128
|
/**
|
|
4500
|
-
* @returns {
|
|
5129
|
+
* @returns {any}
|
|
4501
5130
|
*/
|
|
4502
5131
|
get kind() {
|
|
4503
5132
|
const ret = wasm.wasmtextannotation_kind(this.__wbg_ptr);
|
|
4504
|
-
return ret;
|
|
5133
|
+
return takeObject(ret);
|
|
4505
5134
|
}
|
|
4506
5135
|
/**
|
|
4507
5136
|
* @param {number} start
|
|
4508
5137
|
* @param {number} end
|
|
4509
|
-
* @param {
|
|
5138
|
+
* @param {any} kind
|
|
4510
5139
|
*/
|
|
4511
5140
|
constructor(start, end, kind) {
|
|
4512
|
-
const ret = wasm.wasmtextannotation_new(start, end, kind);
|
|
5141
|
+
const ret = wasm.wasmtextannotation_new(start, end, addHeapObject(kind));
|
|
4513
5142
|
this.__wbg_ptr = ret;
|
|
4514
5143
|
WasmTextAnnotationFinalization.register(this, this.__wbg_ptr, this);
|
|
4515
5144
|
return this;
|
|
@@ -4521,10 +5150,10 @@ export class WasmTextAnnotation {
|
|
|
4521
5150
|
wasm.wasmtextannotation_set_end(this.__wbg_ptr, value);
|
|
4522
5151
|
}
|
|
4523
5152
|
/**
|
|
4524
|
-
* @param {
|
|
5153
|
+
* @param {any} value
|
|
4525
5154
|
*/
|
|
4526
5155
|
set kind(value) {
|
|
4527
|
-
wasm.wasmtextannotation_set_kind(this.__wbg_ptr, value);
|
|
5156
|
+
wasm.wasmtextannotation_set_kind(this.__wbg_ptr, addHeapObject(value));
|
|
4528
5157
|
}
|
|
4529
5158
|
/**
|
|
4530
5159
|
* @param {number} value
|
|
@@ -4571,9 +5200,12 @@ export const WasmVisitResult = Object.freeze({
|
|
|
4571
5200
|
});
|
|
4572
5201
|
|
|
4573
5202
|
/**
|
|
4574
|
-
*
|
|
5203
|
+
* Shareable, thread-safe handle to a user-provided HTML visitor implementation.
|
|
4575
5204
|
*
|
|
4576
|
-
*
|
|
5205
|
+
* Pass an instance wrapped in this handle to `ConversionOptions` to
|
|
5206
|
+
* customise how the HTML document is traversed and converted to Markdown.
|
|
5207
|
+
* The handle may be cloned and shared across threads without additional
|
|
5208
|
+
* synchronisation on the caller's side.
|
|
4577
5209
|
*/
|
|
4578
5210
|
export class WasmVisitorHandle {
|
|
4579
5211
|
static __wrap(ptr) {
|
|
@@ -4629,23 +5261,16 @@ export const WasmWhitespaceMode = Object.freeze({
|
|
|
4629
5261
|
});
|
|
4630
5262
|
|
|
4631
5263
|
/**
|
|
4632
|
-
* Convert HTML to Markdown, returning a
|
|
5264
|
+
* Convert HTML to Markdown, returning a `ConversionResult` with content, metadata, images,
|
|
4633
5265
|
* and warnings.
|
|
4634
5266
|
*
|
|
4635
5267
|
* # Arguments
|
|
4636
5268
|
*
|
|
4637
5269
|
* * `html` — the HTML string to convert.
|
|
4638
|
-
* * `options` — optional conversion options. Defaults to
|
|
5270
|
+
* * `options` — optional conversion options. Defaults to `ConversionOptions.default`.
|
|
4639
5271
|
*
|
|
4640
5272
|
* # Example
|
|
4641
5273
|
*
|
|
4642
|
-
* ```
|
|
4643
|
-
* use html_to_markdown_rs::convert;
|
|
4644
|
-
*
|
|
4645
|
-
* let html = "<h1>Hello World</h1>";
|
|
4646
|
-
* let result = convert(html, None).unwrap();
|
|
4647
|
-
* assert!(result.content.as_deref().unwrap_or("").contains("Hello World"));
|
|
4648
|
-
* ```
|
|
4649
5274
|
*
|
|
4650
5275
|
* # Errors
|
|
4651
5276
|
*
|
|
@@ -4679,20 +5304,20 @@ export function convert(html, options) {
|
|
|
4679
5304
|
function __wbg_get_imports() {
|
|
4680
5305
|
const import0 = {
|
|
4681
5306
|
__proto__: null,
|
|
4682
|
-
|
|
5307
|
+
__wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
|
|
4683
5308
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
4684
5309
|
return ret;
|
|
4685
5310
|
},
|
|
4686
|
-
|
|
5311
|
+
__wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
|
|
4687
5312
|
const val = getObject(arg0);
|
|
4688
5313
|
const ret = typeof(val) === 'object' && val !== null;
|
|
4689
5314
|
return ret;
|
|
4690
5315
|
},
|
|
4691
|
-
|
|
5316
|
+
__wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
|
|
4692
5317
|
const ret = getObject(arg0) === undefined;
|
|
4693
5318
|
return ret;
|
|
4694
5319
|
},
|
|
4695
|
-
|
|
5320
|
+
__wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
|
|
4696
5321
|
const obj = getObject(arg1);
|
|
4697
5322
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
4698
5323
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -4700,41 +5325,47 @@ function __wbg_get_imports() {
|
|
|
4700
5325
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4701
5326
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4702
5327
|
},
|
|
4703
|
-
|
|
5328
|
+
__wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
|
|
4704
5329
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
4705
5330
|
},
|
|
4706
|
-
|
|
5331
|
+
__wbg_apply_292b6d94e4f92b15: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4707
5332
|
const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
|
|
4708
5333
|
return addHeapObject(ret);
|
|
4709
5334
|
}, arguments); },
|
|
4710
|
-
|
|
5335
|
+
__wbg_get_de6a0f7d4d18a304: function() { return handleError(function (arg0, arg1) {
|
|
4711
5336
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4712
5337
|
return addHeapObject(ret);
|
|
4713
5338
|
}, arguments); },
|
|
4714
|
-
|
|
5339
|
+
__wbg_has_73740b27f436fed3: function() { return handleError(function (arg0, arg1) {
|
|
4715
5340
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
4716
5341
|
return ret;
|
|
4717
5342
|
}, arguments); },
|
|
4718
|
-
|
|
5343
|
+
__wbg_new_ce1ab61c1c2b300d: function() {
|
|
4719
5344
|
const ret = new Object();
|
|
4720
5345
|
return addHeapObject(ret);
|
|
4721
5346
|
},
|
|
4722
|
-
|
|
5347
|
+
__wbg_new_d90091b82fdf5b91: function() {
|
|
4723
5348
|
const ret = new Array();
|
|
4724
5349
|
return addHeapObject(ret);
|
|
4725
5350
|
},
|
|
4726
|
-
|
|
5351
|
+
__wbg_parse_03863847d06c4e89: function() { return handleError(function (arg0, arg1) {
|
|
4727
5352
|
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
4728
5353
|
return addHeapObject(ret);
|
|
4729
5354
|
}, arguments); },
|
|
4730
|
-
|
|
5355
|
+
__wbg_push_a6822215aa43e71c: function(arg0, arg1) {
|
|
4731
5356
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
4732
5357
|
return ret;
|
|
4733
5358
|
},
|
|
4734
|
-
|
|
5359
|
+
__wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
|
|
5360
|
+
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
5361
|
+
},
|
|
5362
|
+
__wbg_set_6e30c9374c26414c: function() { return handleError(function (arg0, arg1, arg2) {
|
|
4735
5363
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
4736
5364
|
return ret;
|
|
4737
5365
|
}, arguments); },
|
|
5366
|
+
__wbg_set_dca99999bba88a9a: function(arg0, arg1, arg2) {
|
|
5367
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
5368
|
+
},
|
|
4738
5369
|
__wbg_wasmdocumentnode_new: function(arg0) {
|
|
4739
5370
|
const ret = WasmDocumentNode.__wrap(arg0);
|
|
4740
5371
|
return addHeapObject(ret);
|
|
@@ -4831,12 +5462,12 @@ function __wbg_get_imports() {
|
|
|
4831
5462
|
};
|
|
4832
5463
|
}
|
|
4833
5464
|
|
|
5465
|
+
const WasmAnnotationKindFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5466
|
+
? { register: () => {}, unregister: () => {} }
|
|
5467
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmannotationkind_free(ptr, 1));
|
|
4834
5468
|
const WasmConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4835
5469
|
? { register: () => {}, unregister: () => {} }
|
|
4836
5470
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptions_free(ptr, 1));
|
|
4837
|
-
const WasmConversionOptionsBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4838
|
-
? { register: () => {}, unregister: () => {} }
|
|
4839
|
-
: new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionsbuilder_free(ptr, 1));
|
|
4840
5471
|
const WasmConversionOptionsUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4841
5472
|
? { register: () => {}, unregister: () => {} }
|
|
4842
5473
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionsupdate_free(ptr, 1));
|
|
@@ -4867,6 +5498,9 @@ const WasmImageMetadataFinalization = (typeof FinalizationRegistry === 'undefine
|
|
|
4867
5498
|
const WasmLinkMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4868
5499
|
? { register: () => {}, unregister: () => {} }
|
|
4869
5500
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmlinkmetadata_free(ptr, 1));
|
|
5501
|
+
const WasmNodeContentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5502
|
+
? { register: () => {}, unregister: () => {} }
|
|
5503
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmnodecontent_free(ptr, 1));
|
|
4870
5504
|
const WasmNodeContextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4871
5505
|
? { register: () => {}, unregister: () => {} }
|
|
4872
5506
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmnodecontext_free(ptr, 1));
|