@kreuzberg/html-to-markdown-wasm 3.4.1 → 3.5.0-rc.2

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.
@@ -4,19 +4,120 @@
4
4
  * The type of an inline text annotation.
5
5
  *
6
6
  * Uses internally tagged representation (`"annotation_type": "bold"`) for JSON serialization.
7
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8}
8
7
  */
9
- export const WasmAnnotationKind = Object.freeze({
10
- Bold: 0, "0": "Bold",
11
- Italic: 1, "1": "Italic",
12
- Underline: 2, "2": "Underline",
13
- Strikethrough: 3, "3": "Strikethrough",
14
- Code: 4, "4": "Code",
15
- Subscript: 5, "5": "Subscript",
16
- Superscript: 6, "6": "Superscript",
17
- Highlight: 7, "7": "Highlight",
18
- Link: 8, "8": "Link",
19
- });
8
+ export class WasmAnnotationKind {
9
+ static __wrap(ptr) {
10
+ const obj = Object.create(WasmAnnotationKind.prototype);
11
+ obj.__wbg_ptr = ptr;
12
+ WasmAnnotationKindFinalization.register(obj, obj.__wbg_ptr, obj);
13
+ return obj;
14
+ }
15
+ __destroy_into_raw() {
16
+ const ptr = this.__wbg_ptr;
17
+ this.__wbg_ptr = 0;
18
+ WasmAnnotationKindFinalization.unregister(this);
19
+ return ptr;
20
+ }
21
+ free() {
22
+ const ptr = this.__destroy_into_raw();
23
+ wasm.__wbg_wasmannotationkind_free(ptr, 0);
24
+ }
25
+ /**
26
+ * @returns {string}
27
+ */
28
+ get annotationType() {
29
+ let deferred1_0;
30
+ let deferred1_1;
31
+ try {
32
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
33
+ wasm.wasmannotationkind_annotationType(retptr, this.__wbg_ptr);
34
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
35
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
36
+ deferred1_0 = r0;
37
+ deferred1_1 = r1;
38
+ return getStringFromWasm0(r0, r1);
39
+ } finally {
40
+ wasm.__wbindgen_add_to_stack_pointer(16);
41
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
42
+ }
43
+ }
44
+ /**
45
+ * @returns {WasmAnnotationKind}
46
+ */
47
+ static default() {
48
+ const ret = wasm.wasmannotationkind_default();
49
+ return WasmAnnotationKind.__wrap(ret);
50
+ }
51
+ constructor() {
52
+ const ret = wasm.wasmannotationkind_new();
53
+ this.__wbg_ptr = ret;
54
+ WasmAnnotationKindFinalization.register(this, this.__wbg_ptr, this);
55
+ return this;
56
+ }
57
+ /**
58
+ * @param {string} value
59
+ */
60
+ set annotationType(value) {
61
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
62
+ const len0 = WASM_VECTOR_LEN;
63
+ wasm.wasmannotationkind_set_annotationType(this.__wbg_ptr, ptr0, len0);
64
+ }
65
+ /**
66
+ * @param {string | null} [value]
67
+ */
68
+ set title(value) {
69
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
70
+ var len0 = WASM_VECTOR_LEN;
71
+ wasm.wasmannotationkind_set_title(this.__wbg_ptr, ptr0, len0);
72
+ }
73
+ /**
74
+ * @param {string | null} [value]
75
+ */
76
+ set url(value) {
77
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
78
+ var len0 = WASM_VECTOR_LEN;
79
+ wasm.wasmannotationkind_set_url(this.__wbg_ptr, ptr0, len0);
80
+ }
81
+ /**
82
+ * @returns {string | undefined}
83
+ */
84
+ get title() {
85
+ try {
86
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
87
+ wasm.wasmannotationkind_title(retptr, this.__wbg_ptr);
88
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
89
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
90
+ let v1;
91
+ if (r0 !== 0) {
92
+ v1 = getStringFromWasm0(r0, r1).slice();
93
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
94
+ }
95
+ return v1;
96
+ } finally {
97
+ wasm.__wbindgen_add_to_stack_pointer(16);
98
+ }
99
+ }
100
+ /**
101
+ * @returns {string | undefined}
102
+ */
103
+ get url() {
104
+ try {
105
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
106
+ wasm.wasmannotationkind_url(retptr, this.__wbg_ptr);
107
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
108
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
109
+ let v1;
110
+ if (r0 !== 0) {
111
+ v1 = getStringFromWasm0(r0, r1).slice();
112
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
113
+ }
114
+ return v1;
115
+ } finally {
116
+ wasm.__wbindgen_add_to_stack_pointer(16);
117
+ }
118
+ }
119
+ }
120
+ if (Symbol.dispose) WasmAnnotationKind.prototype[Symbol.dispose] = WasmAnnotationKind.prototype.free;
20
121
 
21
122
  /**
22
123
  * Code block fence style in Markdown output.
@@ -33,19 +134,9 @@ export const WasmCodeBlockStyle = Object.freeze({
33
134
  /**
34
135
  * Main conversion options for HTML to Markdown conversion.
35
136
  *
36
- * Use [`ConversionOptions::builder()`] to construct, or [`Default::default()`] for defaults.
137
+ * Use `ConversionOptions.builder()` to construct, or `Default.default()` for defaults.
37
138
  *
38
139
  * # Example
39
- *
40
- * ```text
41
- * use html_to_markdown_rs::ConversionOptions;
42
- *
43
- * let options = ConversionOptions::builder()
44
- * .heading_style(HeadingStyle::Atx)
45
- * .wrap(true)
46
- * .wrap_width(100)
47
- * .build();
48
- * ```
49
140
  */
50
141
  export class WasmConversionOptions {
51
142
  static __wrap(ptr) {
@@ -64,15 +155,6 @@ export class WasmConversionOptions {
64
155
  const ptr = this.__destroy_into_raw();
65
156
  wasm.__wbg_wasmconversionoptions_free(ptr, 0);
66
157
  }
67
- /**
68
- * Apply a partial update to these conversion options.
69
- * @param {WasmConversionOptionsUpdate} update
70
- */
71
- applyUpdate(update) {
72
- _assertClass(update, WasmConversionOptionsUpdate);
73
- var ptr0 = update.__destroy_into_raw();
74
- wasm.wasmconversionoptions_applyUpdate(this.__wbg_ptr, ptr0);
75
- }
76
158
  /**
77
159
  * @returns {boolean}
78
160
  */
@@ -87,14 +169,6 @@ export class WasmConversionOptions {
87
169
  const ret = wasm.wasmconversionoptions_brInTables(this.__wbg_ptr);
88
170
  return ret !== 0;
89
171
  }
90
- /**
91
- * Create a new builder with default values.
92
- * @returns {WasmConversionOptionsBuilder}
93
- */
94
- static builder() {
95
- const ret = wasm.wasmconversionoptions_builder();
96
- return WasmConversionOptionsBuilder.__wrap(ret);
97
- }
98
172
  /**
99
173
  * @returns {string}
100
174
  */
@@ -159,6 +233,13 @@ export class WasmConversionOptions {
159
233
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
160
234
  }
161
235
  }
236
+ /**
237
+ * @returns {boolean}
238
+ */
239
+ get compactTables() {
240
+ const ret = wasm.wasmconversionoptions_compactTables(this.__wbg_ptr);
241
+ return ret !== 0;
242
+ }
162
243
  /**
163
244
  * @returns {boolean}
164
245
  */
@@ -264,27 +345,6 @@ export class WasmConversionOptions {
264
345
  const ret = wasm.wasmconversionoptions_extractMetadata(this.__wbg_ptr);
265
346
  return ret !== 0;
266
347
  }
267
- /**
268
- * @param {WasmConversionOptionsUpdate} update
269
- * @returns {WasmConversionOptions}
270
- */
271
- static from(update) {
272
- _assertClass(update, WasmConversionOptionsUpdate);
273
- var ptr0 = update.__destroy_into_raw();
274
- const ret = wasm.wasmconversionoptions_from(ptr0);
275
- return WasmConversionOptions.__wrap(ret);
276
- }
277
- /**
278
- * Create from a partial update, applying to defaults.
279
- * @param {WasmConversionOptionsUpdate} update
280
- * @returns {WasmConversionOptions}
281
- */
282
- static fromUpdate(update) {
283
- _assertClass(update, WasmConversionOptionsUpdate);
284
- var ptr0 = update.__destroy_into_raw();
285
- const ret = wasm.wasmconversionoptions_fromUpdate(ptr0);
286
- return WasmConversionOptions.__wrap(ret);
287
- }
288
348
  /**
289
349
  * @returns {string}
290
350
  */
@@ -413,59 +473,60 @@ export class WasmConversionOptions {
413
473
  return BigInt.asUintN(64, ret);
414
474
  }
415
475
  /**
416
- * @param {WasmHeadingStyle | null} [heading_style]
417
- * @param {WasmListIndentType | null} [list_indent_type]
418
- * @param {number | null} [list_indent_width]
476
+ * @param {WasmHeadingStyle | null} [headingStyle]
477
+ * @param {WasmListIndentType | null} [listIndentType]
478
+ * @param {number | null} [listIndentWidth]
419
479
  * @param {string | null} [bullets]
420
- * @param {string | null} [strong_em_symbol]
421
- * @param {boolean | null} [escape_asterisks]
422
- * @param {boolean | null} [escape_underscores]
423
- * @param {boolean | null} [escape_misc]
424
- * @param {boolean | null} [escape_ascii]
425
- * @param {string | null} [code_language]
480
+ * @param {string | null} [strongEmSymbol]
481
+ * @param {boolean | null} [escapeAsterisks]
482
+ * @param {boolean | null} [escapeUnderscores]
483
+ * @param {boolean | null} [escapeMisc]
484
+ * @param {boolean | null} [escapeAscii]
485
+ * @param {string | null} [codeLanguage]
426
486
  * @param {boolean | null} [autolinks]
427
- * @param {boolean | null} [default_title]
428
- * @param {boolean | null} [br_in_tables]
429
- * @param {WasmHighlightStyle | null} [highlight_style]
430
- * @param {boolean | null} [extract_metadata]
431
- * @param {WasmWhitespaceMode | null} [whitespace_mode]
432
- * @param {boolean | null} [strip_newlines]
487
+ * @param {boolean | null} [defaultTitle]
488
+ * @param {boolean | null} [brInTables]
489
+ * @param {boolean | null} [compactTables]
490
+ * @param {WasmHighlightStyle | null} [highlightStyle]
491
+ * @param {boolean | null} [extractMetadata]
492
+ * @param {WasmWhitespaceMode | null} [whitespaceMode]
493
+ * @param {boolean | null} [stripNewlines]
433
494
  * @param {boolean | null} [wrap]
434
- * @param {number | null} [wrap_width]
435
- * @param {boolean | null} [convert_as_inline]
436
- * @param {string | null} [sub_symbol]
437
- * @param {string | null} [sup_symbol]
438
- * @param {WasmNewlineStyle | null} [newline_style]
439
- * @param {WasmCodeBlockStyle | null} [code_block_style]
440
- * @param {string[] | null} [keep_inline_images_in]
495
+ * @param {number | null} [wrapWidth]
496
+ * @param {boolean | null} [convertAsInline]
497
+ * @param {string | null} [subSymbol]
498
+ * @param {string | null} [supSymbol]
499
+ * @param {WasmNewlineStyle | null} [newlineStyle]
500
+ * @param {WasmCodeBlockStyle | null} [codeBlockStyle]
501
+ * @param {string[] | null} [keepInlineImagesIn]
441
502
  * @param {WasmPreprocessingOptions | null} [preprocessing]
442
503
  * @param {string | null} [encoding]
443
504
  * @param {boolean | null} [debug]
444
- * @param {string[] | null} [strip_tags]
445
- * @param {string[] | null} [preserve_tags]
446
- * @param {boolean | null} [skip_images]
447
- * @param {WasmLinkStyle | null} [link_style]
448
- * @param {WasmOutputFormat | null} [output_format]
449
- * @param {boolean | null} [include_document_structure]
450
- * @param {boolean | null} [extract_images]
451
- * @param {bigint | null} [max_image_size]
452
- * @param {boolean | null} [capture_svg]
453
- * @param {boolean | null} [infer_dimensions]
454
- * @param {string[] | null} [exclude_selectors]
455
- * @param {number | null} [max_depth]
456
- */
457
- 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) {
505
+ * @param {string[] | null} [stripTags]
506
+ * @param {string[] | null} [preserveTags]
507
+ * @param {boolean | null} [skipImages]
508
+ * @param {WasmLinkStyle | null} [linkStyle]
509
+ * @param {WasmOutputFormat | null} [outputFormat]
510
+ * @param {boolean | null} [includeDocumentStructure]
511
+ * @param {boolean | null} [extractImages]
512
+ * @param {bigint | null} [maxImageSize]
513
+ * @param {boolean | null} [captureSvg]
514
+ * @param {boolean | null} [inferDimensions]
515
+ * @param {string[] | null} [excludeSelectors]
516
+ * @param {number | null} [maxDepth]
517
+ */
518
+ constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, maxDepth) {
458
519
  var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
459
520
  var len0 = WASM_VECTOR_LEN;
460
- var ptr1 = isLikeNone(strong_em_symbol) ? 0 : passStringToWasm0(strong_em_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
521
+ var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
461
522
  var len1 = WASM_VECTOR_LEN;
462
- var ptr2 = isLikeNone(code_language) ? 0 : passStringToWasm0(code_language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
523
+ var ptr2 = isLikeNone(codeLanguage) ? 0 : passStringToWasm0(codeLanguage, wasm.__wbindgen_export, wasm.__wbindgen_export2);
463
524
  var len2 = WASM_VECTOR_LEN;
464
- var ptr3 = isLikeNone(sub_symbol) ? 0 : passStringToWasm0(sub_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
525
+ var ptr3 = isLikeNone(subSymbol) ? 0 : passStringToWasm0(subSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
465
526
  var len3 = WASM_VECTOR_LEN;
466
- var ptr4 = isLikeNone(sup_symbol) ? 0 : passStringToWasm0(sup_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
527
+ var ptr4 = isLikeNone(supSymbol) ? 0 : passStringToWasm0(supSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
467
528
  var len4 = WASM_VECTOR_LEN;
468
- var ptr5 = isLikeNone(keep_inline_images_in) ? 0 : passArrayJsValueToWasm0(keep_inline_images_in, wasm.__wbindgen_export);
529
+ var ptr5 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_export);
469
530
  var len5 = WASM_VECTOR_LEN;
470
531
  let ptr6 = 0;
471
532
  if (!isLikeNone(preprocessing)) {
@@ -474,13 +535,13 @@ export class WasmConversionOptions {
474
535
  }
475
536
  var ptr7 = isLikeNone(encoding) ? 0 : passStringToWasm0(encoding, wasm.__wbindgen_export, wasm.__wbindgen_export2);
476
537
  var len7 = WASM_VECTOR_LEN;
477
- var ptr8 = isLikeNone(strip_tags) ? 0 : passArrayJsValueToWasm0(strip_tags, wasm.__wbindgen_export);
538
+ var ptr8 = isLikeNone(stripTags) ? 0 : passArrayJsValueToWasm0(stripTags, wasm.__wbindgen_export);
478
539
  var len8 = WASM_VECTOR_LEN;
479
- var ptr9 = isLikeNone(preserve_tags) ? 0 : passArrayJsValueToWasm0(preserve_tags, wasm.__wbindgen_export);
540
+ var ptr9 = isLikeNone(preserveTags) ? 0 : passArrayJsValueToWasm0(preserveTags, wasm.__wbindgen_export);
480
541
  var len9 = WASM_VECTOR_LEN;
481
- var ptr10 = isLikeNone(exclude_selectors) ? 0 : passArrayJsValueToWasm0(exclude_selectors, wasm.__wbindgen_export);
542
+ var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
482
543
  var len10 = WASM_VECTOR_LEN;
483
- 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);
544
+ const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
484
545
  this.__wbg_ptr = ret;
485
546
  WasmConversionOptionsFinalization.register(this, this.__wbg_ptr, this);
486
547
  return this;
@@ -586,6 +647,12 @@ export class WasmConversionOptions {
586
647
  const len0 = WASM_VECTOR_LEN;
587
648
  wasm.wasmconversionoptions_set_codeLanguage(this.__wbg_ptr, ptr0, len0);
588
649
  }
650
+ /**
651
+ * @param {boolean} value
652
+ */
653
+ set compactTables(value) {
654
+ wasm.wasmconversionoptions_set_compactTables(this.__wbg_ptr, value);
655
+ }
589
656
  /**
590
657
  * @param {boolean} value
591
658
  */
@@ -949,113 +1016,11 @@ export class WasmConversionOptions {
949
1016
  }
950
1017
  if (Symbol.dispose) WasmConversionOptions.prototype[Symbol.dispose] = WasmConversionOptions.prototype.free;
951
1018
 
952
- /**
953
- * Builder for [`ConversionOptions`].
954
- *
955
- * All fields start with default values. Call `.build()` to produce the final options.
956
- */
957
- export class WasmConversionOptionsBuilder {
958
- static __wrap(ptr) {
959
- const obj = Object.create(WasmConversionOptionsBuilder.prototype);
960
- obj.__wbg_ptr = ptr;
961
- WasmConversionOptionsBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
962
- return obj;
963
- }
964
- __destroy_into_raw() {
965
- const ptr = this.__wbg_ptr;
966
- this.__wbg_ptr = 0;
967
- WasmConversionOptionsBuilderFinalization.unregister(this);
968
- return ptr;
969
- }
970
- free() {
971
- const ptr = this.__destroy_into_raw();
972
- wasm.__wbg_wasmconversionoptionsbuilder_free(ptr, 0);
973
- }
974
- /**
975
- * Build the final [`ConversionOptions`].
976
- * @returns {WasmConversionOptions}
977
- */
978
- build() {
979
- const ret = wasm.wasmconversionoptionsbuilder_build(this.__wbg_ptr);
980
- return WasmConversionOptions.__wrap(ret);
981
- }
982
- /**
983
- * Set the list of CSS selectors for elements to exclude entirely from output.
984
- * @param {string[]} selectors
985
- * @returns {WasmConversionOptionsBuilder}
986
- */
987
- excludeSelectors(selectors) {
988
- const ptr0 = passArrayJsValueToWasm0(selectors, wasm.__wbindgen_export);
989
- const len0 = WASM_VECTOR_LEN;
990
- const ret = wasm.wasmconversionoptionsbuilder_excludeSelectors(this.__wbg_ptr, ptr0, len0);
991
- return WasmConversionOptionsBuilder.__wrap(ret);
992
- }
993
- /**
994
- * Set the list of HTML tag names whose `<img>` children are kept inline.
995
- * @param {string[]} tags
996
- * @returns {WasmConversionOptionsBuilder}
997
- */
998
- keepInlineImagesIn(tags) {
999
- const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
1000
- const len0 = WASM_VECTOR_LEN;
1001
- const ret = wasm.wasmconversionoptionsbuilder_keepInlineImagesIn(this.__wbg_ptr, ptr0, len0);
1002
- return WasmConversionOptionsBuilder.__wrap(ret);
1003
- }
1004
- /**
1005
- * Set the pre-processing options applied to the HTML before conversion.
1006
- * @param {WasmPreprocessingOptions} preprocessing
1007
- * @returns {WasmConversionOptionsBuilder}
1008
- */
1009
- preprocessing(preprocessing) {
1010
- _assertClass(preprocessing, WasmPreprocessingOptions);
1011
- var ptr0 = preprocessing.__destroy_into_raw();
1012
- const ret = wasm.wasmconversionoptionsbuilder_preprocessing(this.__wbg_ptr, ptr0);
1013
- return WasmConversionOptionsBuilder.__wrap(ret);
1014
- }
1015
- /**
1016
- * Set the list of HTML tag names that are preserved verbatim in output.
1017
- * @param {string[]} tags
1018
- * @returns {WasmConversionOptionsBuilder}
1019
- */
1020
- preserveTags(tags) {
1021
- const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
1022
- const len0 = WASM_VECTOR_LEN;
1023
- const ret = wasm.wasmconversionoptionsbuilder_preserveTags(this.__wbg_ptr, ptr0, len0);
1024
- return WasmConversionOptionsBuilder.__wrap(ret);
1025
- }
1026
- /**
1027
- * Set the list of HTML tag names whose content is stripped from output.
1028
- * @param {string[]} tags
1029
- * @returns {WasmConversionOptionsBuilder}
1030
- */
1031
- stripTags(tags) {
1032
- const ptr0 = passArrayJsValueToWasm0(tags, wasm.__wbindgen_export);
1033
- const len0 = WASM_VECTOR_LEN;
1034
- const ret = wasm.wasmconversionoptionsbuilder_stripTags(this.__wbg_ptr, ptr0, len0);
1035
- return WasmConversionOptionsBuilder.__wrap(ret);
1036
- }
1037
- /**
1038
- * Set the visitor used during conversion.
1039
- * @param {WasmVisitorHandle | null} [visitor]
1040
- * @returns {WasmConversionOptionsBuilder}
1041
- */
1042
- visitor(visitor) {
1043
- let ptr0 = 0;
1044
- if (!isLikeNone(visitor)) {
1045
- _assertClass(visitor, WasmVisitorHandle);
1046
- ptr0 = visitor.__destroy_into_raw();
1047
- }
1048
- const ret = wasm.wasmconversionoptionsbuilder_visitor(this.__wbg_ptr, ptr0);
1049
- return WasmConversionOptionsBuilder.__wrap(ret);
1050
- }
1051
- }
1052
- if (Symbol.dispose) WasmConversionOptionsBuilder.prototype[Symbol.dispose] = WasmConversionOptionsBuilder.prototype.free;
1053
-
1054
1019
  /**
1055
1020
  * Partial update for `ConversionOptions`.
1056
1021
  *
1057
1022
  * Uses `Option<T>` fields for selective updates. Bindings use this to construct
1058
- * options from language-native types. Prefer [`ConversionOptionsBuilder`] for Rust code.
1023
+ * options from language-native types. Prefer `ConversionOptionsBuilder` for Rust code.
1059
1024
  */
1060
1025
  export class WasmConversionOptionsUpdate {
1061
1026
  static __wrap(ptr) {
@@ -1152,6 +1117,13 @@ export class WasmConversionOptionsUpdate {
1152
1117
  wasm.__wbindgen_add_to_stack_pointer(16);
1153
1118
  }
1154
1119
  }
1120
+ /**
1121
+ * @returns {boolean | undefined}
1122
+ */
1123
+ get compactTables() {
1124
+ const ret = wasm.wasmconversionoptionsupdate_compactTables(this.__wbg_ptr);
1125
+ return ret === 0xFFFFFF ? undefined : ret !== 0;
1126
+ }
1155
1127
  /**
1156
1128
  * @returns {boolean | undefined}
1157
1129
  */
@@ -1398,59 +1370,60 @@ export class WasmConversionOptionsUpdate {
1398
1370
  }
1399
1371
  }
1400
1372
  /**
1401
- * @param {WasmHeadingStyle | null} [heading_style]
1402
- * @param {WasmListIndentType | null} [list_indent_type]
1403
- * @param {number | null} [list_indent_width]
1373
+ * @param {WasmHeadingStyle | null} [headingStyle]
1374
+ * @param {WasmListIndentType | null} [listIndentType]
1375
+ * @param {number | null} [listIndentWidth]
1404
1376
  * @param {string | null} [bullets]
1405
- * @param {string | null} [strong_em_symbol]
1406
- * @param {boolean | null} [escape_asterisks]
1407
- * @param {boolean | null} [escape_underscores]
1408
- * @param {boolean | null} [escape_misc]
1409
- * @param {boolean | null} [escape_ascii]
1410
- * @param {string | null} [code_language]
1377
+ * @param {string | null} [strongEmSymbol]
1378
+ * @param {boolean | null} [escapeAsterisks]
1379
+ * @param {boolean | null} [escapeUnderscores]
1380
+ * @param {boolean | null} [escapeMisc]
1381
+ * @param {boolean | null} [escapeAscii]
1382
+ * @param {string | null} [codeLanguage]
1411
1383
  * @param {boolean | null} [autolinks]
1412
- * @param {boolean | null} [default_title]
1413
- * @param {boolean | null} [br_in_tables]
1414
- * @param {WasmHighlightStyle | null} [highlight_style]
1415
- * @param {boolean | null} [extract_metadata]
1416
- * @param {WasmWhitespaceMode | null} [whitespace_mode]
1417
- * @param {boolean | null} [strip_newlines]
1384
+ * @param {boolean | null} [defaultTitle]
1385
+ * @param {boolean | null} [brInTables]
1386
+ * @param {boolean | null} [compactTables]
1387
+ * @param {WasmHighlightStyle | null} [highlightStyle]
1388
+ * @param {boolean | null} [extractMetadata]
1389
+ * @param {WasmWhitespaceMode | null} [whitespaceMode]
1390
+ * @param {boolean | null} [stripNewlines]
1418
1391
  * @param {boolean | null} [wrap]
1419
- * @param {number | null} [wrap_width]
1420
- * @param {boolean | null} [convert_as_inline]
1421
- * @param {string | null} [sub_symbol]
1422
- * @param {string | null} [sup_symbol]
1423
- * @param {WasmNewlineStyle | null} [newline_style]
1424
- * @param {WasmCodeBlockStyle | null} [code_block_style]
1425
- * @param {string[] | null} [keep_inline_images_in]
1392
+ * @param {number | null} [wrapWidth]
1393
+ * @param {boolean | null} [convertAsInline]
1394
+ * @param {string | null} [subSymbol]
1395
+ * @param {string | null} [supSymbol]
1396
+ * @param {WasmNewlineStyle | null} [newlineStyle]
1397
+ * @param {WasmCodeBlockStyle | null} [codeBlockStyle]
1398
+ * @param {string[] | null} [keepInlineImagesIn]
1426
1399
  * @param {WasmPreprocessingOptionsUpdate | null} [preprocessing]
1427
1400
  * @param {string | null} [encoding]
1428
1401
  * @param {boolean | null} [debug]
1429
- * @param {string[] | null} [strip_tags]
1430
- * @param {string[] | null} [preserve_tags]
1431
- * @param {boolean | null} [skip_images]
1432
- * @param {WasmLinkStyle | null} [link_style]
1433
- * @param {WasmOutputFormat | null} [output_format]
1434
- * @param {boolean | null} [include_document_structure]
1435
- * @param {boolean | null} [extract_images]
1436
- * @param {bigint | null} [max_image_size]
1437
- * @param {boolean | null} [capture_svg]
1438
- * @param {boolean | null} [infer_dimensions]
1439
- * @param {number | null} [max_depth]
1440
- * @param {string[] | null} [exclude_selectors]
1441
- */
1442
- 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) {
1402
+ * @param {string[] | null} [stripTags]
1403
+ * @param {string[] | null} [preserveTags]
1404
+ * @param {boolean | null} [skipImages]
1405
+ * @param {WasmLinkStyle | null} [linkStyle]
1406
+ * @param {WasmOutputFormat | null} [outputFormat]
1407
+ * @param {boolean | null} [includeDocumentStructure]
1408
+ * @param {boolean | null} [extractImages]
1409
+ * @param {bigint | null} [maxImageSize]
1410
+ * @param {boolean | null} [captureSvg]
1411
+ * @param {boolean | null} [inferDimensions]
1412
+ * @param {number | null} [maxDepth]
1413
+ * @param {string[] | null} [excludeSelectors]
1414
+ */
1415
+ constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors) {
1443
1416
  var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1444
1417
  var len0 = WASM_VECTOR_LEN;
1445
- var ptr1 = isLikeNone(strong_em_symbol) ? 0 : passStringToWasm0(strong_em_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1418
+ var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1446
1419
  var len1 = WASM_VECTOR_LEN;
1447
- var ptr2 = isLikeNone(code_language) ? 0 : passStringToWasm0(code_language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1420
+ var ptr2 = isLikeNone(codeLanguage) ? 0 : passStringToWasm0(codeLanguage, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1448
1421
  var len2 = WASM_VECTOR_LEN;
1449
- var ptr3 = isLikeNone(sub_symbol) ? 0 : passStringToWasm0(sub_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1422
+ var ptr3 = isLikeNone(subSymbol) ? 0 : passStringToWasm0(subSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1450
1423
  var len3 = WASM_VECTOR_LEN;
1451
- var ptr4 = isLikeNone(sup_symbol) ? 0 : passStringToWasm0(sup_symbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1424
+ var ptr4 = isLikeNone(supSymbol) ? 0 : passStringToWasm0(supSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1452
1425
  var len4 = WASM_VECTOR_LEN;
1453
- var ptr5 = isLikeNone(keep_inline_images_in) ? 0 : passArrayJsValueToWasm0(keep_inline_images_in, wasm.__wbindgen_export);
1426
+ var ptr5 = isLikeNone(keepInlineImagesIn) ? 0 : passArrayJsValueToWasm0(keepInlineImagesIn, wasm.__wbindgen_export);
1454
1427
  var len5 = WASM_VECTOR_LEN;
1455
1428
  let ptr6 = 0;
1456
1429
  if (!isLikeNone(preprocessing)) {
@@ -1459,13 +1432,13 @@ export class WasmConversionOptionsUpdate {
1459
1432
  }
1460
1433
  var ptr7 = isLikeNone(encoding) ? 0 : passStringToWasm0(encoding, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1461
1434
  var len7 = WASM_VECTOR_LEN;
1462
- var ptr8 = isLikeNone(strip_tags) ? 0 : passArrayJsValueToWasm0(strip_tags, wasm.__wbindgen_export);
1435
+ var ptr8 = isLikeNone(stripTags) ? 0 : passArrayJsValueToWasm0(stripTags, wasm.__wbindgen_export);
1463
1436
  var len8 = WASM_VECTOR_LEN;
1464
- var ptr9 = isLikeNone(preserve_tags) ? 0 : passArrayJsValueToWasm0(preserve_tags, wasm.__wbindgen_export);
1437
+ var ptr9 = isLikeNone(preserveTags) ? 0 : passArrayJsValueToWasm0(preserveTags, wasm.__wbindgen_export);
1465
1438
  var len9 = WASM_VECTOR_LEN;
1466
- var ptr10 = isLikeNone(exclude_selectors) ? 0 : passArrayJsValueToWasm0(exclude_selectors, wasm.__wbindgen_export);
1439
+ var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
1467
1440
  var len10 = WASM_VECTOR_LEN;
1468
- 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);
1441
+ const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10);
1469
1442
  this.__wbg_ptr = ret;
1470
1443
  WasmConversionOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
1471
1444
  return this;
@@ -1574,6 +1547,12 @@ export class WasmConversionOptionsUpdate {
1574
1547
  var len0 = WASM_VECTOR_LEN;
1575
1548
  wasm.wasmconversionoptionsupdate_set_codeLanguage(this.__wbg_ptr, ptr0, len0);
1576
1549
  }
1550
+ /**
1551
+ * @param {boolean | null} [value]
1552
+ */
1553
+ set compactTables(value) {
1554
+ wasm.wasmconversionoptionsupdate_set_compactTables(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value ? 1 : 0);
1555
+ }
1577
1556
  /**
1578
1557
  * @param {boolean | null} [value]
1579
1558
  */
@@ -2148,17 +2127,6 @@ if (Symbol.dispose) WasmConversionResult.prototype[Symbol.dispose] = WasmConvers
2148
2127
  * and browsers for document indexing and presentation.
2149
2128
  *
2150
2129
  * # Examples
2151
- *
2152
- * ```
2153
- * let doc = DocumentMetadata {
2154
- * title: Some("My Article".to_string()),
2155
- * description: Some("A great article about Rust".to_string()),
2156
- * keywords: vec!["rust".to_string(), "programming".to_string()],
2157
- * ..Default::default()
2158
- * };
2159
- *
2160
- * assert_eq!(doc.title, Some("My Article".to_string()));
2161
- * ```
2162
2130
  */
2163
2131
  export class WasmDocumentMetadata {
2164
2132
  static __wrap(ptr) {
@@ -2304,18 +2272,18 @@ export class WasmDocumentMetadata {
2304
2272
  }
2305
2273
  /**
2306
2274
  * @param {string[] | null} [keywords]
2307
- * @param {any | null} [open_graph]
2308
- * @param {any | null} [twitter_card]
2309
- * @param {any | null} [meta_tags]
2275
+ * @param {any | null} [openGraph]
2276
+ * @param {any | null} [twitterCard]
2277
+ * @param {any | null} [metaTags]
2310
2278
  * @param {string | null} [title]
2311
2279
  * @param {string | null} [description]
2312
2280
  * @param {string | null} [author]
2313
- * @param {string | null} [canonical_url]
2314
- * @param {string | null} [base_href]
2281
+ * @param {string | null} [canonicalUrl]
2282
+ * @param {string | null} [baseHref]
2315
2283
  * @param {string | null} [language]
2316
- * @param {WasmTextDirection | null} [text_direction]
2284
+ * @param {WasmTextDirection | null} [textDirection]
2317
2285
  */
2318
- constructor(keywords, open_graph, twitter_card, meta_tags, title, description, author, canonical_url, base_href, language, text_direction) {
2286
+ constructor(keywords, openGraph, twitterCard, metaTags, title, description, author, canonicalUrl, baseHref, language, textDirection) {
2319
2287
  var ptr0 = isLikeNone(keywords) ? 0 : passArrayJsValueToWasm0(keywords, wasm.__wbindgen_export);
2320
2288
  var len0 = WASM_VECTOR_LEN;
2321
2289
  var ptr1 = isLikeNone(title) ? 0 : passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -2324,13 +2292,13 @@ export class WasmDocumentMetadata {
2324
2292
  var len2 = WASM_VECTOR_LEN;
2325
2293
  var ptr3 = isLikeNone(author) ? 0 : passStringToWasm0(author, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2326
2294
  var len3 = WASM_VECTOR_LEN;
2327
- var ptr4 = isLikeNone(canonical_url) ? 0 : passStringToWasm0(canonical_url, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2295
+ var ptr4 = isLikeNone(canonicalUrl) ? 0 : passStringToWasm0(canonicalUrl, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2328
2296
  var len4 = WASM_VECTOR_LEN;
2329
- var ptr5 = isLikeNone(base_href) ? 0 : passStringToWasm0(base_href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2297
+ var ptr5 = isLikeNone(baseHref) ? 0 : passStringToWasm0(baseHref, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2330
2298
  var len5 = WASM_VECTOR_LEN;
2331
2299
  var ptr6 = isLikeNone(language) ? 0 : passStringToWasm0(language, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2332
2300
  var len6 = WASM_VECTOR_LEN;
2333
- 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);
2301
+ const ret = wasm.wasmdocumentmetadata_new(ptr0, len0, isLikeNone(openGraph) ? 0 : addHeapObject(openGraph), isLikeNone(twitterCard) ? 0 : addHeapObject(twitterCard), isLikeNone(metaTags) ? 0 : addHeapObject(metaTags), ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, isLikeNone(textDirection) ? 3 : textDirection);
2334
2302
  this.__wbg_ptr = ret;
2335
2303
  WasmDocumentMetadataFinalization.register(this, this.__wbg_ptr, this);
2336
2304
  return this;
@@ -2536,23 +2504,11 @@ export class WasmDocumentNode {
2536
2504
  }
2537
2505
  }
2538
2506
  /**
2539
- * @returns {string}
2507
+ * @returns {any}
2540
2508
  */
2541
2509
  get content() {
2542
- let deferred1_0;
2543
- let deferred1_1;
2544
- try {
2545
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2546
- wasm.wasmdocumentnode_content(retptr, this.__wbg_ptr);
2547
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2548
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2549
- deferred1_0 = r0;
2550
- deferred1_1 = r1;
2551
- return getStringFromWasm0(r0, r1);
2552
- } finally {
2553
- wasm.__wbindgen_add_to_stack_pointer(16);
2554
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
2555
- }
2510
+ const ret = wasm.wasmdocumentnode_content(this.__wbg_ptr);
2511
+ return takeObject(ret);
2556
2512
  }
2557
2513
  /**
2558
2514
  * @returns {WasmDocumentNode}
@@ -2582,7 +2538,7 @@ export class WasmDocumentNode {
2582
2538
  }
2583
2539
  /**
2584
2540
  * @param {string} id
2585
- * @param {WasmNodeContent} content
2541
+ * @param {any} content
2586
2542
  * @param {Uint32Array} children
2587
2543
  * @param {WasmTextAnnotation[]} annotations
2588
2544
  * @param {number | null} [parent]
@@ -2595,7 +2551,7 @@ export class WasmDocumentNode {
2595
2551
  const len1 = WASM_VECTOR_LEN;
2596
2552
  const ptr2 = passArrayJsValueToWasm0(annotations, wasm.__wbindgen_export);
2597
2553
  const len2 = WASM_VECTOR_LEN;
2598
- const ret = wasm.wasmdocumentnode_new(ptr0, len0, content, ptr1, len1, ptr2, len2, isLikeNone(parent) ? Number.MAX_SAFE_INTEGER : (parent) >>> 0, isLikeNone(attributes) ? 0 : addHeapObject(attributes));
2554
+ const ret = wasm.wasmdocumentnode_new(ptr0, len0, addHeapObject(content), ptr1, len1, ptr2, len2, isLikeNone(parent) ? Number.MAX_SAFE_INTEGER : (parent) >>> 0, isLikeNone(attributes) ? 0 : addHeapObject(attributes));
2599
2555
  this.__wbg_ptr = ret;
2600
2556
  WasmDocumentNodeFinalization.register(this, this.__wbg_ptr, this);
2601
2557
  return this;
@@ -2630,10 +2586,10 @@ export class WasmDocumentNode {
2630
2586
  wasm.wasmdocumentnode_set_children(this.__wbg_ptr, ptr0, len0);
2631
2587
  }
2632
2588
  /**
2633
- * @param {WasmNodeContent} value
2589
+ * @param {any} value
2634
2590
  */
2635
2591
  set content(value) {
2636
- wasm.wasmdocumentnode_set_content(this.__wbg_ptr, value);
2592
+ wasm.wasmdocumentnode_set_content(this.__wbg_ptr, addHeapObject(value));
2637
2593
  }
2638
2594
  /**
2639
2595
  * @param {string} value
@@ -2683,12 +2639,12 @@ export class WasmDocumentStructure {
2683
2639
  }
2684
2640
  /**
2685
2641
  * @param {WasmDocumentNode[]} nodes
2686
- * @param {string | null} [source_format]
2642
+ * @param {string | null} [sourceFormat]
2687
2643
  */
2688
- constructor(nodes, source_format) {
2644
+ constructor(nodes, sourceFormat) {
2689
2645
  const ptr0 = passArrayJsValueToWasm0(nodes, wasm.__wbindgen_export);
2690
2646
  const len0 = WASM_VECTOR_LEN;
2691
- var ptr1 = isLikeNone(source_format) ? 0 : passStringToWasm0(source_format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2647
+ var ptr1 = isLikeNone(sourceFormat) ? 0 : passStringToWasm0(sourceFormat, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2692
2648
  var len1 = WASM_VECTOR_LEN;
2693
2649
  const ret = wasm.wasmdocumentstructure_new(ptr0, len0, ptr1, len1);
2694
2650
  this.__wbg_ptr = ret;
@@ -2826,14 +2782,14 @@ export class WasmGridCell {
2826
2782
  * @param {string} content
2827
2783
  * @param {number} row
2828
2784
  * @param {number} col
2829
- * @param {number} row_span
2830
- * @param {number} col_span
2831
- * @param {boolean} is_header
2785
+ * @param {number} rowSpan
2786
+ * @param {number} colSpan
2787
+ * @param {boolean} isHeader
2832
2788
  */
2833
- constructor(content, row, col, row_span, col_span, is_header) {
2789
+ constructor(content, row, col, rowSpan, colSpan, isHeader) {
2834
2790
  const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2835
2791
  const len0 = WASM_VECTOR_LEN;
2836
- const ret = wasm.wasmgridcell_new(ptr0, len0, row, col, row_span, col_span, is_header);
2792
+ const ret = wasm.wasmgridcell_new(ptr0, len0, row, col, rowSpan, colSpan, isHeader);
2837
2793
  this.__wbg_ptr = ret;
2838
2794
  WasmGridCellFinalization.register(this, this.__wbg_ptr, this);
2839
2795
  return this;
@@ -2900,19 +2856,6 @@ if (Symbol.dispose) WasmGridCell.prototype[Symbol.dispose] = WasmGridCell.protot
2900
2856
  * and position in the document structure.
2901
2857
  *
2902
2858
  * # Examples
2903
- *
2904
- * ```
2905
- * let header = HeaderMetadata {
2906
- * level: 1,
2907
- * text: "Main Title".to_string(),
2908
- * id: Some("main-title".to_string()),
2909
- * depth: 0,
2910
- * html_offset: 145,
2911
- * };
2912
- *
2913
- * assert_eq!(header.level, 1);
2914
- * assert!(header.is_valid());
2915
- * ```
2916
2859
  */
2917
2860
  export class WasmHeaderMetadata {
2918
2861
  static __wrap(ptr) {
@@ -2985,26 +2928,6 @@ export class WasmHeaderMetadata {
2985
2928
  * `true` if level is 1-6, `false` otherwise.
2986
2929
  *
2987
2930
  * # Examples
2988
- *
2989
- * ```
2990
- * let valid = HeaderMetadata {
2991
- * level: 3,
2992
- * text: "Title".to_string(),
2993
- * id: None,
2994
- * depth: 2,
2995
- * html_offset: 100,
2996
- * };
2997
- * assert!(valid.is_valid());
2998
- *
2999
- * let invalid = HeaderMetadata {
3000
- * level: 7, // Invalid
3001
- * text: "Title".to_string(),
3002
- * id: None,
3003
- * depth: 2,
3004
- * html_offset: 100,
3005
- * };
3006
- * assert!(!invalid.is_valid());
3007
- * ```
3008
2931
  * @returns {boolean}
3009
2932
  */
3010
2933
  isValid() {
@@ -3022,15 +2945,15 @@ export class WasmHeaderMetadata {
3022
2945
  * @param {number} level
3023
2946
  * @param {string} text
3024
2947
  * @param {number} depth
3025
- * @param {number} html_offset
2948
+ * @param {number} htmlOffset
3026
2949
  * @param {string | null} [id]
3027
2950
  */
3028
- constructor(level, text, depth, html_offset, id) {
2951
+ constructor(level, text, depth, htmlOffset, id) {
3029
2952
  const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3030
2953
  const len0 = WASM_VECTOR_LEN;
3031
2954
  var ptr1 = isLikeNone(id) ? 0 : passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3032
2955
  var len1 = WASM_VECTOR_LEN;
3033
- const ret = wasm.wasmheadermetadata_new(level, ptr0, len0, depth, html_offset, ptr1, len1);
2956
+ const ret = wasm.wasmheadermetadata_new(level, ptr0, len0, depth, htmlOffset, ptr1, len1);
3034
2957
  this.__wbg_ptr = ret;
3035
2958
  WasmHeaderMetadataFinalization.register(this, this.__wbg_ptr, this);
3036
2959
  return this;
@@ -3123,18 +3046,6 @@ export const WasmHighlightStyle = Object.freeze({
3123
3046
  * suitable for serialization and transmission across language boundaries.
3124
3047
  *
3125
3048
  * # Examples
3126
- *
3127
- * ```
3128
- * let metadata = HtmlMetadata {
3129
- * document: Default::default(),
3130
- * headers: Vec::new(),
3131
- * links: Vec::new(),
3132
- * images: Vec::new(),
3133
- * structured_data: Vec::new(),
3134
- * };
3135
- *
3136
- * assert!(metadata.headers.is_empty());
3137
- * ```
3138
3049
  */
3139
3050
  export class WasmHtmlMetadata {
3140
3051
  static __wrap(ptr) {
@@ -3220,9 +3131,9 @@ export class WasmHtmlMetadata {
3220
3131
  * @param {WasmHeaderMetadata[] | null} [headers]
3221
3132
  * @param {WasmLinkMetadata[] | null} [links]
3222
3133
  * @param {WasmImageMetadata[] | null} [images]
3223
- * @param {WasmStructuredData[] | null} [structured_data]
3134
+ * @param {WasmStructuredData[] | null} [structuredData]
3224
3135
  */
3225
- constructor(document, headers, links, images, structured_data) {
3136
+ constructor(document, headers, links, images, structuredData) {
3226
3137
  let ptr0 = 0;
3227
3138
  if (!isLikeNone(document)) {
3228
3139
  _assertClass(document, WasmDocumentMetadata);
@@ -3234,7 +3145,7 @@ export class WasmHtmlMetadata {
3234
3145
  var len2 = WASM_VECTOR_LEN;
3235
3146
  var ptr3 = isLikeNone(images) ? 0 : passArrayJsValueToWasm0(images, wasm.__wbindgen_export);
3236
3147
  var len3 = WASM_VECTOR_LEN;
3237
- var ptr4 = isLikeNone(structured_data) ? 0 : passArrayJsValueToWasm0(structured_data, wasm.__wbindgen_export);
3148
+ var ptr4 = isLikeNone(structuredData) ? 0 : passArrayJsValueToWasm0(structuredData, wasm.__wbindgen_export);
3238
3149
  var len4 = WASM_VECTOR_LEN;
3239
3150
  const ret = wasm.wasmhtmlmetadata_new(ptr0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
3240
3151
  this.__wbg_ptr = ret;
@@ -3307,19 +3218,6 @@ if (Symbol.dispose) WasmHtmlMetadata.prototype[Symbol.dispose] = WasmHtmlMetadat
3307
3218
  * for image analysis and optimization.
3308
3219
  *
3309
3220
  * # Examples
3310
- *
3311
- * ```
3312
- * let img = ImageMetadata {
3313
- * src: "https://example.com/image.jpg".to_string(),
3314
- * alt: Some("An example image".to_string()),
3315
- * title: Some("Example".to_string()),
3316
- * dimensions: Some((800, 600)),
3317
- * image_type: ImageType::External,
3318
- * attributes: Default::default(),
3319
- * };
3320
- *
3321
- * assert_eq!(img.image_type, ImageType::External);
3322
- * ```
3323
3221
  */
3324
3222
  export class WasmImageMetadata {
3325
3223
  static __wrap(ptr) {
@@ -3417,13 +3315,13 @@ export class WasmImageMetadata {
3417
3315
  }
3418
3316
  /**
3419
3317
  * @param {string} src
3420
- * @param {WasmImageType} image_type
3318
+ * @param {WasmImageType} imageType
3421
3319
  * @param {any} attributes
3422
3320
  * @param {string | null} [alt]
3423
3321
  * @param {string | null} [title]
3424
3322
  * @param {Uint32Array | null} [dimensions]
3425
3323
  */
3426
- constructor(src, image_type, attributes, alt, title, dimensions) {
3324
+ constructor(src, imageType, attributes, alt, title, dimensions) {
3427
3325
  const ptr0 = passStringToWasm0(src, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3428
3326
  const len0 = WASM_VECTOR_LEN;
3429
3327
  var ptr1 = isLikeNone(alt) ? 0 : passStringToWasm0(alt, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -3432,7 +3330,7 @@ export class WasmImageMetadata {
3432
3330
  var len2 = WASM_VECTOR_LEN;
3433
3331
  var ptr3 = isLikeNone(dimensions) ? 0 : passArray32ToWasm0(dimensions, wasm.__wbindgen_export);
3434
3332
  var len3 = WASM_VECTOR_LEN;
3435
- const ret = wasm.wasmimagemetadata_new(ptr0, len0, image_type, addHeapObject(attributes), ptr1, len1, ptr2, len2, ptr3, len3);
3333
+ const ret = wasm.wasmimagemetadata_new(ptr0, len0, imageType, addHeapObject(attributes), ptr1, len1, ptr2, len2, ptr3, len3);
3436
3334
  this.__wbg_ptr = ret;
3437
3335
  WasmImageMetadataFinalization.register(this, this.__wbg_ptr, this);
3438
3336
  return this;
@@ -3541,20 +3439,6 @@ export const WasmImageType = Object.freeze({
3541
3439
  * Represents `<a>` elements with parsed href values, text content, and link type classification.
3542
3440
  *
3543
3441
  * # Examples
3544
- *
3545
- * ```
3546
- * let link = LinkMetadata {
3547
- * href: "https://example.com".to_string(),
3548
- * text: "Example".to_string(),
3549
- * title: Some("Visit Example".to_string()),
3550
- * link_type: LinkType::External,
3551
- * rel: vec!["nofollow".to_string()],
3552
- * attributes: Default::default(),
3553
- * };
3554
- *
3555
- * assert_eq!(link.link_type, LinkType::External);
3556
- * assert_eq!(link.text, "Example");
3557
- * ```
3558
3442
  */
3559
3443
  export class WasmLinkMetadata {
3560
3444
  static __wrap(ptr) {
@@ -3586,34 +3470,6 @@ export class WasmLinkMetadata {
3586
3470
  const ret = wasm.wasmlinkmetadata_attributes(this.__wbg_ptr);
3587
3471
  return takeObject(ret);
3588
3472
  }
3589
- /**
3590
- * Classify a link based on href value.
3591
- *
3592
- * # Arguments
3593
- *
3594
- * * `href` - The href attribute value
3595
- *
3596
- * # Returns
3597
- *
3598
- * Appropriate [`LinkType`] based on protocol and content.
3599
- *
3600
- * # Examples
3601
- *
3602
- * ```
3603
- * assert_eq!(LinkMetadata::classify_link("#section"), LinkType::Anchor);
3604
- * assert_eq!(LinkMetadata::classify_link("mailto:test@example.com"), LinkType::Email);
3605
- * assert_eq!(LinkMetadata::classify_link("tel:+1234567890"), LinkType::Phone);
3606
- * assert_eq!(LinkMetadata::classify_link("https://example.com"), LinkType::External);
3607
- * ```
3608
- * @param {string} href
3609
- * @returns {WasmLinkType}
3610
- */
3611
- static classifyLink(href) {
3612
- const ptr0 = passStringToWasm0(href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3613
- const len0 = WASM_VECTOR_LEN;
3614
- const ret = wasm.wasmlinkmetadata_classifyLink(ptr0, len0);
3615
- return ret;
3616
- }
3617
3473
  /**
3618
3474
  * @returns {WasmLinkMetadata}
3619
3475
  */
@@ -3662,12 +3518,12 @@ export class WasmLinkMetadata {
3662
3518
  /**
3663
3519
  * @param {string} href
3664
3520
  * @param {string} text
3665
- * @param {WasmLinkType} link_type
3521
+ * @param {WasmLinkType} linkType
3666
3522
  * @param {string[]} rel
3667
3523
  * @param {any} attributes
3668
3524
  * @param {string | null} [title]
3669
3525
  */
3670
- constructor(href, text, link_type, rel, attributes, title) {
3526
+ constructor(href, text, linkType, rel, attributes, title) {
3671
3527
  const ptr0 = passStringToWasm0(href, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3672
3528
  const len0 = WASM_VECTOR_LEN;
3673
3529
  const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -3676,7 +3532,7 @@ export class WasmLinkMetadata {
3676
3532
  const len2 = WASM_VECTOR_LEN;
3677
3533
  var ptr3 = isLikeNone(title) ? 0 : passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3678
3534
  var len3 = WASM_VECTOR_LEN;
3679
- const ret = wasm.wasmlinkmetadata_new(ptr0, len0, ptr1, len1, link_type, ptr2, len2, addHeapObject(attributes), ptr3, len3);
3535
+ const ret = wasm.wasmlinkmetadata_new(ptr0, len0, ptr1, len1, linkType, ptr2, len2, addHeapObject(attributes), ptr3, len3);
3680
3536
  this.__wbg_ptr = ret;
3681
3537
  WasmLinkMetadataFinalization.register(this, this.__wbg_ptr, this);
3682
3538
  return this;
@@ -3835,61 +3691,457 @@ export const WasmNewlineStyle = Object.freeze({
3835
3691
  * The semantic content type of a document node.
3836
3692
  *
3837
3693
  * Uses internally tagged representation (`"node_type": "heading"`) for JSON serialization.
3838
- * @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12}
3839
- */
3840
- export const WasmNodeContent = Object.freeze({
3841
- Heading: 0, "0": "Heading",
3842
- Paragraph: 1, "1": "Paragraph",
3843
- List: 2, "2": "List",
3844
- ListItem: 3, "3": "ListItem",
3845
- Table: 4, "4": "Table",
3846
- Image: 5, "5": "Image",
3847
- Code: 6, "6": "Code",
3848
- Quote: 7, "7": "Quote",
3849
- DefinitionList: 8, "8": "DefinitionList",
3850
- DefinitionItem: 9, "9": "DefinitionItem",
3851
- RawBlock: 10, "10": "RawBlock",
3852
- MetadataBlock: 11, "11": "MetadataBlock",
3853
- Group: 12, "12": "Group",
3854
- });
3855
-
3856
- /**
3857
- * Context information passed to all visitor methods.
3858
- *
3859
- * Provides comprehensive metadata about the current node being visited,
3860
- * including its type, attributes, position in the DOM tree, and parent context.
3861
3694
  */
3862
- export class WasmNodeContext {
3695
+ export class WasmNodeContent {
3863
3696
  static __wrap(ptr) {
3864
- const obj = Object.create(WasmNodeContext.prototype);
3697
+ const obj = Object.create(WasmNodeContent.prototype);
3865
3698
  obj.__wbg_ptr = ptr;
3866
- WasmNodeContextFinalization.register(obj, obj.__wbg_ptr, obj);
3699
+ WasmNodeContentFinalization.register(obj, obj.__wbg_ptr, obj);
3867
3700
  return obj;
3868
3701
  }
3869
3702
  __destroy_into_raw() {
3870
3703
  const ptr = this.__wbg_ptr;
3871
3704
  this.__wbg_ptr = 0;
3872
- WasmNodeContextFinalization.unregister(this);
3705
+ WasmNodeContentFinalization.unregister(this);
3873
3706
  return ptr;
3874
3707
  }
3875
3708
  free() {
3876
3709
  const ptr = this.__destroy_into_raw();
3877
- wasm.__wbg_wasmnodecontext_free(ptr, 0);
3878
- }
3879
- /**
3880
- * @returns {any}
3881
- */
3882
- get attributes() {
3883
- const ret = wasm.wasmnodecontext_attributes(this.__wbg_ptr);
3884
- return takeObject(ret);
3710
+ wasm.__wbg_wasmnodecontent_free(ptr, 0);
3885
3711
  }
3886
3712
  /**
3887
- * @returns {WasmNodeContext}
3713
+ * @returns {string | undefined}
3888
3714
  */
3889
- static default() {
3890
- const ret = wasm.wasmnodecontext_default();
3891
- return WasmNodeContext.__wrap(ret);
3892
- }
3715
+ get content() {
3716
+ try {
3717
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3718
+ wasm.wasmnodecontent_content(retptr, this.__wbg_ptr);
3719
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3720
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3721
+ let v1;
3722
+ if (r0 !== 0) {
3723
+ v1 = getStringFromWasm0(r0, r1).slice();
3724
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3725
+ }
3726
+ return v1;
3727
+ } finally {
3728
+ wasm.__wbindgen_add_to_stack_pointer(16);
3729
+ }
3730
+ }
3731
+ /**
3732
+ * @returns {WasmNodeContent}
3733
+ */
3734
+ static default() {
3735
+ const ret = wasm.wasmnodecontent_default();
3736
+ return WasmNodeContent.__wrap(ret);
3737
+ }
3738
+ /**
3739
+ * @returns {string | undefined}
3740
+ */
3741
+ get definition() {
3742
+ try {
3743
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3744
+ wasm.wasmnodecontent_definition(retptr, this.__wbg_ptr);
3745
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3746
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3747
+ let v1;
3748
+ if (r0 !== 0) {
3749
+ v1 = getStringFromWasm0(r0, r1).slice();
3750
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3751
+ }
3752
+ return v1;
3753
+ } finally {
3754
+ wasm.__wbindgen_add_to_stack_pointer(16);
3755
+ }
3756
+ }
3757
+ /**
3758
+ * @returns {string | undefined}
3759
+ */
3760
+ get description() {
3761
+ try {
3762
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3763
+ wasm.wasmnodecontent_description(retptr, this.__wbg_ptr);
3764
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3765
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3766
+ let v1;
3767
+ if (r0 !== 0) {
3768
+ v1 = getStringFromWasm0(r0, r1).slice();
3769
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3770
+ }
3771
+ return v1;
3772
+ } finally {
3773
+ wasm.__wbindgen_add_to_stack_pointer(16);
3774
+ }
3775
+ }
3776
+ /**
3777
+ * @returns {any | undefined}
3778
+ */
3779
+ get entries() {
3780
+ const ret = wasm.wasmnodecontent_entries(this.__wbg_ptr);
3781
+ return takeObject(ret);
3782
+ }
3783
+ /**
3784
+ * @returns {string | undefined}
3785
+ */
3786
+ get format() {
3787
+ try {
3788
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3789
+ wasm.wasmnodecontent_format(retptr, this.__wbg_ptr);
3790
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3791
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3792
+ let v1;
3793
+ if (r0 !== 0) {
3794
+ v1 = getStringFromWasm0(r0, r1).slice();
3795
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3796
+ }
3797
+ return v1;
3798
+ } finally {
3799
+ wasm.__wbindgen_add_to_stack_pointer(16);
3800
+ }
3801
+ }
3802
+ /**
3803
+ * @returns {WasmTableGrid | undefined}
3804
+ */
3805
+ get grid() {
3806
+ const ret = wasm.wasmnodecontent_grid(this.__wbg_ptr);
3807
+ return ret === 0 ? undefined : WasmTableGrid.__wrap(ret);
3808
+ }
3809
+ /**
3810
+ * @returns {number | undefined}
3811
+ */
3812
+ get headingLevel() {
3813
+ const ret = wasm.wasmnodecontent_headingLevel(this.__wbg_ptr);
3814
+ return ret === 0xFFFFFF ? undefined : ret;
3815
+ }
3816
+ /**
3817
+ * @returns {string | undefined}
3818
+ */
3819
+ get headingText() {
3820
+ try {
3821
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3822
+ wasm.wasmnodecontent_headingText(retptr, this.__wbg_ptr);
3823
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3824
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3825
+ let v1;
3826
+ if (r0 !== 0) {
3827
+ v1 = getStringFromWasm0(r0, r1).slice();
3828
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3829
+ }
3830
+ return v1;
3831
+ } finally {
3832
+ wasm.__wbindgen_add_to_stack_pointer(16);
3833
+ }
3834
+ }
3835
+ /**
3836
+ * @returns {number | undefined}
3837
+ */
3838
+ get imageIndex() {
3839
+ const ret = wasm.wasmnodecontent_imageIndex(this.__wbg_ptr);
3840
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
3841
+ }
3842
+ /**
3843
+ * @returns {string | undefined}
3844
+ */
3845
+ get label() {
3846
+ try {
3847
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3848
+ wasm.wasmnodecontent_label(retptr, this.__wbg_ptr);
3849
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3850
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3851
+ let v1;
3852
+ if (r0 !== 0) {
3853
+ v1 = getStringFromWasm0(r0, r1).slice();
3854
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3855
+ }
3856
+ return v1;
3857
+ } finally {
3858
+ wasm.__wbindgen_add_to_stack_pointer(16);
3859
+ }
3860
+ }
3861
+ /**
3862
+ * @returns {string | undefined}
3863
+ */
3864
+ get language() {
3865
+ try {
3866
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3867
+ wasm.wasmnodecontent_language(retptr, this.__wbg_ptr);
3868
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3869
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3870
+ let v1;
3871
+ if (r0 !== 0) {
3872
+ v1 = getStringFromWasm0(r0, r1).slice();
3873
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
3874
+ }
3875
+ return v1;
3876
+ } finally {
3877
+ wasm.__wbindgen_add_to_stack_pointer(16);
3878
+ }
3879
+ }
3880
+ /**
3881
+ * @returns {number | undefined}
3882
+ */
3883
+ get level() {
3884
+ const ret = wasm.wasmnodecontent_level(this.__wbg_ptr);
3885
+ return ret === 0xFFFFFF ? undefined : ret;
3886
+ }
3887
+ constructor() {
3888
+ const ret = wasm.wasmnodecontent_new();
3889
+ this.__wbg_ptr = ret;
3890
+ WasmNodeContentFinalization.register(this, this.__wbg_ptr, this);
3891
+ return this;
3892
+ }
3893
+ /**
3894
+ * @returns {string}
3895
+ */
3896
+ get nodeType() {
3897
+ let deferred1_0;
3898
+ let deferred1_1;
3899
+ try {
3900
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3901
+ wasm.wasmnodecontent_nodeType(retptr, this.__wbg_ptr);
3902
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3903
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3904
+ deferred1_0 = r0;
3905
+ deferred1_1 = r1;
3906
+ return getStringFromWasm0(r0, r1);
3907
+ } finally {
3908
+ wasm.__wbindgen_add_to_stack_pointer(16);
3909
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
3910
+ }
3911
+ }
3912
+ /**
3913
+ * @returns {boolean | undefined}
3914
+ */
3915
+ get ordered() {
3916
+ const ret = wasm.wasmnodecontent_ordered(this.__wbg_ptr);
3917
+ return ret === 0xFFFFFF ? undefined : ret !== 0;
3918
+ }
3919
+ /**
3920
+ * @param {string | null} [value]
3921
+ */
3922
+ set content(value) {
3923
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3924
+ var len0 = WASM_VECTOR_LEN;
3925
+ wasm.wasmnodecontent_set_content(this.__wbg_ptr, ptr0, len0);
3926
+ }
3927
+ /**
3928
+ * @param {string | null} [value]
3929
+ */
3930
+ set definition(value) {
3931
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3932
+ var len0 = WASM_VECTOR_LEN;
3933
+ wasm.wasmnodecontent_set_definition(this.__wbg_ptr, ptr0, len0);
3934
+ }
3935
+ /**
3936
+ * @param {string | null} [value]
3937
+ */
3938
+ set description(value) {
3939
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3940
+ var len0 = WASM_VECTOR_LEN;
3941
+ wasm.wasmnodecontent_set_description(this.__wbg_ptr, ptr0, len0);
3942
+ }
3943
+ /**
3944
+ * @param {any | null} [value]
3945
+ */
3946
+ set entries(value) {
3947
+ wasm.wasmnodecontent_set_entries(this.__wbg_ptr, isLikeNone(value) ? 0 : addHeapObject(value));
3948
+ }
3949
+ /**
3950
+ * @param {string | null} [value]
3951
+ */
3952
+ set format(value) {
3953
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3954
+ var len0 = WASM_VECTOR_LEN;
3955
+ wasm.wasmnodecontent_set_format(this.__wbg_ptr, ptr0, len0);
3956
+ }
3957
+ /**
3958
+ * @param {WasmTableGrid | null} [value]
3959
+ */
3960
+ set grid(value) {
3961
+ let ptr0 = 0;
3962
+ if (!isLikeNone(value)) {
3963
+ _assertClass(value, WasmTableGrid);
3964
+ ptr0 = value.__destroy_into_raw();
3965
+ }
3966
+ wasm.wasmnodecontent_set_grid(this.__wbg_ptr, ptr0);
3967
+ }
3968
+ /**
3969
+ * @param {number | null} [value]
3970
+ */
3971
+ set headingLevel(value) {
3972
+ wasm.wasmnodecontent_set_headingLevel(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value);
3973
+ }
3974
+ /**
3975
+ * @param {string | null} [value]
3976
+ */
3977
+ set headingText(value) {
3978
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3979
+ var len0 = WASM_VECTOR_LEN;
3980
+ wasm.wasmnodecontent_set_headingText(this.__wbg_ptr, ptr0, len0);
3981
+ }
3982
+ /**
3983
+ * @param {number | null} [value]
3984
+ */
3985
+ set imageIndex(value) {
3986
+ wasm.wasmnodecontent_set_imageIndex(this.__wbg_ptr, isLikeNone(value) ? Number.MAX_SAFE_INTEGER : (value) >>> 0);
3987
+ }
3988
+ /**
3989
+ * @param {string | null} [value]
3990
+ */
3991
+ set label(value) {
3992
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3993
+ var len0 = WASM_VECTOR_LEN;
3994
+ wasm.wasmnodecontent_set_label(this.__wbg_ptr, ptr0, len0);
3995
+ }
3996
+ /**
3997
+ * @param {string | null} [value]
3998
+ */
3999
+ set language(value) {
4000
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4001
+ var len0 = WASM_VECTOR_LEN;
4002
+ wasm.wasmnodecontent_set_language(this.__wbg_ptr, ptr0, len0);
4003
+ }
4004
+ /**
4005
+ * @param {number | null} [value]
4006
+ */
4007
+ set level(value) {
4008
+ wasm.wasmnodecontent_set_level(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value);
4009
+ }
4010
+ /**
4011
+ * @param {string} value
4012
+ */
4013
+ set nodeType(value) {
4014
+ const ptr0 = passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4015
+ const len0 = WASM_VECTOR_LEN;
4016
+ wasm.wasmnodecontent_set_nodeType(this.__wbg_ptr, ptr0, len0);
4017
+ }
4018
+ /**
4019
+ * @param {boolean | null} [value]
4020
+ */
4021
+ set ordered(value) {
4022
+ wasm.wasmnodecontent_set_ordered(this.__wbg_ptr, isLikeNone(value) ? 0xFFFFFF : value ? 1 : 0);
4023
+ }
4024
+ /**
4025
+ * @param {string | null} [value]
4026
+ */
4027
+ set src(value) {
4028
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4029
+ var len0 = WASM_VECTOR_LEN;
4030
+ wasm.wasmnodecontent_set_src(this.__wbg_ptr, ptr0, len0);
4031
+ }
4032
+ /**
4033
+ * @param {string | null} [value]
4034
+ */
4035
+ set term(value) {
4036
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4037
+ var len0 = WASM_VECTOR_LEN;
4038
+ wasm.wasmnodecontent_set_term(this.__wbg_ptr, ptr0, len0);
4039
+ }
4040
+ /**
4041
+ * @param {string | null} [value]
4042
+ */
4043
+ set text(value) {
4044
+ var ptr0 = isLikeNone(value) ? 0 : passStringToWasm0(value, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4045
+ var len0 = WASM_VECTOR_LEN;
4046
+ wasm.wasmnodecontent_set_text(this.__wbg_ptr, ptr0, len0);
4047
+ }
4048
+ /**
4049
+ * @returns {string | undefined}
4050
+ */
4051
+ get src() {
4052
+ try {
4053
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4054
+ wasm.wasmnodecontent_src(retptr, this.__wbg_ptr);
4055
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4056
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4057
+ let v1;
4058
+ if (r0 !== 0) {
4059
+ v1 = getStringFromWasm0(r0, r1).slice();
4060
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
4061
+ }
4062
+ return v1;
4063
+ } finally {
4064
+ wasm.__wbindgen_add_to_stack_pointer(16);
4065
+ }
4066
+ }
4067
+ /**
4068
+ * @returns {string | undefined}
4069
+ */
4070
+ get term() {
4071
+ try {
4072
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4073
+ wasm.wasmnodecontent_term(retptr, this.__wbg_ptr);
4074
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4075
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4076
+ let v1;
4077
+ if (r0 !== 0) {
4078
+ v1 = getStringFromWasm0(r0, r1).slice();
4079
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
4080
+ }
4081
+ return v1;
4082
+ } finally {
4083
+ wasm.__wbindgen_add_to_stack_pointer(16);
4084
+ }
4085
+ }
4086
+ /**
4087
+ * @returns {string | undefined}
4088
+ */
4089
+ get text() {
4090
+ try {
4091
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4092
+ wasm.wasmnodecontent_text(retptr, this.__wbg_ptr);
4093
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4094
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4095
+ let v1;
4096
+ if (r0 !== 0) {
4097
+ v1 = getStringFromWasm0(r0, r1).slice();
4098
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
4099
+ }
4100
+ return v1;
4101
+ } finally {
4102
+ wasm.__wbindgen_add_to_stack_pointer(16);
4103
+ }
4104
+ }
4105
+ }
4106
+ if (Symbol.dispose) WasmNodeContent.prototype[Symbol.dispose] = WasmNodeContent.prototype.free;
4107
+
4108
+ /**
4109
+ * Context information passed to all visitor methods.
4110
+ *
4111
+ * Provides comprehensive metadata about the current node being visited,
4112
+ * including its type, attributes, position in the DOM tree, and parent context.
4113
+ */
4114
+ export class WasmNodeContext {
4115
+ static __wrap(ptr) {
4116
+ const obj = Object.create(WasmNodeContext.prototype);
4117
+ obj.__wbg_ptr = ptr;
4118
+ WasmNodeContextFinalization.register(obj, obj.__wbg_ptr, obj);
4119
+ return obj;
4120
+ }
4121
+ __destroy_into_raw() {
4122
+ const ptr = this.__wbg_ptr;
4123
+ this.__wbg_ptr = 0;
4124
+ WasmNodeContextFinalization.unregister(this);
4125
+ return ptr;
4126
+ }
4127
+ free() {
4128
+ const ptr = this.__destroy_into_raw();
4129
+ wasm.__wbg_wasmnodecontext_free(ptr, 0);
4130
+ }
4131
+ /**
4132
+ * @returns {any}
4133
+ */
4134
+ get attributes() {
4135
+ const ret = wasm.wasmnodecontext_attributes(this.__wbg_ptr);
4136
+ return takeObject(ret);
4137
+ }
4138
+ /**
4139
+ * @returns {WasmNodeContext}
4140
+ */
4141
+ static default() {
4142
+ const ret = wasm.wasmnodecontext_default();
4143
+ return WasmNodeContext.__wrap(ret);
4144
+ }
3893
4145
  /**
3894
4146
  * @returns {number}
3895
4147
  */
@@ -3912,20 +4164,20 @@ export class WasmNodeContext {
3912
4164
  return ret !== 0;
3913
4165
  }
3914
4166
  /**
3915
- * @param {WasmNodeType} node_type
3916
- * @param {string} tag_name
4167
+ * @param {WasmNodeType} nodeType
4168
+ * @param {string} tagName
3917
4169
  * @param {any} attributes
3918
4170
  * @param {number} depth
3919
- * @param {number} index_in_parent
3920
- * @param {boolean} is_inline
3921
- * @param {string | null} [parent_tag]
4171
+ * @param {number} indexInParent
4172
+ * @param {boolean} isInline
4173
+ * @param {string | null} [parentTag]
3922
4174
  */
3923
- constructor(node_type, tag_name, attributes, depth, index_in_parent, is_inline, parent_tag) {
3924
- const ptr0 = passStringToWasm0(tag_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4175
+ constructor(nodeType, tagName, attributes, depth, indexInParent, isInline, parentTag) {
4176
+ const ptr0 = passStringToWasm0(tagName, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3925
4177
  const len0 = WASM_VECTOR_LEN;
3926
- var ptr1 = isLikeNone(parent_tag) ? 0 : passStringToWasm0(parent_tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4178
+ var ptr1 = isLikeNone(parentTag) ? 0 : passStringToWasm0(parentTag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
3927
4179
  var len1 = WASM_VECTOR_LEN;
3928
- const ret = wasm.wasmnodecontext_new(node_type, ptr0, len0, addHeapObject(attributes), depth, index_in_parent, is_inline, ptr1, len1);
4180
+ const ret = wasm.wasmnodecontext_new(nodeType, ptr0, len0, addHeapObject(attributes), depth, indexInParent, isInline, ptr1, len1);
3929
4181
  this.__wbg_ptr = ret;
3930
4182
  WasmNodeContextFinalization.register(this, this.__wbg_ptr, this);
3931
4183
  return this;
@@ -4166,22 +4418,6 @@ export class WasmPreprocessingOptions {
4166
4418
  const ptr = this.__destroy_into_raw();
4167
4419
  wasm.__wbg_wasmpreprocessingoptions_free(ptr, 0);
4168
4420
  }
4169
- /**
4170
- * Apply a partial update to these preprocessing options.
4171
- *
4172
- * Any specified fields in the update will override the current values.
4173
- * Unspecified fields (None) are left unchanged.
4174
- *
4175
- * # Arguments
4176
- *
4177
- * * `update` - Partial preprocessing options update
4178
- * @param {WasmPreprocessingOptionsUpdate} update
4179
- */
4180
- applyUpdate(update) {
4181
- _assertClass(update, WasmPreprocessingOptionsUpdate);
4182
- var ptr0 = update.__destroy_into_raw();
4183
- wasm.wasmpreprocessingoptions_applyUpdate(this.__wbg_ptr, ptr0);
4184
- }
4185
4421
  /**
4186
4422
  * @returns {WasmPreprocessingOptions}
4187
4423
  */
@@ -4196,46 +4432,14 @@ export class WasmPreprocessingOptions {
4196
4432
  const ret = wasm.wasmpreprocessingoptions_enabled(this.__wbg_ptr);
4197
4433
  return ret !== 0;
4198
4434
  }
4199
- /**
4200
- * @param {WasmPreprocessingOptionsUpdate} update
4201
- * @returns {WasmPreprocessingOptions}
4202
- */
4203
- static from(update) {
4204
- _assertClass(update, WasmPreprocessingOptionsUpdate);
4205
- var ptr0 = update.__destroy_into_raw();
4206
- const ret = wasm.wasmpreprocessingoptions_from(ptr0);
4207
- return WasmPreprocessingOptions.__wrap(ret);
4208
- }
4209
- /**
4210
- * Create new preprocessing options from a partial update.
4211
- *
4212
- * Creates a new `PreprocessingOptions` struct with defaults, then applies the update.
4213
- * Fields not specified in the update keep their default values.
4214
- *
4215
- * # Arguments
4216
- *
4217
- * * `update` - Partial preprocessing options update
4218
- *
4219
- * # Returns
4220
- *
4221
- * New `PreprocessingOptions` with specified updates applied to defaults
4222
- * @param {WasmPreprocessingOptionsUpdate} update
4223
- * @returns {WasmPreprocessingOptions}
4224
- */
4225
- static fromUpdate(update) {
4226
- _assertClass(update, WasmPreprocessingOptionsUpdate);
4227
- var ptr0 = update.__destroy_into_raw();
4228
- const ret = wasm.wasmpreprocessingoptions_fromUpdate(ptr0);
4229
- return WasmPreprocessingOptions.__wrap(ret);
4230
- }
4231
4435
  /**
4232
4436
  * @param {boolean | null} [enabled]
4233
4437
  * @param {WasmPreprocessingPreset | null} [preset]
4234
- * @param {boolean | null} [remove_navigation]
4235
- * @param {boolean | null} [remove_forms]
4438
+ * @param {boolean | null} [removeNavigation]
4439
+ * @param {boolean | null} [removeForms]
4236
4440
  */
4237
- constructor(enabled, preset, remove_navigation, remove_forms) {
4238
- 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);
4441
+ constructor(enabled, preset, removeNavigation, removeForms) {
4442
+ const ret = wasm.wasmpreprocessingoptions_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(removeNavigation) ? 0xFFFFFF : removeNavigation ? 1 : 0, isLikeNone(removeForms) ? 0xFFFFFF : removeForms ? 1 : 0);
4239
4443
  this.__wbg_ptr = ret;
4240
4444
  WasmPreprocessingOptionsFinalization.register(this, this.__wbg_ptr, this);
4241
4445
  return this;
@@ -4304,8 +4508,8 @@ if (Symbol.dispose) WasmPreprocessingOptions.prototype[Symbol.dispose] = WasmPre
4304
4508
  * Partial update for `PreprocessingOptions`.
4305
4509
  *
4306
4510
  * This struct uses `Option<T>` to represent optional fields that can be selectively updated.
4307
- * Only specified fields (Some values) will override existing options; None values leave the
4308
- * corresponding fields unchanged when applied via [`PreprocessingOptions::apply_update`].
4511
+ * Only specified fields (values) will override existing options; undefined values leave the
4512
+ * corresponding fields unchanged when applied via `PreprocessingOptions.apply_update`.
4309
4513
  */
4310
4514
  export class WasmPreprocessingOptionsUpdate {
4311
4515
  static __wrap(ptr) {
@@ -4341,11 +4545,11 @@ export class WasmPreprocessingOptionsUpdate {
4341
4545
  /**
4342
4546
  * @param {boolean | null} [enabled]
4343
4547
  * @param {WasmPreprocessingPreset | null} [preset]
4344
- * @param {boolean | null} [remove_navigation]
4345
- * @param {boolean | null} [remove_forms]
4548
+ * @param {boolean | null} [removeNavigation]
4549
+ * @param {boolean | null} [removeForms]
4346
4550
  */
4347
- constructor(enabled, preset, remove_navigation, remove_forms) {
4348
- 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);
4551
+ constructor(enabled, preset, removeNavigation, removeForms) {
4552
+ const ret = wasm.wasmpreprocessingoptionsupdate_new(isLikeNone(enabled) ? 0xFFFFFF : enabled ? 1 : 0, isLikeNone(preset) ? 3 : preset, isLikeNone(removeNavigation) ? 0xFFFFFF : removeNavigation ? 1 : 0, isLikeNone(removeForms) ? 0xFFFFFF : removeForms ? 1 : 0);
4349
4553
  this.__wbg_ptr = ret;
4350
4554
  WasmPreprocessingOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
4351
4555
  return this;
@@ -4423,7 +4627,21 @@ export const WasmPreprocessingPreset = Object.freeze({
4423
4627
  });
4424
4628
 
4425
4629
  /**
4426
- * A non-fatal warning generated during HTML processing.
4630
+ * A non-fatal diagnostic produced during HTML conversion.
4631
+ *
4632
+ * Warnings indicate that conversion completed but some content may have been handled
4633
+ * differently than expected — for example, an image that could not be extracted, a truncated
4634
+ * input, or malformed HTML that was repaired with best-effort parsing.
4635
+ *
4636
+ * Conversion always succeeds (returns `ConversionResult`) even when warnings are
4637
+ * present. Callers should inspect `warnings` and decide how to
4638
+ * handle them based on their tolerance for partial results:
4639
+ *
4640
+ * - **Logging pipelines**: emit each warning at `WARN` level and continue.
4641
+ * - **Strict pipelines**: treat any warning as a hard error by checking
4642
+ * `result.warnings.is_empty()` before using the output.
4643
+ *
4644
+ * See `WarningKind` for the full taxonomy of warning categories.
4427
4645
  */
4428
4646
  export class WasmProcessingWarning {
4429
4647
  static __wrap(ptr) {
@@ -4529,16 +4747,6 @@ if (Symbol.dispose) WasmProcessingWarning.prototype[Symbol.dispose] = WasmProces
4529
4747
  * JSON-LD blocks are collected as raw JSON strings for flexibility.
4530
4748
  *
4531
4749
  * # Examples
4532
- *
4533
- * ```
4534
- * let schema = StructuredData {
4535
- * data_type: StructuredDataType::JsonLd,
4536
- * raw_json: r#"{"@context":"https://schema.org","@type":"Article"}"#.to_string(),
4537
- * schema_type: Some("Article".to_string()),
4538
- * };
4539
- *
4540
- * assert_eq!(schema.data_type, StructuredDataType::JsonLd);
4541
- * ```
4542
4750
  */
4543
4751
  export class WasmStructuredData {
4544
4752
  static __wrap(ptr) {
@@ -4590,16 +4798,16 @@ export class WasmStructuredData {
4590
4798
  return WasmStructuredData.__wrap(ret);
4591
4799
  }
4592
4800
  /**
4593
- * @param {WasmStructuredDataType} data_type
4594
- * @param {string} raw_json
4595
- * @param {string | null} [schema_type]
4801
+ * @param {WasmStructuredDataType} dataType
4802
+ * @param {string} rawJson
4803
+ * @param {string | null} [schemaType]
4596
4804
  */
4597
- constructor(data_type, raw_json, schema_type) {
4598
- const ptr0 = passStringToWasm0(raw_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4805
+ constructor(dataType, rawJson, schemaType) {
4806
+ const ptr0 = passStringToWasm0(rawJson, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4599
4807
  const len0 = WASM_VECTOR_LEN;
4600
- var ptr1 = isLikeNone(schema_type) ? 0 : passStringToWasm0(schema_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4808
+ var ptr1 = isLikeNone(schemaType) ? 0 : passStringToWasm0(schemaType, wasm.__wbindgen_export, wasm.__wbindgen_export2);
4601
4809
  var len1 = WASM_VECTOR_LEN;
4602
- const ret = wasm.wasmstructureddata_new(data_type, ptr0, len0, ptr1, len1);
4810
+ const ret = wasm.wasmstructureddata_new(dataType, ptr0, len0, ptr1, len1);
4603
4811
  this.__wbg_ptr = ret;
4604
4812
  WasmStructuredDataFinalization.register(this, this.__wbg_ptr, this);
4605
4813
  return this;
@@ -4865,9 +5073,20 @@ export class WasmTableGrid {
4865
5073
  if (Symbol.dispose) WasmTableGrid.prototype[Symbol.dispose] = WasmTableGrid.prototype.free;
4866
5074
 
4867
5075
  /**
4868
- * An inline text annotation with byte-range offsets.
5076
+ * A styling or semantic annotation that applies to a byte range within a node's text.
5077
+ *
5078
+ * Unlike `DocumentNode`, which captures block-level structure (headings, paragraphs, etc.),
5079
+ * a `TextAnnotation` describes inline-level markup — bold, italic, links, code spans, and
5080
+ * similar — that spans a contiguous run of bytes inside `DocumentNode.content`'s text field.
5081
+ *
5082
+ * Byte offsets (`start`..`end`) are into the UTF-8 encoded text of the parent node. The range
5083
+ * follows Rust slice conventions: `start` is inclusive and `end` is exclusive, so the annotated
5084
+ * text is `text[start as usize..end as usize]`.
5085
+ *
5086
+ * Multiple annotations on the same node can overlap (e.g. bold-italic text), and they are
5087
+ * stored in the order they are encountered during DOM traversal.
4869
5088
  *
4870
- * Annotations describe formatting (bold, italic, etc.) and links within a node's text content.
5089
+ * See `AnnotationKind` for the full list of supported annotation types.
4871
5090
  */
4872
5091
  export class WasmTextAnnotation {
4873
5092
  static __wrap(ptr) {
@@ -4907,31 +5126,19 @@ export class WasmTextAnnotation {
4907
5126
  return ret >>> 0;
4908
5127
  }
4909
5128
  /**
4910
- * @returns {string}
5129
+ * @returns {any}
4911
5130
  */
4912
5131
  get kind() {
4913
- let deferred1_0;
4914
- let deferred1_1;
4915
- try {
4916
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4917
- wasm.wasmtextannotation_kind(retptr, this.__wbg_ptr);
4918
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4919
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4920
- deferred1_0 = r0;
4921
- deferred1_1 = r1;
4922
- return getStringFromWasm0(r0, r1);
4923
- } finally {
4924
- wasm.__wbindgen_add_to_stack_pointer(16);
4925
- wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
4926
- }
5132
+ const ret = wasm.wasmtextannotation_kind(this.__wbg_ptr);
5133
+ return takeObject(ret);
4927
5134
  }
4928
5135
  /**
4929
5136
  * @param {number} start
4930
5137
  * @param {number} end
4931
- * @param {WasmAnnotationKind} kind
5138
+ * @param {any} kind
4932
5139
  */
4933
5140
  constructor(start, end, kind) {
4934
- const ret = wasm.wasmtextannotation_new(start, end, kind);
5141
+ const ret = wasm.wasmtextannotation_new(start, end, addHeapObject(kind));
4935
5142
  this.__wbg_ptr = ret;
4936
5143
  WasmTextAnnotationFinalization.register(this, this.__wbg_ptr, this);
4937
5144
  return this;
@@ -4943,10 +5150,10 @@ export class WasmTextAnnotation {
4943
5150
  wasm.wasmtextannotation_set_end(this.__wbg_ptr, value);
4944
5151
  }
4945
5152
  /**
4946
- * @param {WasmAnnotationKind} value
5153
+ * @param {any} value
4947
5154
  */
4948
5155
  set kind(value) {
4949
- wasm.wasmtextannotation_set_kind(this.__wbg_ptr, value);
5156
+ wasm.wasmtextannotation_set_kind(this.__wbg_ptr, addHeapObject(value));
4950
5157
  }
4951
5158
  /**
4952
5159
  * @param {number} value
@@ -4993,11 +5200,12 @@ export const WasmVisitResult = Object.freeze({
4993
5200
  });
4994
5201
 
4995
5202
  /**
4996
- * Type alias for a visitor handle (`Arc`-wrapped `Mutex` for thread-safe shared mutation).
5203
+ * Shareable, thread-safe handle to a user-provided HTML visitor implementation.
4997
5204
  *
4998
- * `Send + Sync` so that types embedding a `VisitorHandle` (e.g. `ConversionOptions`)
4999
- * can be shared across threads required by callers that stash configs inside
5000
- * axum/rmcp/tokio Send-bound contexts.
5205
+ * Pass an instance wrapped in this handle to `ConversionOptions` to
5206
+ * customise how the HTML document is traversed and converted to Markdown.
5207
+ * The handle may be cloned and shared across threads without additional
5208
+ * synchronisation on the caller's side.
5001
5209
  */
5002
5210
  export class WasmVisitorHandle {
5003
5211
  static __wrap(ptr) {
@@ -5053,23 +5261,16 @@ export const WasmWhitespaceMode = Object.freeze({
5053
5261
  });
5054
5262
 
5055
5263
  /**
5056
- * Convert HTML to Markdown, returning a [`ConversionResult`] with content, metadata, images,
5264
+ * Convert HTML to Markdown, returning a `ConversionResult` with content, metadata, images,
5057
5265
  * and warnings.
5058
5266
  *
5059
5267
  * # Arguments
5060
5268
  *
5061
5269
  * * `html` — the HTML string to convert.
5062
- * * `options` — optional conversion options. Defaults to [`ConversionOptions::default`].
5270
+ * * `options` — optional conversion options. Defaults to `ConversionOptions.default`.
5063
5271
  *
5064
5272
  * # Example
5065
5273
  *
5066
- * ```
5067
- * use html_to_markdown_rs::convert;
5068
- *
5069
- * let html = "<h1>Hello World</h1>";
5070
- * let result = convert(html, None).unwrap();
5071
- * assert!(result.content.as_deref().unwrap_or("").contains("Hello World"));
5072
- * ```
5073
5274
  *
5074
5275
  * # Errors
5075
5276
  *
@@ -5103,20 +5304,20 @@ export function convert(html, options) {
5103
5304
  function __wbg_get_imports() {
5104
5305
  const import0 = {
5105
5306
  __proto__: null,
5106
- __wbg___wbindgen_is_function_5cd60d5cf78b4eef: function(arg0) {
5307
+ __wbg___wbindgen_is_function_754e9f305ff6029e: function(arg0) {
5107
5308
  const ret = typeof(getObject(arg0)) === 'function';
5108
5309
  return ret;
5109
5310
  },
5110
- __wbg___wbindgen_is_object_b4593df85baada48: function(arg0) {
5311
+ __wbg___wbindgen_is_object_56732c2bc353f41d: function(arg0) {
5111
5312
  const val = getObject(arg0);
5112
5313
  const ret = typeof(val) === 'object' && val !== null;
5113
5314
  return ret;
5114
5315
  },
5115
- __wbg___wbindgen_is_undefined_35bb9f4c7fd651d5: function(arg0) {
5316
+ __wbg___wbindgen_is_undefined_67b456be8673d3d7: function(arg0) {
5116
5317
  const ret = getObject(arg0) === undefined;
5117
5318
  return ret;
5118
5319
  },
5119
- __wbg___wbindgen_string_get_d109740c0d18f4d7: function(arg0, arg1) {
5320
+ __wbg___wbindgen_string_get_72bdf95d3ae505b1: function(arg0, arg1) {
5120
5321
  const obj = getObject(arg1);
5121
5322
  const ret = typeof(obj) === 'string' ? obj : undefined;
5122
5323
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -5124,44 +5325,47 @@ function __wbg_get_imports() {
5124
5325
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
5125
5326
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
5126
5327
  },
5127
- __wbg___wbindgen_throw_9c31b086c2b26051: function(arg0, arg1) {
5328
+ __wbg___wbindgen_throw_1506f2235d1bdba0: function(arg0, arg1) {
5128
5329
  throw new Error(getStringFromWasm0(arg0, arg1));
5129
5330
  },
5130
- __wbg_apply_b593fcd87094fd23: function() { return handleError(function (arg0, arg1, arg2) {
5331
+ __wbg_apply_292b6d94e4f92b15: function() { return handleError(function (arg0, arg1, arg2) {
5131
5332
  const ret = getObject(arg0).apply(getObject(arg1), getObject(arg2));
5132
5333
  return addHeapObject(ret);
5133
5334
  }, arguments); },
5134
- __wbg_get_dcf82ab8aad1a593: function() { return handleError(function (arg0, arg1) {
5335
+ __wbg_get_de6a0f7d4d18a304: function() { return handleError(function (arg0, arg1) {
5135
5336
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
5136
5337
  return addHeapObject(ret);
5137
5338
  }, arguments); },
5138
- __wbg_has_ef192b1f278770eb: function() { return handleError(function (arg0, arg1) {
5339
+ __wbg_has_73740b27f436fed3: function() { return handleError(function (arg0, arg1) {
5139
5340
  const ret = Reflect.has(getObject(arg0), getObject(arg1));
5140
5341
  return ret;
5141
5342
  }, arguments); },
5142
- __wbg_new_02d162bc6cf02f60: function() {
5343
+ __wbg_new_ce1ab61c1c2b300d: function() {
5143
5344
  const ret = new Object();
5144
5345
  return addHeapObject(ret);
5145
5346
  },
5146
- __wbg_new_310879b66b6e95e1: function() {
5347
+ __wbg_new_d90091b82fdf5b91: function() {
5147
5348
  const ret = new Array();
5148
5349
  return addHeapObject(ret);
5149
5350
  },
5150
- __wbg_parse_2c1cad6215e84999: function() { return handleError(function (arg0, arg1) {
5351
+ __wbg_parse_03863847d06c4e89: function() { return handleError(function (arg0, arg1) {
5151
5352
  const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
5152
5353
  return addHeapObject(ret);
5153
5354
  }, arguments); },
5154
- __wbg_push_b77c476b01548d0a: function(arg0, arg1) {
5355
+ __wbg_push_a6822215aa43e71c: function(arg0, arg1) {
5155
5356
  const ret = getObject(arg0).push(getObject(arg1));
5156
5357
  return ret;
5157
5358
  },
5158
- __wbg_set_78ea6a19f4818587: function(arg0, arg1, arg2) {
5159
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5359
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
5360
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5160
5361
  },
5161
- __wbg_set_a0e911be3da02782: function() { return handleError(function (arg0, arg1, arg2) {
5362
+ __wbg_set_6e30c9374c26414c: function() { return handleError(function (arg0, arg1, arg2) {
5162
5363
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5163
5364
  return ret;
5164
5365
  }, arguments); },
5366
+ __wbg_set_dca99999bba88a9a: function(arg0, arg1, arg2) {
5367
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5368
+ },
5165
5369
  __wbg_wasmdocumentnode_new: function(arg0) {
5166
5370
  const ret = WasmDocumentNode.__wrap(arg0);
5167
5371
  return addHeapObject(ret);
@@ -5258,12 +5462,12 @@ function __wbg_get_imports() {
5258
5462
  };
5259
5463
  }
5260
5464
 
5465
+ const WasmAnnotationKindFinalization = (typeof FinalizationRegistry === 'undefined')
5466
+ ? { register: () => {}, unregister: () => {} }
5467
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmannotationkind_free(ptr, 1));
5261
5468
  const WasmConversionOptionsFinalization = (typeof FinalizationRegistry === 'undefined')
5262
5469
  ? { register: () => {}, unregister: () => {} }
5263
5470
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptions_free(ptr, 1));
5264
- const WasmConversionOptionsBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
5265
- ? { register: () => {}, unregister: () => {} }
5266
- : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionsbuilder_free(ptr, 1));
5267
5471
  const WasmConversionOptionsUpdateFinalization = (typeof FinalizationRegistry === 'undefined')
5268
5472
  ? { register: () => {}, unregister: () => {} }
5269
5473
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmconversionoptionsupdate_free(ptr, 1));
@@ -5294,6 +5498,9 @@ const WasmImageMetadataFinalization = (typeof FinalizationRegistry === 'undefine
5294
5498
  const WasmLinkMetadataFinalization = (typeof FinalizationRegistry === 'undefined')
5295
5499
  ? { register: () => {}, unregister: () => {} }
5296
5500
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmlinkmetadata_free(ptr, 1));
5501
+ const WasmNodeContentFinalization = (typeof FinalizationRegistry === 'undefined')
5502
+ ? { register: () => {}, unregister: () => {} }
5503
+ : new FinalizationRegistry(ptr => wasm.__wbg_wasmnodecontent_free(ptr, 1));
5297
5504
  const WasmNodeContextFinalization = (typeof FinalizationRegistry === 'undefined')
5298
5505
  ? { register: () => {}, unregister: () => {} }
5299
5506
  : new FinalizationRegistry(ptr => wasm.__wbg_wasmnodecontext_free(ptr, 1));