@kreuzberg/html-to-markdown-wasm 3.4.0-rc.9 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,7 +52,7 @@ export class WasmConversionOptions {
52
52
  /**
53
53
  * Apply a partial update to these conversion options.
54
54
  */
55
- applyUpdate(_update: WasmConversionOptionsUpdate): void;
55
+ applyUpdate(update: WasmConversionOptionsUpdate): void;
56
56
  /**
57
57
  * Create a new builder with default values.
58
58
  */
@@ -68,7 +68,8 @@ export class WasmConversionOptions {
68
68
  brInTables: boolean;
69
69
  bullets: string;
70
70
  captureSvg: boolean;
71
- codeBlockStyle: WasmCodeBlockStyle;
71
+ get codeBlockStyle(): string;
72
+ set codeBlockStyle(value: WasmCodeBlockStyle);
72
73
  codeLanguage: string;
73
74
  convertAsInline: boolean;
74
75
  debug: boolean;
@@ -81,19 +82,25 @@ export class WasmConversionOptions {
81
82
  excludeSelectors: string[];
82
83
  extractImages: boolean;
83
84
  extractMetadata: boolean;
84
- headingStyle: WasmHeadingStyle;
85
- highlightStyle: WasmHighlightStyle;
85
+ get headingStyle(): string;
86
+ set headingStyle(value: WasmHeadingStyle);
87
+ get highlightStyle(): string;
88
+ set highlightStyle(value: WasmHighlightStyle);
86
89
  includeDocumentStructure: boolean;
87
90
  inferDimensions: boolean;
88
91
  keepInlineImagesIn: string[];
89
- linkStyle: WasmLinkStyle;
90
- listIndentType: WasmListIndentType;
92
+ get linkStyle(): string;
93
+ set linkStyle(value: WasmLinkStyle);
94
+ get listIndentType(): string;
95
+ set listIndentType(value: WasmListIndentType);
91
96
  listIndentWidth: number;
92
97
  get maxDepth(): number | undefined;
93
98
  set maxDepth(value: number | null | undefined);
94
99
  maxImageSize: bigint;
95
- newlineStyle: WasmNewlineStyle;
96
- outputFormat: WasmOutputFormat;
100
+ get newlineStyle(): string;
101
+ set newlineStyle(value: WasmNewlineStyle);
102
+ get outputFormat(): string;
103
+ set outputFormat(value: WasmOutputFormat);
97
104
  preprocessing: WasmPreprocessingOptions;
98
105
  preserveTags: string[];
99
106
  skipImages: boolean;
@@ -102,7 +109,10 @@ export class WasmConversionOptions {
102
109
  strongEmSymbol: string;
103
110
  subSymbol: string;
104
111
  supSymbol: string;
105
- whitespaceMode: WasmWhitespaceMode;
112
+ get visitor(): WasmVisitorHandle | undefined;
113
+ set visitor(value: WasmVisitorHandle | null | undefined);
114
+ get whitespaceMode(): string;
115
+ set whitespaceMode(value: WasmWhitespaceMode);
106
116
  wrap: boolean;
107
117
  wrapWidth: number;
108
118
  }
@@ -140,6 +150,10 @@ export class WasmConversionOptionsBuilder {
140
150
  * Set the list of HTML tag names whose content is stripped from output.
141
151
  */
142
152
  stripTags(tags: string[]): WasmConversionOptionsBuilder;
153
+ /**
154
+ * Set the visitor used during conversion.
155
+ */
156
+ visitor(visitor?: WasmVisitorHandle | null): WasmConversionOptionsBuilder;
143
157
  }
144
158
 
145
159
  /**
@@ -151,6 +165,7 @@ export class WasmConversionOptionsBuilder {
151
165
  export class WasmConversionOptionsUpdate {
152
166
  free(): void;
153
167
  [Symbol.dispose](): void;
168
+ static default(): WasmConversionOptionsUpdate;
154
169
  constructor(heading_style?: WasmHeadingStyle | null, list_indent_type?: WasmListIndentType | null, list_indent_width?: number | null, bullets?: string | null, strong_em_symbol?: string | null, escape_asterisks?: boolean | null, escape_underscores?: boolean | null, escape_misc?: boolean | null, escape_ascii?: boolean | null, code_language?: string | null, autolinks?: boolean | null, default_title?: boolean | null, br_in_tables?: boolean | null, highlight_style?: WasmHighlightStyle | null, extract_metadata?: boolean | null, whitespace_mode?: WasmWhitespaceMode | null, strip_newlines?: boolean | null, wrap?: boolean | null, wrap_width?: number | null, convert_as_inline?: boolean | null, sub_symbol?: string | null, sup_symbol?: string | null, newline_style?: WasmNewlineStyle | null, code_block_style?: WasmCodeBlockStyle | null, keep_inline_images_in?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, strip_tags?: string[] | null, preserve_tags?: string[] | null, skip_images?: boolean | null, link_style?: WasmLinkStyle | null, output_format?: WasmOutputFormat | null, include_document_structure?: boolean | null, extract_images?: boolean | null, max_image_size?: bigint | null, capture_svg?: boolean | null, infer_dimensions?: boolean | null, max_depth?: number | null, exclude_selectors?: string[] | null);
155
170
  get autolinks(): boolean | undefined;
156
171
  set autolinks(value: boolean | null | undefined);
@@ -160,7 +175,7 @@ export class WasmConversionOptionsUpdate {
160
175
  set bullets(value: string | null | undefined);
161
176
  get captureSvg(): boolean | undefined;
162
177
  set captureSvg(value: boolean | null | undefined);
163
- get codeBlockStyle(): WasmCodeBlockStyle | undefined;
178
+ get codeBlockStyle(): string | undefined;
164
179
  set codeBlockStyle(value: WasmCodeBlockStyle | null | undefined);
165
180
  get codeLanguage(): string | undefined;
166
181
  set codeLanguage(value: string | null | undefined);
@@ -186,9 +201,9 @@ export class WasmConversionOptionsUpdate {
186
201
  set extractImages(value: boolean | null | undefined);
187
202
  get extractMetadata(): boolean | undefined;
188
203
  set extractMetadata(value: boolean | null | undefined);
189
- get headingStyle(): WasmHeadingStyle | undefined;
204
+ get headingStyle(): string | undefined;
190
205
  set headingStyle(value: WasmHeadingStyle | null | undefined);
191
- get highlightStyle(): WasmHighlightStyle | undefined;
206
+ get highlightStyle(): string | undefined;
192
207
  set highlightStyle(value: WasmHighlightStyle | null | undefined);
193
208
  get includeDocumentStructure(): boolean | undefined;
194
209
  set includeDocumentStructure(value: boolean | null | undefined);
@@ -196,9 +211,9 @@ export class WasmConversionOptionsUpdate {
196
211
  set inferDimensions(value: boolean | null | undefined);
197
212
  get keepInlineImagesIn(): string[] | undefined;
198
213
  set keepInlineImagesIn(value: string[] | null | undefined);
199
- get linkStyle(): WasmLinkStyle | undefined;
214
+ get linkStyle(): string | undefined;
200
215
  set linkStyle(value: WasmLinkStyle | null | undefined);
201
- get listIndentType(): WasmListIndentType | undefined;
216
+ get listIndentType(): string | undefined;
202
217
  set listIndentType(value: WasmListIndentType | null | undefined);
203
218
  get listIndentWidth(): number | undefined;
204
219
  set listIndentWidth(value: number | null | undefined);
@@ -206,9 +221,9 @@ export class WasmConversionOptionsUpdate {
206
221
  set maxDepth(value: number | null | undefined);
207
222
  get maxImageSize(): bigint | undefined;
208
223
  set maxImageSize(value: bigint | null | undefined);
209
- get newlineStyle(): WasmNewlineStyle | undefined;
224
+ get newlineStyle(): string | undefined;
210
225
  set newlineStyle(value: WasmNewlineStyle | null | undefined);
211
- get outputFormat(): WasmOutputFormat | undefined;
226
+ get outputFormat(): string | undefined;
212
227
  set outputFormat(value: WasmOutputFormat | null | undefined);
213
228
  get preprocessing(): WasmPreprocessingOptionsUpdate | undefined;
214
229
  set preprocessing(value: WasmPreprocessingOptionsUpdate | null | undefined);
@@ -226,7 +241,9 @@ export class WasmConversionOptionsUpdate {
226
241
  set subSymbol(value: string | null | undefined);
227
242
  get supSymbol(): string | undefined;
228
243
  set supSymbol(value: string | null | undefined);
229
- get whitespaceMode(): WasmWhitespaceMode | undefined;
244
+ get visitor(): WasmVisitorHandle | undefined;
245
+ set visitor(value: WasmVisitorHandle | null | undefined);
246
+ get whitespaceMode(): string | undefined;
230
247
  set whitespaceMode(value: WasmWhitespaceMode | null | undefined);
231
248
  get wrap(): boolean | undefined;
232
249
  set wrap(value: boolean | null | undefined);
@@ -253,7 +270,8 @@ export class WasmConversionOptionsUpdate {
253
270
  export class WasmConversionResult {
254
271
  free(): void;
255
272
  [Symbol.dispose](): void;
256
- constructor(metadata?: WasmHtmlMetadata | null, tables?: WasmTableData[] | null, images?: string[] | null, warnings?: WasmProcessingWarning[] | null, content?: string | null, document?: WasmDocumentStructure | null);
273
+ static default(): WasmConversionResult;
274
+ constructor(tables?: WasmTableData[] | null, warnings?: WasmProcessingWarning[] | null, content?: string | null, document?: WasmDocumentStructure | null);
257
275
  get content(): string | undefined;
258
276
  set content(value: string | null | undefined);
259
277
  get document(): WasmDocumentStructure | undefined;
@@ -273,7 +291,6 @@ export class WasmConversionResult {
273
291
  * # Examples
274
292
  *
275
293
  * ```
276
- * # use html_to_markdown_rs::metadata::DocumentMetadata;
277
294
  * let doc = DocumentMetadata {
278
295
  * title: Some("My Article".to_string()),
279
296
  * description: Some("A great article about Rust".to_string()),
@@ -287,6 +304,7 @@ export class WasmConversionResult {
287
304
  export class WasmDocumentMetadata {
288
305
  free(): void;
289
306
  [Symbol.dispose](): void;
307
+ static default(): WasmDocumentMetadata;
290
308
  constructor(keywords?: string[] | null, open_graph?: any | null, twitter_card?: any | null, meta_tags?: any | null, title?: string | null, description?: string | null, author?: string | null, canonical_url?: string | null, base_href?: string | null, language?: string | null, text_direction?: WasmTextDirection | null);
291
309
  get author(): string | undefined;
292
310
  set author(value: string | null | undefined);
@@ -301,7 +319,7 @@ export class WasmDocumentMetadata {
301
319
  set language(value: string | null | undefined);
302
320
  metaTags: any;
303
321
  openGraph: any;
304
- get textDirection(): WasmTextDirection | undefined;
322
+ get textDirection(): string | undefined;
305
323
  set textDirection(value: WasmTextDirection | null | undefined);
306
324
  get title(): string | undefined;
307
325
  set title(value: string | null | undefined);
@@ -314,12 +332,14 @@ export class WasmDocumentMetadata {
314
332
  export class WasmDocumentNode {
315
333
  free(): void;
316
334
  [Symbol.dispose](): void;
335
+ static default(): WasmDocumentNode;
317
336
  constructor(id: string, content: WasmNodeContent, children: Uint32Array, annotations: WasmTextAnnotation[], parent?: number | null, attributes?: any | null);
318
337
  annotations: WasmTextAnnotation[];
319
338
  get attributes(): any | undefined;
320
339
  set attributes(value: any | null | undefined);
321
340
  children: Uint32Array;
322
- content: WasmNodeContent;
341
+ get content(): string;
342
+ set content(value: WasmNodeContent);
323
343
  id: string;
324
344
  get parent(): number | undefined;
325
345
  set parent(value: number | null | undefined);
@@ -333,6 +353,7 @@ export class WasmDocumentNode {
333
353
  export class WasmDocumentStructure {
334
354
  free(): void;
335
355
  [Symbol.dispose](): void;
356
+ static default(): WasmDocumentStructure;
336
357
  constructor(nodes: WasmDocumentNode[], source_format?: string | null);
337
358
  nodes: WasmDocumentNode[];
338
359
  get sourceFormat(): string | undefined;
@@ -345,6 +366,7 @@ export class WasmDocumentStructure {
345
366
  export class WasmGridCell {
346
367
  free(): void;
347
368
  [Symbol.dispose](): void;
369
+ static default(): WasmGridCell;
348
370
  constructor(content: string, row: number, col: number, row_span: number, col_span: number, is_header: boolean);
349
371
  col: number;
350
372
  colSpan: number;
@@ -363,7 +385,6 @@ export class WasmGridCell {
363
385
  * # Examples
364
386
  *
365
387
  * ```
366
- * # use html_to_markdown_rs::metadata::HeaderMetadata;
367
388
  * let header = HeaderMetadata {
368
389
  * level: 1,
369
390
  * text: "Main Title".to_string(),
@@ -379,6 +400,7 @@ export class WasmGridCell {
379
400
  export class WasmHeaderMetadata {
380
401
  free(): void;
381
402
  [Symbol.dispose](): void;
403
+ static default(): WasmHeaderMetadata;
382
404
  /**
383
405
  * Validate that the header level is within valid range (1-6).
384
406
  *
@@ -389,7 +411,6 @@ export class WasmHeaderMetadata {
389
411
  * # Examples
390
412
  *
391
413
  * ```
392
- * # use html_to_markdown_rs::metadata::HeaderMetadata;
393
414
  * let valid = HeaderMetadata {
394
415
  * level: 3,
395
416
  * text: "Title".to_string(),
@@ -451,7 +472,6 @@ export enum WasmHighlightStyle {
451
472
  * # Examples
452
473
  *
453
474
  * ```
454
- * # use html_to_markdown_rs::metadata::HtmlMetadata;
455
475
  * let metadata = HtmlMetadata {
456
476
  * document: Default::default(),
457
477
  * headers: Vec::new(),
@@ -466,6 +486,7 @@ export enum WasmHighlightStyle {
466
486
  export class WasmHtmlMetadata {
467
487
  free(): void;
468
488
  [Symbol.dispose](): void;
489
+ static default(): WasmHtmlMetadata;
469
490
  constructor(document?: WasmDocumentMetadata | null, headers?: WasmHeaderMetadata[] | null, links?: WasmLinkMetadata[] | null, images?: WasmImageMetadata[] | null, structured_data?: WasmStructuredData[] | null);
470
491
  document: WasmDocumentMetadata;
471
492
  headers: WasmHeaderMetadata[];
@@ -483,7 +504,6 @@ export class WasmHtmlMetadata {
483
504
  * # Examples
484
505
  *
485
506
  * ```
486
- * # use html_to_markdown_rs::metadata::{ImageMetadata, ImageType};
487
507
  * let img = ImageMetadata {
488
508
  * src: "https://example.com/image.jpg".to_string(),
489
509
  * alt: Some("An example image".to_string()),
@@ -499,13 +519,15 @@ export class WasmHtmlMetadata {
499
519
  export class WasmImageMetadata {
500
520
  free(): void;
501
521
  [Symbol.dispose](): void;
522
+ static default(): WasmImageMetadata;
502
523
  constructor(src: string, image_type: WasmImageType, attributes: any, alt?: string | null, title?: string | null, dimensions?: Uint32Array | null);
503
524
  get alt(): string | undefined;
504
525
  set alt(value: string | null | undefined);
505
526
  attributes: any;
506
527
  get dimensions(): Uint32Array | undefined;
507
528
  set dimensions(value: Uint32Array | null | undefined);
508
- imageType: WasmImageType;
529
+ get imageType(): string;
530
+ set imageType(value: WasmImageType);
509
531
  src: string;
510
532
  get title(): string | undefined;
511
533
  set title(value: string | null | undefined);
@@ -531,7 +553,6 @@ export enum WasmImageType {
531
553
  * # Examples
532
554
  *
533
555
  * ```
534
- * # use html_to_markdown_rs::metadata::{LinkMetadata, LinkType};
535
556
  * let link = LinkMetadata {
536
557
  * href: "https://example.com".to_string(),
537
558
  * text: "Example".to_string(),
@@ -562,7 +583,6 @@ export class WasmLinkMetadata {
562
583
  * # Examples
563
584
  *
564
585
  * ```
565
- * # use html_to_markdown_rs::metadata::{LinkMetadata, LinkType};
566
586
  * assert_eq!(LinkMetadata::classify_link("#section"), LinkType::Anchor);
567
587
  * assert_eq!(LinkMetadata::classify_link("mailto:test@example.com"), LinkType::Email);
568
588
  * assert_eq!(LinkMetadata::classify_link("tel:+1234567890"), LinkType::Phone);
@@ -570,10 +590,12 @@ export class WasmLinkMetadata {
570
590
  * ```
571
591
  */
572
592
  static classifyLink(href: string): WasmLinkType;
593
+ static default(): WasmLinkMetadata;
573
594
  constructor(href: string, text: string, link_type: WasmLinkType, rel: string[], attributes: any, title?: string | null);
574
595
  attributes: any;
575
596
  href: string;
576
- linkType: WasmLinkType;
597
+ get linkType(): string;
598
+ set linkType(value: WasmLinkType);
577
599
  rel: string[];
578
600
  text: string;
579
601
  get title(): string | undefined;
@@ -655,12 +677,14 @@ export enum WasmNodeContent {
655
677
  export class WasmNodeContext {
656
678
  free(): void;
657
679
  [Symbol.dispose](): void;
680
+ static default(): WasmNodeContext;
658
681
  constructor(node_type: WasmNodeType, tag_name: string, attributes: any, depth: number, index_in_parent: number, is_inline: boolean, parent_tag?: string | null);
659
682
  attributes: any;
660
683
  depth: number;
661
684
  indexInParent: number;
662
685
  isInline: boolean;
663
- nodeType: WasmNodeType;
686
+ get nodeType(): string;
687
+ set nodeType(value: WasmNodeType);
664
688
  get parentTag(): string | undefined;
665
689
  set parentTag(value: string | null | undefined);
666
690
  tagName: string;
@@ -790,7 +814,7 @@ export class WasmPreprocessingOptions {
790
814
  *
791
815
  * * `update` - Partial preprocessing options update
792
816
  */
793
- applyUpdate(_update: WasmPreprocessingOptionsUpdate): void;
817
+ applyUpdate(update: WasmPreprocessingOptionsUpdate): void;
794
818
  static default(): WasmPreprocessingOptions;
795
819
  static from(update: WasmPreprocessingOptionsUpdate): WasmPreprocessingOptions;
796
820
  /**
@@ -810,7 +834,8 @@ export class WasmPreprocessingOptions {
810
834
  static fromUpdate(update: WasmPreprocessingOptionsUpdate): WasmPreprocessingOptions;
811
835
  constructor(enabled?: boolean | null, preset?: WasmPreprocessingPreset | null, remove_navigation?: boolean | null, remove_forms?: boolean | null);
812
836
  enabled: boolean;
813
- preset: WasmPreprocessingPreset;
837
+ get preset(): string;
838
+ set preset(value: WasmPreprocessingPreset);
814
839
  removeForms: boolean;
815
840
  removeNavigation: boolean;
816
841
  }
@@ -825,10 +850,11 @@ export class WasmPreprocessingOptions {
825
850
  export class WasmPreprocessingOptionsUpdate {
826
851
  free(): void;
827
852
  [Symbol.dispose](): void;
853
+ static default(): WasmPreprocessingOptionsUpdate;
828
854
  constructor(enabled?: boolean | null, preset?: WasmPreprocessingPreset | null, remove_navigation?: boolean | null, remove_forms?: boolean | null);
829
855
  get enabled(): boolean | undefined;
830
856
  set enabled(value: boolean | null | undefined);
831
- get preset(): WasmPreprocessingPreset | undefined;
857
+ get preset(): string | undefined;
832
858
  set preset(value: WasmPreprocessingPreset | null | undefined);
833
859
  get removeForms(): boolean | undefined;
834
860
  set removeForms(value: boolean | null | undefined);
@@ -853,8 +879,10 @@ export enum WasmPreprocessingPreset {
853
879
  export class WasmProcessingWarning {
854
880
  free(): void;
855
881
  [Symbol.dispose](): void;
882
+ static default(): WasmProcessingWarning;
856
883
  constructor(message: string, kind: WasmWarningKind);
857
- kind: WasmWarningKind;
884
+ get kind(): string;
885
+ set kind(value: WasmWarningKind);
858
886
  message: string;
859
887
  }
860
888
 
@@ -867,7 +895,6 @@ export class WasmProcessingWarning {
867
895
  * # Examples
868
896
  *
869
897
  * ```
870
- * # use html_to_markdown_rs::metadata::{StructuredData, StructuredDataType};
871
898
  * let schema = StructuredData {
872
899
  * data_type: StructuredDataType::JsonLd,
873
900
  * raw_json: r#"{"@context":"https://schema.org","@type":"Article"}"#.to_string(),
@@ -880,8 +907,10 @@ export class WasmProcessingWarning {
880
907
  export class WasmStructuredData {
881
908
  free(): void;
882
909
  [Symbol.dispose](): void;
910
+ static default(): WasmStructuredData;
883
911
  constructor(data_type: WasmStructuredDataType, raw_json: string, schema_type?: string | null);
884
- dataType: WasmStructuredDataType;
912
+ get dataType(): string;
913
+ set dataType(value: WasmStructuredDataType);
885
914
  rawJson: string;
886
915
  get schemaType(): string | undefined;
887
916
  set schemaType(value: string | null | undefined);
@@ -904,6 +933,7 @@ export enum WasmStructuredDataType {
904
933
  export class WasmTableData {
905
934
  free(): void;
906
935
  [Symbol.dispose](): void;
936
+ static default(): WasmTableData;
907
937
  constructor(grid: WasmTableGrid, markdown: string);
908
938
  grid: WasmTableGrid;
909
939
  markdown: string;
@@ -915,6 +945,7 @@ export class WasmTableData {
915
945
  export class WasmTableGrid {
916
946
  free(): void;
917
947
  [Symbol.dispose](): void;
948
+ static default(): WasmTableGrid;
918
949
  constructor(rows?: number | null, cols?: number | null, cells?: WasmGridCell[] | null);
919
950
  cells: WasmGridCell[];
920
951
  cols: number;
@@ -929,9 +960,11 @@ export class WasmTableGrid {
929
960
  export class WasmTextAnnotation {
930
961
  free(): void;
931
962
  [Symbol.dispose](): void;
963
+ static default(): WasmTextAnnotation;
932
964
  constructor(start: number, end: number, kind: WasmAnnotationKind);
933
965
  end: number;
934
- kind: WasmAnnotationKind;
966
+ get kind(): string;
967
+ set kind(value: WasmAnnotationKind);
935
968
  start: number;
936
969
  }
937
970
 
@@ -961,6 +994,19 @@ export enum WasmVisitResult {
961
994
  Error = 4,
962
995
  }
963
996
 
997
+ /**
998
+ * Type alias for a visitor handle (`Arc`-wrapped `Mutex` for thread-safe shared mutation).
999
+ *
1000
+ * `Send + Sync` so that types embedding a `VisitorHandle` (e.g. `ConversionOptions`)
1001
+ * can be shared across threads — required by callers that stash configs inside
1002
+ * axum/rmcp/tokio Send-bound contexts.
1003
+ */
1004
+ export class WasmVisitorHandle {
1005
+ free(): void;
1006
+ [Symbol.dispose](): void;
1007
+ constructor(visitor: any);
1008
+ }
1009
+
964
1010
  /**
965
1011
  * Categories of processing warnings.
966
1012
  */
@@ -983,7 +1029,30 @@ export enum WasmWhitespaceMode {
983
1029
  Strict = 1,
984
1030
  }
985
1031
 
986
- export function convert(html: string, options?: WasmConversionOptions | null, visitor?: any | null): WasmConversionResult;
1032
+ /**
1033
+ * Convert HTML to Markdown, returning a [`ConversionResult`] with content, metadata, images,
1034
+ * and warnings.
1035
+ *
1036
+ * # Arguments
1037
+ *
1038
+ * * `html` — the HTML string to convert.
1039
+ * * `options` — optional conversion options. Defaults to [`ConversionOptions::default`].
1040
+ *
1041
+ * # Example
1042
+ *
1043
+ * ```
1044
+ * use html_to_markdown_rs::convert;
1045
+ *
1046
+ * let html = "<h1>Hello World</h1>";
1047
+ * let result = convert(html, None).unwrap();
1048
+ * assert!(result.content.as_deref().unwrap_or("").contains("Hello World"));
1049
+ * ```
1050
+ *
1051
+ * # Errors
1052
+ *
1053
+ * Returns an error if HTML parsing fails or if the input contains invalid UTF-8.
1054
+ */
1055
+ export function convert(html: string, options?: WasmConversionOptions | null): WasmConversionResult;
987
1056
 
988
1057
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
989
1058
 
@@ -1008,14 +1077,15 @@ export interface InitOutput {
1008
1077
  readonly __wbg_wasmtabledata_free: (a: number, b: number) => void;
1009
1078
  readonly __wbg_wasmtablegrid_free: (a: number, b: number) => void;
1010
1079
  readonly __wbg_wasmtextannotation_free: (a: number, b: number) => void;
1011
- readonly convert: (a: number, b: number, c: number, d: number, e: number) => void;
1080
+ readonly __wbg_wasmvisitorhandle_free: (a: number, b: number) => void;
1081
+ readonly convert: (a: number, b: number, c: number, d: number) => void;
1012
1082
  readonly wasmconversionoptions_applyUpdate: (a: number, b: number) => void;
1013
1083
  readonly wasmconversionoptions_autolinks: (a: number) => number;
1014
1084
  readonly wasmconversionoptions_brInTables: (a: number) => number;
1015
1085
  readonly wasmconversionoptions_builder: () => number;
1016
1086
  readonly wasmconversionoptions_bullets: (a: number, b: number) => void;
1017
1087
  readonly wasmconversionoptions_captureSvg: (a: number) => number;
1018
- readonly wasmconversionoptions_codeBlockStyle: (a: number) => number;
1088
+ readonly wasmconversionoptions_codeBlockStyle: (a: number, b: number) => void;
1019
1089
  readonly wasmconversionoptions_codeLanguage: (a: number, b: number) => void;
1020
1090
  readonly wasmconversionoptions_convertAsInline: (a: number) => number;
1021
1091
  readonly wasmconversionoptions_debug: (a: number) => number;
@@ -1031,19 +1101,19 @@ export interface InitOutput {
1031
1101
  readonly wasmconversionoptions_extractMetadata: (a: number) => number;
1032
1102
  readonly wasmconversionoptions_from: (a: number) => number;
1033
1103
  readonly wasmconversionoptions_fromUpdate: (a: number) => number;
1034
- readonly wasmconversionoptions_headingStyle: (a: number) => number;
1035
- readonly wasmconversionoptions_highlightStyle: (a: number) => number;
1104
+ readonly wasmconversionoptions_headingStyle: (a: number, b: number) => void;
1105
+ readonly wasmconversionoptions_highlightStyle: (a: number, b: number) => void;
1036
1106
  readonly wasmconversionoptions_includeDocumentStructure: (a: number) => number;
1037
1107
  readonly wasmconversionoptions_inferDimensions: (a: number) => number;
1038
1108
  readonly wasmconversionoptions_keepInlineImagesIn: (a: number, b: number) => void;
1039
- readonly wasmconversionoptions_linkStyle: (a: number) => number;
1040
- readonly wasmconversionoptions_listIndentType: (a: number) => number;
1109
+ readonly wasmconversionoptions_linkStyle: (a: number, b: number) => void;
1110
+ readonly wasmconversionoptions_listIndentType: (a: number, b: number) => void;
1041
1111
  readonly wasmconversionoptions_listIndentWidth: (a: number) => number;
1042
1112
  readonly wasmconversionoptions_maxDepth: (a: number) => number;
1043
1113
  readonly wasmconversionoptions_maxImageSize: (a: number) => bigint;
1044
1114
  readonly wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: bigint, u1: number, v1: number, w1: number, x1: number, y1: number) => number;
1045
- readonly wasmconversionoptions_newlineStyle: (a: number) => number;
1046
- readonly wasmconversionoptions_outputFormat: (a: number) => number;
1115
+ readonly wasmconversionoptions_newlineStyle: (a: number, b: number) => void;
1116
+ readonly wasmconversionoptions_outputFormat: (a: number, b: number) => void;
1047
1117
  readonly wasmconversionoptions_preprocessing: (a: number) => number;
1048
1118
  readonly wasmconversionoptions_preserveTags: (a: number, b: number) => void;
1049
1119
  readonly wasmconversionoptions_set_autolinks: (a: number, b: number) => void;
@@ -1083,6 +1153,7 @@ export interface InitOutput {
1083
1153
  readonly wasmconversionoptions_set_strongEmSymbol: (a: number, b: number, c: number) => void;
1084
1154
  readonly wasmconversionoptions_set_subSymbol: (a: number, b: number, c: number) => void;
1085
1155
  readonly wasmconversionoptions_set_supSymbol: (a: number, b: number, c: number) => void;
1156
+ readonly wasmconversionoptions_set_visitor: (a: number, b: number) => void;
1086
1157
  readonly wasmconversionoptions_set_whitespaceMode: (a: number, b: number) => void;
1087
1158
  readonly wasmconversionoptions_set_wrap: (a: number, b: number) => void;
1088
1159
  readonly wasmconversionoptions_set_wrapWidth: (a: number, b: number) => void;
@@ -1092,7 +1163,8 @@ export interface InitOutput {
1092
1163
  readonly wasmconversionoptions_strongEmSymbol: (a: number, b: number) => void;
1093
1164
  readonly wasmconversionoptions_subSymbol: (a: number, b: number) => void;
1094
1165
  readonly wasmconversionoptions_supSymbol: (a: number, b: number) => void;
1095
- readonly wasmconversionoptions_whitespaceMode: (a: number) => number;
1166
+ readonly wasmconversionoptions_visitor: (a: number) => number;
1167
+ readonly wasmconversionoptions_whitespaceMode: (a: number, b: number) => void;
1096
1168
  readonly wasmconversionoptions_wrap: (a: number) => number;
1097
1169
  readonly wasmconversionoptions_wrapWidth: (a: number) => number;
1098
1170
  readonly wasmconversionoptionsbuilder_build: (a: number) => number;
@@ -1101,14 +1173,16 @@ export interface InitOutput {
1101
1173
  readonly wasmconversionoptionsbuilder_preprocessing: (a: number, b: number) => number;
1102
1174
  readonly wasmconversionoptionsbuilder_preserveTags: (a: number, b: number, c: number) => number;
1103
1175
  readonly wasmconversionoptionsbuilder_stripTags: (a: number, b: number, c: number) => number;
1176
+ readonly wasmconversionoptionsbuilder_visitor: (a: number, b: number) => number;
1104
1177
  readonly wasmconversionoptionsupdate_autolinks: (a: number) => number;
1105
1178
  readonly wasmconversionoptionsupdate_brInTables: (a: number) => number;
1106
1179
  readonly wasmconversionoptionsupdate_bullets: (a: number, b: number) => void;
1107
1180
  readonly wasmconversionoptionsupdate_captureSvg: (a: number) => number;
1108
- readonly wasmconversionoptionsupdate_codeBlockStyle: (a: number) => number;
1181
+ readonly wasmconversionoptionsupdate_codeBlockStyle: (a: number, b: number) => void;
1109
1182
  readonly wasmconversionoptionsupdate_codeLanguage: (a: number, b: number) => void;
1110
1183
  readonly wasmconversionoptionsupdate_convertAsInline: (a: number) => number;
1111
1184
  readonly wasmconversionoptionsupdate_debug: (a: number) => number;
1185
+ readonly wasmconversionoptionsupdate_default: () => number;
1112
1186
  readonly wasmconversionoptionsupdate_defaultTitle: (a: number) => number;
1113
1187
  readonly wasmconversionoptionsupdate_encoding: (a: number, b: number) => void;
1114
1188
  readonly wasmconversionoptionsupdate_escapeAscii: (a: number) => number;
@@ -1118,19 +1192,19 @@ export interface InitOutput {
1118
1192
  readonly wasmconversionoptionsupdate_excludeSelectors: (a: number, b: number) => void;
1119
1193
  readonly wasmconversionoptionsupdate_extractImages: (a: number) => number;
1120
1194
  readonly wasmconversionoptionsupdate_extractMetadata: (a: number) => number;
1121
- readonly wasmconversionoptionsupdate_headingStyle: (a: number) => number;
1122
- readonly wasmconversionoptionsupdate_highlightStyle: (a: number) => number;
1195
+ readonly wasmconversionoptionsupdate_headingStyle: (a: number, b: number) => void;
1196
+ readonly wasmconversionoptionsupdate_highlightStyle: (a: number, b: number) => void;
1123
1197
  readonly wasmconversionoptionsupdate_includeDocumentStructure: (a: number) => number;
1124
1198
  readonly wasmconversionoptionsupdate_inferDimensions: (a: number) => number;
1125
1199
  readonly wasmconversionoptionsupdate_keepInlineImagesIn: (a: number, b: number) => void;
1126
- readonly wasmconversionoptionsupdate_linkStyle: (a: number) => number;
1127
- readonly wasmconversionoptionsupdate_listIndentType: (a: number) => number;
1200
+ readonly wasmconversionoptionsupdate_linkStyle: (a: number, b: number) => void;
1201
+ readonly wasmconversionoptionsupdate_listIndentType: (a: number, b: number) => void;
1128
1202
  readonly wasmconversionoptionsupdate_listIndentWidth: (a: number) => number;
1129
1203
  readonly wasmconversionoptionsupdate_maxDepth: (a: number) => number;
1130
1204
  readonly wasmconversionoptionsupdate_maxImageSize: (a: number, b: number) => void;
1131
1205
  readonly wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: bigint, u1: number, v1: number, w1: number, x1: number, y1: number) => number;
1132
- readonly wasmconversionoptionsupdate_newlineStyle: (a: number) => number;
1133
- readonly wasmconversionoptionsupdate_outputFormat: (a: number) => number;
1206
+ readonly wasmconversionoptionsupdate_newlineStyle: (a: number, b: number) => void;
1207
+ readonly wasmconversionoptionsupdate_outputFormat: (a: number, b: number) => void;
1134
1208
  readonly wasmconversionoptionsupdate_preprocessing: (a: number) => number;
1135
1209
  readonly wasmconversionoptionsupdate_preserveTags: (a: number, b: number) => void;
1136
1210
  readonly wasmconversionoptionsupdate_set_autolinks: (a: number, b: number) => void;
@@ -1170,6 +1244,7 @@ export interface InitOutput {
1170
1244
  readonly wasmconversionoptionsupdate_set_strongEmSymbol: (a: number, b: number, c: number) => void;
1171
1245
  readonly wasmconversionoptionsupdate_set_subSymbol: (a: number, b: number, c: number) => void;
1172
1246
  readonly wasmconversionoptionsupdate_set_supSymbol: (a: number, b: number, c: number) => void;
1247
+ readonly wasmconversionoptionsupdate_set_visitor: (a: number, b: number) => void;
1173
1248
  readonly wasmconversionoptionsupdate_set_whitespaceMode: (a: number, b: number) => void;
1174
1249
  readonly wasmconversionoptionsupdate_set_wrap: (a: number, b: number) => void;
1175
1250
  readonly wasmconversionoptionsupdate_set_wrapWidth: (a: number, b: number) => void;
@@ -1179,14 +1254,16 @@ export interface InitOutput {
1179
1254
  readonly wasmconversionoptionsupdate_strongEmSymbol: (a: number, b: number) => void;
1180
1255
  readonly wasmconversionoptionsupdate_subSymbol: (a: number, b: number) => void;
1181
1256
  readonly wasmconversionoptionsupdate_supSymbol: (a: number, b: number) => void;
1182
- readonly wasmconversionoptionsupdate_whitespaceMode: (a: number) => number;
1257
+ readonly wasmconversionoptionsupdate_visitor: (a: number) => number;
1258
+ readonly wasmconversionoptionsupdate_whitespaceMode: (a: number, b: number) => void;
1183
1259
  readonly wasmconversionoptionsupdate_wrap: (a: number) => number;
1184
1260
  readonly wasmconversionoptionsupdate_wrapWidth: (a: number) => number;
1185
1261
  readonly wasmconversionresult_content: (a: number, b: number) => void;
1262
+ readonly wasmconversionresult_default: () => number;
1186
1263
  readonly wasmconversionresult_document: (a: number) => number;
1187
1264
  readonly wasmconversionresult_images: (a: number, b: number) => void;
1188
1265
  readonly wasmconversionresult_metadata: (a: number) => number;
1189
- readonly wasmconversionresult_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
1266
+ readonly wasmconversionresult_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
1190
1267
  readonly wasmconversionresult_set_content: (a: number, b: number, c: number) => void;
1191
1268
  readonly wasmconversionresult_set_document: (a: number, b: number) => void;
1192
1269
  readonly wasmconversionresult_set_images: (a: number, b: number, c: number) => void;
@@ -1198,6 +1275,7 @@ export interface InitOutput {
1198
1275
  readonly wasmdocumentmetadata_author: (a: number, b: number) => void;
1199
1276
  readonly wasmdocumentmetadata_baseHref: (a: number, b: number) => void;
1200
1277
  readonly wasmdocumentmetadata_canonicalUrl: (a: number, b: number) => void;
1278
+ readonly wasmdocumentmetadata_default: () => number;
1201
1279
  readonly wasmdocumentmetadata_description: (a: number, b: number) => void;
1202
1280
  readonly wasmdocumentmetadata_keywords: (a: number, b: number) => void;
1203
1281
  readonly wasmdocumentmetadata_language: (a: number, b: number) => void;
@@ -1215,13 +1293,14 @@ export interface InitOutput {
1215
1293
  readonly wasmdocumentmetadata_set_textDirection: (a: number, b: number) => void;
1216
1294
  readonly wasmdocumentmetadata_set_title: (a: number, b: number, c: number) => void;
1217
1295
  readonly wasmdocumentmetadata_set_twitterCard: (a: number, b: number) => void;
1218
- readonly wasmdocumentmetadata_textDirection: (a: number) => number;
1296
+ readonly wasmdocumentmetadata_textDirection: (a: number, b: number) => void;
1219
1297
  readonly wasmdocumentmetadata_title: (a: number, b: number) => void;
1220
1298
  readonly wasmdocumentmetadata_twitterCard: (a: number) => number;
1221
1299
  readonly wasmdocumentnode_annotations: (a: number, b: number) => void;
1222
1300
  readonly wasmdocumentnode_attributes: (a: number) => number;
1223
1301
  readonly wasmdocumentnode_children: (a: number, b: number) => void;
1224
- readonly wasmdocumentnode_content: (a: number) => number;
1302
+ readonly wasmdocumentnode_content: (a: number, b: number) => void;
1303
+ readonly wasmdocumentnode_default: () => number;
1225
1304
  readonly wasmdocumentnode_id: (a: number, b: number) => void;
1226
1305
  readonly wasmdocumentnode_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
1227
1306
  readonly wasmdocumentnode_parent: (a: number) => number;
@@ -1231,6 +1310,7 @@ export interface InitOutput {
1231
1310
  readonly wasmdocumentnode_set_content: (a: number, b: number) => void;
1232
1311
  readonly wasmdocumentnode_set_id: (a: number, b: number, c: number) => void;
1233
1312
  readonly wasmdocumentnode_set_parent: (a: number, b: number) => void;
1313
+ readonly wasmdocumentstructure_default: () => number;
1234
1314
  readonly wasmdocumentstructure_new: (a: number, b: number, c: number, d: number) => number;
1235
1315
  readonly wasmdocumentstructure_nodes: (a: number, b: number) => void;
1236
1316
  readonly wasmdocumentstructure_set_nodes: (a: number, b: number, c: number) => void;
@@ -1239,6 +1319,7 @@ export interface InitOutput {
1239
1319
  readonly wasmgridcell_col: (a: number) => number;
1240
1320
  readonly wasmgridcell_colSpan: (a: number) => number;
1241
1321
  readonly wasmgridcell_content: (a: number, b: number) => void;
1322
+ readonly wasmgridcell_default: () => number;
1242
1323
  readonly wasmgridcell_isHeader: (a: number) => number;
1243
1324
  readonly wasmgridcell_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
1244
1325
  readonly wasmgridcell_row: (a: number) => number;
@@ -1249,6 +1330,7 @@ export interface InitOutput {
1249
1330
  readonly wasmgridcell_set_isHeader: (a: number, b: number) => void;
1250
1331
  readonly wasmgridcell_set_row: (a: number, b: number) => void;
1251
1332
  readonly wasmgridcell_set_rowSpan: (a: number, b: number) => void;
1333
+ readonly wasmheadermetadata_default: () => number;
1252
1334
  readonly wasmheadermetadata_htmlOffset: (a: number) => number;
1253
1335
  readonly wasmheadermetadata_id: (a: number, b: number) => void;
1254
1336
  readonly wasmheadermetadata_isValid: (a: number) => number;
@@ -1259,6 +1341,7 @@ export interface InitOutput {
1259
1341
  readonly wasmheadermetadata_set_level: (a: number, b: number) => void;
1260
1342
  readonly wasmheadermetadata_set_text: (a: number, b: number, c: number) => void;
1261
1343
  readonly wasmheadermetadata_text: (a: number, b: number) => void;
1344
+ readonly wasmhtmlmetadata_default: () => number;
1262
1345
  readonly wasmhtmlmetadata_document: (a: number) => number;
1263
1346
  readonly wasmhtmlmetadata_headers: (a: number, b: number) => void;
1264
1347
  readonly wasmhtmlmetadata_images: (a: number, b: number) => void;
@@ -1272,8 +1355,9 @@ export interface InitOutput {
1272
1355
  readonly wasmhtmlmetadata_structuredData: (a: number, b: number) => void;
1273
1356
  readonly wasmimagemetadata_alt: (a: number, b: number) => void;
1274
1357
  readonly wasmimagemetadata_attributes: (a: number) => number;
1358
+ readonly wasmimagemetadata_default: () => number;
1275
1359
  readonly wasmimagemetadata_dimensions: (a: number, b: number) => void;
1276
- readonly wasmimagemetadata_imageType: (a: number) => number;
1360
+ readonly wasmimagemetadata_imageType: (a: number, b: number) => void;
1277
1361
  readonly wasmimagemetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
1278
1362
  readonly wasmimagemetadata_set_alt: (a: number, b: number, c: number) => void;
1279
1363
  readonly wasmimagemetadata_set_attributes: (a: number, b: number) => void;
@@ -1285,8 +1369,9 @@ export interface InitOutput {
1285
1369
  readonly wasmimagemetadata_title: (a: number, b: number) => void;
1286
1370
  readonly wasmlinkmetadata_attributes: (a: number) => number;
1287
1371
  readonly wasmlinkmetadata_classifyLink: (a: number, b: number) => number;
1372
+ readonly wasmlinkmetadata_default: () => number;
1288
1373
  readonly wasmlinkmetadata_href: (a: number, b: number) => void;
1289
- readonly wasmlinkmetadata_linkType: (a: number) => number;
1374
+ readonly wasmlinkmetadata_linkType: (a: number, b: number) => void;
1290
1375
  readonly wasmlinkmetadata_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
1291
1376
  readonly wasmlinkmetadata_rel: (a: number, b: number) => void;
1292
1377
  readonly wasmlinkmetadata_set_attributes: (a: number, b: number) => void;
@@ -1298,10 +1383,11 @@ export interface InitOutput {
1298
1383
  readonly wasmlinkmetadata_text: (a: number, b: number) => void;
1299
1384
  readonly wasmlinkmetadata_title: (a: number, b: number) => void;
1300
1385
  readonly wasmnodecontext_attributes: (a: number) => number;
1386
+ readonly wasmnodecontext_default: () => number;
1301
1387
  readonly wasmnodecontext_indexInParent: (a: number) => number;
1302
1388
  readonly wasmnodecontext_isInline: (a: number) => number;
1303
1389
  readonly wasmnodecontext_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
1304
- readonly wasmnodecontext_nodeType: (a: number) => number;
1390
+ readonly wasmnodecontext_nodeType: (a: number, b: number) => void;
1305
1391
  readonly wasmnodecontext_parentTag: (a: number, b: number) => void;
1306
1392
  readonly wasmnodecontext_set_attributes: (a: number, b: number) => void;
1307
1393
  readonly wasmnodecontext_set_indexInParent: (a: number, b: number) => void;
@@ -1315,49 +1401,56 @@ export interface InitOutput {
1315
1401
  readonly wasmpreprocessingoptions_enabled: (a: number) => number;
1316
1402
  readonly wasmpreprocessingoptions_from: (a: number) => number;
1317
1403
  readonly wasmpreprocessingoptions_new: (a: number, b: number, c: number, d: number) => number;
1318
- readonly wasmpreprocessingoptions_preset: (a: number) => number;
1404
+ readonly wasmpreprocessingoptions_preset: (a: number, b: number) => void;
1319
1405
  readonly wasmpreprocessingoptions_removeForms: (a: number) => number;
1320
1406
  readonly wasmpreprocessingoptions_removeNavigation: (a: number) => number;
1321
1407
  readonly wasmpreprocessingoptions_set_enabled: (a: number, b: number) => void;
1322
1408
  readonly wasmpreprocessingoptions_set_preset: (a: number, b: number) => void;
1323
1409
  readonly wasmpreprocessingoptions_set_removeForms: (a: number, b: number) => void;
1324
1410
  readonly wasmpreprocessingoptions_set_removeNavigation: (a: number, b: number) => void;
1411
+ readonly wasmpreprocessingoptionsupdate_default: () => number;
1325
1412
  readonly wasmpreprocessingoptionsupdate_enabled: (a: number) => number;
1326
1413
  readonly wasmpreprocessingoptionsupdate_new: (a: number, b: number, c: number, d: number) => number;
1327
- readonly wasmpreprocessingoptionsupdate_preset: (a: number) => number;
1414
+ readonly wasmpreprocessingoptionsupdate_preset: (a: number, b: number) => void;
1328
1415
  readonly wasmpreprocessingoptionsupdate_removeForms: (a: number) => number;
1329
1416
  readonly wasmpreprocessingoptionsupdate_removeNavigation: (a: number) => number;
1330
1417
  readonly wasmpreprocessingoptionsupdate_set_enabled: (a: number, b: number) => void;
1331
1418
  readonly wasmpreprocessingoptionsupdate_set_preset: (a: number, b: number) => void;
1332
1419
  readonly wasmpreprocessingoptionsupdate_set_removeForms: (a: number, b: number) => void;
1333
1420
  readonly wasmpreprocessingoptionsupdate_set_removeNavigation: (a: number, b: number) => void;
1334
- readonly wasmprocessingwarning_kind: (a: number) => number;
1421
+ readonly wasmprocessingwarning_default: () => number;
1422
+ readonly wasmprocessingwarning_kind: (a: number, b: number) => void;
1335
1423
  readonly wasmprocessingwarning_message: (a: number, b: number) => void;
1336
1424
  readonly wasmprocessingwarning_new: (a: number, b: number, c: number) => number;
1337
1425
  readonly wasmprocessingwarning_set_kind: (a: number, b: number) => void;
1338
1426
  readonly wasmprocessingwarning_set_message: (a: number, b: number, c: number) => void;
1339
- readonly wasmstructureddata_dataType: (a: number) => number;
1427
+ readonly wasmstructureddata_dataType: (a: number, b: number) => void;
1428
+ readonly wasmstructureddata_default: () => number;
1340
1429
  readonly wasmstructureddata_new: (a: number, b: number, c: number, d: number, e: number) => number;
1341
1430
  readonly wasmstructureddata_rawJson: (a: number, b: number) => void;
1342
1431
  readonly wasmstructureddata_schemaType: (a: number, b: number) => void;
1343
1432
  readonly wasmstructureddata_set_dataType: (a: number, b: number) => void;
1344
1433
  readonly wasmstructureddata_set_rawJson: (a: number, b: number, c: number) => void;
1345
1434
  readonly wasmstructureddata_set_schemaType: (a: number, b: number, c: number) => void;
1435
+ readonly wasmtabledata_default: () => number;
1346
1436
  readonly wasmtabledata_grid: (a: number) => number;
1347
1437
  readonly wasmtabledata_markdown: (a: number, b: number) => void;
1348
1438
  readonly wasmtabledata_new: (a: number, b: number, c: number) => number;
1349
1439
  readonly wasmtabledata_set_grid: (a: number, b: number) => void;
1350
1440
  readonly wasmtabledata_set_markdown: (a: number, b: number, c: number) => void;
1351
1441
  readonly wasmtablegrid_cells: (a: number, b: number) => void;
1442
+ readonly wasmtablegrid_default: () => number;
1352
1443
  readonly wasmtablegrid_new: (a: number, b: number, c: number, d: number) => number;
1353
1444
  readonly wasmtablegrid_set_cells: (a: number, b: number, c: number) => void;
1445
+ readonly wasmtextannotation_default: () => number;
1354
1446
  readonly wasmtextannotation_end: (a: number) => number;
1355
- readonly wasmtextannotation_kind: (a: number) => number;
1447
+ readonly wasmtextannotation_kind: (a: number, b: number) => void;
1356
1448
  readonly wasmtextannotation_new: (a: number, b: number, c: number) => number;
1357
1449
  readonly wasmtextannotation_set_end: (a: number, b: number) => void;
1358
1450
  readonly wasmtextannotation_set_kind: (a: number, b: number) => void;
1359
1451
  readonly wasmtextannotation_set_start: (a: number, b: number) => void;
1360
1452
  readonly wasmtextannotation_start: (a: number) => number;
1453
+ readonly wasmvisitorhandle_new: (a: number) => number;
1361
1454
  readonly wasmpreprocessingoptions_fromUpdate: (a: number) => number;
1362
1455
  readonly wasmheadermetadata_set_depth: (a: number, b: number) => void;
1363
1456
  readonly wasmnodecontext_set_depth: (a: number, b: number) => void;
@@ -1396,128 +1489,3 @@ export function initSync(module: { module: SyncInitInput } | SyncInitInput): Ini
1396
1489
  * @returns {Promise<InitOutput>}
1397
1490
  */
1398
1491
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
1399
-
1400
-
1401
- export type WasmHeadingStyle = "underlined" | "atx" | "atxClosed";
1402
- export type WasmListIndentType = "spaces" | "tabs";
1403
- export type WasmWhitespaceMode = "normalized" | "strict";
1404
- export type WasmNewlineStyle = "spaces" | "backslash";
1405
- export type WasmCodeBlockStyle = "indented" | "backticks" | "tildes";
1406
- export type WasmHighlightStyle = "doubleEqual" | "html" | "bold" | "none";
1407
- export type WasmPreprocessingPreset = "minimal" | "standard" | "aggressive";
1408
- export type WasmOutputFormat = "markdown" | "djot" | "plain";
1409
-
1410
- export interface WasmPreprocessingOptions {
1411
- enabled?: boolean;
1412
- preset?: WasmPreprocessingPreset;
1413
- removeNavigation?: boolean;
1414
- removeForms?: boolean;
1415
- }
1416
-
1417
- export interface WasmConversionOptions {
1418
- headingStyle?: WasmHeadingStyle;
1419
- listIndentType?: WasmListIndentType;
1420
- listIndentWidth?: number;
1421
- bullets?: string;
1422
- strongEmSymbol?: string;
1423
- escapeAsterisks?: boolean;
1424
- escapeUnderscores?: boolean;
1425
- escapeMisc?: boolean;
1426
- escapeAscii?: boolean;
1427
- codeLanguage?: string;
1428
- autolinks?: boolean;
1429
- defaultTitle?: boolean;
1430
- brInTables?: boolean;
1431
- hocrSpatialTables?: boolean;
1432
- highlightStyle?: WasmHighlightStyle;
1433
- extractMetadata?: boolean;
1434
- whitespaceMode?: WasmWhitespaceMode;
1435
- stripNewlines?: boolean;
1436
- wrap?: boolean;
1437
- wrapWidth?: number;
1438
- convertAsInline?: boolean;
1439
- subSymbol?: string;
1440
- supSymbol?: string;
1441
- newlineStyle?: WasmNewlineStyle;
1442
- codeBlockStyle?: WasmCodeBlockStyle;
1443
- keepInlineImagesIn?: string[];
1444
- preprocessing?: WasmPreprocessingOptions | null;
1445
- encoding?: string;
1446
- debug?: boolean;
1447
- stripTags?: string[];
1448
- preserveTags?: string[];
1449
- skipImages?: boolean;
1450
- outputFormat?: WasmOutputFormat;
1451
- includeDocumentStructure?: boolean;
1452
- extractImages?: boolean;
1453
- maxImageSize?: number;
1454
- captureSvg?: boolean;
1455
- inferDimensions?: boolean;
1456
- }
1457
-
1458
- /** A single cell in a structured table grid. */
1459
- export interface WasmGridCell {
1460
- content: string;
1461
- row: number;
1462
- col: number;
1463
- rowSpan: number;
1464
- colSpan: number;
1465
- isHeader: boolean;
1466
- }
1467
-
1468
- /** Structured table grid with cell-level data. */
1469
- export interface WasmTableGrid {
1470
- rows: number;
1471
- cols: number;
1472
- cells: WasmGridCell[];
1473
- }
1474
-
1475
- /** A table extracted during conversion. */
1476
- export interface WasmConversionTable {
1477
- grid: WasmTableGrid;
1478
- markdown: string;
1479
- }
1480
-
1481
- /** Non-fatal warning emitted during conversion. */
1482
- export interface WasmConversionWarning {
1483
- /** Human-readable warning message. */
1484
- message: string;
1485
- /** Warning kind identifier. */
1486
- kind: string;
1487
- }
1488
-
1489
- /** An extracted inline image from the HTML document. */
1490
- export interface WasmInlineImage {
1491
- /** Raw image data as a Uint8Array. */
1492
- data: Uint8Array;
1493
- /** Image format (png, jpeg, gif, svg, etc.). */
1494
- format: string;
1495
- /** Generated or provided filename, or null. */
1496
- filename: string | null;
1497
- /** Alt text or description, or null. */
1498
- description: string | null;
1499
- /** Image width in pixels, or null if not available. */
1500
- width: number | null;
1501
- /** Image height in pixels, or null if not available. */
1502
- height: number | null;
1503
- /** Source type ("img_data_uri" or "svg_element"). */
1504
- source: string;
1505
- /** HTML attributes from the source element. */
1506
- attributes: Record<string, string>;
1507
- }
1508
-
1509
- /** Result of the convert() API. */
1510
- export interface WasmConversionResult {
1511
- /** Converted text output (markdown, djot, or plain text), or null. */
1512
- content: string | null;
1513
- /** Structured document tree serialized as a JSON value, or null. */
1514
- document: unknown | null;
1515
- /** Extracted HTML metadata serialized as a JSON value, or null. */
1516
- metadata: unknown | null;
1517
- /** All tables found in the HTML, in document order. */
1518
- tables: WasmConversionTable[];
1519
- /** Extracted inline images (data URIs and SVGs). */
1520
- images: WasmInlineImage[];
1521
- /** Non-fatal processing warnings. */
1522
- warnings: WasmConversionWarning[];
1523
- }