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