html-to-markdown-wasm 2.9.0 → 2.9.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.
@@ -1,42 +1,12 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Initialize panic hook for better error messages in the browser
5
- */
6
- export function init(): void;
7
- export function convertBytes(html: Uint8Array, options: any): string;
8
- /**
9
- * Convert HTML to Markdown
10
- *
11
- * # Arguments
12
- *
13
- * * `html` - The HTML string to convert
14
- * * `options` - Optional conversion options (as a JavaScript object)
15
- *
16
- * # Example
17
- *
18
- * ```javascript
19
- * import { convert } from 'html-to-markdown-wasm';
20
- *
21
- * const html = '<h1>Hello World</h1>';
22
- * const markdown = convert(html);
23
- * console.log(markdown); // # Hello World
24
- * ```
25
- */
26
- export function convert(html: string, options: any): string;
27
- export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
28
- export function convertBytesWithOptionsHandle(html: Uint8Array, handle: WasmConversionOptionsHandle): string;
29
- export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
30
- export function convertBytesWithInlineImages(html: Uint8Array, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
31
- export function createConversionOptionsHandle(options: any): WasmConversionOptionsHandle;
3
+
32
4
  export class WasmConversionOptionsHandle {
33
5
  free(): void;
34
6
  [Symbol.dispose](): void;
35
7
  constructor(options: any);
36
8
  }
37
- /**
38
- * Result of HTML extraction with inline images
39
- */
9
+
40
10
  export class WasmHtmlExtraction {
41
11
  private constructor();
42
12
  free(): void;
@@ -45,9 +15,7 @@ export class WasmHtmlExtraction {
45
15
  readonly markdown: string;
46
16
  readonly warnings: WasmInlineImageWarning[];
47
17
  }
48
- /**
49
- * Inline image data
50
- */
18
+
51
19
  export class WasmInlineImage {
52
20
  private constructor();
53
21
  free(): void;
@@ -60,9 +28,7 @@ export class WasmInlineImage {
60
28
  readonly source: string;
61
29
  readonly filename: string | undefined;
62
30
  }
63
- /**
64
- * Inline image configuration
65
- */
31
+
66
32
  export class WasmInlineImageConfig {
67
33
  free(): void;
68
34
  [Symbol.dispose](): void;
@@ -71,9 +37,7 @@ export class WasmInlineImageConfig {
71
37
  set filenamePrefix(value: string | null | undefined);
72
38
  set inferDimensions(value: boolean);
73
39
  }
74
- /**
75
- * Warning about inline image processing
76
- */
40
+
77
41
  export class WasmInlineImageWarning {
78
42
  private constructor();
79
43
  free(): void;
@@ -82,5 +46,42 @@ export class WasmInlineImageWarning {
82
46
  readonly message: string;
83
47
  }
84
48
 
49
+ /**
50
+ * Convert HTML to Markdown
51
+ *
52
+ * # Arguments
53
+ *
54
+ * * `html` - The HTML string to convert
55
+ * * `options` - Optional conversion options (as a JavaScript object)
56
+ *
57
+ * # Example
58
+ *
59
+ * ```javascript
60
+ * import { convert } from 'html-to-markdown-wasm';
61
+ *
62
+ * const html = '<h1>Hello World</h1>';
63
+ * const markdown = convert(html);
64
+ * console.log(markdown); // # Hello World
65
+ * ```
66
+ */
67
+ export function convert(html: string, options: any): string;
68
+
69
+ export function convertBytes(html: Uint8Array, options: any): string;
70
+
71
+ export function convertBytesWithInlineImages(html: Uint8Array, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
72
+
73
+ export function convertBytesWithOptionsHandle(html: Uint8Array, handle: WasmConversionOptionsHandle): string;
74
+
75
+ export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
76
+
77
+ export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
78
+
79
+ export function createConversionOptionsHandle(options: any): WasmConversionOptionsHandle;
80
+
81
+ /**
82
+ * Initialize panic hook for better error messages in the browser
83
+ */
84
+ export function init(): void;
85
+
85
86
  export declare function initWasm(): Promise<void>;
86
87
  export declare const wasmReady: Promise<void>;