html-to-markdown-wasm 2.9.1 → 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.
- package/dist/html_to_markdown_wasm.d.ts +42 -41
- package/dist/html_to_markdown_wasm_bg.js +398 -416
- package/dist/html_to_markdown_wasm_bg.wasm +0 -0
- package/dist/package.json +1 -1
- package/dist-node/html_to_markdown_wasm.d.ts +42 -41
- package/dist-node/html_to_markdown_wasm.js +402 -416
- package/dist-node/html_to_markdown_wasm_bg.wasm +0 -0
- package/dist-node/package.json +1 -1
- package/dist-web/html_to_markdown_wasm.d.ts +43 -41
- package/dist-web/html_to_markdown_wasm.js +395 -417
- package/dist-web/html_to_markdown_wasm_bg.wasm +0 -0
- package/dist-web/package.json +1 -1
- package/package.json +2 -2
|
Binary file
|
package/dist-node/package.json
CHANGED
|
@@ -1,42 +1,12 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
4
|
-
* Convert HTML to Markdown
|
|
5
|
-
*
|
|
6
|
-
* # Arguments
|
|
7
|
-
*
|
|
8
|
-
* * `html` - The HTML string to convert
|
|
9
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
10
|
-
*
|
|
11
|
-
* # Example
|
|
12
|
-
*
|
|
13
|
-
* ```javascript
|
|
14
|
-
* import { convert } from 'html-to-markdown-wasm';
|
|
15
|
-
*
|
|
16
|
-
* const html = '<h1>Hello World</h1>';
|
|
17
|
-
* const markdown = convert(html);
|
|
18
|
-
* console.log(markdown); // # Hello World
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export function convert(html: string, options: any): string;
|
|
22
|
-
export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
|
|
23
|
-
export function convertBytesWithOptionsHandle(html: Uint8Array, handle: WasmConversionOptionsHandle): string;
|
|
24
|
-
export function convertBytesWithInlineImages(html: Uint8Array, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
|
|
25
|
-
export function createConversionOptionsHandle(options: any): WasmConversionOptionsHandle;
|
|
26
|
-
export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
|
|
27
|
-
export function convertBytes(html: Uint8Array, options: any): string;
|
|
28
|
-
/**
|
|
29
|
-
* Initialize panic hook for better error messages in the browser
|
|
30
|
-
*/
|
|
31
|
-
export function init(): void;
|
|
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,6 +46,43 @@ 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 type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
86
87
|
|
|
87
88
|
export interface InitOutput {
|
|
@@ -125,6 +126,7 @@ export interface InitOutput {
|
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
129
|
+
|
|
128
130
|
/**
|
|
129
131
|
* Instantiates the given `module`, which can either be bytes or
|
|
130
132
|
* a precompiled `WebAssembly.Module`.
|