rumdl-wasm 0.0.186 → 0.0.187

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/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "Ruben J. Jongejan <ruben.jongejan@gmail.com>"
6
6
  ],
7
7
  "description": "Fast markdown linter with 60+ rules - WebAssembly build",
8
- "version": "0.0.186",
8
+ "version": "0.0.187",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/rumdl_lib.d.ts CHANGED
@@ -1,37 +1,13 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * Get the rumdl version
5
- */
6
- export function get_version(): string;
7
- /**
8
- * Lint markdown content and return warnings as JSON
9
- *
10
- * Returns a JSON array of warnings, each with:
11
- * - `rule`: Rule name (e.g., "MD001")
12
- * - `message`: Warning message
13
- * - `line`: 1-indexed line number
14
- * - `column`: 1-indexed column number
15
- * - `end_line`: 1-indexed end line
16
- * - `end_column`: 1-indexed end column
17
- * - `severity`: "Error" or "Warning"
18
- * - `fix`: Optional fix object with `start`, `end`, `replacement`
19
- */
20
- export function lint_markdown(content: string): string;
21
- /**
22
- * Apply a single fix to the content
23
- *
24
- * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
25
- * Returns the content with the fix applied.
4
+ * Initialize the WASM module with better panic messages
26
5
  */
27
- export function apply_fix(content: string, fix_json: string): string;
6
+ export function init(): void;
28
7
  /**
29
- * Apply all auto-fixes to the content and return the fixed content
30
- *
31
- * Returns the content with all available fixes applied.
32
- * Uses the same fix coordinator as the CLI for consistent behavior.
8
+ * Get the rumdl version
33
9
  */
34
- export function apply_all_fixes(content: string): string;
10
+ export function get_version(): string;
35
11
  /**
36
12
  * Get list of available rules as JSON
37
13
  *
@@ -41,23 +17,70 @@ export function apply_all_fixes(content: string): string;
41
17
  */
42
18
  export function get_available_rules(): string;
43
19
  /**
44
- * Initialize the WASM module with better panic messages
20
+ * A markdown linter with configuration
21
+ *
22
+ * Create a new `Linter` with a configuration object, then use
23
+ * `check()` to lint content and `fix()` to auto-fix issues.
45
24
  */
46
- export function init(): void;
25
+ export class Linter {
26
+ free(): void;
27
+ [Symbol.dispose](): void;
28
+ /**
29
+ * Get the current configuration as JSON
30
+ */
31
+ get_config(): string;
32
+ /**
33
+ * Apply all auto-fixes to the content and return the fixed content
34
+ *
35
+ * Uses the same fix coordinator as the CLI for consistent behavior.
36
+ */
37
+ fix(content: string): string;
38
+ /**
39
+ * Create a new Linter with the given configuration
40
+ *
41
+ * # Arguments
42
+ *
43
+ * * `options` - Configuration object (see LinterConfig)
44
+ *
45
+ * # Example
46
+ *
47
+ * ```javascript
48
+ * const linter = new Linter({
49
+ * disable: ["MD041"],
50
+ * "line-length": 120
51
+ * });
52
+ * ```
53
+ */
54
+ constructor(options: any);
55
+ /**
56
+ * Lint markdown content and return warnings as JSON
57
+ *
58
+ * Returns a JSON array of warnings, each with:
59
+ * - `rule_name`: Rule name (e.g., "MD001")
60
+ * - `message`: Warning message
61
+ * - `line`: 1-indexed line number
62
+ * - `column`: 1-indexed column number
63
+ * - `fix`: Optional fix object with `range.start`, `range.end`, `replacement`
64
+ */
65
+ check(content: string): string;
66
+ }
47
67
 
48
68
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
49
69
 
50
70
  export interface InitOutput {
51
71
  readonly memory: WebAssembly.Memory;
52
- readonly apply_all_fixes: (a: number, b: number, c: number) => void;
53
- readonly apply_fix: (a: number, b: number, c: number, d: number, e: number) => void;
72
+ readonly __wbg_linter_free: (a: number, b: number) => void;
54
73
  readonly get_available_rules: (a: number) => void;
55
74
  readonly get_version: (a: number) => void;
56
75
  readonly init: () => void;
57
- readonly lint_markdown: (a: number, b: number, c: number) => void;
58
- readonly __wbindgen_export: (a: number, b: number, c: number) => void;
59
- readonly __wbindgen_export2: (a: number, b: number) => number;
60
- readonly __wbindgen_export3: (a: number, b: number, c: number, d: number) => number;
76
+ readonly linter_check: (a: number, b: number, c: number, d: number) => void;
77
+ readonly linter_fix: (a: number, b: number, c: number, d: number) => void;
78
+ readonly linter_get_config: (a: number, b: number) => void;
79
+ readonly linter_new: (a: number, b: number) => void;
80
+ readonly __wbindgen_export: (a: number, b: number) => number;
81
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
82
+ readonly __wbindgen_export3: (a: number) => void;
83
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
61
84
  readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
62
85
  readonly __wbindgen_start: () => void;
63
86
  }
package/rumdl_lib.js CHANGED
@@ -110,6 +110,88 @@ function getDataViewMemory0() {
110
110
  return cachedDataViewMemory0;
111
111
  }
112
112
 
113
+ function isLikeNone(x) {
114
+ return x === undefined || x === null;
115
+ }
116
+
117
+ function debugString(val) {
118
+ // primitive types
119
+ const type = typeof val;
120
+ if (type == 'number' || type == 'boolean' || val == null) {
121
+ return `${val}`;
122
+ }
123
+ if (type == 'string') {
124
+ return `"${val}"`;
125
+ }
126
+ if (type == 'symbol') {
127
+ const description = val.description;
128
+ if (description == null) {
129
+ return 'Symbol';
130
+ } else {
131
+ return `Symbol(${description})`;
132
+ }
133
+ }
134
+ if (type == 'function') {
135
+ const name = val.name;
136
+ if (typeof name == 'string' && name.length > 0) {
137
+ return `Function(${name})`;
138
+ } else {
139
+ return 'Function';
140
+ }
141
+ }
142
+ // objects
143
+ if (Array.isArray(val)) {
144
+ const length = val.length;
145
+ let debug = '[';
146
+ if (length > 0) {
147
+ debug += debugString(val[0]);
148
+ }
149
+ for(let i = 1; i < length; i++) {
150
+ debug += ', ' + debugString(val[i]);
151
+ }
152
+ debug += ']';
153
+ return debug;
154
+ }
155
+ // Test for built-in
156
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
157
+ let className;
158
+ if (builtInMatches && builtInMatches.length > 1) {
159
+ className = builtInMatches[1];
160
+ } else {
161
+ // Failed to match the standard '[object ClassName]'
162
+ return toString.call(val);
163
+ }
164
+ if (className == 'Object') {
165
+ // we're a user defined class or Object
166
+ // JSON.stringify avoids problems with cycles, and is generally much
167
+ // easier than looping through ownProperties of `val`.
168
+ try {
169
+ return 'Object(' + JSON.stringify(val) + ')';
170
+ } catch (_) {
171
+ return 'Object';
172
+ }
173
+ }
174
+ // errors
175
+ if (val instanceof Error) {
176
+ return `${val.name}: ${val.message}\n${val.stack}`;
177
+ }
178
+ // TODO we could test for more things here, like `Set`s and `Map`s.
179
+ return className;
180
+ }
181
+
182
+ function handleError(f, args) {
183
+ try {
184
+ return f.apply(this, args);
185
+ } catch (e) {
186
+ wasm.__wbindgen_export3(addHeapObject(e));
187
+ }
188
+ }
189
+
190
+ function getArrayU8FromWasm0(ptr, len) {
191
+ ptr = ptr >>> 0;
192
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
193
+ }
194
+
113
195
  function dropObject(idx) {
114
196
  if (idx < 132) return;
115
197
  heap[idx] = heap_next;
@@ -121,6 +203,13 @@ function takeObject(idx) {
121
203
  dropObject(idx);
122
204
  return ret;
123
205
  }
206
+ /**
207
+ * Initialize the WASM module with better panic messages
208
+ */
209
+ export function init() {
210
+ wasm.init();
211
+ }
212
+
124
213
  /**
125
214
  * Get the rumdl version
126
215
  * @returns {string}
@@ -138,98 +227,7 @@ export function get_version() {
138
227
  return getStringFromWasm0(r0, r1);
139
228
  } finally {
140
229
  wasm.__wbindgen_add_to_stack_pointer(16);
141
- wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
142
- }
143
- }
144
-
145
- /**
146
- * Lint markdown content and return warnings as JSON
147
- *
148
- * Returns a JSON array of warnings, each with:
149
- * - `rule`: Rule name (e.g., "MD001")
150
- * - `message`: Warning message
151
- * - `line`: 1-indexed line number
152
- * - `column`: 1-indexed column number
153
- * - `end_line`: 1-indexed end line
154
- * - `end_column`: 1-indexed end column
155
- * - `severity`: "Error" or "Warning"
156
- * - `fix`: Optional fix object with `start`, `end`, `replacement`
157
- * @param {string} content
158
- * @returns {string}
159
- */
160
- export function lint_markdown(content) {
161
- let deferred2_0;
162
- let deferred2_1;
163
- try {
164
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
165
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
166
- const len0 = WASM_VECTOR_LEN;
167
- wasm.lint_markdown(retptr, ptr0, len0);
168
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
169
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
170
- deferred2_0 = r0;
171
- deferred2_1 = r1;
172
- return getStringFromWasm0(r0, r1);
173
- } finally {
174
- wasm.__wbindgen_add_to_stack_pointer(16);
175
- wasm.__wbindgen_export(deferred2_0, deferred2_1, 1);
176
- }
177
- }
178
-
179
- /**
180
- * Apply a single fix to the content
181
- *
182
- * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
183
- * Returns the content with the fix applied.
184
- * @param {string} content
185
- * @param {string} fix_json
186
- * @returns {string}
187
- */
188
- export function apply_fix(content, fix_json) {
189
- let deferred3_0;
190
- let deferred3_1;
191
- try {
192
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
193
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
194
- const len0 = WASM_VECTOR_LEN;
195
- const ptr1 = passStringToWasm0(fix_json, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
196
- const len1 = WASM_VECTOR_LEN;
197
- wasm.apply_fix(retptr, ptr0, len0, ptr1, len1);
198
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
199
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
200
- deferred3_0 = r0;
201
- deferred3_1 = r1;
202
- return getStringFromWasm0(r0, r1);
203
- } finally {
204
- wasm.__wbindgen_add_to_stack_pointer(16);
205
- wasm.__wbindgen_export(deferred3_0, deferred3_1, 1);
206
- }
207
- }
208
-
209
- /**
210
- * Apply all auto-fixes to the content and return the fixed content
211
- *
212
- * Returns the content with all available fixes applied.
213
- * Uses the same fix coordinator as the CLI for consistent behavior.
214
- * @param {string} content
215
- * @returns {string}
216
- */
217
- export function apply_all_fixes(content) {
218
- let deferred2_0;
219
- let deferred2_1;
220
- try {
221
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
222
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
223
- const len0 = WASM_VECTOR_LEN;
224
- wasm.apply_all_fixes(retptr, ptr0, len0);
225
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
226
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
227
- deferred2_0 = r0;
228
- deferred2_1 = r1;
229
- return getStringFromWasm0(r0, r1);
230
- } finally {
231
- wasm.__wbindgen_add_to_stack_pointer(16);
232
- wasm.__wbindgen_export(deferred2_0, deferred2_1, 1);
230
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
233
231
  }
234
232
  }
235
233
 
@@ -254,16 +252,143 @@ export function get_available_rules() {
254
252
  return getStringFromWasm0(r0, r1);
255
253
  } finally {
256
254
  wasm.__wbindgen_add_to_stack_pointer(16);
257
- wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
255
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
258
256
  }
259
257
  }
260
258
 
259
+ const LinterFinalization = (typeof FinalizationRegistry === 'undefined')
260
+ ? { register: () => {}, unregister: () => {} }
261
+ : new FinalizationRegistry(ptr => wasm.__wbg_linter_free(ptr >>> 0, 1));
261
262
  /**
262
- * Initialize the WASM module with better panic messages
263
+ * A markdown linter with configuration
264
+ *
265
+ * Create a new `Linter` with a configuration object, then use
266
+ * `check()` to lint content and `fix()` to auto-fix issues.
263
267
  */
264
- export function init() {
265
- wasm.init();
268
+ export class Linter {
269
+
270
+ __destroy_into_raw() {
271
+ const ptr = this.__wbg_ptr;
272
+ this.__wbg_ptr = 0;
273
+ LinterFinalization.unregister(this);
274
+ return ptr;
275
+ }
276
+
277
+ free() {
278
+ const ptr = this.__destroy_into_raw();
279
+ wasm.__wbg_linter_free(ptr, 0);
280
+ }
281
+ /**
282
+ * Get the current configuration as JSON
283
+ * @returns {string}
284
+ */
285
+ get_config() {
286
+ let deferred1_0;
287
+ let deferred1_1;
288
+ try {
289
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
290
+ wasm.linter_get_config(retptr, this.__wbg_ptr);
291
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
292
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
293
+ deferred1_0 = r0;
294
+ deferred1_1 = r1;
295
+ return getStringFromWasm0(r0, r1);
296
+ } finally {
297
+ wasm.__wbindgen_add_to_stack_pointer(16);
298
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
299
+ }
300
+ }
301
+ /**
302
+ * Apply all auto-fixes to the content and return the fixed content
303
+ *
304
+ * Uses the same fix coordinator as the CLI for consistent behavior.
305
+ * @param {string} content
306
+ * @returns {string}
307
+ */
308
+ fix(content) {
309
+ let deferred2_0;
310
+ let deferred2_1;
311
+ try {
312
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
313
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
314
+ const len0 = WASM_VECTOR_LEN;
315
+ wasm.linter_fix(retptr, this.__wbg_ptr, ptr0, len0);
316
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
317
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
318
+ deferred2_0 = r0;
319
+ deferred2_1 = r1;
320
+ return getStringFromWasm0(r0, r1);
321
+ } finally {
322
+ wasm.__wbindgen_add_to_stack_pointer(16);
323
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
324
+ }
325
+ }
326
+ /**
327
+ * Create a new Linter with the given configuration
328
+ *
329
+ * # Arguments
330
+ *
331
+ * * `options` - Configuration object (see LinterConfig)
332
+ *
333
+ * # Example
334
+ *
335
+ * ```javascript
336
+ * const linter = new Linter({
337
+ * disable: ["MD041"],
338
+ * "line-length": 120
339
+ * });
340
+ * ```
341
+ * @param {any} options
342
+ */
343
+ constructor(options) {
344
+ try {
345
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
346
+ wasm.linter_new(retptr, addHeapObject(options));
347
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
348
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
349
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
350
+ if (r2) {
351
+ throw takeObject(r1);
352
+ }
353
+ this.__wbg_ptr = r0 >>> 0;
354
+ LinterFinalization.register(this, this.__wbg_ptr, this);
355
+ return this;
356
+ } finally {
357
+ wasm.__wbindgen_add_to_stack_pointer(16);
358
+ }
359
+ }
360
+ /**
361
+ * Lint markdown content and return warnings as JSON
362
+ *
363
+ * Returns a JSON array of warnings, each with:
364
+ * - `rule_name`: Rule name (e.g., "MD001")
365
+ * - `message`: Warning message
366
+ * - `line`: 1-indexed line number
367
+ * - `column`: 1-indexed column number
368
+ * - `fix`: Optional fix object with `range.start`, `range.end`, `replacement`
369
+ * @param {string} content
370
+ * @returns {string}
371
+ */
372
+ check(content) {
373
+ let deferred2_0;
374
+ let deferred2_1;
375
+ try {
376
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
377
+ const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
378
+ const len0 = WASM_VECTOR_LEN;
379
+ wasm.linter_check(retptr, this.__wbg_ptr, ptr0, len0);
380
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
381
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
382
+ deferred2_0 = r0;
383
+ deferred2_1 = r1;
384
+ return getStringFromWasm0(r0, r1);
385
+ } finally {
386
+ wasm.__wbindgen_add_to_stack_pointer(16);
387
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
388
+ }
389
+ }
266
390
  }
391
+ if (Symbol.dispose) Linter.prototype[Symbol.dispose] = Linter.prototype.free;
267
392
 
268
393
  const EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);
269
394
 
@@ -303,6 +428,97 @@ async function __wbg_load(module, imports) {
303
428
  function __wbg_get_imports() {
304
429
  const imports = {};
305
430
  imports.wbg = {};
431
+ imports.wbg.__wbg_Error_e83987f665cf5504 = function(arg0, arg1) {
432
+ const ret = Error(getStringFromWasm0(arg0, arg1));
433
+ return addHeapObject(ret);
434
+ };
435
+ imports.wbg.__wbg_Number_bb48ca12f395cd08 = function(arg0) {
436
+ const ret = Number(getObject(arg0));
437
+ return ret;
438
+ };
439
+ imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
440
+ const ret = String(getObject(arg1));
441
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
442
+ const len1 = WASM_VECTOR_LEN;
443
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
444
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
445
+ };
446
+ imports.wbg.__wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd = function(arg0, arg1) {
447
+ const v = getObject(arg1);
448
+ const ret = typeof(v) === 'bigint' ? v : undefined;
449
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
450
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
451
+ };
452
+ imports.wbg.__wbg___wbindgen_boolean_get_6d5a1ee65bab5f68 = function(arg0) {
453
+ const v = getObject(arg0);
454
+ const ret = typeof(v) === 'boolean' ? v : undefined;
455
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
456
+ };
457
+ imports.wbg.__wbg___wbindgen_debug_string_df47ffb5e35e6763 = function(arg0, arg1) {
458
+ const ret = debugString(getObject(arg1));
459
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
460
+ const len1 = WASM_VECTOR_LEN;
461
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
462
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
463
+ };
464
+ imports.wbg.__wbg___wbindgen_in_bb933bd9e1b3bc0f = function(arg0, arg1) {
465
+ const ret = getObject(arg0) in getObject(arg1);
466
+ return ret;
467
+ };
468
+ imports.wbg.__wbg___wbindgen_is_bigint_cb320707dcd35f0b = function(arg0) {
469
+ const ret = typeof(getObject(arg0)) === 'bigint';
470
+ return ret;
471
+ };
472
+ imports.wbg.__wbg___wbindgen_is_function_ee8a6c5833c90377 = function(arg0) {
473
+ const ret = typeof(getObject(arg0)) === 'function';
474
+ return ret;
475
+ };
476
+ imports.wbg.__wbg___wbindgen_is_null_5e69f72e906cc57c = function(arg0) {
477
+ const ret = getObject(arg0) === null;
478
+ return ret;
479
+ };
480
+ imports.wbg.__wbg___wbindgen_is_object_c818261d21f283a4 = function(arg0) {
481
+ const val = getObject(arg0);
482
+ const ret = typeof(val) === 'object' && val !== null;
483
+ return ret;
484
+ };
485
+ imports.wbg.__wbg___wbindgen_is_undefined_2d472862bd29a478 = function(arg0) {
486
+ const ret = getObject(arg0) === undefined;
487
+ return ret;
488
+ };
489
+ imports.wbg.__wbg___wbindgen_jsval_eq_6b13ab83478b1c50 = function(arg0, arg1) {
490
+ const ret = getObject(arg0) === getObject(arg1);
491
+ return ret;
492
+ };
493
+ imports.wbg.__wbg___wbindgen_jsval_loose_eq_b664b38a2f582147 = function(arg0, arg1) {
494
+ const ret = getObject(arg0) == getObject(arg1);
495
+ return ret;
496
+ };
497
+ imports.wbg.__wbg___wbindgen_number_get_a20bf9b85341449d = function(arg0, arg1) {
498
+ const obj = getObject(arg1);
499
+ const ret = typeof(obj) === 'number' ? obj : undefined;
500
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
501
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
502
+ };
503
+ imports.wbg.__wbg___wbindgen_string_get_e4f06c90489ad01b = function(arg0, arg1) {
504
+ const obj = getObject(arg1);
505
+ const ret = typeof(obj) === 'string' ? obj : undefined;
506
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
507
+ var len1 = WASM_VECTOR_LEN;
508
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
509
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
510
+ };
511
+ imports.wbg.__wbg___wbindgen_throw_b855445ff6a94295 = function(arg0, arg1) {
512
+ throw new Error(getStringFromWasm0(arg0, arg1));
513
+ };
514
+ imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
515
+ const ret = getObject(arg0).call(getObject(arg1));
516
+ return addHeapObject(ret);
517
+ }, arguments) };
518
+ imports.wbg.__wbg_done_2042aa2670fb1db1 = function(arg0) {
519
+ const ret = getObject(arg0).done;
520
+ return ret;
521
+ };
306
522
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
307
523
  let deferred0_0;
308
524
  let deferred0_1;
@@ -311,20 +527,105 @@ function __wbg_get_imports() {
311
527
  deferred0_1 = arg1;
312
528
  console.error(getStringFromWasm0(arg0, arg1));
313
529
  } finally {
314
- wasm.__wbindgen_export(deferred0_0, deferred0_1, 1);
530
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
531
+ }
532
+ };
533
+ imports.wbg.__wbg_get_7bed016f185add81 = function(arg0, arg1) {
534
+ const ret = getObject(arg0)[arg1 >>> 0];
535
+ return addHeapObject(ret);
536
+ };
537
+ imports.wbg.__wbg_get_efcb449f58ec27c2 = function() { return handleError(function (arg0, arg1) {
538
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
539
+ return addHeapObject(ret);
540
+ }, arguments) };
541
+ imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {
542
+ const ret = getObject(arg0)[getObject(arg1)];
543
+ return addHeapObject(ret);
544
+ };
545
+ imports.wbg.__wbg_instanceof_ArrayBuffer_70beb1189ca63b38 = function(arg0) {
546
+ let result;
547
+ try {
548
+ result = getObject(arg0) instanceof ArrayBuffer;
549
+ } catch (_) {
550
+ result = false;
551
+ }
552
+ const ret = result;
553
+ return ret;
554
+ };
555
+ imports.wbg.__wbg_instanceof_Uint8Array_20c8e73002f7af98 = function(arg0) {
556
+ let result;
557
+ try {
558
+ result = getObject(arg0) instanceof Uint8Array;
559
+ } catch (_) {
560
+ result = false;
315
561
  }
562
+ const ret = result;
563
+ return ret;
564
+ };
565
+ imports.wbg.__wbg_isArray_96e0af9891d0945d = function(arg0) {
566
+ const ret = Array.isArray(getObject(arg0));
567
+ return ret;
568
+ };
569
+ imports.wbg.__wbg_isSafeInteger_d216eda7911dde36 = function(arg0) {
570
+ const ret = Number.isSafeInteger(getObject(arg0));
571
+ return ret;
572
+ };
573
+ imports.wbg.__wbg_iterator_e5822695327a3c39 = function() {
574
+ const ret = Symbol.iterator;
575
+ return addHeapObject(ret);
576
+ };
577
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
578
+ const ret = getObject(arg0).length;
579
+ return ret;
580
+ };
581
+ imports.wbg.__wbg_length_cdd215e10d9dd507 = function(arg0) {
582
+ const ret = getObject(arg0).length;
583
+ return ret;
584
+ };
585
+ imports.wbg.__wbg_new_5a79be3ab53b8aa5 = function(arg0) {
586
+ const ret = new Uint8Array(getObject(arg0));
587
+ return addHeapObject(ret);
316
588
  };
317
589
  imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
318
590
  const ret = new Error();
319
591
  return addHeapObject(ret);
320
592
  };
593
+ imports.wbg.__wbg_next_020810e0ae8ebcb0 = function() { return handleError(function (arg0) {
594
+ const ret = getObject(arg0).next();
595
+ return addHeapObject(ret);
596
+ }, arguments) };
597
+ imports.wbg.__wbg_next_2c826fe5dfec6b6a = function(arg0) {
598
+ const ret = getObject(arg0).next;
599
+ return addHeapObject(ret);
600
+ };
601
+ imports.wbg.__wbg_prototypesetcall_2a6620b6922694b2 = function(arg0, arg1, arg2) {
602
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
603
+ };
321
604
  imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
322
605
  const ret = getObject(arg1).stack;
323
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
606
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
324
607
  const len1 = WASM_VECTOR_LEN;
325
608
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
326
609
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
327
610
  };
611
+ imports.wbg.__wbg_value_692627309814bb8c = function(arg0) {
612
+ const ret = getObject(arg0).value;
613
+ return addHeapObject(ret);
614
+ };
615
+ imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
616
+ // Cast intrinsic for `Ref(String) -> Externref`.
617
+ const ret = getStringFromWasm0(arg0, arg1);
618
+ return addHeapObject(ret);
619
+ };
620
+ imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {
621
+ // Cast intrinsic for `U64 -> Externref`.
622
+ const ret = BigInt.asUintN(64, arg0);
623
+ return addHeapObject(ret);
624
+ };
625
+ imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
626
+ const ret = getObject(arg0);
627
+ return addHeapObject(ret);
628
+ };
328
629
  imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
329
630
  takeObject(arg0);
330
631
  };
package/rumdl_lib_bg.wasm CHANGED
Binary file