mdream 1.7.1 → 2.0.0-beta.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.
- package/README.md +54 -51
- package/dist/browser.d.mts +101 -7
- package/dist/browser.mjs +213 -33
- package/dist/edge.d.mts +96 -6
- package/dist/edge.mjs +114 -43
- package/dist/iife.js +232 -23
- package/dist/index.d.mts +15 -12
- package/dist/index.mjs +68 -17
- package/dist/wasm.d.mts +100 -0
- package/dist/wasm.mjs +140 -0
- package/dist/worker.d.mts +11 -8
- package/dist/worker.mjs +121 -4
- package/napi/index.d.mts +20 -0
- package/napi/index.d.ts +20 -0
- package/napi/index.mjs +47 -33
- package/package.json +33 -22
- package/skills/mdream/SKILL.md +124 -0
- package/skills/mdream/references/runtimes.md +49 -0
- package/wasm/mdream_edge.d.ts +27 -0
- package/wasm/mdream_edge.js +91 -19
- package/wasm/mdream_edge_bg.wasm +0 -0
- package/wasm/mdream_edge_bg.wasm.d.ts +3 -0
- package/wasm/package.json +1 -1
- package/wasm-bundler/mdream_edge.d.ts +24 -0
- package/wasm-bundler/mdream_edge.js +6 -2
- package/wasm-bundler/mdream_edge_bg.js +91 -19
- package/wasm-bundler/mdream_edge_bg.wasm +0 -0
- package/wasm-bundler/mdream_edge_bg.wasm.d.ts +3 -0
- package/wasm-bundler/package.json +1 -1
package/wasm/mdream_edge.js
CHANGED
|
@@ -40,6 +40,33 @@ export class MarkdownStream {
|
|
|
40
40
|
return this;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
+
* Byte chunk in, string out, skipping the transcode per chunk. A sequence
|
|
44
|
+
* split across chunks carries to the next call rather than decoding early,
|
|
45
|
+
* matching `TextDecoder({ stream: true })`; invalid bytes become U+FFFD.
|
|
46
|
+
* @param {Uint8Array} chunk
|
|
47
|
+
* @returns {string}
|
|
48
|
+
*/
|
|
49
|
+
processChunkBytes(chunk) {
|
|
50
|
+
let deferred2_0;
|
|
51
|
+
let deferred2_1;
|
|
52
|
+
try {
|
|
53
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
54
|
+
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_export);
|
|
55
|
+
const len0 = WASM_VECTOR_LEN;
|
|
56
|
+
wasm.markdownstream_processChunkBytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
57
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
58
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
59
|
+
deferred2_0 = r0;
|
|
60
|
+
deferred2_1 = r1;
|
|
61
|
+
return getStringFromWasm0(r0, r1);
|
|
62
|
+
} finally {
|
|
63
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
64
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* A carried byte tail cannot be completed by a string chunk, so it is
|
|
69
|
+
* flushed first. Byte and string chunks may be mixed freely.
|
|
43
70
|
* @param {string} chunk
|
|
44
71
|
* @returns {string}
|
|
45
72
|
*/
|
|
@@ -61,6 +88,16 @@ export class MarkdownStream {
|
|
|
61
88
|
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
62
89
|
}
|
|
63
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Frontmatter and extracted elements collected so far, as
|
|
93
|
+
* `{ frontmatter?, extracted? }`. Call after `finish()` for the complete
|
|
94
|
+
* data. Extracted elements drain on each call.
|
|
95
|
+
* @returns {any}
|
|
96
|
+
*/
|
|
97
|
+
takeData() {
|
|
98
|
+
const ret = wasm.markdownstream_takeData(this.__wbg_ptr);
|
|
99
|
+
return takeObject(ret);
|
|
100
|
+
}
|
|
64
101
|
}
|
|
65
102
|
if (Symbol.dispose) MarkdownStream.prototype[Symbol.dispose] = MarkdownStream.prototype.free;
|
|
66
103
|
|
|
@@ -109,6 +146,34 @@ export function htmlToMarkdown(html, options) {
|
|
|
109
146
|
}
|
|
110
147
|
}
|
|
111
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Bytes in, string out: skips the transcode (~14% of a convert) for a
|
|
151
|
+
* caller already holding UTF-8 bytes. Encoding a string to get here
|
|
152
|
+
* measures 1-16% *slower* than [`html_to_markdown`] — only worth it when
|
|
153
|
+
* the bytes are already in hand.
|
|
154
|
+
* @param {Uint8Array} html
|
|
155
|
+
* @param {any} options
|
|
156
|
+
* @returns {string}
|
|
157
|
+
*/
|
|
158
|
+
export function htmlToMarkdownBytes(html, options) {
|
|
159
|
+
let deferred2_0;
|
|
160
|
+
let deferred2_1;
|
|
161
|
+
try {
|
|
162
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
163
|
+
const ptr0 = passArray8ToWasm0(html, wasm.__wbindgen_export);
|
|
164
|
+
const len0 = WASM_VECTOR_LEN;
|
|
165
|
+
wasm.htmlToMarkdownBytes(retptr, ptr0, len0, addHeapObject(options));
|
|
166
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
167
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
168
|
+
deferred2_0 = r0;
|
|
169
|
+
deferred2_1 = r1;
|
|
170
|
+
return getStringFromWasm0(r0, r1);
|
|
171
|
+
} finally {
|
|
172
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
173
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
112
177
|
/**
|
|
113
178
|
* @param {string} html
|
|
114
179
|
* @param {any} options
|
|
@@ -127,26 +192,26 @@ export function install_panic_hook() {
|
|
|
127
192
|
function __wbg_get_imports() {
|
|
128
193
|
const import0 = {
|
|
129
194
|
__proto__: null,
|
|
130
|
-
|
|
195
|
+
__wbg___wbindgen_boolean_get_5b446f51afd21013: function(arg0) {
|
|
131
196
|
const v = getObject(arg0);
|
|
132
197
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
133
198
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
134
199
|
},
|
|
135
|
-
|
|
200
|
+
__wbg___wbindgen_is_null_e343b7d08827ba72: function(arg0) {
|
|
136
201
|
const ret = getObject(arg0) === null;
|
|
137
202
|
return ret;
|
|
138
203
|
},
|
|
139
|
-
|
|
204
|
+
__wbg___wbindgen_is_undefined_8865fb403f8fe9d8: function(arg0) {
|
|
140
205
|
const ret = getObject(arg0) === undefined;
|
|
141
206
|
return ret;
|
|
142
207
|
},
|
|
143
|
-
|
|
208
|
+
__wbg___wbindgen_number_get_2e0e7dee9f701a71: function(arg0, arg1) {
|
|
144
209
|
const obj = getObject(arg1);
|
|
145
210
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
146
211
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
147
212
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
148
213
|
},
|
|
149
|
-
|
|
214
|
+
__wbg___wbindgen_string_get_0380ccaa2f57f0d9: function(arg0, arg1) {
|
|
150
215
|
const obj = getObject(arg1);
|
|
151
216
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
152
217
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -154,50 +219,50 @@ function __wbg_get_imports() {
|
|
|
154
219
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
155
220
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
156
221
|
},
|
|
157
|
-
|
|
222
|
+
__wbg___wbindgen_throw_41e9ee4f547fc59a: function(arg0, arg1) {
|
|
158
223
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
159
224
|
},
|
|
160
|
-
|
|
225
|
+
__wbg_entries_fb6397112b1de25f: function(arg0) {
|
|
161
226
|
const ret = Object.entries(getObject(arg0));
|
|
162
227
|
return addHeapObject(ret);
|
|
163
228
|
},
|
|
164
|
-
|
|
229
|
+
__wbg_from_296ca31f8d0f1c52: function(arg0) {
|
|
165
230
|
const ret = Array.from(getObject(arg0));
|
|
166
231
|
return addHeapObject(ret);
|
|
167
232
|
},
|
|
168
|
-
|
|
233
|
+
__wbg_get_31af05bd4842a84f: function() { return handleError(function (arg0, arg1) {
|
|
169
234
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
170
235
|
return addHeapObject(ret);
|
|
171
236
|
}, arguments); },
|
|
172
|
-
|
|
237
|
+
__wbg_get_6c896e0571ddae51: function(arg0, arg1) {
|
|
173
238
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
174
239
|
return addHeapObject(ret);
|
|
175
240
|
},
|
|
176
|
-
|
|
241
|
+
__wbg_isArray_e15a2ff68ffdbef2: function(arg0) {
|
|
177
242
|
const ret = Array.isArray(getObject(arg0));
|
|
178
243
|
return ret;
|
|
179
244
|
},
|
|
180
|
-
|
|
245
|
+
__wbg_length_d4bdea10311bd9cf: function(arg0) {
|
|
181
246
|
const ret = getObject(arg0).length;
|
|
182
247
|
return ret;
|
|
183
248
|
},
|
|
184
|
-
|
|
185
|
-
const ret = new
|
|
249
|
+
__wbg_new_617a8cdb8bb1130e: function() {
|
|
250
|
+
const ret = new Object();
|
|
186
251
|
return addHeapObject(ret);
|
|
187
252
|
},
|
|
188
|
-
|
|
189
|
-
const ret = new
|
|
253
|
+
__wbg_new_ee2291f50781bf1d: function() {
|
|
254
|
+
const ret = new Array();
|
|
190
255
|
return addHeapObject(ret);
|
|
191
256
|
},
|
|
192
|
-
|
|
257
|
+
__wbg_push_2baf45db356cf468: function(arg0, arg1) {
|
|
193
258
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
194
259
|
return ret;
|
|
195
260
|
},
|
|
196
|
-
|
|
261
|
+
__wbg_set_145a351398b48c65: function() { return handleError(function (arg0, arg1, arg2) {
|
|
197
262
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
198
263
|
return ret;
|
|
199
264
|
}, arguments); },
|
|
200
|
-
|
|
265
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
201
266
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
202
267
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
203
268
|
return addHeapObject(ret);
|
|
@@ -274,6 +339,13 @@ function isLikeNone(x) {
|
|
|
274
339
|
return x === undefined || x === null;
|
|
275
340
|
}
|
|
276
341
|
|
|
342
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
343
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
344
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
345
|
+
WASM_VECTOR_LEN = arg.length;
|
|
346
|
+
return ptr;
|
|
347
|
+
}
|
|
348
|
+
|
|
277
349
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
278
350
|
if (realloc === undefined) {
|
|
279
351
|
const buf = cachedTextEncoder.encode(arg);
|
package/wasm/mdream_edge_bg.wasm
CHANGED
|
Binary file
|
|
@@ -4,11 +4,14 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export const __mdreamTakePanicMessage: (a: number) => void;
|
|
5
5
|
export const __wbg_markdownstream_free: (a: number, b: number) => void;
|
|
6
6
|
export const htmlToMarkdown: (a: number, b: number, c: number, d: number) => void;
|
|
7
|
+
export const htmlToMarkdownBytes: (a: number, b: number, c: number, d: number) => void;
|
|
7
8
|
export const htmlToMarkdownResult: (a: number, b: number, c: number) => number;
|
|
8
9
|
export const install_panic_hook: () => void;
|
|
9
10
|
export const markdownstream_finish: (a: number, b: number) => void;
|
|
10
11
|
export const markdownstream_new: (a: number) => number;
|
|
11
12
|
export const markdownstream_processChunk: (a: number, b: number, c: number, d: number) => void;
|
|
13
|
+
export const markdownstream_processChunkBytes: (a: number, b: number, c: number, d: number) => void;
|
|
14
|
+
export const markdownstream_takeData: (a: number) => number;
|
|
12
15
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
13
16
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
14
17
|
export const __wbindgen_export3: (a: number) => void;
|
package/wasm/package.json
CHANGED
|
@@ -6,7 +6,23 @@ export class MarkdownStream {
|
|
|
6
6
|
[Symbol.dispose](): void;
|
|
7
7
|
finish(): string;
|
|
8
8
|
constructor(options: any);
|
|
9
|
+
/**
|
|
10
|
+
* Byte chunk in, string out, skipping the transcode per chunk. A sequence
|
|
11
|
+
* split across chunks carries to the next call rather than decoding early,
|
|
12
|
+
* matching `TextDecoder({ stream: true })`; invalid bytes become U+FFFD.
|
|
13
|
+
*/
|
|
14
|
+
processChunkBytes(chunk: Uint8Array): string;
|
|
15
|
+
/**
|
|
16
|
+
* A carried byte tail cannot be completed by a string chunk, so it is
|
|
17
|
+
* flushed first. Byte and string chunks may be mixed freely.
|
|
18
|
+
*/
|
|
9
19
|
processChunk(chunk: string): string;
|
|
20
|
+
/**
|
|
21
|
+
* Frontmatter and extracted elements collected so far, as
|
|
22
|
+
* `{ frontmatter?, extracted? }`. Call after `finish()` for the complete
|
|
23
|
+
* data. Extracted elements drain on each call.
|
|
24
|
+
*/
|
|
25
|
+
takeData(): any;
|
|
10
26
|
}
|
|
11
27
|
|
|
12
28
|
/**
|
|
@@ -16,6 +32,14 @@ export function __mdreamTakePanicMessage(): string | undefined;
|
|
|
16
32
|
|
|
17
33
|
export function htmlToMarkdown(html: string, options: any): string;
|
|
18
34
|
|
|
35
|
+
/**
|
|
36
|
+
* Bytes in, string out: skips the transcode (~14% of a convert) for a
|
|
37
|
+
* caller already holding UTF-8 bytes. Encoding a string to get here
|
|
38
|
+
* measures 1-16% *slower* than [`html_to_markdown`] — only worth it when
|
|
39
|
+
* the bytes are already in hand.
|
|
40
|
+
*/
|
|
41
|
+
export function htmlToMarkdownBytes(html: Uint8Array, options: any): string;
|
|
42
|
+
|
|
19
43
|
export function htmlToMarkdownResult(html: string, options: any): any;
|
|
20
44
|
|
|
21
45
|
export function install_panic_hook(): void;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/* @ts-self-types="./mdream_edge.d.ts" */
|
|
2
|
-
import
|
|
2
|
+
import wasmModule from "./mdream_edge_bg.wasm";
|
|
3
|
+
import * as imports from "./mdream_edge_bg.js";
|
|
4
|
+
const wasm = wasmModule instanceof WebAssembly.Module
|
|
5
|
+
? new WebAssembly.Instance(wasmModule, { "./mdream_edge_bg.js": imports }).exports
|
|
6
|
+
: wasmModule;
|
|
3
7
|
import { __wbg_set_wasm } from "./mdream_edge_bg.js";
|
|
4
8
|
|
|
5
9
|
__wbg_set_wasm(wasm);
|
|
6
10
|
wasm.__wbindgen_start();
|
|
7
11
|
export {
|
|
8
|
-
MarkdownStream, __mdreamTakePanicMessage, htmlToMarkdown, htmlToMarkdownResult, install_panic_hook
|
|
12
|
+
MarkdownStream, __mdreamTakePanicMessage, htmlToMarkdown, htmlToMarkdownBytes, htmlToMarkdownResult, install_panic_hook
|
|
9
13
|
} from "./mdream_edge_bg.js";
|
|
@@ -38,6 +38,33 @@ export class MarkdownStream {
|
|
|
38
38
|
return this;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
+
* Byte chunk in, string out, skipping the transcode per chunk. A sequence
|
|
42
|
+
* split across chunks carries to the next call rather than decoding early,
|
|
43
|
+
* matching `TextDecoder({ stream: true })`; invalid bytes become U+FFFD.
|
|
44
|
+
* @param {Uint8Array} chunk
|
|
45
|
+
* @returns {string}
|
|
46
|
+
*/
|
|
47
|
+
processChunkBytes(chunk) {
|
|
48
|
+
let deferred2_0;
|
|
49
|
+
let deferred2_1;
|
|
50
|
+
try {
|
|
51
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
52
|
+
const ptr0 = passArray8ToWasm0(chunk, wasm.__wbindgen_export);
|
|
53
|
+
const len0 = WASM_VECTOR_LEN;
|
|
54
|
+
wasm.markdownstream_processChunkBytes(retptr, this.__wbg_ptr, ptr0, len0);
|
|
55
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
56
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
57
|
+
deferred2_0 = r0;
|
|
58
|
+
deferred2_1 = r1;
|
|
59
|
+
return getStringFromWasm0(r0, r1);
|
|
60
|
+
} finally {
|
|
61
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
62
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* A carried byte tail cannot be completed by a string chunk, so it is
|
|
67
|
+
* flushed first. Byte and string chunks may be mixed freely.
|
|
41
68
|
* @param {string} chunk
|
|
42
69
|
* @returns {string}
|
|
43
70
|
*/
|
|
@@ -59,6 +86,16 @@ export class MarkdownStream {
|
|
|
59
86
|
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
60
87
|
}
|
|
61
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Frontmatter and extracted elements collected so far, as
|
|
91
|
+
* `{ frontmatter?, extracted? }`. Call after `finish()` for the complete
|
|
92
|
+
* data. Extracted elements drain on each call.
|
|
93
|
+
* @returns {any}
|
|
94
|
+
*/
|
|
95
|
+
takeData() {
|
|
96
|
+
const ret = wasm.markdownstream_takeData(this.__wbg_ptr);
|
|
97
|
+
return takeObject(ret);
|
|
98
|
+
}
|
|
62
99
|
}
|
|
63
100
|
if (Symbol.dispose) MarkdownStream.prototype[Symbol.dispose] = MarkdownStream.prototype.free;
|
|
64
101
|
|
|
@@ -107,6 +144,34 @@ export function htmlToMarkdown(html, options) {
|
|
|
107
144
|
}
|
|
108
145
|
}
|
|
109
146
|
|
|
147
|
+
/**
|
|
148
|
+
* Bytes in, string out: skips the transcode (~14% of a convert) for a
|
|
149
|
+
* caller already holding UTF-8 bytes. Encoding a string to get here
|
|
150
|
+
* measures 1-16% *slower* than [`html_to_markdown`] — only worth it when
|
|
151
|
+
* the bytes are already in hand.
|
|
152
|
+
* @param {Uint8Array} html
|
|
153
|
+
* @param {any} options
|
|
154
|
+
* @returns {string}
|
|
155
|
+
*/
|
|
156
|
+
export function htmlToMarkdownBytes(html, options) {
|
|
157
|
+
let deferred2_0;
|
|
158
|
+
let deferred2_1;
|
|
159
|
+
try {
|
|
160
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
161
|
+
const ptr0 = passArray8ToWasm0(html, wasm.__wbindgen_export);
|
|
162
|
+
const len0 = WASM_VECTOR_LEN;
|
|
163
|
+
wasm.htmlToMarkdownBytes(retptr, ptr0, len0, addHeapObject(options));
|
|
164
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
165
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
166
|
+
deferred2_0 = r0;
|
|
167
|
+
deferred2_1 = r1;
|
|
168
|
+
return getStringFromWasm0(r0, r1);
|
|
169
|
+
} finally {
|
|
170
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
171
|
+
wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
110
175
|
/**
|
|
111
176
|
* @param {string} html
|
|
112
177
|
* @param {any} options
|
|
@@ -122,26 +187,26 @@ export function htmlToMarkdownResult(html, options) {
|
|
|
122
187
|
export function install_panic_hook() {
|
|
123
188
|
wasm.install_panic_hook();
|
|
124
189
|
}
|
|
125
|
-
export function
|
|
190
|
+
export function __wbg___wbindgen_boolean_get_5b446f51afd21013(arg0) {
|
|
126
191
|
const v = getObject(arg0);
|
|
127
192
|
const ret = typeof(v) === 'boolean' ? v : undefined;
|
|
128
193
|
return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
|
|
129
194
|
}
|
|
130
|
-
export function
|
|
195
|
+
export function __wbg___wbindgen_is_null_e343b7d08827ba72(arg0) {
|
|
131
196
|
const ret = getObject(arg0) === null;
|
|
132
197
|
return ret;
|
|
133
198
|
}
|
|
134
|
-
export function
|
|
199
|
+
export function __wbg___wbindgen_is_undefined_8865fb403f8fe9d8(arg0) {
|
|
135
200
|
const ret = getObject(arg0) === undefined;
|
|
136
201
|
return ret;
|
|
137
202
|
}
|
|
138
|
-
export function
|
|
203
|
+
export function __wbg___wbindgen_number_get_2e0e7dee9f701a71(arg0, arg1) {
|
|
139
204
|
const obj = getObject(arg1);
|
|
140
205
|
const ret = typeof(obj) === 'number' ? obj : undefined;
|
|
141
206
|
getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
|
|
142
207
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
|
|
143
208
|
}
|
|
144
|
-
export function
|
|
209
|
+
export function __wbg___wbindgen_string_get_0380ccaa2f57f0d9(arg0, arg1) {
|
|
145
210
|
const obj = getObject(arg1);
|
|
146
211
|
const ret = typeof(obj) === 'string' ? obj : undefined;
|
|
147
212
|
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -149,50 +214,50 @@ export function __wbg___wbindgen_string_get_d154f1e671052120(arg0, arg1) {
|
|
|
149
214
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
150
215
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
151
216
|
}
|
|
152
|
-
export function
|
|
217
|
+
export function __wbg___wbindgen_throw_41e9ee4f547fc59a(arg0, arg1) {
|
|
153
218
|
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
154
219
|
}
|
|
155
|
-
export function
|
|
220
|
+
export function __wbg_entries_fb6397112b1de25f(arg0) {
|
|
156
221
|
const ret = Object.entries(getObject(arg0));
|
|
157
222
|
return addHeapObject(ret);
|
|
158
223
|
}
|
|
159
|
-
export function
|
|
224
|
+
export function __wbg_from_296ca31f8d0f1c52(arg0) {
|
|
160
225
|
const ret = Array.from(getObject(arg0));
|
|
161
226
|
return addHeapObject(ret);
|
|
162
227
|
}
|
|
163
|
-
export function
|
|
228
|
+
export function __wbg_get_31af05bd4842a84f() { return handleError(function (arg0, arg1) {
|
|
164
229
|
const ret = Reflect.get(getObject(arg0), getObject(arg1));
|
|
165
230
|
return addHeapObject(ret);
|
|
166
231
|
}, arguments); }
|
|
167
|
-
export function
|
|
232
|
+
export function __wbg_get_6c896e0571ddae51(arg0, arg1) {
|
|
168
233
|
const ret = getObject(arg0)[arg1 >>> 0];
|
|
169
234
|
return addHeapObject(ret);
|
|
170
235
|
}
|
|
171
|
-
export function
|
|
236
|
+
export function __wbg_isArray_e15a2ff68ffdbef2(arg0) {
|
|
172
237
|
const ret = Array.isArray(getObject(arg0));
|
|
173
238
|
return ret;
|
|
174
239
|
}
|
|
175
|
-
export function
|
|
240
|
+
export function __wbg_length_d4bdea10311bd9cf(arg0) {
|
|
176
241
|
const ret = getObject(arg0).length;
|
|
177
242
|
return ret;
|
|
178
243
|
}
|
|
179
|
-
export function
|
|
180
|
-
const ret = new
|
|
244
|
+
export function __wbg_new_617a8cdb8bb1130e() {
|
|
245
|
+
const ret = new Object();
|
|
181
246
|
return addHeapObject(ret);
|
|
182
247
|
}
|
|
183
|
-
export function
|
|
184
|
-
const ret = new
|
|
248
|
+
export function __wbg_new_ee2291f50781bf1d() {
|
|
249
|
+
const ret = new Array();
|
|
185
250
|
return addHeapObject(ret);
|
|
186
251
|
}
|
|
187
|
-
export function
|
|
252
|
+
export function __wbg_push_2baf45db356cf468(arg0, arg1) {
|
|
188
253
|
const ret = getObject(arg0).push(getObject(arg1));
|
|
189
254
|
return ret;
|
|
190
255
|
}
|
|
191
|
-
export function
|
|
256
|
+
export function __wbg_set_145a351398b48c65() { return handleError(function (arg0, arg1, arg2) {
|
|
192
257
|
const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
|
|
193
258
|
return ret;
|
|
194
259
|
}, arguments); }
|
|
195
|
-
export function
|
|
260
|
+
export function __wbindgen_generic_0000000000000001(arg0, arg1) {
|
|
196
261
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
197
262
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
198
263
|
return addHeapObject(ret);
|
|
@@ -262,6 +327,13 @@ function isLikeNone(x) {
|
|
|
262
327
|
return x === undefined || x === null;
|
|
263
328
|
}
|
|
264
329
|
|
|
330
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
331
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
332
|
+
getUint8ArrayMemory0().set(arg, ptr / 1);
|
|
333
|
+
WASM_VECTOR_LEN = arg.length;
|
|
334
|
+
return ptr;
|
|
335
|
+
}
|
|
336
|
+
|
|
265
337
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
266
338
|
if (realloc === undefined) {
|
|
267
339
|
const buf = cachedTextEncoder.encode(arg);
|
|
Binary file
|
|
@@ -4,11 +4,14 @@ export const memory: WebAssembly.Memory;
|
|
|
4
4
|
export const __mdreamTakePanicMessage: (a: number) => void;
|
|
5
5
|
export const __wbg_markdownstream_free: (a: number, b: number) => void;
|
|
6
6
|
export const htmlToMarkdown: (a: number, b: number, c: number, d: number) => void;
|
|
7
|
+
export const htmlToMarkdownBytes: (a: number, b: number, c: number, d: number) => void;
|
|
7
8
|
export const htmlToMarkdownResult: (a: number, b: number, c: number) => number;
|
|
8
9
|
export const install_panic_hook: () => void;
|
|
9
10
|
export const markdownstream_finish: (a: number, b: number) => void;
|
|
10
11
|
export const markdownstream_new: (a: number) => number;
|
|
11
12
|
export const markdownstream_processChunk: (a: number, b: number, c: number, d: number) => void;
|
|
13
|
+
export const markdownstream_processChunkBytes: (a: number, b: number, c: number, d: number) => void;
|
|
14
|
+
export const markdownstream_takeData: (a: number) => number;
|
|
12
15
|
export const __wbindgen_export: (a: number, b: number) => number;
|
|
13
16
|
export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
14
17
|
export const __wbindgen_export3: (a: number) => void;
|