@kreuzberg/html-to-markdown-wasm 3.4.0-rc.9 → 3.4.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/package.json +33 -63
- package/{dist-node → pkg/bundler}/html_to_markdown_wasm.d.ts +107 -163
- package/pkg/bundler/html_to_markdown_wasm.js +9 -0
- package/{dist → pkg/bundler}/html_to_markdown_wasm_bg.js +675 -151
- package/{dist-web → pkg/bundler}/html_to_markdown_wasm_bg.wasm +0 -0
- package/{dist-web → pkg/bundler}/html_to_markdown_wasm_bg.wasm.d.ts +52 -28
- package/{dist → pkg/bundler}/package.json +6 -5
- package/{dist → pkg/deno}/html_to_markdown_wasm.d.ts +107 -166
- package/pkg/deno/html_to_markdown_wasm.js +5481 -0
- package/{dist → pkg/deno}/html_to_markdown_wasm_bg.wasm +0 -0
- package/{dist → pkg/deno}/html_to_markdown_wasm_bg.wasm.d.ts +52 -28
- package/pkg/nodejs/html_to_markdown_wasm.d.ts +1055 -0
- package/{dist-node → pkg/nodejs}/html_to_markdown_wasm.js +676 -151
- package/{dist-node → pkg/nodejs}/html_to_markdown_wasm_bg.wasm +0 -0
- package/{dist-node → pkg/nodejs}/html_to_markdown_wasm_bg.wasm.d.ts +52 -28
- package/{dist-node → pkg/nodejs}/package.json +5 -5
- package/{dist-web → pkg/web}/html_to_markdown_wasm.d.ts +159 -191
- package/{dist-web → pkg/web}/html_to_markdown_wasm.js +675 -151
- package/pkg/web/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/web/html_to_markdown_wasm_bg.wasm.d.ts +411 -0
- package/{dist-web → pkg/web}/package.json +5 -5
- package/dist/html_to_markdown_wasm.js +0 -116
|
@@ -64,11 +64,11 @@ export class WasmConversionOptions {
|
|
|
64
64
|
}
|
|
65
65
|
/**
|
|
66
66
|
* Apply a partial update to these conversion options.
|
|
67
|
-
* @param {WasmConversionOptionsUpdate}
|
|
67
|
+
* @param {WasmConversionOptionsUpdate} update
|
|
68
68
|
*/
|
|
69
|
-
applyUpdate(
|
|
70
|
-
_assertClass(
|
|
71
|
-
var ptr0 =
|
|
69
|
+
applyUpdate(update) {
|
|
70
|
+
_assertClass(update, WasmConversionOptionsUpdate);
|
|
71
|
+
var ptr0 = update.__destroy_into_raw();
|
|
72
72
|
wasm.wasmconversionoptions_applyUpdate(this.__wbg_ptr, ptr0);
|
|
73
73
|
}
|
|
74
74
|
/**
|
|
@@ -120,11 +120,23 @@ export class WasmConversionOptions {
|
|
|
120
120
|
return ret !== 0;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
|
-
* @returns {
|
|
123
|
+
* @returns {string}
|
|
124
124
|
*/
|
|
125
125
|
get codeBlockStyle() {
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
let deferred1_0;
|
|
127
|
+
let deferred1_1;
|
|
128
|
+
try {
|
|
129
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
130
|
+
wasm.wasmconversionoptions_codeBlockStyle(retptr, this.__wbg_ptr);
|
|
131
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
132
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
133
|
+
deferred1_0 = r0;
|
|
134
|
+
deferred1_1 = r1;
|
|
135
|
+
return getStringFromWasm0(r0, r1);
|
|
136
|
+
} finally {
|
|
137
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
138
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
139
|
+
}
|
|
128
140
|
}
|
|
129
141
|
/**
|
|
130
142
|
* @returns {string}
|
|
@@ -272,18 +284,42 @@ export class WasmConversionOptions {
|
|
|
272
284
|
return WasmConversionOptions.__wrap(ret);
|
|
273
285
|
}
|
|
274
286
|
/**
|
|
275
|
-
* @returns {
|
|
287
|
+
* @returns {string}
|
|
276
288
|
*/
|
|
277
289
|
get headingStyle() {
|
|
278
|
-
|
|
279
|
-
|
|
290
|
+
let deferred1_0;
|
|
291
|
+
let deferred1_1;
|
|
292
|
+
try {
|
|
293
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
294
|
+
wasm.wasmconversionoptions_headingStyle(retptr, this.__wbg_ptr);
|
|
295
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
296
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
297
|
+
deferred1_0 = r0;
|
|
298
|
+
deferred1_1 = r1;
|
|
299
|
+
return getStringFromWasm0(r0, r1);
|
|
300
|
+
} finally {
|
|
301
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
302
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
303
|
+
}
|
|
280
304
|
}
|
|
281
305
|
/**
|
|
282
|
-
* @returns {
|
|
306
|
+
* @returns {string}
|
|
283
307
|
*/
|
|
284
308
|
get highlightStyle() {
|
|
285
|
-
|
|
286
|
-
|
|
309
|
+
let deferred1_0;
|
|
310
|
+
let deferred1_1;
|
|
311
|
+
try {
|
|
312
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
313
|
+
wasm.wasmconversionoptions_highlightStyle(retptr, this.__wbg_ptr);
|
|
314
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
315
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
316
|
+
deferred1_0 = r0;
|
|
317
|
+
deferred1_1 = r1;
|
|
318
|
+
return getStringFromWasm0(r0, r1);
|
|
319
|
+
} finally {
|
|
320
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
321
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
322
|
+
}
|
|
287
323
|
}
|
|
288
324
|
/**
|
|
289
325
|
* @returns {boolean}
|
|
@@ -316,18 +352,42 @@ export class WasmConversionOptions {
|
|
|
316
352
|
}
|
|
317
353
|
}
|
|
318
354
|
/**
|
|
319
|
-
* @returns {
|
|
355
|
+
* @returns {string}
|
|
320
356
|
*/
|
|
321
357
|
get linkStyle() {
|
|
322
|
-
|
|
323
|
-
|
|
358
|
+
let deferred1_0;
|
|
359
|
+
let deferred1_1;
|
|
360
|
+
try {
|
|
361
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
362
|
+
wasm.wasmconversionoptions_linkStyle(retptr, this.__wbg_ptr);
|
|
363
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
364
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
365
|
+
deferred1_0 = r0;
|
|
366
|
+
deferred1_1 = r1;
|
|
367
|
+
return getStringFromWasm0(r0, r1);
|
|
368
|
+
} finally {
|
|
369
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
370
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
371
|
+
}
|
|
324
372
|
}
|
|
325
373
|
/**
|
|
326
|
-
* @returns {
|
|
374
|
+
* @returns {string}
|
|
327
375
|
*/
|
|
328
376
|
get listIndentType() {
|
|
329
|
-
|
|
330
|
-
|
|
377
|
+
let deferred1_0;
|
|
378
|
+
let deferred1_1;
|
|
379
|
+
try {
|
|
380
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
381
|
+
wasm.wasmconversionoptions_listIndentType(retptr, this.__wbg_ptr);
|
|
382
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
383
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
384
|
+
deferred1_0 = r0;
|
|
385
|
+
deferred1_1 = r1;
|
|
386
|
+
return getStringFromWasm0(r0, r1);
|
|
387
|
+
} finally {
|
|
388
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
389
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
390
|
+
}
|
|
331
391
|
}
|
|
332
392
|
/**
|
|
333
393
|
* @returns {number}
|
|
@@ -424,18 +484,42 @@ export class WasmConversionOptions {
|
|
|
424
484
|
return this;
|
|
425
485
|
}
|
|
426
486
|
/**
|
|
427
|
-
* @returns {
|
|
487
|
+
* @returns {string}
|
|
428
488
|
*/
|
|
429
489
|
get newlineStyle() {
|
|
430
|
-
|
|
431
|
-
|
|
490
|
+
let deferred1_0;
|
|
491
|
+
let deferred1_1;
|
|
492
|
+
try {
|
|
493
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
494
|
+
wasm.wasmconversionoptions_newlineStyle(retptr, this.__wbg_ptr);
|
|
495
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
496
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
497
|
+
deferred1_0 = r0;
|
|
498
|
+
deferred1_1 = r1;
|
|
499
|
+
return getStringFromWasm0(r0, r1);
|
|
500
|
+
} finally {
|
|
501
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
502
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
503
|
+
}
|
|
432
504
|
}
|
|
433
505
|
/**
|
|
434
|
-
* @returns {
|
|
506
|
+
* @returns {string}
|
|
435
507
|
*/
|
|
436
508
|
get outputFormat() {
|
|
437
|
-
|
|
438
|
-
|
|
509
|
+
let deferred1_0;
|
|
510
|
+
let deferred1_1;
|
|
511
|
+
try {
|
|
512
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
513
|
+
wasm.wasmconversionoptions_outputFormat(retptr, this.__wbg_ptr);
|
|
514
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
515
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
516
|
+
deferred1_0 = r0;
|
|
517
|
+
deferred1_1 = r1;
|
|
518
|
+
return getStringFromWasm0(r0, r1);
|
|
519
|
+
} finally {
|
|
520
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
521
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
522
|
+
}
|
|
439
523
|
}
|
|
440
524
|
/**
|
|
441
525
|
* @returns {WasmPreprocessingOptions}
|
|
@@ -704,6 +788,17 @@ export class WasmConversionOptions {
|
|
|
704
788
|
const len0 = WASM_VECTOR_LEN;
|
|
705
789
|
wasm.wasmconversionoptions_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
706
790
|
}
|
|
791
|
+
/**
|
|
792
|
+
* @param {WasmVisitorHandle | null} [value]
|
|
793
|
+
*/
|
|
794
|
+
set visitor(value) {
|
|
795
|
+
let ptr0 = 0;
|
|
796
|
+
if (!isLikeNone(value)) {
|
|
797
|
+
_assertClass(value, WasmVisitorHandle);
|
|
798
|
+
ptr0 = value.__destroy_into_raw();
|
|
799
|
+
}
|
|
800
|
+
wasm.wasmconversionoptions_set_visitor(this.__wbg_ptr, ptr0);
|
|
801
|
+
}
|
|
707
802
|
/**
|
|
708
803
|
* @param {WasmWhitespaceMode} value
|
|
709
804
|
*/
|
|
@@ -810,11 +905,30 @@ export class WasmConversionOptions {
|
|
|
810
905
|
}
|
|
811
906
|
}
|
|
812
907
|
/**
|
|
813
|
-
* @returns {
|
|
908
|
+
* @returns {WasmVisitorHandle | undefined}
|
|
909
|
+
*/
|
|
910
|
+
get visitor() {
|
|
911
|
+
const ret = wasm.wasmconversionoptions_visitor(this.__wbg_ptr);
|
|
912
|
+
return ret === 0 ? undefined : WasmVisitorHandle.__wrap(ret);
|
|
913
|
+
}
|
|
914
|
+
/**
|
|
915
|
+
* @returns {string}
|
|
814
916
|
*/
|
|
815
917
|
get whitespaceMode() {
|
|
816
|
-
|
|
817
|
-
|
|
918
|
+
let deferred1_0;
|
|
919
|
+
let deferred1_1;
|
|
920
|
+
try {
|
|
921
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
922
|
+
wasm.wasmconversionoptions_whitespaceMode(retptr, this.__wbg_ptr);
|
|
923
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
924
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
925
|
+
deferred1_0 = r0;
|
|
926
|
+
deferred1_1 = r1;
|
|
927
|
+
return getStringFromWasm0(r0, r1);
|
|
928
|
+
} finally {
|
|
929
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
930
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
931
|
+
}
|
|
818
932
|
}
|
|
819
933
|
/**
|
|
820
934
|
* @returns {boolean}
|
|
@@ -918,6 +1032,20 @@ export class WasmConversionOptionsBuilder {
|
|
|
918
1032
|
const ret = wasm.wasmconversionoptionsbuilder_stripTags(this.__wbg_ptr, ptr0, len0);
|
|
919
1033
|
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
920
1034
|
}
|
|
1035
|
+
/**
|
|
1036
|
+
* Set the visitor used during conversion.
|
|
1037
|
+
* @param {WasmVisitorHandle | null} [visitor]
|
|
1038
|
+
* @returns {WasmConversionOptionsBuilder}
|
|
1039
|
+
*/
|
|
1040
|
+
visitor(visitor) {
|
|
1041
|
+
let ptr0 = 0;
|
|
1042
|
+
if (!isLikeNone(visitor)) {
|
|
1043
|
+
_assertClass(visitor, WasmVisitorHandle);
|
|
1044
|
+
ptr0 = visitor.__destroy_into_raw();
|
|
1045
|
+
}
|
|
1046
|
+
const ret = wasm.wasmconversionoptionsbuilder_visitor(this.__wbg_ptr, ptr0);
|
|
1047
|
+
return WasmConversionOptionsBuilder.__wrap(ret);
|
|
1048
|
+
}
|
|
921
1049
|
}
|
|
922
1050
|
if (Symbol.dispose) WasmConversionOptionsBuilder.prototype[Symbol.dispose] = WasmConversionOptionsBuilder.prototype.free;
|
|
923
1051
|
|
|
@@ -928,6 +1056,12 @@ if (Symbol.dispose) WasmConversionOptionsBuilder.prototype[Symbol.dispose] = Was
|
|
|
928
1056
|
* options from language-native types. Prefer [`ConversionOptionsBuilder`] for Rust code.
|
|
929
1057
|
*/
|
|
930
1058
|
export class WasmConversionOptionsUpdate {
|
|
1059
|
+
static __wrap(ptr) {
|
|
1060
|
+
const obj = Object.create(WasmConversionOptionsUpdate.prototype);
|
|
1061
|
+
obj.__wbg_ptr = ptr;
|
|
1062
|
+
WasmConversionOptionsUpdateFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1063
|
+
return obj;
|
|
1064
|
+
}
|
|
931
1065
|
__destroy_into_raw() {
|
|
932
1066
|
const ptr = this.__wbg_ptr;
|
|
933
1067
|
this.__wbg_ptr = 0;
|
|
@@ -979,11 +1113,23 @@ export class WasmConversionOptionsUpdate {
|
|
|
979
1113
|
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
980
1114
|
}
|
|
981
1115
|
/**
|
|
982
|
-
* @returns {
|
|
1116
|
+
* @returns {string | undefined}
|
|
983
1117
|
*/
|
|
984
1118
|
get codeBlockStyle() {
|
|
985
|
-
|
|
986
|
-
|
|
1119
|
+
try {
|
|
1120
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1121
|
+
wasm.wasmconversionoptionsupdate_codeBlockStyle(retptr, this.__wbg_ptr);
|
|
1122
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1123
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1124
|
+
let v1;
|
|
1125
|
+
if (r0 !== 0) {
|
|
1126
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1127
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1128
|
+
}
|
|
1129
|
+
return v1;
|
|
1130
|
+
} finally {
|
|
1131
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1132
|
+
}
|
|
987
1133
|
}
|
|
988
1134
|
/**
|
|
989
1135
|
* @returns {string | undefined}
|
|
@@ -1018,6 +1164,13 @@ export class WasmConversionOptionsUpdate {
|
|
|
1018
1164
|
const ret = wasm.wasmconversionoptionsupdate_debug(this.__wbg_ptr);
|
|
1019
1165
|
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1020
1166
|
}
|
|
1167
|
+
/**
|
|
1168
|
+
* @returns {WasmConversionOptionsUpdate}
|
|
1169
|
+
*/
|
|
1170
|
+
static default() {
|
|
1171
|
+
const ret = wasm.wasmconversionoptionsupdate_default();
|
|
1172
|
+
return WasmConversionOptionsUpdate.__wrap(ret);
|
|
1173
|
+
}
|
|
1021
1174
|
/**
|
|
1022
1175
|
* @returns {boolean | undefined}
|
|
1023
1176
|
*/
|
|
@@ -1106,18 +1259,42 @@ export class WasmConversionOptionsUpdate {
|
|
|
1106
1259
|
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
1107
1260
|
}
|
|
1108
1261
|
/**
|
|
1109
|
-
* @returns {
|
|
1262
|
+
* @returns {string | undefined}
|
|
1110
1263
|
*/
|
|
1111
1264
|
get headingStyle() {
|
|
1112
|
-
|
|
1113
|
-
|
|
1265
|
+
try {
|
|
1266
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1267
|
+
wasm.wasmconversionoptionsupdate_headingStyle(retptr, this.__wbg_ptr);
|
|
1268
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1269
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1270
|
+
let v1;
|
|
1271
|
+
if (r0 !== 0) {
|
|
1272
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1273
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1274
|
+
}
|
|
1275
|
+
return v1;
|
|
1276
|
+
} finally {
|
|
1277
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1278
|
+
}
|
|
1114
1279
|
}
|
|
1115
1280
|
/**
|
|
1116
|
-
* @returns {
|
|
1281
|
+
* @returns {string | undefined}
|
|
1117
1282
|
*/
|
|
1118
1283
|
get highlightStyle() {
|
|
1119
|
-
|
|
1120
|
-
|
|
1284
|
+
try {
|
|
1285
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1286
|
+
wasm.wasmconversionoptionsupdate_highlightStyle(retptr, this.__wbg_ptr);
|
|
1287
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1288
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1289
|
+
let v1;
|
|
1290
|
+
if (r0 !== 0) {
|
|
1291
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1292
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1293
|
+
}
|
|
1294
|
+
return v1;
|
|
1295
|
+
} finally {
|
|
1296
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1297
|
+
}
|
|
1121
1298
|
}
|
|
1122
1299
|
/**
|
|
1123
1300
|
* @returns {boolean | undefined}
|
|
@@ -1153,18 +1330,42 @@ export class WasmConversionOptionsUpdate {
|
|
|
1153
1330
|
}
|
|
1154
1331
|
}
|
|
1155
1332
|
/**
|
|
1156
|
-
* @returns {
|
|
1333
|
+
* @returns {string | undefined}
|
|
1157
1334
|
*/
|
|
1158
1335
|
get linkStyle() {
|
|
1159
|
-
|
|
1160
|
-
|
|
1336
|
+
try {
|
|
1337
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1338
|
+
wasm.wasmconversionoptionsupdate_linkStyle(retptr, this.__wbg_ptr);
|
|
1339
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1340
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1341
|
+
let v1;
|
|
1342
|
+
if (r0 !== 0) {
|
|
1343
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1344
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1345
|
+
}
|
|
1346
|
+
return v1;
|
|
1347
|
+
} finally {
|
|
1348
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1349
|
+
}
|
|
1161
1350
|
}
|
|
1162
1351
|
/**
|
|
1163
|
-
* @returns {
|
|
1352
|
+
* @returns {string | undefined}
|
|
1164
1353
|
*/
|
|
1165
1354
|
get listIndentType() {
|
|
1166
|
-
|
|
1167
|
-
|
|
1355
|
+
try {
|
|
1356
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1357
|
+
wasm.wasmconversionoptionsupdate_listIndentType(retptr, this.__wbg_ptr);
|
|
1358
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1359
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1360
|
+
let v1;
|
|
1361
|
+
if (r0 !== 0) {
|
|
1362
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1363
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1364
|
+
}
|
|
1365
|
+
return v1;
|
|
1366
|
+
} finally {
|
|
1367
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1368
|
+
}
|
|
1168
1369
|
}
|
|
1169
1370
|
/**
|
|
1170
1371
|
* @returns {number | undefined}
|
|
@@ -1268,18 +1469,42 @@ export class WasmConversionOptionsUpdate {
|
|
|
1268
1469
|
return this;
|
|
1269
1470
|
}
|
|
1270
1471
|
/**
|
|
1271
|
-
* @returns {
|
|
1472
|
+
* @returns {string | undefined}
|
|
1272
1473
|
*/
|
|
1273
1474
|
get newlineStyle() {
|
|
1274
|
-
|
|
1275
|
-
|
|
1475
|
+
try {
|
|
1476
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1477
|
+
wasm.wasmconversionoptionsupdate_newlineStyle(retptr, this.__wbg_ptr);
|
|
1478
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1479
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1480
|
+
let v1;
|
|
1481
|
+
if (r0 !== 0) {
|
|
1482
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1483
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1484
|
+
}
|
|
1485
|
+
return v1;
|
|
1486
|
+
} finally {
|
|
1487
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1488
|
+
}
|
|
1276
1489
|
}
|
|
1277
1490
|
/**
|
|
1278
|
-
* @returns {
|
|
1491
|
+
* @returns {string | undefined}
|
|
1279
1492
|
*/
|
|
1280
1493
|
get outputFormat() {
|
|
1281
|
-
|
|
1282
|
-
|
|
1494
|
+
try {
|
|
1495
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1496
|
+
wasm.wasmconversionoptionsupdate_outputFormat(retptr, this.__wbg_ptr);
|
|
1497
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1498
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1499
|
+
let v1;
|
|
1500
|
+
if (r0 !== 0) {
|
|
1501
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1502
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1503
|
+
}
|
|
1504
|
+
return v1;
|
|
1505
|
+
} finally {
|
|
1506
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1507
|
+
}
|
|
1283
1508
|
}
|
|
1284
1509
|
/**
|
|
1285
1510
|
* @returns {WasmPreprocessingOptionsUpdate | undefined}
|
|
@@ -1554,6 +1779,17 @@ export class WasmConversionOptionsUpdate {
|
|
|
1554
1779
|
var len0 = WASM_VECTOR_LEN;
|
|
1555
1780
|
wasm.wasmconversionoptionsupdate_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
1556
1781
|
}
|
|
1782
|
+
/**
|
|
1783
|
+
* @param {WasmVisitorHandle | null} [value]
|
|
1784
|
+
*/
|
|
1785
|
+
set visitor(value) {
|
|
1786
|
+
let ptr0 = 0;
|
|
1787
|
+
if (!isLikeNone(value)) {
|
|
1788
|
+
_assertClass(value, WasmVisitorHandle);
|
|
1789
|
+
ptr0 = value.__destroy_into_raw();
|
|
1790
|
+
}
|
|
1791
|
+
wasm.wasmconversionoptionsupdate_set_visitor(this.__wbg_ptr, ptr0);
|
|
1792
|
+
}
|
|
1557
1793
|
/**
|
|
1558
1794
|
* @param {WasmWhitespaceMode | null} [value]
|
|
1559
1795
|
*/
|
|
@@ -1663,11 +1899,30 @@ export class WasmConversionOptionsUpdate {
|
|
|
1663
1899
|
}
|
|
1664
1900
|
}
|
|
1665
1901
|
/**
|
|
1666
|
-
* @returns {
|
|
1902
|
+
* @returns {WasmVisitorHandle | undefined}
|
|
1903
|
+
*/
|
|
1904
|
+
get visitor() {
|
|
1905
|
+
const ret = wasm.wasmconversionoptionsupdate_visitor(this.__wbg_ptr);
|
|
1906
|
+
return ret === 0 ? undefined : WasmVisitorHandle.__wrap(ret);
|
|
1907
|
+
}
|
|
1908
|
+
/**
|
|
1909
|
+
* @returns {string | undefined}
|
|
1667
1910
|
*/
|
|
1668
1911
|
get whitespaceMode() {
|
|
1669
|
-
|
|
1670
|
-
|
|
1912
|
+
try {
|
|
1913
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1914
|
+
wasm.wasmconversionoptionsupdate_whitespaceMode(retptr, this.__wbg_ptr);
|
|
1915
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1916
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1917
|
+
let v1;
|
|
1918
|
+
if (r0 !== 0) {
|
|
1919
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1920
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1921
|
+
}
|
|
1922
|
+
return v1;
|
|
1923
|
+
} finally {
|
|
1924
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1925
|
+
}
|
|
1671
1926
|
}
|
|
1672
1927
|
/**
|
|
1673
1928
|
* @returns {boolean | undefined}
|
|
@@ -1738,6 +1993,13 @@ export class WasmConversionResult {
|
|
|
1738
1993
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1739
1994
|
}
|
|
1740
1995
|
}
|
|
1996
|
+
/**
|
|
1997
|
+
* @returns {WasmConversionResult}
|
|
1998
|
+
*/
|
|
1999
|
+
static default() {
|
|
2000
|
+
const ret = wasm.wasmconversionresult_default();
|
|
2001
|
+
return WasmConversionResult.__wrap(ret);
|
|
2002
|
+
}
|
|
1741
2003
|
/**
|
|
1742
2004
|
* @returns {WasmDocumentStructure | undefined}
|
|
1743
2005
|
*/
|
|
@@ -1769,33 +2031,24 @@ export class WasmConversionResult {
|
|
|
1769
2031
|
return WasmHtmlMetadata.__wrap(ret);
|
|
1770
2032
|
}
|
|
1771
2033
|
/**
|
|
1772
|
-
* @param {WasmHtmlMetadata | null} [metadata]
|
|
1773
2034
|
* @param {WasmTableData[] | null} [tables]
|
|
1774
|
-
* @param {string[] | null} [images]
|
|
1775
2035
|
* @param {WasmProcessingWarning[] | null} [warnings]
|
|
1776
2036
|
* @param {string | null} [content]
|
|
1777
2037
|
* @param {WasmDocumentStructure | null} [document]
|
|
1778
2038
|
*/
|
|
1779
|
-
constructor(
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
ptr0 = metadata.__destroy_into_raw();
|
|
1784
|
-
}
|
|
1785
|
-
var ptr1 = isLikeNone(tables) ? 0 : passArrayJsValueToWasm0(tables, wasm.__wbindgen_export);
|
|
2039
|
+
constructor(tables, warnings, content, document) {
|
|
2040
|
+
var ptr0 = isLikeNone(tables) ? 0 : passArrayJsValueToWasm0(tables, wasm.__wbindgen_export);
|
|
2041
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2042
|
+
var ptr1 = isLikeNone(warnings) ? 0 : passArrayJsValueToWasm0(warnings, wasm.__wbindgen_export);
|
|
1786
2043
|
var len1 = WASM_VECTOR_LEN;
|
|
1787
|
-
var ptr2 = isLikeNone(
|
|
2044
|
+
var ptr2 = isLikeNone(content) ? 0 : passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1788
2045
|
var len2 = WASM_VECTOR_LEN;
|
|
1789
|
-
|
|
1790
|
-
var len3 = WASM_VECTOR_LEN;
|
|
1791
|
-
var ptr4 = isLikeNone(content) ? 0 : passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1792
|
-
var len4 = WASM_VECTOR_LEN;
|
|
1793
|
-
let ptr5 = 0;
|
|
2046
|
+
let ptr3 = 0;
|
|
1794
2047
|
if (!isLikeNone(document)) {
|
|
1795
2048
|
_assertClass(document, WasmDocumentStructure);
|
|
1796
|
-
|
|
2049
|
+
ptr3 = document.__destroy_into_raw();
|
|
1797
2050
|
}
|
|
1798
|
-
const ret = wasm.wasmconversionresult_new(ptr0, ptr1, len1, ptr2, len2, ptr3
|
|
2051
|
+
const ret = wasm.wasmconversionresult_new(ptr0, len0, ptr1, len1, ptr2, len2, ptr3);
|
|
1799
2052
|
this.__wbg_ptr = ret;
|
|
1800
2053
|
WasmConversionResultFinalization.register(this, this.__wbg_ptr, this);
|
|
1801
2054
|
return this;
|
|
@@ -1895,7 +2148,6 @@ if (Symbol.dispose) WasmConversionResult.prototype[Symbol.dispose] = WasmConvers
|
|
|
1895
2148
|
* # Examples
|
|
1896
2149
|
*
|
|
1897
2150
|
* ```
|
|
1898
|
-
* # use html_to_markdown_rs::metadata::DocumentMetadata;
|
|
1899
2151
|
* let doc = DocumentMetadata {
|
|
1900
2152
|
* title: Some("My Article".to_string()),
|
|
1901
2153
|
* description: Some("A great article about Rust".to_string()),
|
|
@@ -1980,6 +2232,13 @@ export class WasmDocumentMetadata {
|
|
|
1980
2232
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1981
2233
|
}
|
|
1982
2234
|
}
|
|
2235
|
+
/**
|
|
2236
|
+
* @returns {WasmDocumentMetadata}
|
|
2237
|
+
*/
|
|
2238
|
+
static default() {
|
|
2239
|
+
const ret = wasm.wasmdocumentmetadata_default();
|
|
2240
|
+
return WasmDocumentMetadata.__wrap(ret);
|
|
2241
|
+
}
|
|
1983
2242
|
/**
|
|
1984
2243
|
* @returns {string | undefined}
|
|
1985
2244
|
*/
|
|
@@ -2035,7 +2294,7 @@ export class WasmDocumentMetadata {
|
|
|
2035
2294
|
}
|
|
2036
2295
|
}
|
|
2037
2296
|
/**
|
|
2038
|
-
* @returns {
|
|
2297
|
+
* @returns {any}
|
|
2039
2298
|
*/
|
|
2040
2299
|
get metaTags() {
|
|
2041
2300
|
const ret = wasm.wasmdocumentmetadata_metaTags(this.__wbg_ptr);
|
|
@@ -2075,7 +2334,7 @@ export class WasmDocumentMetadata {
|
|
|
2075
2334
|
return this;
|
|
2076
2335
|
}
|
|
2077
2336
|
/**
|
|
2078
|
-
* @returns {
|
|
2337
|
+
* @returns {any}
|
|
2079
2338
|
*/
|
|
2080
2339
|
get openGraph() {
|
|
2081
2340
|
const ret = wasm.wasmdocumentmetadata_openGraph(this.__wbg_ptr);
|
|
@@ -2162,11 +2421,23 @@ export class WasmDocumentMetadata {
|
|
|
2162
2421
|
wasm.wasmdocumentmetadata_set_twitterCard(this.__wbg_ptr, addHeapObject(value));
|
|
2163
2422
|
}
|
|
2164
2423
|
/**
|
|
2165
|
-
* @returns {
|
|
2424
|
+
* @returns {string | undefined}
|
|
2166
2425
|
*/
|
|
2167
2426
|
get textDirection() {
|
|
2168
|
-
|
|
2169
|
-
|
|
2427
|
+
try {
|
|
2428
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2429
|
+
wasm.wasmdocumentmetadata_textDirection(retptr, this.__wbg_ptr);
|
|
2430
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2431
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2432
|
+
let v1;
|
|
2433
|
+
if (r0 !== 0) {
|
|
2434
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
2435
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
2436
|
+
}
|
|
2437
|
+
return v1;
|
|
2438
|
+
} finally {
|
|
2439
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2440
|
+
}
|
|
2170
2441
|
}
|
|
2171
2442
|
/**
|
|
2172
2443
|
* @returns {string | undefined}
|
|
@@ -2188,7 +2459,7 @@ export class WasmDocumentMetadata {
|
|
|
2188
2459
|
}
|
|
2189
2460
|
}
|
|
2190
2461
|
/**
|
|
2191
|
-
* @returns {
|
|
2462
|
+
* @returns {any}
|
|
2192
2463
|
*/
|
|
2193
2464
|
get twitterCard() {
|
|
2194
2465
|
const ret = wasm.wasmdocumentmetadata_twitterCard(this.__wbg_ptr);
|
|
@@ -2263,11 +2534,30 @@ export class WasmDocumentNode {
|
|
|
2263
2534
|
}
|
|
2264
2535
|
}
|
|
2265
2536
|
/**
|
|
2266
|
-
* @returns {
|
|
2537
|
+
* @returns {string}
|
|
2267
2538
|
*/
|
|
2268
2539
|
get content() {
|
|
2269
|
-
|
|
2270
|
-
|
|
2540
|
+
let deferred1_0;
|
|
2541
|
+
let deferred1_1;
|
|
2542
|
+
try {
|
|
2543
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2544
|
+
wasm.wasmdocumentnode_content(retptr, this.__wbg_ptr);
|
|
2545
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2546
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2547
|
+
deferred1_0 = r0;
|
|
2548
|
+
deferred1_1 = r1;
|
|
2549
|
+
return getStringFromWasm0(r0, r1);
|
|
2550
|
+
} finally {
|
|
2551
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2552
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2553
|
+
}
|
|
2554
|
+
}
|
|
2555
|
+
/**
|
|
2556
|
+
* @returns {WasmDocumentNode}
|
|
2557
|
+
*/
|
|
2558
|
+
static default() {
|
|
2559
|
+
const ret = wasm.wasmdocumentnode_default();
|
|
2560
|
+
return WasmDocumentNode.__wrap(ret);
|
|
2271
2561
|
}
|
|
2272
2562
|
/**
|
|
2273
2563
|
* @returns {string}
|
|
@@ -2382,6 +2672,13 @@ export class WasmDocumentStructure {
|
|
|
2382
2672
|
const ptr = this.__destroy_into_raw();
|
|
2383
2673
|
wasm.__wbg_wasmdocumentstructure_free(ptr, 0);
|
|
2384
2674
|
}
|
|
2675
|
+
/**
|
|
2676
|
+
* @returns {WasmDocumentStructure}
|
|
2677
|
+
*/
|
|
2678
|
+
static default() {
|
|
2679
|
+
const ret = wasm.wasmdocumentstructure_default();
|
|
2680
|
+
return WasmDocumentStructure.__wrap(ret);
|
|
2681
|
+
}
|
|
2385
2682
|
/**
|
|
2386
2683
|
* @param {WasmDocumentNode[]} nodes
|
|
2387
2684
|
* @param {string | null} [source_format]
|
|
@@ -2509,6 +2806,13 @@ export class WasmGridCell {
|
|
|
2509
2806
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2510
2807
|
}
|
|
2511
2808
|
}
|
|
2809
|
+
/**
|
|
2810
|
+
* @returns {WasmGridCell}
|
|
2811
|
+
*/
|
|
2812
|
+
static default() {
|
|
2813
|
+
const ret = wasm.wasmgridcell_default();
|
|
2814
|
+
return WasmGridCell.__wrap(ret);
|
|
2815
|
+
}
|
|
2512
2816
|
/**
|
|
2513
2817
|
* @returns {boolean}
|
|
2514
2818
|
*/
|
|
@@ -2596,7 +2900,6 @@ if (Symbol.dispose) WasmGridCell.prototype[Symbol.dispose] = WasmGridCell.protot
|
|
|
2596
2900
|
* # Examples
|
|
2597
2901
|
*
|
|
2598
2902
|
* ```
|
|
2599
|
-
* # use html_to_markdown_rs::metadata::HeaderMetadata;
|
|
2600
2903
|
* let header = HeaderMetadata {
|
|
2601
2904
|
* level: 1,
|
|
2602
2905
|
* text: "Main Title".to_string(),
|
|
@@ -2632,6 +2935,13 @@ export class WasmHeaderMetadata {
|
|
|
2632
2935
|
const ptr = this.__destroy_into_raw();
|
|
2633
2936
|
wasm.__wbg_wasmheadermetadata_free(ptr, 0);
|
|
2634
2937
|
}
|
|
2938
|
+
/**
|
|
2939
|
+
* @returns {WasmHeaderMetadata}
|
|
2940
|
+
*/
|
|
2941
|
+
static default() {
|
|
2942
|
+
const ret = wasm.wasmheadermetadata_default();
|
|
2943
|
+
return WasmHeaderMetadata.__wrap(ret);
|
|
2944
|
+
}
|
|
2635
2945
|
/**
|
|
2636
2946
|
* @returns {number}
|
|
2637
2947
|
*/
|
|
@@ -2675,7 +2985,6 @@ export class WasmHeaderMetadata {
|
|
|
2675
2985
|
* # Examples
|
|
2676
2986
|
*
|
|
2677
2987
|
* ```
|
|
2678
|
-
* # use html_to_markdown_rs::metadata::HeaderMetadata;
|
|
2679
2988
|
* let valid = HeaderMetadata {
|
|
2680
2989
|
* level: 3,
|
|
2681
2990
|
* text: "Title".to_string(),
|
|
@@ -2814,7 +3123,6 @@ export const WasmHighlightStyle = Object.freeze({
|
|
|
2814
3123
|
* # Examples
|
|
2815
3124
|
*
|
|
2816
3125
|
* ```
|
|
2817
|
-
* # use html_to_markdown_rs::metadata::HtmlMetadata;
|
|
2818
3126
|
* let metadata = HtmlMetadata {
|
|
2819
3127
|
* document: Default::default(),
|
|
2820
3128
|
* headers: Vec::new(),
|
|
@@ -2843,6 +3151,13 @@ export class WasmHtmlMetadata {
|
|
|
2843
3151
|
const ptr = this.__destroy_into_raw();
|
|
2844
3152
|
wasm.__wbg_wasmhtmlmetadata_free(ptr, 0);
|
|
2845
3153
|
}
|
|
3154
|
+
/**
|
|
3155
|
+
* @returns {WasmHtmlMetadata}
|
|
3156
|
+
*/
|
|
3157
|
+
static default() {
|
|
3158
|
+
const ret = wasm.wasmhtmlmetadata_default();
|
|
3159
|
+
return WasmHtmlMetadata.__wrap(ret);
|
|
3160
|
+
}
|
|
2846
3161
|
/**
|
|
2847
3162
|
* @returns {WasmDocumentMetadata}
|
|
2848
3163
|
*/
|
|
@@ -2992,7 +3307,6 @@ if (Symbol.dispose) WasmHtmlMetadata.prototype[Symbol.dispose] = WasmHtmlMetadat
|
|
|
2992
3307
|
* # Examples
|
|
2993
3308
|
*
|
|
2994
3309
|
* ```
|
|
2995
|
-
* # use html_to_markdown_rs::metadata::{ImageMetadata, ImageType};
|
|
2996
3310
|
* let img = ImageMetadata {
|
|
2997
3311
|
* src: "https://example.com/image.jpg".to_string(),
|
|
2998
3312
|
* alt: Some("An example image".to_string()),
|
|
@@ -3048,12 +3362,19 @@ export class WasmImageMetadata {
|
|
|
3048
3362
|
}
|
|
3049
3363
|
}
|
|
3050
3364
|
/**
|
|
3051
|
-
* @returns {
|
|
3365
|
+
* @returns {any}
|
|
3052
3366
|
*/
|
|
3053
3367
|
get attributes() {
|
|
3054
3368
|
const ret = wasm.wasmimagemetadata_attributes(this.__wbg_ptr);
|
|
3055
3369
|
return takeObject(ret);
|
|
3056
3370
|
}
|
|
3371
|
+
/**
|
|
3372
|
+
* @returns {WasmImageMetadata}
|
|
3373
|
+
*/
|
|
3374
|
+
static default() {
|
|
3375
|
+
const ret = wasm.wasmimagemetadata_default();
|
|
3376
|
+
return WasmImageMetadata.__wrap(ret);
|
|
3377
|
+
}
|
|
3057
3378
|
/**
|
|
3058
3379
|
* @returns {Uint32Array | undefined}
|
|
3059
3380
|
*/
|
|
@@ -3074,11 +3395,23 @@ export class WasmImageMetadata {
|
|
|
3074
3395
|
}
|
|
3075
3396
|
}
|
|
3076
3397
|
/**
|
|
3077
|
-
* @returns {
|
|
3398
|
+
* @returns {string}
|
|
3078
3399
|
*/
|
|
3079
3400
|
get imageType() {
|
|
3080
|
-
|
|
3081
|
-
|
|
3401
|
+
let deferred1_0;
|
|
3402
|
+
let deferred1_1;
|
|
3403
|
+
try {
|
|
3404
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3405
|
+
wasm.wasmimagemetadata_imageType(retptr, this.__wbg_ptr);
|
|
3406
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3407
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3408
|
+
deferred1_0 = r0;
|
|
3409
|
+
deferred1_1 = r1;
|
|
3410
|
+
return getStringFromWasm0(r0, r1);
|
|
3411
|
+
} finally {
|
|
3412
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3413
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3414
|
+
}
|
|
3082
3415
|
}
|
|
3083
3416
|
/**
|
|
3084
3417
|
* @param {string} src
|
|
@@ -3208,7 +3541,6 @@ export const WasmImageType = Object.freeze({
|
|
|
3208
3541
|
* # Examples
|
|
3209
3542
|
*
|
|
3210
3543
|
* ```
|
|
3211
|
-
* # use html_to_markdown_rs::metadata::{LinkMetadata, LinkType};
|
|
3212
3544
|
* let link = LinkMetadata {
|
|
3213
3545
|
* href: "https://example.com".to_string(),
|
|
3214
3546
|
* text: "Example".to_string(),
|
|
@@ -3246,7 +3578,7 @@ export class WasmLinkMetadata {
|
|
|
3246
3578
|
wasm.__wbg_wasmlinkmetadata_free(ptr, 0);
|
|
3247
3579
|
}
|
|
3248
3580
|
/**
|
|
3249
|
-
* @returns {
|
|
3581
|
+
* @returns {any}
|
|
3250
3582
|
*/
|
|
3251
3583
|
get attributes() {
|
|
3252
3584
|
const ret = wasm.wasmlinkmetadata_attributes(this.__wbg_ptr);
|
|
@@ -3266,7 +3598,6 @@ export class WasmLinkMetadata {
|
|
|
3266
3598
|
* # Examples
|
|
3267
3599
|
*
|
|
3268
3600
|
* ```
|
|
3269
|
-
* # use html_to_markdown_rs::metadata::{LinkMetadata, LinkType};
|
|
3270
3601
|
* assert_eq!(LinkMetadata::classify_link("#section"), LinkType::Anchor);
|
|
3271
3602
|
* assert_eq!(LinkMetadata::classify_link("mailto:test@example.com"), LinkType::Email);
|
|
3272
3603
|
* assert_eq!(LinkMetadata::classify_link("tel:+1234567890"), LinkType::Phone);
|
|
@@ -3281,6 +3612,13 @@ export class WasmLinkMetadata {
|
|
|
3281
3612
|
const ret = wasm.wasmlinkmetadata_classifyLink(ptr0, len0);
|
|
3282
3613
|
return ret;
|
|
3283
3614
|
}
|
|
3615
|
+
/**
|
|
3616
|
+
* @returns {WasmLinkMetadata}
|
|
3617
|
+
*/
|
|
3618
|
+
static default() {
|
|
3619
|
+
const ret = wasm.wasmlinkmetadata_default();
|
|
3620
|
+
return WasmLinkMetadata.__wrap(ret);
|
|
3621
|
+
}
|
|
3284
3622
|
/**
|
|
3285
3623
|
* @returns {string}
|
|
3286
3624
|
*/
|
|
@@ -3301,11 +3639,23 @@ export class WasmLinkMetadata {
|
|
|
3301
3639
|
}
|
|
3302
3640
|
}
|
|
3303
3641
|
/**
|
|
3304
|
-
* @returns {
|
|
3642
|
+
* @returns {string}
|
|
3305
3643
|
*/
|
|
3306
3644
|
get linkType() {
|
|
3307
|
-
|
|
3308
|
-
|
|
3645
|
+
let deferred1_0;
|
|
3646
|
+
let deferred1_1;
|
|
3647
|
+
try {
|
|
3648
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3649
|
+
wasm.wasmlinkmetadata_linkType(retptr, this.__wbg_ptr);
|
|
3650
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3651
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3652
|
+
deferred1_0 = r0;
|
|
3653
|
+
deferred1_1 = r1;
|
|
3654
|
+
return getStringFromWasm0(r0, r1);
|
|
3655
|
+
} finally {
|
|
3656
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3657
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3658
|
+
}
|
|
3309
3659
|
}
|
|
3310
3660
|
/**
|
|
3311
3661
|
* @param {string} href
|
|
@@ -3508,6 +3858,12 @@ export const WasmNodeContent = Object.freeze({
|
|
|
3508
3858
|
* including its type, attributes, position in the DOM tree, and parent context.
|
|
3509
3859
|
*/
|
|
3510
3860
|
export class WasmNodeContext {
|
|
3861
|
+
static __wrap(ptr) {
|
|
3862
|
+
const obj = Object.create(WasmNodeContext.prototype);
|
|
3863
|
+
obj.__wbg_ptr = ptr;
|
|
3864
|
+
WasmNodeContextFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
3865
|
+
return obj;
|
|
3866
|
+
}
|
|
3511
3867
|
__destroy_into_raw() {
|
|
3512
3868
|
const ptr = this.__wbg_ptr;
|
|
3513
3869
|
this.__wbg_ptr = 0;
|
|
@@ -3519,12 +3875,19 @@ export class WasmNodeContext {
|
|
|
3519
3875
|
wasm.__wbg_wasmnodecontext_free(ptr, 0);
|
|
3520
3876
|
}
|
|
3521
3877
|
/**
|
|
3522
|
-
* @returns {
|
|
3878
|
+
* @returns {any}
|
|
3523
3879
|
*/
|
|
3524
3880
|
get attributes() {
|
|
3525
3881
|
const ret = wasm.wasmnodecontext_attributes(this.__wbg_ptr);
|
|
3526
3882
|
return takeObject(ret);
|
|
3527
3883
|
}
|
|
3884
|
+
/**
|
|
3885
|
+
* @returns {WasmNodeContext}
|
|
3886
|
+
*/
|
|
3887
|
+
static default() {
|
|
3888
|
+
const ret = wasm.wasmnodecontext_default();
|
|
3889
|
+
return WasmNodeContext.__wrap(ret);
|
|
3890
|
+
}
|
|
3528
3891
|
/**
|
|
3529
3892
|
* @returns {number}
|
|
3530
3893
|
*/
|
|
@@ -3566,11 +3929,23 @@ export class WasmNodeContext {
|
|
|
3566
3929
|
return this;
|
|
3567
3930
|
}
|
|
3568
3931
|
/**
|
|
3569
|
-
* @returns {
|
|
3932
|
+
* @returns {string}
|
|
3570
3933
|
*/
|
|
3571
3934
|
get nodeType() {
|
|
3572
|
-
|
|
3573
|
-
|
|
3935
|
+
let deferred1_0;
|
|
3936
|
+
let deferred1_1;
|
|
3937
|
+
try {
|
|
3938
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3939
|
+
wasm.wasmnodecontext_nodeType(retptr, this.__wbg_ptr);
|
|
3940
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
3941
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
3942
|
+
deferred1_0 = r0;
|
|
3943
|
+
deferred1_1 = r1;
|
|
3944
|
+
return getStringFromWasm0(r0, r1);
|
|
3945
|
+
} finally {
|
|
3946
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3947
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
3948
|
+
}
|
|
3574
3949
|
}
|
|
3575
3950
|
/**
|
|
3576
3951
|
* @returns {string | undefined}
|
|
@@ -3798,11 +4173,11 @@ export class WasmPreprocessingOptions {
|
|
|
3798
4173
|
* # Arguments
|
|
3799
4174
|
*
|
|
3800
4175
|
* * `update` - Partial preprocessing options update
|
|
3801
|
-
* @param {WasmPreprocessingOptionsUpdate}
|
|
4176
|
+
* @param {WasmPreprocessingOptionsUpdate} update
|
|
3802
4177
|
*/
|
|
3803
|
-
applyUpdate(
|
|
3804
|
-
_assertClass(
|
|
3805
|
-
var ptr0 =
|
|
4178
|
+
applyUpdate(update) {
|
|
4179
|
+
_assertClass(update, WasmPreprocessingOptionsUpdate);
|
|
4180
|
+
var ptr0 = update.__destroy_into_raw();
|
|
3806
4181
|
wasm.wasmpreprocessingoptions_applyUpdate(this.__wbg_ptr, ptr0);
|
|
3807
4182
|
}
|
|
3808
4183
|
/**
|
|
@@ -3864,11 +4239,23 @@ export class WasmPreprocessingOptions {
|
|
|
3864
4239
|
return this;
|
|
3865
4240
|
}
|
|
3866
4241
|
/**
|
|
3867
|
-
* @returns {
|
|
4242
|
+
* @returns {string}
|
|
3868
4243
|
*/
|
|
3869
4244
|
get preset() {
|
|
3870
|
-
|
|
3871
|
-
|
|
4245
|
+
let deferred1_0;
|
|
4246
|
+
let deferred1_1;
|
|
4247
|
+
try {
|
|
4248
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4249
|
+
wasm.wasmpreprocessingoptions_preset(retptr, this.__wbg_ptr);
|
|
4250
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4251
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4252
|
+
deferred1_0 = r0;
|
|
4253
|
+
deferred1_1 = r1;
|
|
4254
|
+
return getStringFromWasm0(r0, r1);
|
|
4255
|
+
} finally {
|
|
4256
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4257
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4258
|
+
}
|
|
3872
4259
|
}
|
|
3873
4260
|
/**
|
|
3874
4261
|
* @returns {boolean}
|
|
@@ -3935,6 +4322,13 @@ export class WasmPreprocessingOptionsUpdate {
|
|
|
3935
4322
|
const ptr = this.__destroy_into_raw();
|
|
3936
4323
|
wasm.__wbg_wasmpreprocessingoptionsupdate_free(ptr, 0);
|
|
3937
4324
|
}
|
|
4325
|
+
/**
|
|
4326
|
+
* @returns {WasmPreprocessingOptionsUpdate}
|
|
4327
|
+
*/
|
|
4328
|
+
static default() {
|
|
4329
|
+
const ret = wasm.wasmpreprocessingoptionsupdate_default();
|
|
4330
|
+
return WasmPreprocessingOptionsUpdate.__wrap(ret);
|
|
4331
|
+
}
|
|
3938
4332
|
/**
|
|
3939
4333
|
* @returns {boolean | undefined}
|
|
3940
4334
|
*/
|
|
@@ -3955,11 +4349,23 @@ export class WasmPreprocessingOptionsUpdate {
|
|
|
3955
4349
|
return this;
|
|
3956
4350
|
}
|
|
3957
4351
|
/**
|
|
3958
|
-
* @returns {
|
|
4352
|
+
* @returns {string | undefined}
|
|
3959
4353
|
*/
|
|
3960
4354
|
get preset() {
|
|
3961
|
-
|
|
3962
|
-
|
|
4355
|
+
try {
|
|
4356
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4357
|
+
wasm.wasmpreprocessingoptionsupdate_preset(retptr, this.__wbg_ptr);
|
|
4358
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4359
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4360
|
+
let v1;
|
|
4361
|
+
if (r0 !== 0) {
|
|
4362
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
4363
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
4364
|
+
}
|
|
4365
|
+
return v1;
|
|
4366
|
+
} finally {
|
|
4367
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4368
|
+
}
|
|
3963
4369
|
}
|
|
3964
4370
|
/**
|
|
3965
4371
|
* @returns {boolean | undefined}
|
|
@@ -4041,11 +4447,30 @@ export class WasmProcessingWarning {
|
|
|
4041
4447
|
wasm.__wbg_wasmprocessingwarning_free(ptr, 0);
|
|
4042
4448
|
}
|
|
4043
4449
|
/**
|
|
4044
|
-
* @returns {
|
|
4450
|
+
* @returns {WasmProcessingWarning}
|
|
4451
|
+
*/
|
|
4452
|
+
static default() {
|
|
4453
|
+
const ret = wasm.wasmprocessingwarning_default();
|
|
4454
|
+
return WasmProcessingWarning.__wrap(ret);
|
|
4455
|
+
}
|
|
4456
|
+
/**
|
|
4457
|
+
* @returns {string}
|
|
4045
4458
|
*/
|
|
4046
4459
|
get kind() {
|
|
4047
|
-
|
|
4048
|
-
|
|
4460
|
+
let deferred1_0;
|
|
4461
|
+
let deferred1_1;
|
|
4462
|
+
try {
|
|
4463
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4464
|
+
wasm.wasmprocessingwarning_kind(retptr, this.__wbg_ptr);
|
|
4465
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4466
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4467
|
+
deferred1_0 = r0;
|
|
4468
|
+
deferred1_1 = r1;
|
|
4469
|
+
return getStringFromWasm0(r0, r1);
|
|
4470
|
+
} finally {
|
|
4471
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4472
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4473
|
+
}
|
|
4049
4474
|
}
|
|
4050
4475
|
/**
|
|
4051
4476
|
* @returns {string}
|
|
@@ -4104,7 +4529,6 @@ if (Symbol.dispose) WasmProcessingWarning.prototype[Symbol.dispose] = WasmProces
|
|
|
4104
4529
|
* # Examples
|
|
4105
4530
|
*
|
|
4106
4531
|
* ```
|
|
4107
|
-
* # use html_to_markdown_rs::metadata::{StructuredData, StructuredDataType};
|
|
4108
4532
|
* let schema = StructuredData {
|
|
4109
4533
|
* data_type: StructuredDataType::JsonLd,
|
|
4110
4534
|
* raw_json: r#"{"@context":"https://schema.org","@type":"Article"}"#.to_string(),
|
|
@@ -4138,11 +4562,30 @@ export class WasmStructuredData {
|
|
|
4138
4562
|
wasm.__wbg_wasmstructureddata_free(ptr, 0);
|
|
4139
4563
|
}
|
|
4140
4564
|
/**
|
|
4141
|
-
* @returns {
|
|
4565
|
+
* @returns {string}
|
|
4142
4566
|
*/
|
|
4143
4567
|
get dataType() {
|
|
4144
|
-
|
|
4145
|
-
|
|
4568
|
+
let deferred1_0;
|
|
4569
|
+
let deferred1_1;
|
|
4570
|
+
try {
|
|
4571
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4572
|
+
wasm.wasmstructureddata_dataType(retptr, this.__wbg_ptr);
|
|
4573
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4574
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4575
|
+
deferred1_0 = r0;
|
|
4576
|
+
deferred1_1 = r1;
|
|
4577
|
+
return getStringFromWasm0(r0, r1);
|
|
4578
|
+
} finally {
|
|
4579
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4580
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4581
|
+
}
|
|
4582
|
+
}
|
|
4583
|
+
/**
|
|
4584
|
+
* @returns {WasmStructuredData}
|
|
4585
|
+
*/
|
|
4586
|
+
static default() {
|
|
4587
|
+
const ret = wasm.wasmstructureddata_default();
|
|
4588
|
+
return WasmStructuredData.__wrap(ret);
|
|
4146
4589
|
}
|
|
4147
4590
|
/**
|
|
4148
4591
|
* @param {WasmStructuredDataType} data_type
|
|
@@ -4260,6 +4703,13 @@ export class WasmTableData {
|
|
|
4260
4703
|
const ptr = this.__destroy_into_raw();
|
|
4261
4704
|
wasm.__wbg_wasmtabledata_free(ptr, 0);
|
|
4262
4705
|
}
|
|
4706
|
+
/**
|
|
4707
|
+
* @returns {WasmTableData}
|
|
4708
|
+
*/
|
|
4709
|
+
static default() {
|
|
4710
|
+
const ret = wasm.wasmtabledata_default();
|
|
4711
|
+
return WasmTableData.__wrap(ret);
|
|
4712
|
+
}
|
|
4263
4713
|
/**
|
|
4264
4714
|
* @returns {WasmTableGrid}
|
|
4265
4715
|
*/
|
|
@@ -4362,6 +4812,13 @@ export class WasmTableGrid {
|
|
|
4362
4812
|
const ret = wasm.wasmtablegrid_cols(this.__wbg_ptr);
|
|
4363
4813
|
return ret >>> 0;
|
|
4364
4814
|
}
|
|
4815
|
+
/**
|
|
4816
|
+
* @returns {WasmTableGrid}
|
|
4817
|
+
*/
|
|
4818
|
+
static default() {
|
|
4819
|
+
const ret = wasm.wasmtablegrid_default();
|
|
4820
|
+
return WasmTableGrid.__wrap(ret);
|
|
4821
|
+
}
|
|
4365
4822
|
/**
|
|
4366
4823
|
* @param {number | null} [rows]
|
|
4367
4824
|
* @param {number | null} [cols]
|
|
@@ -4433,6 +4890,13 @@ export class WasmTextAnnotation {
|
|
|
4433
4890
|
const ptr = this.__destroy_into_raw();
|
|
4434
4891
|
wasm.__wbg_wasmtextannotation_free(ptr, 0);
|
|
4435
4892
|
}
|
|
4893
|
+
/**
|
|
4894
|
+
* @returns {WasmTextAnnotation}
|
|
4895
|
+
*/
|
|
4896
|
+
static default() {
|
|
4897
|
+
const ret = wasm.wasmtextannotation_default();
|
|
4898
|
+
return WasmTextAnnotation.__wrap(ret);
|
|
4899
|
+
}
|
|
4436
4900
|
/**
|
|
4437
4901
|
* @returns {number}
|
|
4438
4902
|
*/
|
|
@@ -4441,11 +4905,23 @@ export class WasmTextAnnotation {
|
|
|
4441
4905
|
return ret >>> 0;
|
|
4442
4906
|
}
|
|
4443
4907
|
/**
|
|
4444
|
-
* @returns {
|
|
4908
|
+
* @returns {string}
|
|
4445
4909
|
*/
|
|
4446
4910
|
get kind() {
|
|
4447
|
-
|
|
4448
|
-
|
|
4911
|
+
let deferred1_0;
|
|
4912
|
+
let deferred1_1;
|
|
4913
|
+
try {
|
|
4914
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4915
|
+
wasm.wasmtextannotation_kind(retptr, this.__wbg_ptr);
|
|
4916
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4917
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4918
|
+
deferred1_0 = r0;
|
|
4919
|
+
deferred1_1 = r1;
|
|
4920
|
+
return getStringFromWasm0(r0, r1);
|
|
4921
|
+
} finally {
|
|
4922
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4923
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
4924
|
+
}
|
|
4449
4925
|
}
|
|
4450
4926
|
/**
|
|
4451
4927
|
* @param {number} start
|
|
@@ -4514,6 +4990,42 @@ export const WasmVisitResult = Object.freeze({
|
|
|
4514
4990
|
Error: 4, "4": "Error",
|
|
4515
4991
|
});
|
|
4516
4992
|
|
|
4993
|
+
/**
|
|
4994
|
+
* Type alias for a visitor handle (`Arc`-wrapped `Mutex` for thread-safe shared mutation).
|
|
4995
|
+
*
|
|
4996
|
+
* `Send + Sync` so that types embedding a `VisitorHandle` (e.g. `ConversionOptions`)
|
|
4997
|
+
* can be shared across threads — required by callers that stash configs inside
|
|
4998
|
+
* axum/rmcp/tokio Send-bound contexts.
|
|
4999
|
+
*/
|
|
5000
|
+
export class WasmVisitorHandle {
|
|
5001
|
+
static __wrap(ptr) {
|
|
5002
|
+
const obj = Object.create(WasmVisitorHandle.prototype);
|
|
5003
|
+
obj.__wbg_ptr = ptr;
|
|
5004
|
+
WasmVisitorHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
5005
|
+
return obj;
|
|
5006
|
+
}
|
|
5007
|
+
__destroy_into_raw() {
|
|
5008
|
+
const ptr = this.__wbg_ptr;
|
|
5009
|
+
this.__wbg_ptr = 0;
|
|
5010
|
+
WasmVisitorHandleFinalization.unregister(this);
|
|
5011
|
+
return ptr;
|
|
5012
|
+
}
|
|
5013
|
+
free() {
|
|
5014
|
+
const ptr = this.__destroy_into_raw();
|
|
5015
|
+
wasm.__wbg_wasmvisitorhandle_free(ptr, 0);
|
|
5016
|
+
}
|
|
5017
|
+
/**
|
|
5018
|
+
* @param {any} visitor
|
|
5019
|
+
*/
|
|
5020
|
+
constructor(visitor) {
|
|
5021
|
+
const ret = wasm.wasmvisitorhandle_new(addHeapObject(visitor));
|
|
5022
|
+
this.__wbg_ptr = ret;
|
|
5023
|
+
WasmVisitorHandleFinalization.register(this, this.__wbg_ptr, this);
|
|
5024
|
+
return this;
|
|
5025
|
+
}
|
|
5026
|
+
}
|
|
5027
|
+
if (Symbol.dispose) WasmVisitorHandle.prototype[Symbol.dispose] = WasmVisitorHandle.prototype.free;
|
|
5028
|
+
|
|
4517
5029
|
/**
|
|
4518
5030
|
* Categories of processing warnings.
|
|
4519
5031
|
* @enum {0 | 1 | 2 | 3 | 4 | 5}
|
|
@@ -4539,12 +5051,32 @@ export const WasmWhitespaceMode = Object.freeze({
|
|
|
4539
5051
|
});
|
|
4540
5052
|
|
|
4541
5053
|
/**
|
|
5054
|
+
* Convert HTML to Markdown, returning a [`ConversionResult`] with content, metadata, images,
|
|
5055
|
+
* and warnings.
|
|
5056
|
+
*
|
|
5057
|
+
* # Arguments
|
|
5058
|
+
*
|
|
5059
|
+
* * `html` — the HTML string to convert.
|
|
5060
|
+
* * `options` — optional conversion options. Defaults to [`ConversionOptions::default`].
|
|
5061
|
+
*
|
|
5062
|
+
* # Example
|
|
5063
|
+
*
|
|
5064
|
+
* ```
|
|
5065
|
+
* use html_to_markdown_rs::convert;
|
|
5066
|
+
*
|
|
5067
|
+
* let html = "<h1>Hello World</h1>";
|
|
5068
|
+
* let result = convert(html, None).unwrap();
|
|
5069
|
+
* assert!(result.content.as_deref().unwrap_or("").contains("Hello World"));
|
|
5070
|
+
* ```
|
|
5071
|
+
*
|
|
5072
|
+
* # Errors
|
|
5073
|
+
*
|
|
5074
|
+
* Returns an error if HTML parsing fails or if the input contains invalid UTF-8.
|
|
4542
5075
|
* @param {string} html
|
|
4543
5076
|
* @param {WasmConversionOptions | null} [options]
|
|
4544
|
-
* @param {any | null} [visitor]
|
|
4545
5077
|
* @returns {WasmConversionResult}
|
|
4546
5078
|
*/
|
|
4547
|
-
export function convert(html, options
|
|
5079
|
+
export function convert(html, options) {
|
|
4548
5080
|
try {
|
|
4549
5081
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
4550
5082
|
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -4554,7 +5086,7 @@ export function convert(html, options, visitor) {
|
|
|
4554
5086
|
_assertClass(options, WasmConversionOptions);
|
|
4555
5087
|
ptr1 = options.__destroy_into_raw();
|
|
4556
5088
|
}
|
|
4557
|
-
wasm.convert(retptr, ptr0, len0, ptr1
|
|
5089
|
+
wasm.convert(retptr, ptr0, len0, ptr1);
|
|
4558
5090
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
4559
5091
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
4560
5092
|
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
@@ -4566,23 +5098,20 @@ export function convert(html, options, visitor) {
|
|
|
4566
5098
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
4567
5099
|
}
|
|
4568
5100
|
}
|
|
4569
|
-
export function
|
|
4570
|
-
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
4571
|
-
return addHeapObject(ret);
|
|
4572
|
-
}
|
|
4573
|
-
export function __wbg___wbindgen_is_function_2f0fd7ceb86e64c5(arg0) {
|
|
5101
|
+
export function __wbg___wbindgen_is_function_5cd60d5cf78b4eef(arg0) {
|
|
4574
5102
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
4575
5103
|
return ret;
|
|
4576
5104
|
}
|
|
4577
|
-
export function
|
|
4578
|
-
const
|
|
5105
|
+
export function __wbg___wbindgen_is_object_b4593df85baada48(arg0) {
|
|
5106
|
+
const val = getObject(arg0);
|
|
5107
|
+
const ret = typeof(val) === 'object' && val !== null;
|
|
4579
5108
|
return ret;
|
|
4580
5109
|
}
|
|
4581
|
-
export function
|
|
5110
|
+
export function __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5(arg0) {
|
|
4582
5111
|
const ret = getObject(arg0) === undefined;
|
|
4583
5112
|
return ret;
|
|
4584
5113
|
}
|
|
4585
|
-
export function
|
|
5114
|
+
export function __wbg___wbindgen_string_get_d109740c0d18f4d7(arg0, arg1) {
|
|
4586
5115
|
const obj = getObject(arg1);
|
|
4587
5116
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
4588
5117
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -4590,48 +5119,44 @@ export function __wbg___wbindgen_string_get_965592073e5d848c(arg0, arg1) {
|
|
|
4590
5119
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
4591
5120
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
4592
5121
|
}
|
|
4593
|
-
export function
|
|
5122
|
+
export function __wbg___wbindgen_throw_9c31b086c2b26051(arg0, arg1) {
|
|
4594
5123
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
4595
5124
|
}
|
|
4596
|
-
export function
|
|
5125
|
+
export function __wbg_apply_b593fcd87094fd23() { return handleError(function (arg0, arg1, arg2) {
|
|
4597
5126
|
const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
|
|
4598
5127
|
return addHeapObject(ret);
|
|
4599
5128
|
}, arguments); }
|
|
4600
|
-
export function
|
|
5129
|
+
export function __wbg_get_dcf82ab8aad1a593() { return handleError(function (arg0, arg1) {
|
|
4601
5130
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
4602
5131
|
return addHeapObject(ret);
|
|
4603
5132
|
}, arguments); }
|
|
4604
|
-
export function
|
|
5133
|
+
export function __wbg_has_ef192b1f278770eb() { return handleError(function (arg0, arg1) {
|
|
4605
5134
|
const ret = Reflect.has(getObject(arg0), getObject(arg1));
|
|
4606
5135
|
return ret;
|
|
4607
5136
|
}, arguments); }
|
|
4608
|
-
export function
|
|
5137
|
+
export function __wbg_new_02d162bc6cf02f60() {
|
|
4609
5138
|
const ret = new Object();
|
|
4610
5139
|
return addHeapObject(ret);
|
|
4611
5140
|
}
|
|
4612
|
-
export function
|
|
5141
|
+
export function __wbg_new_310879b66b6e95e1() {
|
|
4613
5142
|
const ret = new Array();
|
|
4614
5143
|
return addHeapObject(ret);
|
|
4615
5144
|
}
|
|
4616
|
-
export function
|
|
4617
|
-
const ret =
|
|
5145
|
+
export function __wbg_parse_2c1cad6215e84999() { return handleError(function (arg0, arg1) {
|
|
5146
|
+
const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
4618
5147
|
return addHeapObject(ret);
|
|
4619
|
-
}
|
|
4620
|
-
export function
|
|
5148
|
+
}, arguments); }
|
|
5149
|
+
export function __wbg_push_b77c476b01548d0a(arg0, arg1) {
|
|
4621
5150
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
4622
5151
|
return ret;
|
|
4623
5152
|
}
|
|
4624
|
-
export function
|
|
5153
|
+
export function __wbg_set_78ea6a19f4818587(arg0, arg1, arg2) {
|
|
5154
|
+
getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
|
|
5155
|
+
}
|
|
5156
|
+
export function __wbg_set_a0e911be3da02782() { return handleError(function (arg0, arg1, arg2) {
|
|
4625
5157
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
4626
5158
|
return ret;
|
|
4627
5159
|
}, arguments); }
|
|
4628
|
-
export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
|
|
4629
|
-
getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
|
|
4630
|
-
}
|
|
4631
|
-
export function __wbg_set_82f7a370f604db70(arg0, arg1, arg2) {
|
|
4632
|
-
const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
|
|
4633
|
-
return addHeapObject(ret);
|
|
4634
|
-
}
|
|
4635
5160
|
export function __wbg_wasmdocumentnode_new(arg0) {
|
|
4636
5161
|
const ret = WasmDocumentNode.__wrap(arg0);
|
|
4637
5162
|
return addHeapObject(ret);
|
|
@@ -4781,6 +5306,9 @@ const WasmTableGridFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
4781
5306
|
const WasmTextAnnotationFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4782
5307
|
? { register: () => {}, unregister: () => {} }
|
|
4783
5308
|
: new FinalizationRegistry(ptr => wasm.__wbg_wasmtextannotation_free(ptr, 1));
|
|
5309
|
+
const WasmVisitorHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
5310
|
+
? { register: () => {}, unregister: () => {} }
|
|
5311
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_wasmvisitorhandle_free(ptr, 1));
|
|
4784
5312
|
|
|
4785
5313
|
function addHeapObject(obj) {
|
|
4786
5314
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
@@ -4956,10 +5484,6 @@ let WASM_VECTOR_LEN = 0;
|
|
|
4956
5484
|
|
|
4957
5485
|
|
|
4958
5486
|
let wasm;
|
|
4959
|
-
/**
|
|
4960
|
-
* @typedef {import("./html_to_markdown_wasm").WasmConversionOptions} WasmConversionOptions
|
|
4961
|
-
*/
|
|
4962
|
-
|
|
4963
5487
|
export function __wbg_set_wasm(val) {
|
|
4964
5488
|
wasm = val;
|
|
4965
5489
|
}
|