@kreuzberg/html-to-markdown-wasm 3.4.1 → 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.
@@ -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 const WasmAnnotationKind = Object.freeze({
8
- Bold: 0, "0": "Bold",
9
- Italic: 1, "1": "Italic",
10
- Underline: 2, "2": "Underline",
11
- Strikethrough: 3, "3": "Strikethrough",
12
- Code: 4, "4": "Code",
13
- Subscript: 5, "5": "Subscript",
14
- Superscript: 6, "6": "Superscript",
15
- Highlight: 7, "7": "Highlight",
16
- Link: 8, "8": "Link",
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 [`ConversionOptions::builder()`] to construct, or [`Default::default()`] for defaults.
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
  */
@@ -157,6 +231,13 @@ export class WasmConversionOptions {
157
231
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
158
232
  }
159
233
  }
234
+ /**
235
+ * @returns {boolean}
236
+ */
237
+ get compactTables() {
238
+ const ret = wasm.wasmconversionoptions_compactTables(this.__wbg_ptr);
239
+ return ret !== 0;
240
+ }
160
241
  /**
161
242
  * @returns {boolean}
162
243
  */
@@ -262,27 +343,6 @@ export class WasmConversionOptions {
262
343
  const ret = wasm.wasmconversionoptions_extractMetadata(this.__wbg_ptr);
263
344
  return ret !== 0;
264
345
  }
265
- /**
266
- * @param {WasmConversionOptionsUpdate} update
267
- * @returns {WasmConversionOptions}
268
- */
269
- static from(update) {
270
- _assertClass(update, WasmConversionOptionsUpdate);
271
- var ptr0 = update.__destroy_into_raw();
272
- const ret = wasm.wasmconversionoptions_from(ptr0);
273
- return WasmConversionOptions.__wrap(ret);
274
- }
275
- /**
276
- * Create from a partial update, applying to defaults.
277
- * @param {WasmConversionOptionsUpdate} update
278
- * @returns {WasmConversionOptions}
279
- */
280
- static fromUpdate(update) {
281
- _assertClass(update, WasmConversionOptionsUpdate);
282
- var ptr0 = update.__destroy_into_raw();
283
- const ret = wasm.wasmconversionoptions_fromUpdate(ptr0);
284
- return WasmConversionOptions.__wrap(ret);
285
- }
286
346
  /**
287
347
  * @returns {string}
288
348
  */
@@ -411,59 +471,60 @@ export class WasmConversionOptions {
411
471
  return BigInt.asUintN(64, ret);
412
472
  }
413
473
  /**
414
- * @param {WasmHeadingStyle | null} [heading_style]
415
- * @param {WasmListIndentType | null} [list_indent_type]
416
- * @param {number | null} [list_indent_width]
474
+ * @param {WasmHeadingStyle | null} [headingStyle]
475
+ * @param {WasmListIndentType | null} [listIndentType]
476
+ * @param {number | null} [listIndentWidth]
417
477
  * @param {string | null} [bullets]
418
- * @param {string | null} [strong_em_symbol]
419
- * @param {boolean | null} [escape_asterisks]
420
- * @param {boolean | null} [escape_underscores]
421
- * @param {boolean | null} [escape_misc]
422
- * @param {boolean | null} [escape_ascii]
423
- * @param {string | null} [code_language]
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]
424
484
  * @param {boolean | null} [autolinks]
425
- * @param {boolean | null} [default_title]
426
- * @param {boolean | null} [br_in_tables]
427
- * @param {WasmHighlightStyle | null} [highlight_style]
428
- * @param {boolean | null} [extract_metadata]
429
- * @param {WasmWhitespaceMode | null} [whitespace_mode]
430
- * @param {boolean | null} [strip_newlines]
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]
431
492
  * @param {boolean | null} [wrap]
432
- * @param {number | null} [wrap_width]
433
- * @param {boolean | null} [convert_as_inline]
434
- * @param {string | null} [sub_symbol]
435
- * @param {string | null} [sup_symbol]
436
- * @param {WasmNewlineStyle | null} [newline_style]
437
- * @param {WasmCodeBlockStyle | null} [code_block_style]
438
- * @param {string[] | null} [keep_inline_images_in]
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]
439
500
  * @param {WasmPreprocessingOptions | null} [preprocessing]
440
501
  * @param {string | null} [encoding]
441
502
  * @param {boolean | null} [debug]
442
- * @param {string[] | null} [strip_tags]
443
- * @param {string[] | null} [preserve_tags]
444
- * @param {boolean | null} [skip_images]
445
- * @param {WasmLinkStyle | null} [link_style]
446
- * @param {WasmOutputFormat | null} [output_format]
447
- * @param {boolean | null} [include_document_structure]
448
- * @param {boolean | null} [extract_images]
449
- * @param {bigint | null} [max_image_size]
450
- * @param {boolean | null} [capture_svg]
451
- * @param {boolean | null} [infer_dimensions]
452
- * @param {string[] | null} [exclude_selectors]
453
- * @param {number | null} [max_depth]
454
- */
455
- 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) {
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) {
456
517
  var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
457
518
  var len0 = WASM_VECTOR_LEN;
458
- var ptr1 = isLikeNone(strong_em_symbol) ? 0 : passStringToWasm0(strong_em_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
519
+ var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
459
520
  var len1 = WASM_VECTOR_LEN;
460
- var ptr2 = isLikeNone(code_language) ? 0 : passStringToWasm0(code_language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
521
+ var ptr2 = isLikeNone(codeLanguage) ? 0 : passStringToWasm0(codeLanguage, wasm.__wbindgen_export, wasm.__wbindgen_export2);
461
522
  var len2 = WASM_VECTOR_LEN;
462
- var ptr3 = isLikeNone(sub_symbol) ? 0 : passStringToWasm0(sub_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
523
+ var ptr3 = isLikeNone(subSymbol) ? 0 : passStringToWasm0(subSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
463
524
  var len3 = WASM_VECTOR_LEN;
464
- var ptr4 = isLikeNone(sup_symbol) ? 0 : passStringToWasm0(sup_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
525
+ var ptr4 = isLikeNone(supSymbol) ? 0 : passStringToWasm0(supSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
465
526
  var len4 = WASM_VECTOR_LEN;
466
- var ptr5 = isLikeNone(keep_inline_images_in) ? 0 : passArrayJsValueToWasm0(keep_inline_images_in, wasm.__wbindgen_export);
527
+ var ptr5 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_export);
467
528
  var len5 = WASM_VECTOR_LEN;
468
529
  let ptr6 = 0;
469
530
  if (!isLikeNone(preprocessing)) {
@@ -472,13 +533,13 @@ export class WasmConversionOptions {
472
533
  }
473
534
  var ptr7 = isLikeNone(encoding) ? 0 : passStringToWasm0(encoding, wasm.__wbindgen_export, wasm.__wbindgen_export2);
474
535
  var len7 = WASM_VECTOR_LEN;
475
- var ptr8 = isLikeNone(strip_tags) ? 0 : passArrayJsValueToWasm0(strip_tags, wasm.__wbindgen_export);
536
+ var ptr8 = isLikeNone(stripTags) ? 0 : passArrayJsValueToWasm0(stripTags, wasm.__wbindgen_export);
476
537
  var len8 = WASM_VECTOR_LEN;
477
- var ptr9 = isLikeNone(preserve_tags) ? 0 : passArrayJsValueToWasm0(preserve_tags, wasm.__wbindgen_export);
538
+ var ptr9 = isLikeNone(preserveTags) ? 0 : passArrayJsValueToWasm0(preserveTags, wasm.__wbindgen_export);
478
539
  var len9 = WASM_VECTOR_LEN;
479
- var ptr10 = isLikeNone(exclude_selectors) ? 0 : passArrayJsValueToWasm0(exclude_selectors, wasm.__wbindgen_export);
540
+ var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
480
541
  var len10 = WASM_VECTOR_LEN;
481
- 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);
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);
482
543
  this.__wbg_ptr = ret;
483
544
  WasmConversionOptionsFinalization.register(this, this.__wbg_ptr, this);
484
545
  return this;
@@ -584,6 +645,12 @@ export class WasmConversionOptions {
584
645
  const len0 = WASM_VECTOR_LEN;
585
646
  wasm.wasmconversionoptions_set_codeLanguage(this.__wbg_ptr, ptr0, len0);
586
647
  }
648
+ /**
649
+ * @param {boolean} value
650
+ */
651
+ set compactTables(value) {
652
+ wasm.wasmconversionoptions_set_compactTables(this.__wbg_ptr, value);
653
+ }
587
654
  /**
588
655
  * @param {boolean} value
589
656
  */
@@ -947,113 +1014,11 @@ export class WasmConversionOptions {
947
1014
  }
948
1015
  if (Symbol.dispose) WasmConversionOptions.prototype[Symbol.dispose] = WasmConversionOptions.prototype.free;
949
1016
 
950
- /**
951
- * Builder for [`ConversionOptions`].
952
- *
953
- * All fields start with default values. Call `.build()` to produce the final options.
954
- */
955
- export class WasmConversionOptionsBuilder {
956
- static __wrap(ptr) {
957
- const obj = Object.create(WasmConversionOptionsBuilder.prototype);
958
- obj.__wbg_ptr = ptr;
959
- WasmConversionOptionsBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
960
- return obj;
961
- }
962
- __destroy_into_raw() {
963
- const ptr = this.__wbg_ptr;
964
- this.__wbg_ptr = 0;
965
- WasmConversionOptionsBuilderFinalization.unregister(this);
966
- return ptr;
967
- }
968
- free() {
969
- const ptr = this.__destroy_into_raw();
970
- wasm.__wbg_wasmconversionoptionsbuilder_free(ptr, 0);
971
- }
972
- /**
973
- * Build the final [`ConversionOptions`].
974
- * @returns {WasmConversionOptions}
975
- */
976
- build() {
977
- const ret = wasm.wasmconversionoptionsbuilder_build(this.__wbg_ptr);
978
- return WasmConversionOptions.__wrap(ret);
979
- }
980
- /**
981
- * Set the list of CSS selectors for elements to exclude entirely from output.
982
- * @param {string[]} selectors
983
- * @returns {WasmConversionOptionsBuilder}
984
- */
985
- excludeSelectors(selectors) {
986
- const ptr0 = passArrayJsValueToWasm0(selectors, wasm.__wbindgen_export);
987
- const len0 = WASM_VECTOR_LEN;
988
- const ret = wasm.wasmconversionoptionsbuilder_excludeSelectors(this.__wbg_ptr, ptr0, len0);
989
- return WasmConversionOptionsBuilder.__wrap(ret);
990
- }
991
- /**
992
- * Set the list of HTML tag names whose `<img>` children are kept inline.
993
- * @param {string[]} tags
994
- * @returns {WasmConversionOptionsBuilder}
995
- */
996
- keepInlineImagesIn(tags) {
997
- const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
998
- const len0 = WASM_VECTOR_LEN;
999
- const ret = wasm.wasmconversionoptionsbuilder_keepInlineImagesIn(this.__wbg_ptr, ptr0, len0);
1000
- return WasmConversionOptionsBuilder.__wrap(ret);
1001
- }
1002
- /**
1003
- * Set the pre-processing options applied to the HTML before conversion.
1004
- * @param {WasmPreprocessingOptions} preprocessing
1005
- * @returns {WasmConversionOptionsBuilder}
1006
- */
1007
- preprocessing(preprocessing) {
1008
- _assertClass(preprocessing, WasmPreprocessingOptions);
1009
- var ptr0 = preprocessing.__destroy_into_raw();
1010
- const ret = wasm.wasmconversionoptionsbuilder_preprocessing(this.__wbg_ptr, ptr0);
1011
- return WasmConversionOptionsBuilder.__wrap(ret);
1012
- }
1013
- /**
1014
- * Set the list of HTML tag names that are preserved verbatim in output.
1015
- * @param {string[]} tags
1016
- * @returns {WasmConversionOptionsBuilder}
1017
- */
1018
- preserveTags(tags) {
1019
- const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
1020
- const len0 = WASM_VECTOR_LEN;
1021
- const ret = wasm.wasmconversionoptionsbuilder_preserveTags(this.__wbg_ptr, ptr0, len0);
1022
- return WasmConversionOptionsBuilder.__wrap(ret);
1023
- }
1024
- /**
1025
- * Set the list of HTML tag names whose content is stripped from output.
1026
- * @param {string[]} tags
1027
- * @returns {WasmConversionOptionsBuilder}
1028
- */
1029
- stripTags(tags) {
1030
- const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
1031
- const len0 = WASM_VECTOR_LEN;
1032
- const ret = wasm.wasmconversionoptionsbuilder_stripTags(this.__wbg_ptr, ptr0, len0);
1033
- return WasmConversionOptionsBuilder.__wrap(ret);
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
- }
1049
- }
1050
- if (Symbol.dispose) WasmConversionOptionsBuilder.prototype[Symbol.dispose] = WasmConversionOptionsBuilder.prototype.free;
1051
-
1052
1017
  /**
1053
1018
  * Partial update for `ConversionOptions`.
1054
1019
  *
1055
1020
  * Uses `Option<T>` fields for selective updates. Bindings use this to construct
1056
- * options from language-native types. Prefer [`ConversionOptionsBuilder`] for Rust code.
1021
+ * options from language-native types. Prefer `ConversionOptionsBuilder` for Rust code.
1057
1022
  */
1058
1023
  export class WasmConversionOptionsUpdate {
1059
1024
  static __wrap(ptr) {
@@ -1150,6 +1115,13 @@ export class WasmConversionOptionsUpdate {
1150
1115
  wasm.__wbindgen_add_to_stack_pointer(16);
1151
1116
  }
1152
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
+ }
1153
1125
  /**
1154
1126
  * @returns {boolean | undefined}
1155
1127
  */
@@ -1396,59 +1368,60 @@ export class WasmConversionOptionsUpdate {
1396
1368
  }
1397
1369
  }
1398
1370
  /**
1399
- * @param {WasmHeadingStyle | null} [heading_style]
1400
- * @param {WasmListIndentType | null} [list_indent_type]
1401
- * @param {number | null} [list_indent_width]
1371
+ * @param {WasmHeadingStyle | null} [headingStyle]
1372
+ * @param {WasmListIndentType | null} [listIndentType]
1373
+ * @param {number | null} [listIndentWidth]
1402
1374
  * @param {string | null} [bullets]
1403
- * @param {string | null} [strong_em_symbol]
1404
- * @param {boolean | null} [escape_asterisks]
1405
- * @param {boolean | null} [escape_underscores]
1406
- * @param {boolean | null} [escape_misc]
1407
- * @param {boolean | null} [escape_ascii]
1408
- * @param {string | null} [code_language]
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]
1409
1381
  * @param {boolean | null} [autolinks]
1410
- * @param {boolean | null} [default_title]
1411
- * @param {boolean | null} [br_in_tables]
1412
- * @param {WasmHighlightStyle | null} [highlight_style]
1413
- * @param {boolean | null} [extract_metadata]
1414
- * @param {WasmWhitespaceMode | null} [whitespace_mode]
1415
- * @param {boolean | null} [strip_newlines]
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]
1416
1389
  * @param {boolean | null} [wrap]
1417
- * @param {number | null} [wrap_width]
1418
- * @param {boolean | null} [convert_as_inline]
1419
- * @param {string | null} [sub_symbol]
1420
- * @param {string | null} [sup_symbol]
1421
- * @param {WasmNewlineStyle | null} [newline_style]
1422
- * @param {WasmCodeBlockStyle | null} [code_block_style]
1423
- * @param {string[] | null} [keep_inline_images_in]
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]
1424
1397
  * @param {WasmPreprocessingOptionsUpdate | null} [preprocessing]
1425
1398
  * @param {string | null} [encoding]
1426
1399
  * @param {boolean | null} [debug]
1427
- * @param {string[] | null} [strip_tags]
1428
- * @param {string[] | null} [preserve_tags]
1429
- * @param {boolean | null} [skip_images]
1430
- * @param {WasmLinkStyle | null} [link_style]
1431
- * @param {WasmOutputFormat | null} [output_format]
1432
- * @param {boolean | null} [include_document_structure]
1433
- * @param {boolean | null} [extract_images]
1434
- * @param {bigint | null} [max_image_size]
1435
- * @param {boolean | null} [capture_svg]
1436
- * @param {boolean | null} [infer_dimensions]
1437
- * @param {number | null} [max_depth]
1438
- * @param {string[] | null} [exclude_selectors]
1439
- */
1440
- 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) {
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) {
1441
1414
  var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1442
1415
  var len0 = WASM_VECTOR_LEN;
1443
- var ptr1 = isLikeNone(strong_em_symbol) ? 0 : passStringToWasm0(strong_em_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1416
+ var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1444
1417
  var len1 = WASM_VECTOR_LEN;
1445
- var ptr2 = isLikeNone(code_language) ? 0 : passStringToWasm0(code_language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1418
+ var ptr2 = isLikeNone(codeLanguage) ? 0 : passStringToWasm0(codeLanguage, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1446
1419
  var len2 = WASM_VECTOR_LEN;
1447
- var ptr3 = isLikeNone(sub_symbol) ? 0 : passStringToWasm0(sub_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1420
+ var ptr3 = isLikeNone(subSymbol) ? 0 : passStringToWasm0(subSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1448
1421
  var len3 = WASM_VECTOR_LEN;
1449
- var ptr4 = isLikeNone(sup_symbol) ? 0 : passStringToWasm0(sup_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1422
+ var ptr4 = isLikeNone(supSymbol) ? 0 : passStringToWasm0(supSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1450
1423
  var len4 = WASM_VECTOR_LEN;
1451
- var ptr5 = isLikeNone(keep_inline_images_in) ? 0 : passArrayJsValueToWasm0(keep_inline_images_in, wasm.__wbindgen_export);
1424
+ var ptr5 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_export);
1452
1425
  var len5 = WASM_VECTOR_LEN;
1453
1426
  let ptr6 = 0;
1454
1427
  if (!isLikeNone(preprocessing)) {
@@ -1457,13 +1430,13 @@ export class WasmConversionOptionsUpdate {
1457
1430
  }
1458
1431
  var ptr7 = isLikeNone(encoding) ? 0 : passStringToWasm0(encoding, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1459
1432
  var len7 = WASM_VECTOR_LEN;
1460
- var ptr8 = isLikeNone(strip_tags) ? 0 : passArrayJsValueToWasm0(strip_tags, wasm.__wbindgen_export);
1433
+ var ptr8 = isLikeNone(stripTags) ? 0 : passArrayJsValueToWasm0(stripTags, wasm.__wbindgen_export);
1461
1434
  var len8 = WASM_VECTOR_LEN;
1462
- var ptr9 = isLikeNone(preserve_tags) ? 0 : passArrayJsValueToWasm0(preserve_tags, wasm.__wbindgen_export);
1435
+ var ptr9 = isLikeNone(preserveTags) ? 0 : passArrayJsValueToWasm0(preserveTags, wasm.__wbindgen_export);
1463
1436
  var len9 = WASM_VECTOR_LEN;
1464
- var ptr10 = isLikeNone(exclude_selectors) ? 0 : passArrayJsValueToWasm0(exclude_selectors, wasm.__wbindgen_export);
1437
+ var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
1465
1438
  var len10 = WASM_VECTOR_LEN;
1466
- 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);
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);
1467
1440
  this.__wbg_ptr = ret;
1468
1441
  WasmConversionOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
1469
1442
  return this;
@@ -1572,6 +1545,12 @@ export class WasmConversionOptionsUpdate {
1572
1545
  var len0 = WASM_VECTOR_LEN;
1573
1546
  wasm.wasmconversionoptionsupdate_set_codeLanguage(this.__wbg_ptr, ptr0, len0);
1574
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
+ }
1575
1554
  /**
1576
1555
  * @param {boolean | null} [value]
1577
1556
  */
@@ -2146,17 +2125,6 @@ if (Symbol.dispose) WasmConversionResult.prototype[Symbol.dispose] = WasmConvers
2146
2125
  * and browsers for document indexing and presentation.
2147
2126
  *
2148
2127
  * # Examples
2149
- *
2150
- * ```
2151
- * let doc = DocumentMetadata {
2152
- * title: Some("My Article".to_string()),
2153
- * description: Some("A great article about Rust".to_string()),
2154
- * keywords: vec!["rust".to_string(), "programming".to_string()],
2155
- * ..Default::default()
2156
- * };
2157
- *
2158
- * assert_eq!(doc.title, Some("My Article".to_string()));
2159
- * ```
2160
2128
  */
2161
2129
  export class WasmDocumentMetadata {
2162
2130
  static __wrap(ptr) {
@@ -2302,18 +2270,18 @@ export class WasmDocumentMetadata {
2302
2270
  }
2303
2271
  /**
2304
2272
  * @param {string[] | null} [keywords]
2305
- * @param {any | null} [open_graph]
2306
- * @param {any | null} [twitter_card]
2307
- * @param {any | null} [meta_tags]
2273
+ * @param {any | null} [openGraph]
2274
+ * @param {any | null} [twitterCard]
2275
+ * @param {any | null} [metaTags]
2308
2276
  * @param {string | null} [title]
2309
2277
  * @param {string | null} [description]
2310
2278
  * @param {string | null} [author]
2311
- * @param {string | null} [canonical_url]
2312
- * @param {string | null} [base_href]
2279
+ * @param {string | null} [canonicalUrl]
2280
+ * @param {string | null} [baseHref]
2313
2281
  * @param {string | null} [language]
2314
- * @param {WasmTextDirection | null} [text_direction]
2282
+ * @param {WasmTextDirection | null} [textDirection]
2315
2283
  */
2316
- constructor(keywords, open_graph, twitter_card, meta_tags, title, description, author, canonical_url, base_href, language, text_direction) {
2284
+ constructor(keywords, openGraph, twitterCard, metaTags, title, description, author, canonicalUrl, baseHref, language, textDirection) {
2317
2285
  var ptr0 = isLikeNone(keywords) ? 0 : passArrayJsValueToWasm0(keywords, wasm.__wbindgen_export);
2318
2286
  var len0 = WASM_VECTOR_LEN;
2319
2287
  var ptr1 = isLikeNone(title) ? 0 : passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -2322,13 +2290,13 @@ export class WasmDocumentMetadata {
2322
2290
  var len2 = WASM_VECTOR_LEN;
2323
2291
  var ptr3 = isLikeNone(author) ? 0 : passStringToWasm0(author, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2324
2292
  var len3 = WASM_VECTOR_LEN;
2325
- var ptr4 = isLikeNone(canonical_url) ? 0 : passStringToWasm0(canonical_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2293
+ var ptr4 = isLikeNone(canonicalUrl) ? 0 : passStringToWasm0(canonicalUrl, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2326
2294
  var len4 = WASM_VECTOR_LEN;
2327
- var ptr5 = isLikeNone(base_href) ? 0 : passStringToWasm0(base_href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2295
+ var ptr5 = isLikeNone(baseHref) ? 0 : passStringToWasm0(baseHref, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2328
2296
  var len5 = WASM_VECTOR_LEN;
2329
2297
  var ptr6 = isLikeNone(language) ? 0 : passStringToWasm0(language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2330
2298
  var len6 = WASM_VECTOR_LEN;
2331
- const ret = wasm.wasmdocumentmetadata_new(ptr0, len0, isLikeNone(open_graph) ? 0 : addHeapObject(open_graph), isLikeNone(twitter_card) ? 0 : addHeapObject(twitter_card), isLikeNone(meta_tags) ? 0 : addHeapObject(meta_tags), ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(text_direction) ? 3 : text_direction);
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);
2332
2300
  this.__wbg_ptr = ret;
2333
2301
  WasmDocumentMetadataFinalization.register(this, this.__wbg_ptr, this);
2334
2302
  return this;
@@ -2534,23 +2502,11 @@ export class WasmDocumentNode {
2534
2502
  }
2535
2503
  }
2536
2504
  /**
2537
- * @returns {string}
2505
+ * @returns {any}
2538
2506
  */
2539
2507
  get content() {
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
- }
2508
+ const ret = wasm.wasmdocumentnode_content(this.__wbg_ptr);
2509
+ return takeObject(ret);
2554
2510
  }
2555
2511
  /**
2556
2512
  * @returns {WasmDocumentNode}
@@ -2580,7 +2536,7 @@ export class WasmDocumentNode {
2580
2536
  }
2581
2537
  /**
2582
2538
  * @param {string} id
2583
- * @param {WasmNodeContent} content
2539
+ * @param {any} content
2584
2540
  * @param {Uint32Array} children
2585
2541
  * @param {WasmTextAnnotation[]} annotations
2586
2542
  * @param {number | null} [parent]
@@ -2593,7 +2549,7 @@ export class WasmDocumentNode {
2593
2549
  const len1 = WASM_VECTOR_LEN;
2594
2550
  const ptr2 = passArrayJsValueToWasm0(annotations, wasm.__wbindgen_export);
2595
2551
  const len2 = WASM_VECTOR_LEN;
2596
- 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));
2597
2553
  this.__wbg_ptr = ret;
2598
2554
  WasmDocumentNodeFinalization.register(this, this.__wbg_ptr, this);
2599
2555
  return this;
@@ -2628,10 +2584,10 @@ export class WasmDocumentNode {
2628
2584
  wasm.wasmdocumentnode_set_children(this.__wbg_ptr, ptr0, len0);
2629
2585
  }
2630
2586
  /**
2631
- * @param {WasmNodeContent} value
2587
+ * @param {any} value
2632
2588
  */
2633
2589
  set content(value) {
2634
- wasm.wasmdocumentnode_set_content(this.__wbg_ptr, value);
2590
+ wasm.wasmdocumentnode_set_content(this.__wbg_ptr, addHeapObject(value));
2635
2591
  }
2636
2592
  /**
2637
2593
  * @param {string} value
@@ -2681,12 +2637,12 @@ export class WasmDocumentStructure {
2681
2637
  }
2682
2638
  /**
2683
2639
  * @param {WasmDocumentNode[]} nodes
2684
- * @param {string | null} [source_format]
2640
+ * @param {string | null} [sourceFormat]
2685
2641
  */
2686
- constructor(nodes, source_format) {
2642
+ constructor(nodes, sourceFormat) {
2687
2643
  const ptr0 = passArrayJsValueToWasm0(nodes, wasm.__wbindgen_export);
2688
2644
  const len0 = WASM_VECTOR_LEN;
2689
- var ptr1 = isLikeNone(source_format) ? 0 : passStringToWasm0(source_format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2645
+ var ptr1 = isLikeNone(sourceFormat) ? 0 : passStringToWasm0(sourceFormat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2690
2646
  var len1 = WASM_VECTOR_LEN;
2691
2647
  const ret = wasm.wasmdocumentstructure_new(ptr0, len0, ptr1, len1);
2692
2648
  this.__wbg_ptr = ret;
@@ -2824,14 +2780,14 @@ export class WasmGridCell {
2824
2780
  * @param {string} content
2825
2781
  * @param {number} row
2826
2782
  * @param {number} col
2827
- * @param {number} row_span
2828
- * @param {number} col_span
2829
- * @param {boolean} is_header
2783
+ * @param {number} rowSpan
2784
+ * @param {number} colSpan
2785
+ * @param {boolean} isHeader
2830
2786
  */
2831
- constructor(content, row, col, row_span, col_span, is_header) {
2787
+ constructor(content, row, col, rowSpan, colSpan, isHeader) {
2832
2788
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2833
2789
  const len0 = WASM_VECTOR_LEN;
2834
- const ret = wasm.wasmgridcell_new(ptr0, len0, row, col, row_span, col_span, is_header);
2790
+ const ret = wasm.wasmgridcell_new(ptr0, len0, row, col, rowSpan, colSpan, isHeader);
2835
2791
  this.__wbg_ptr = ret;
2836
2792
  WasmGridCellFinalization.register(this, this.__wbg_ptr, this);
2837
2793
  return this;
@@ -2898,19 +2854,6 @@ if (Symbol.dispose) WasmGridCell.prototype[Symbol.dispose] = WasmGridCell.protot
2898
2854
  * and position in the document structure.
2899
2855
  *
2900
2856
  * # Examples
2901
- *
2902
- * ```
2903
- * let header = HeaderMetadata {
2904
- * level: 1,
2905
- * text: "Main Title".to_string(),
2906
- * id: Some("main-title".to_string()),
2907
- * depth: 0,
2908
- * html_offset: 145,
2909
- * };
2910
- *
2911
- * assert_eq!(header.level, 1);
2912
- * assert!(header.is_valid());
2913
- * ```
2914
2857
  */
2915
2858
  export class WasmHeaderMetadata {
2916
2859
  static __wrap(ptr) {
@@ -2983,26 +2926,6 @@ export class WasmHeaderMetadata {
2983
2926
  * `true` if level is 1-6, `false` otherwise.
2984
2927
  *
2985
2928
  * # Examples
2986
- *
2987
- * ```
2988
- * let valid = HeaderMetadata {
2989
- * level: 3,
2990
- * text: "Title".to_string(),
2991
- * id: None,
2992
- * depth: 2,
2993
- * html_offset: 100,
2994
- * };
2995
- * assert!(valid.is_valid());
2996
- *
2997
- * let invalid = HeaderMetadata {
2998
- * level: 7, // Invalid
2999
- * text: "Title".to_string(),
3000
- * id: None,
3001
- * depth: 2,
3002
- * html_offset: 100,
3003
- * };
3004
- * assert!(!invalid.is_valid());
3005
- * ```
3006
2929
  * @returns {boolean}
3007
2930
  */
3008
2931
  isValid() {
@@ -3020,15 +2943,15 @@ export class WasmHeaderMetadata {
3020
2943
  * @param {number} level
3021
2944
  * @param {string} text
3022
2945
  * @param {number} depth
3023
- * @param {number} html_offset
2946
+ * @param {number} htmlOffset
3024
2947
  * @param {string | null} [id]
3025
2948
  */
3026
- constructor(level, text, depth, html_offset, id) {
2949
+ constructor(level, text, depth, htmlOffset, id) {
3027
2950
  const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3028
2951
  const len0 = WASM_VECTOR_LEN;
3029
2952
  var ptr1 = isLikeNone(id) ? 0 : passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3030
2953
  var len1 = WASM_VECTOR_LEN;
3031
- const ret = wasm.wasmheadermetadata_new(level, ptr0, len0, depth, html_offset, ptr1, len1);
2954
+ const ret = wasm.wasmheadermetadata_new(level, ptr0, len0, depth, htmlOffset, ptr1, len1);
3032
2955
  this.__wbg_ptr = ret;
3033
2956
  WasmHeaderMetadataFinalization.register(this, this.__wbg_ptr, this);
3034
2957
  return this;
@@ -3121,18 +3044,6 @@ export const WasmHighlightStyle = Object.freeze({
3121
3044
  * suitable for serialization and transmission across language boundaries.
3122
3045
  *
3123
3046
  * # Examples
3124
- *
3125
- * ```
3126
- * let metadata = HtmlMetadata {
3127
- * document: Default::default(),
3128
- * headers: Vec::new(),
3129
- * links: Vec::new(),
3130
- * images: Vec::new(),
3131
- * structured_data: Vec::new(),
3132
- * };
3133
- *
3134
- * assert!(metadata.headers.is_empty());
3135
- * ```
3136
3047
  */
3137
3048
  export class WasmHtmlMetadata {
3138
3049
  static __wrap(ptr) {
@@ -3218,9 +3129,9 @@ export class WasmHtmlMetadata {
3218
3129
  * @param {WasmHeaderMetadata[] | null} [headers]
3219
3130
  * @param {WasmLinkMetadata[] | null} [links]
3220
3131
  * @param {WasmImageMetadata[] | null} [images]
3221
- * @param {WasmStructuredData[] | null} [structured_data]
3132
+ * @param {WasmStructuredData[] | null} [structuredData]
3222
3133
  */
3223
- constructor(document, headers, links, images, structured_data) {
3134
+ constructor(document, headers, links, images, structuredData) {
3224
3135
  let ptr0 = 0;
3225
3136
  if (!isLikeNone(document)) {
3226
3137
  _assertClass(document, WasmDocumentMetadata);
@@ -3232,7 +3143,7 @@ export class WasmHtmlMetadata {
3232
3143
  var len2 = WASM_VECTOR_LEN;
3233
3144
  var ptr3 = isLikeNone(images) ? 0 : passArrayJsValueToWasm0(images, wasm.__wbindgen_export);
3234
3145
  var len3 = WASM_VECTOR_LEN;
3235
- var ptr4 = isLikeNone(structured_data) ? 0 : passArrayJsValueToWasm0(structured_data, wasm.__wbindgen_export);
3146
+ var ptr4 = isLikeNone(structuredData) ? 0 : passArrayJsValueToWasm0(structuredData, wasm.__wbindgen_export);
3236
3147
  var len4 = WASM_VECTOR_LEN;
3237
3148
  const ret = wasm.wasmhtmlmetadata_new(ptr0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
3238
3149
  this.__wbg_ptr = ret;
@@ -3305,19 +3216,6 @@ if (Symbol.dispose) WasmHtmlMetadata.prototype[Symbol.dispose] = WasmHtmlMetadat
3305
3216
  * for image analysis and optimization.
3306
3217
  *
3307
3218
  * # Examples
3308
- *
3309
- * ```
3310
- * let img = ImageMetadata {
3311
- * src: "https://example.com/image.jpg".to_string(),
3312
- * alt: Some("An example image".to_string()),
3313
- * title: Some("Example".to_string()),
3314
- * dimensions: Some((800, 600)),
3315
- * image_type: ImageType::External,
3316
- * attributes: Default::default(),
3317
- * };
3318
- *
3319
- * assert_eq!(img.image_type, ImageType::External);
3320
- * ```
3321
3219
  */
3322
3220
  export class WasmImageMetadata {
3323
3221
  static __wrap(ptr) {
@@ -3415,13 +3313,13 @@ export class WasmImageMetadata {
3415
3313
  }
3416
3314
  /**
3417
3315
  * @param {string} src
3418
- * @param {WasmImageType} image_type
3316
+ * @param {WasmImageType} imageType
3419
3317
  * @param {any} attributes
3420
3318
  * @param {string | null} [alt]
3421
3319
  * @param {string | null} [title]
3422
3320
  * @param {Uint32Array | null} [dimensions]
3423
3321
  */
3424
- constructor(src, image_type, attributes, alt, title, dimensions) {
3322
+ constructor(src, imageType, attributes, alt, title, dimensions) {
3425
3323
  const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3426
3324
  const len0 = WASM_VECTOR_LEN;
3427
3325
  var ptr1 = isLikeNone(alt) ? 0 : passStringToWasm0(alt, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -3430,7 +3328,7 @@ export class WasmImageMetadata {
3430
3328
  var len2 = WASM_VECTOR_LEN;
3431
3329
  var ptr3 = isLikeNone(dimensions) ? 0 : passArray32ToWasm0(dimensions, wasm.__wbindgen_export);
3432
3330
  var len3 = WASM_VECTOR_LEN;
3433
- const ret = wasm.wasmimagemetadata_new(ptr0, len0, image_type, addHeapObject(attributes), ptr1, len1, ptr2, len2, ptr3, len3);
3331
+ const ret = wasm.wasmimagemetadata_new(ptr0, len0, imageType, addHeapObject(attributes), ptr1, len1, ptr2, len2, ptr3, len3);
3434
3332
  this.__wbg_ptr = ret;
3435
3333
  WasmImageMetadataFinalization.register(this, this.__wbg_ptr, this);
3436
3334
  return this;
@@ -3539,20 +3437,6 @@ export const WasmImageType = Object.freeze({
3539
3437
  * Represents `<a>` elements with parsed href values, text content, and link type classification.
3540
3438
  *
3541
3439
  * # Examples
3542
- *
3543
- * ```
3544
- * let link = LinkMetadata {
3545
- * href: "https://example.com".to_string(),
3546
- * text: "Example".to_string(),
3547
- * title: Some("Visit Example".to_string()),
3548
- * link_type: LinkType::External,
3549
- * rel: vec!["nofollow".to_string()],
3550
- * attributes: Default::default(),
3551
- * };
3552
- *
3553
- * assert_eq!(link.link_type, LinkType::External);
3554
- * assert_eq!(link.text, "Example");
3555
- * ```
3556
3440
  */
3557
3441
  export class WasmLinkMetadata {
3558
3442
  static __wrap(ptr) {
@@ -3584,34 +3468,6 @@ export class WasmLinkMetadata {
3584
3468
  const ret = wasm.wasmlinkmetadata_attributes(this.__wbg_ptr);
3585
3469
  return takeObject(ret);
3586
3470
  }
3587
- /**
3588
- * Classify a link based on href value.
3589
- *
3590
- * # Arguments
3591
- *
3592
- * * `href` - The href attribute value
3593
- *
3594
- * # Returns
3595
- *
3596
- * Appropriate [`LinkType`] based on protocol and content.
3597
- *
3598
- * # Examples
3599
- *
3600
- * ```
3601
- * assert_eq!(LinkMetadata::classify_link("#section"), LinkType::Anchor);
3602
- * assert_eq!(LinkMetadata::classify_link("mailto:test@example.com"), LinkType::Email);
3603
- * assert_eq!(LinkMetadata::classify_link("tel:+1234567890"), LinkType::Phone);
3604
- * assert_eq!(LinkMetadata::classify_link("https://example.com"), LinkType::External);
3605
- * ```
3606
- * @param {string} href
3607
- * @returns {WasmLinkType}
3608
- */
3609
- static classifyLink(href) {
3610
- const ptr0 = passStringToWasm0(href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3611
- const len0 = WASM_VECTOR_LEN;
3612
- const ret = wasm.wasmlinkmetadata_classifyLink(ptr0, len0);
3613
- return ret;
3614
- }
3615
3471
  /**
3616
3472
  * @returns {WasmLinkMetadata}
3617
3473
  */
@@ -3660,12 +3516,12 @@ export class WasmLinkMetadata {
3660
3516
  /**
3661
3517
  * @param {string} href
3662
3518
  * @param {string} text
3663
- * @param {WasmLinkType} link_type
3519
+ * @param {WasmLinkType} linkType
3664
3520
  * @param {string[]} rel
3665
3521
  * @param {any} attributes
3666
3522
  * @param {string | null} [title]
3667
3523
  */
3668
- constructor(href, text, link_type, rel, attributes, title) {
3524
+ constructor(href, text, linkType, rel, attributes, title) {
3669
3525
  const ptr0 = passStringToWasm0(href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3670
3526
  const len0 = WASM_VECTOR_LEN;
3671
3527
  const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -3674,7 +3530,7 @@ export class WasmLinkMetadata {
3674
3530
  const len2 = WASM_VECTOR_LEN;
3675
3531
  var ptr3 = isLikeNone(title) ? 0 : passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3676
3532
  var len3 = WASM_VECTOR_LEN;
3677
- const ret = wasm.wasmlinkmetadata_new(ptr0, len0, ptr1, len1, link_type, ptr2, len2, addHeapObject(attributes), ptr3, len3);
3533
+ const ret = wasm.wasmlinkmetadata_new(ptr0, len0, ptr1, len1, linkType, ptr2, len2, addHeapObject(attributes), ptr3, len3);
3678
3534
  this.__wbg_ptr = ret;
3679
3535
  WasmLinkMetadataFinalization.register(this, this.__wbg_ptr, this);
3680
3536
  return this;
@@ -3833,61 +3689,457 @@ export const WasmNewlineStyle = Object.freeze({
3833
3689
  * The semantic content type of a document node.
3834
3690
  *
3835
3691
  * Uses internally tagged representation (`"node_type": "heading"`) for JSON serialization.
3836
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}
3837
- */
3838
- export const WasmNodeContent = Object.freeze({
3839
- Heading: 0, "0": "Heading",
3840
- Paragraph: 1, "1": "Paragraph",
3841
- List: 2, "2": "List",
3842
- ListItem: 3, "3": "ListItem",
3843
- Table: 4, "4": "Table",
3844
- Image: 5, "5": "Image",
3845
- Code: 6, "6": "Code",
3846
- Quote: 7, "7": "Quote",
3847
- DefinitionList: 8, "8": "DefinitionList",
3848
- DefinitionItem: 9, "9": "DefinitionItem",
3849
- RawBlock: 10, "10": "RawBlock",
3850
- MetadataBlock: 11, "11": "MetadataBlock",
3851
- Group: 12, "12": "Group",
3852
- });
3853
-
3854
- /**
3855
- * Context information passed to all visitor methods.
3856
- *
3857
- * Provides comprehensive metadata about the current node being visited,
3858
- * including its type, attributes, position in the DOM tree, and parent context.
3859
3692
  */
3860
- export class WasmNodeContext {
3693
+ export class WasmNodeContent {
3861
3694
  static __wrap(ptr) {
3862
- const obj = Object.create(WasmNodeContext.prototype);
3695
+ const obj = Object.create(WasmNodeContent.prototype);
3863
3696
  obj.__wbg_ptr = ptr;
3864
- WasmNodeContextFinalization.register(obj, obj.__wbg_ptr, obj);
3697
+ WasmNodeContentFinalization.register(obj, obj.__wbg_ptr, obj);
3865
3698
  return obj;
3866
3699
  }
3867
3700
  __destroy_into_raw() {
3868
3701
  const ptr = this.__wbg_ptr;
3869
3702
  this.__wbg_ptr = 0;
3870
- WasmNodeContextFinalization.unregister(this);
3703
+ WasmNodeContentFinalization.unregister(this);
3871
3704
  return ptr;
3872
3705
  }
3873
3706
  free() {
3874
3707
  const ptr = this.__destroy_into_raw();
3875
- wasm.__wbg_wasmnodecontext_free(ptr, 0);
3876
- }
3877
- /**
3878
- * @returns {any}
3879
- */
3880
- get attributes() {
3881
- const ret = wasm.wasmnodecontext_attributes(this.__wbg_ptr);
3882
- return takeObject(ret);
3708
+ wasm.__wbg_wasmnodecontent_free(ptr, 0);
3883
3709
  }
3884
3710
  /**
3885
- * @returns {WasmNodeContext}
3711
+ * @returns {string | undefined}
3886
3712
  */
3887
- static default() {
3888
- const ret = wasm.wasmnodecontext_default();
3889
- return WasmNodeContext.__wrap(ret);
3890
- }
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) {
4042
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4043
+ var len0 = WASM_VECTOR_LEN;
4044
+ wasm.wasmnodecontent_set_text(this.__wbg_ptr, ptr0, len0);
4045
+ }
4046
+ /**
4047
+ * @returns {string | undefined}
4048
+ */
4049
+ get src() {
4050
+ try {
4051
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4052
+ wasm.wasmnodecontent_src(retptr, this.__wbg_ptr);
4053
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4054
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
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;
4061
+ } finally {
4062
+ wasm.__wbindgen_add_to_stack_pointer(16);
4063
+ }
4064
+ }
4065
+ /**
4066
+ * @returns {string | undefined}
4067
+ */
4068
+ get term() {
4069
+ try {
4070
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
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);
4091
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4092
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4093
+ let v1;
4094
+ if (r0 !== 0) {
4095
+ v1 = getStringFromWasm0(r0, r1).slice();
4096
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
4097
+ }
4098
+ return v1;
4099
+ } finally {
4100
+ wasm.__wbindgen_add_to_stack_pointer(16);
4101
+ }
4102
+ }
4103
+ }
4104
+ if (Symbol.dispose) WasmNodeContent.prototype[Symbol.dispose] = WasmNodeContent.prototype.free;
4105
+
4106
+ /**
4107
+ * Context information passed to all visitor methods.
4108
+ *
4109
+ * Provides comprehensive metadata about the current node being visited,
4110
+ * including its type, attributes, position in the DOM tree, and parent context.
4111
+ */
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
+ }
4119
+ __destroy_into_raw() {
4120
+ const ptr = this.__wbg_ptr;
4121
+ this.__wbg_ptr = 0;
4122
+ WasmNodeContextFinalization.unregister(this);
4123
+ return ptr;
4124
+ }
4125
+ free() {
4126
+ const ptr = this.__destroy_into_raw();
4127
+ wasm.__wbg_wasmnodecontext_free(ptr, 0);
4128
+ }
4129
+ /**
4130
+ * @returns {any}
4131
+ */
4132
+ get attributes() {
4133
+ const ret = wasm.wasmnodecontext_attributes(this.__wbg_ptr);
4134
+ return takeObject(ret);
4135
+ }
4136
+ /**
4137
+ * @returns {WasmNodeContext}
4138
+ */
4139
+ static default() {
4140
+ const ret = wasm.wasmnodecontext_default();
4141
+ return WasmNodeContext.__wrap(ret);
4142
+ }
3891
4143
  /**
3892
4144
  * @returns {number}
3893
4145
  */
@@ -3910,20 +4162,20 @@ export class WasmNodeContext {
3910
4162
  return ret !== 0;
3911
4163
  }
3912
4164
  /**
3913
- * @param {WasmNodeType} node_type
3914
- * @param {string} tag_name
4165
+ * @param {WasmNodeType} nodeType
4166
+ * @param {string} tagName
3915
4167
  * @param {any} attributes
3916
4168
  * @param {number} depth
3917
- * @param {number} index_in_parent
3918
- * @param {boolean} is_inline
3919
- * @param {string | null} [parent_tag]
4169
+ * @param {number} indexInParent
4170
+ * @param {boolean} isInline
4171
+ * @param {string | null} [parentTag]
3920
4172
  */
3921
- constructor(node_type, tag_name, attributes, depth, index_in_parent, is_inline, parent_tag) {
3922
- const ptr0 = passStringToWasm0(tag_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4173
+ constructor(nodeType, tagName, attributes, depth, indexInParent, isInline, parentTag) {
4174
+ const ptr0 = passStringToWasm0(tagName, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3923
4175
  const len0 = WASM_VECTOR_LEN;
3924
- var ptr1 = isLikeNone(parent_tag) ? 0 : passStringToWasm0(parent_tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4176
+ var ptr1 = isLikeNone(parentTag) ? 0 : passStringToWasm0(parentTag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3925
4177
  var len1 = WASM_VECTOR_LEN;
3926
- const ret = wasm.wasmnodecontext_new(node_type, ptr0, len0, addHeapObject(attributes), depth, index_in_parent, is_inline, ptr1, len1);
4178
+ const ret = wasm.wasmnodecontext_new(nodeType, ptr0, len0, addHeapObject(attributes), depth, indexInParent, isInline, ptr1, len1);
3927
4179
  this.__wbg_ptr = ret;
3928
4180
  WasmNodeContextFinalization.register(this, this.__wbg_ptr, this);
3929
4181
  return this;
@@ -4164,22 +4416,6 @@ export class WasmPreprocessingOptions {
4164
4416
  const ptr = this.__destroy_into_raw();
4165
4417
  wasm.__wbg_wasmpreprocessingoptions_free(ptr, 0);
4166
4418
  }
4167
- /**
4168
- * Apply a partial update to these preprocessing options.
4169
- *
4170
- * Any specified fields in the update will override the current values.
4171
- * Unspecified fields (None) are left unchanged.
4172
- *
4173
- * # Arguments
4174
- *
4175
- * * `update` - Partial preprocessing options update
4176
- * @param {WasmPreprocessingOptionsUpdate} update
4177
- */
4178
- applyUpdate(update) {
4179
- _assertClass(update, WasmPreprocessingOptionsUpdate);
4180
- var ptr0 = update.__destroy_into_raw();
4181
- wasm.wasmpreprocessingoptions_applyUpdate(this.__wbg_ptr, ptr0);
4182
- }
4183
4419
  /**
4184
4420
  * @returns {WasmPreprocessingOptions}
4185
4421
  */
@@ -4194,46 +4430,14 @@ export class WasmPreprocessingOptions {
4194
4430
  const ret = wasm.wasmpreprocessingoptions_enabled(this.__wbg_ptr);
4195
4431
  return ret !== 0;
4196
4432
  }
4197
- /**
4198
- * @param {WasmPreprocessingOptionsUpdate} update
4199
- * @returns {WasmPreprocessingOptions}
4200
- */
4201
- static from(update) {
4202
- _assertClass(update, WasmPreprocessingOptionsUpdate);
4203
- var ptr0 = update.__destroy_into_raw();
4204
- const ret = wasm.wasmpreprocessingoptions_from(ptr0);
4205
- return WasmPreprocessingOptions.__wrap(ret);
4206
- }
4207
- /**
4208
- * Create new preprocessing options from a partial update.
4209
- *
4210
- * Creates a new `PreprocessingOptions` struct with defaults, then applies the update.
4211
- * Fields not specified in the update keep their default values.
4212
- *
4213
- * # Arguments
4214
- *
4215
- * * `update` - Partial preprocessing options update
4216
- *
4217
- * # Returns
4218
- *
4219
- * New `PreprocessingOptions` with specified updates applied to defaults
4220
- * @param {WasmPreprocessingOptionsUpdate} update
4221
- * @returns {WasmPreprocessingOptions}
4222
- */
4223
- static fromUpdate(update) {
4224
- _assertClass(update, WasmPreprocessingOptionsUpdate);
4225
- var ptr0 = update.__destroy_into_raw();
4226
- const ret = wasm.wasmpreprocessingoptions_fromUpdate(ptr0);
4227
- return WasmPreprocessingOptions.__wrap(ret);
4228
- }
4229
4433
  /**
4230
4434
  * @param {boolean | null} [enabled]
4231
4435
  * @param {WasmPreprocessingPreset | null} [preset]
4232
- * @param {boolean | null} [remove_navigation]
4233
- * @param {boolean | null} [remove_forms]
4436
+ * @param {boolean | null} [removeNavigation]
4437
+ * @param {boolean | null} [removeForms]
4234
4438
  */
4235
- constructor(enabled, preset, remove_navigation, remove_forms) {
4236
- const ret = wasm.wasmpreprocessingoptions_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(remove_navigation) ? 0xFFFFFF : remove_navigation ? 1 : 0, isLikeNone(remove_forms) ? 0xFFFFFF : remove_forms ? 1 : 0);
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);
4237
4441
  this.__wbg_ptr = ret;
4238
4442
  WasmPreprocessingOptionsFinalization.register(this, this.__wbg_ptr, this);
4239
4443
  return this;
@@ -4302,8 +4506,8 @@ if (Symbol.dispose) WasmPreprocessingOptions.prototype[Symbol.dispose] = WasmPre
4302
4506
  * Partial update for `PreprocessingOptions`.
4303
4507
  *
4304
4508
  * This struct uses `Option<T>` to represent optional fields that can be selectively updated.
4305
- * Only specified fields (Some values) will override existing options; None values leave the
4306
- * corresponding fields unchanged when applied via [`PreprocessingOptions::apply_update`].
4509
+ * Only specified fields (values) will override existing options; undefined values leave the
4510
+ * corresponding fields unchanged when applied via `PreprocessingOptions.apply_update`.
4307
4511
  */
4308
4512
  export class WasmPreprocessingOptionsUpdate {
4309
4513
  static __wrap(ptr) {
@@ -4339,11 +4543,11 @@ export class WasmPreprocessingOptionsUpdate {
4339
4543
  /**
4340
4544
  * @param {boolean | null} [enabled]
4341
4545
  * @param {WasmPreprocessingPreset | null} [preset]
4342
- * @param {boolean | null} [remove_navigation]
4343
- * @param {boolean | null} [remove_forms]
4546
+ * @param {boolean | null} [removeNavigation]
4547
+ * @param {boolean | null} [removeForms]
4344
4548
  */
4345
- constructor(enabled, preset, remove_navigation, remove_forms) {
4346
- const ret = wasm.wasmpreprocessingoptionsupdate_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(remove_navigation) ? 0xFFFFFF : remove_navigation ? 1 : 0, isLikeNone(remove_forms) ? 0xFFFFFF : remove_forms ? 1 : 0);
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);
4347
4551
  this.__wbg_ptr = ret;
4348
4552
  WasmPreprocessingOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
4349
4553
  return this;
@@ -4421,7 +4625,21 @@ export const WasmPreprocessingPreset = Object.freeze({
4421
4625
  });
4422
4626
 
4423
4627
  /**
4424
- * A non-fatal warning generated during HTML processing.
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.
4425
4643
  */
4426
4644
  export class WasmProcessingWarning {
4427
4645
  static __wrap(ptr) {
@@ -4527,16 +4745,6 @@ if (Symbol.dispose) WasmProcessingWarning.prototype[Symbol.dispose] = WasmProces
4527
4745
  * JSON-LD blocks are collected as raw JSON strings for flexibility.
4528
4746
  *
4529
4747
  * # Examples
4530
- *
4531
- * ```
4532
- * let schema = StructuredData {
4533
- * data_type: StructuredDataType::JsonLd,
4534
- * raw_json: r#"{"@context":"https://schema.org","@type":"Article"}"#.to_string(),
4535
- * schema_type: Some("Article".to_string()),
4536
- * };
4537
- *
4538
- * assert_eq!(schema.data_type, StructuredDataType::JsonLd);
4539
- * ```
4540
4748
  */
4541
4749
  export class WasmStructuredData {
4542
4750
  static __wrap(ptr) {
@@ -4588,16 +4796,16 @@ export class WasmStructuredData {
4588
4796
  return WasmStructuredData.__wrap(ret);
4589
4797
  }
4590
4798
  /**
4591
- * @param {WasmStructuredDataType} data_type
4592
- * @param {string} raw_json
4593
- * @param {string | null} [schema_type]
4799
+ * @param {WasmStructuredDataType} dataType
4800
+ * @param {string} rawJson
4801
+ * @param {string | null} [schemaType]
4594
4802
  */
4595
- constructor(data_type, raw_json, schema_type) {
4596
- const ptr0 = passStringToWasm0(raw_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4803
+ constructor(dataType, rawJson, schemaType) {
4804
+ const ptr0 = passStringToWasm0(rawJson, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4597
4805
  const len0 = WASM_VECTOR_LEN;
4598
- var ptr1 = isLikeNone(schema_type) ? 0 : passStringToWasm0(schema_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4806
+ var ptr1 = isLikeNone(schemaType) ? 0 : passStringToWasm0(schemaType, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4599
4807
  var len1 = WASM_VECTOR_LEN;
4600
- const ret = wasm.wasmstructureddata_new(data_type, ptr0, len0, ptr1, len1);
4808
+ const ret = wasm.wasmstructureddata_new(dataType, ptr0, len0, ptr1, len1);
4601
4809
  this.__wbg_ptr = ret;
4602
4810
  WasmStructuredDataFinalization.register(this, this.__wbg_ptr, this);
4603
4811
  return this;
@@ -4863,9 +5071,20 @@ export class WasmTableGrid {
4863
5071
  if (Symbol.dispose) WasmTableGrid.prototype[Symbol.dispose] = WasmTableGrid.prototype.free;
4864
5072
 
4865
5073
  /**
4866
- * An inline text annotation with byte-range offsets.
5074
+ * A styling or semantic annotation that applies to a byte range within a node's text.
5075
+ *
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.
4867
5086
  *
4868
- * Annotations describe formatting (bold, italic, etc.) and links within a node's text content.
5087
+ * See `AnnotationKind` for the full list of supported annotation types.
4869
5088
  */
4870
5089
  export class WasmTextAnnotation {
4871
5090
  static __wrap(ptr) {
@@ -4905,31 +5124,19 @@ export class WasmTextAnnotation {
4905
5124
  return ret >>> 0;
4906
5125
  }
4907
5126
  /**
4908
- * @returns {string}
5127
+ * @returns {any}
4909
5128
  */
4910
5129
  get kind() {
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
- }
5130
+ const ret = wasm.wasmtextannotation_kind(this.__wbg_ptr);
5131
+ return takeObject(ret);
4925
5132
  }
4926
5133
  /**
4927
5134
  * @param {number} start
4928
5135
  * @param {number} end
4929
- * @param {WasmAnnotationKind} kind
5136
+ * @param {any} kind
4930
5137
  */
4931
5138
  constructor(start, end, kind) {
4932
- const ret = wasm.wasmtextannotation_new(start, end, kind);
5139
+ const ret = wasm.wasmtextannotation_new(start, end, addHeapObject(kind));
4933
5140
  this.__wbg_ptr = ret;
4934
5141
  WasmTextAnnotationFinalization.register(this, this.__wbg_ptr, this);
4935
5142
  return this;
@@ -4941,10 +5148,10 @@ export class WasmTextAnnotation {
4941
5148
  wasm.wasmtextannotation_set_end(this.__wbg_ptr, value);
4942
5149
  }
4943
5150
  /**
4944
- * @param {WasmAnnotationKind} value
5151
+ * @param {any} value
4945
5152
  */
4946
5153
  set kind(value) {
4947
- wasm.wasmtextannotation_set_kind(this.__wbg_ptr, value);
5154
+ wasm.wasmtextannotation_set_kind(this.__wbg_ptr, addHeapObject(value));
4948
5155
  }
4949
5156
  /**
4950
5157
  * @param {number} value
@@ -4991,11 +5198,12 @@ export const WasmVisitResult = Object.freeze({
4991
5198
  });
4992
5199
 
4993
5200
  /**
4994
- * Type alias for a visitor handle (`Arc`-wrapped `Mutex` for thread-safe shared mutation).
5201
+ * Shareable, thread-safe handle to a user-provided HTML visitor implementation.
4995
5202
  *
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.
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.
4999
5207
  */
5000
5208
  export class WasmVisitorHandle {
5001
5209
  static __wrap(ptr) {
@@ -5051,23 +5259,16 @@ export const WasmWhitespaceMode = Object.freeze({
5051
5259
  });
5052
5260
 
5053
5261
  /**
5054
- * Convert HTML to Markdown, returning a [`ConversionResult`] with content, metadata, images,
5262
+ * Convert HTML to Markdown, returning a `ConversionResult` with content, metadata, images,
5055
5263
  * and warnings.
5056
5264
  *
5057
5265
  * # Arguments
5058
5266
  *
5059
5267
  * * `html` — the HTML string to convert.
5060
- * * `options` — optional conversion options. Defaults to [`ConversionOptions::default`].
5268
+ * * `options` — optional conversion options. Defaults to `ConversionOptions.default`.
5061
5269
  *
5062
5270
  * # Example
5063
5271
  *
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
5272
  *
5072
5273
  * # Errors
5073
5274
  *
@@ -5098,20 +5299,20 @@ export function convert(html, options) {
5098
5299
  wasm.__wbindgen_add_to_stack_pointer(16);
5099
5300
  }
5100
5301
  }
5101
- export function __wbg___wbindgen_is_function_5cd60d5cf78b4eef(arg0) {
5302
+ export function __wbg___wbindgen_is_function_754e9f305ff6029e(arg0) {
5102
5303
  const ret = typeof(getObject(arg0)) === 'function';
5103
5304
  return ret;
5104
5305
  }
5105
- export function __wbg___wbindgen_is_object_b4593df85baada48(arg0) {
5306
+ export function __wbg___wbindgen_is_object_56732c2bc353f41d(arg0) {
5106
5307
  const val = getObject(arg0);
5107
5308
  const ret = typeof(val) === 'object' && val !== null;
5108
5309
  return ret;
5109
5310
  }
5110
- export function __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5(arg0) {
5311
+ export function __wbg___wbindgen_is_undefined_67b456be8673d3d7(arg0) {
5111
5312
  const ret = getObject(arg0) === undefined;
5112
5313
  return ret;
5113
5314
  }
5114
- export function __wbg___wbindgen_string_get_d109740c0d18f4d7(arg0, arg1) {
5315
+ export function __wbg___wbindgen_string_get_72bdf95d3ae505b1(arg0, arg1) {
5115
5316
  const obj = getObject(arg1);
5116
5317
  const ret = typeof(obj) === 'string' ? obj : undefined;
5117
5318
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -5119,44 +5320,47 @@ export function __wbg___wbindgen_string_get_d109740c0d18f4d7(arg0, arg1) {
5119
5320
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5120
5321
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5121
5322
  }
5122
- export function __wbg___wbindgen_throw_9c31b086c2b26051(arg0, arg1) {
5323
+ export function __wbg___wbindgen_throw_1506f2235d1bdba0(arg0, arg1) {
5123
5324
  throw new Error(getStringFromWasm0(arg0, arg1));
5124
5325
  }
5125
- export function __wbg_apply_b593fcd87094fd23() { return handleError(function (arg0, arg1, arg2) {
5326
+ export function __wbg_apply_292b6d94e4f92b15() { return handleError(function (arg0, arg1, arg2) {
5126
5327
  const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
5127
5328
  return addHeapObject(ret);
5128
5329
  }, arguments); }
5129
- export function __wbg_get_dcf82ab8aad1a593() { return handleError(function (arg0, arg1) {
5330
+ export function __wbg_get_de6a0f7d4d18a304() { return handleError(function (arg0, arg1) {
5130
5331
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
5131
5332
  return addHeapObject(ret);
5132
5333
  }, arguments); }
5133
- export function __wbg_has_ef192b1f278770eb() { return handleError(function (arg0, arg1) {
5334
+ export function __wbg_has_73740b27f436fed3() { return handleError(function (arg0, arg1) {
5134
5335
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
5135
5336
  return ret;
5136
5337
  }, arguments); }
5137
- export function __wbg_new_02d162bc6cf02f60() {
5338
+ export function __wbg_new_ce1ab61c1c2b300d() {
5138
5339
  const ret = new Object();
5139
5340
  return addHeapObject(ret);
5140
5341
  }
5141
- export function __wbg_new_310879b66b6e95e1() {
5342
+ export function __wbg_new_d90091b82fdf5b91() {
5142
5343
  const ret = new Array();
5143
5344
  return addHeapObject(ret);
5144
5345
  }
5145
- export function __wbg_parse_2c1cad6215e84999() { return handleError(function (arg0, arg1) {
5346
+ export function __wbg_parse_03863847d06c4e89() { return handleError(function (arg0, arg1) {
5146
5347
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
5147
5348
  return addHeapObject(ret);
5148
5349
  }, arguments); }
5149
- export function __wbg_push_b77c476b01548d0a(arg0, arg1) {
5350
+ export function __wbg_push_a6822215aa43e71c(arg0, arg1) {
5150
5351
  const ret = getObject(arg0).push(getObject(arg1));
5151
5352
  return ret;
5152
5353
  }
5153
- export function __wbg_set_78ea6a19f4818587(arg0, arg1, arg2) {
5154
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5354
+ export function __wbg_set_6be42768c690e380(arg0, arg1, arg2) {
5355
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5155
5356
  }
5156
- export function __wbg_set_a0e911be3da02782() { return handleError(function (arg0, arg1, arg2) {
5357
+ export function __wbg_set_6e30c9374c26414c() { return handleError(function (arg0, arg1, arg2) {
5157
5358
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5158
5359
  return ret;
5159
5360
  }, arguments); }
5361
+ export function __wbg_set_dca99999bba88a9a(arg0, arg1, arg2) {
5362
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5363
+ }
5160
5364
  export function __wbg_wasmdocumentnode_new(arg0) {
5161
5365
  const ret = WasmDocumentNode.__wrap(arg0);
5162
5366
  return addHeapObject(ret);
@@ -5246,12 +5450,12 @@ export function __wbindgen_object_clone_ref(arg0) {
5246
5450
  export function __wbindgen_object_drop_ref(arg0) {
5247
5451
  takeObject(arg0);
5248
5452
  }
5453
+ const WasmAnnotationKindFinalization = (typeof FinalizationRegistry === 'undefined')
5454
+ ? { register: () => {}, unregister: () => {} }
5455
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmannotationkind_free(ptr, 1));
5249
5456
  const WasmConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
5250
5457
  ? { register: () => {}, unregister: () => {} }
5251
5458
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptions_free(ptr, 1));
5252
- const WasmConversionOptionsBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
5253
- ? { register: () => {}, unregister: () => {} }
5254
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionsbuilder_free(ptr, 1));
5255
5459
  const WasmConversionOptionsUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
5256
5460
  ? { register: () => {}, unregister: () => {} }
5257
5461
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionsupdate_free(ptr, 1));
@@ -5282,6 +5486,9 @@ const WasmImageMetadataFinalization = (typeof FinalizationRegistry === 'undefine
5282
5486
  const WasmLinkMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
5283
5487
  ? { register: () => {}, unregister: () => {} }
5284
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));
5285
5492
  const WasmNodeContextFinalization = (typeof FinalizationRegistry === 'undefined')
5286
5493
  ? { register: () => {}, unregister: () => {} }
5287
5494
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmnodecontext_free(ptr, 1));