rumdl-wasm 0.0.185 → 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.185",
8
+ "version": "0.0.187",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/rumdl_lib.d.ts CHANGED
@@ -1,34 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Get list of available rules as JSON
5
- *
6
- * Returns a JSON array of rule info objects, each with:
7
- * - `name`: Rule name (e.g., "MD001")
8
- * - `description`: Rule description
9
- */
10
- export function get_available_rules(): string;
11
- /**
12
- * Lint markdown content and return warnings as JSON
13
- *
14
- * Returns a JSON array of warnings, each with:
15
- * - `rule`: Rule name (e.g., "MD001")
16
- * - `message`: Warning message
17
- * - `line`: 1-indexed line number
18
- * - `column`: 1-indexed column number
19
- * - `end_line`: 1-indexed end line
20
- * - `end_column`: 1-indexed end column
21
- * - `severity`: "Error" or "Warning"
22
- * - `fix`: Optional fix object with `start`, `end`, `replacement`
23
- */
24
- export function lint_markdown(content: string): string;
25
- /**
26
- * Apply all auto-fixes to the content and return the fixed content
27
- *
28
- * Returns the content with all available fixes applied.
29
- * Uses the same fix coordinator as the CLI for consistent behavior.
30
- */
31
- export function apply_all_fixes(content: string): string;
32
3
  /**
33
4
  * Initialize the WASM module with better panic messages
34
5
  */
@@ -38,26 +9,78 @@ export function init(): void;
38
9
  */
39
10
  export function get_version(): string;
40
11
  /**
41
- * Apply a single fix to the content
12
+ * Get list of available rules as JSON
42
13
  *
43
- * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
44
- * Returns the content with the fix applied.
14
+ * Returns a JSON array of rule info objects, each with:
15
+ * - `name`: Rule name (e.g., "MD001")
16
+ * - `description`: Rule description
45
17
  */
46
- export function apply_fix(content: string, fix_json: string): string;
18
+ export function get_available_rules(): string;
19
+ /**
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.
24
+ */
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,103 +110,99 @@ function getDataViewMemory0() {
110
110
  return cachedDataViewMemory0;
111
111
  }
112
112
 
113
- function dropObject(idx) {
114
- if (idx < 132) return;
115
- heap[idx] = heap_next;
116
- heap_next = idx;
113
+ function isLikeNone(x) {
114
+ return x === undefined || x === null;
117
115
  }
118
116
 
119
- function takeObject(idx) {
120
- const ret = getObject(idx);
121
- dropObject(idx);
122
- return ret;
123
- }
124
- /**
125
- * Get list of available rules as JSON
126
- *
127
- * Returns a JSON array of rule info objects, each with:
128
- * - `name`: Rule name (e.g., "MD001")
129
- * - `description`: Rule description
130
- * @returns {string}
131
- */
132
- export function get_available_rules() {
133
- let deferred1_0;
134
- let deferred1_1;
135
- try {
136
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
137
- wasm.get_available_rules(retptr);
138
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
139
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
140
- deferred1_0 = r0;
141
- deferred1_1 = r1;
142
- return getStringFromWasm0(r0, r1);
143
- } finally {
144
- wasm.__wbindgen_add_to_stack_pointer(16);
145
- wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
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
+ }
146
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;
147
180
  }
148
181
 
149
- /**
150
- * Lint markdown content and return warnings as JSON
151
- *
152
- * Returns a JSON array of warnings, each with:
153
- * - `rule`: Rule name (e.g., "MD001")
154
- * - `message`: Warning message
155
- * - `line`: 1-indexed line number
156
- * - `column`: 1-indexed column number
157
- * - `end_line`: 1-indexed end line
158
- * - `end_column`: 1-indexed end column
159
- * - `severity`: "Error" or "Warning"
160
- * - `fix`: Optional fix object with `start`, `end`, `replacement`
161
- * @param {string} content
162
- * @returns {string}
163
- */
164
- export function lint_markdown(content) {
165
- let deferred2_0;
166
- let deferred2_1;
182
+ function handleError(f, args) {
167
183
  try {
168
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
169
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
170
- const len0 = WASM_VECTOR_LEN;
171
- wasm.lint_markdown(retptr, ptr0, len0);
172
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
173
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
174
- deferred2_0 = r0;
175
- deferred2_1 = r1;
176
- return getStringFromWasm0(r0, r1);
177
- } finally {
178
- wasm.__wbindgen_add_to_stack_pointer(16);
179
- wasm.__wbindgen_export(deferred2_0, deferred2_1, 1);
184
+ return f.apply(this, args);
185
+ } catch (e) {
186
+ wasm.__wbindgen_export3(addHeapObject(e));
180
187
  }
181
188
  }
182
189
 
183
- /**
184
- * Apply all auto-fixes to the content and return the fixed content
185
- *
186
- * Returns the content with all available fixes applied.
187
- * Uses the same fix coordinator as the CLI for consistent behavior.
188
- * @param {string} content
189
- * @returns {string}
190
- */
191
- export function apply_all_fixes(content) {
192
- let deferred2_0;
193
- let deferred2_1;
194
- try {
195
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
196
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
197
- const len0 = WASM_VECTOR_LEN;
198
- wasm.apply_all_fixes(retptr, ptr0, len0);
199
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
200
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
201
- deferred2_0 = r0;
202
- deferred2_1 = r1;
203
- return getStringFromWasm0(r0, r1);
204
- } finally {
205
- wasm.__wbindgen_add_to_stack_pointer(16);
206
- wasm.__wbindgen_export(deferred2_0, deferred2_1, 1);
207
- }
190
+ function getArrayU8FromWasm0(ptr, len) {
191
+ ptr = ptr >>> 0;
192
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
208
193
  }
209
194
 
195
+ function dropObject(idx) {
196
+ if (idx < 132) return;
197
+ heap[idx] = heap_next;
198
+ heap_next = idx;
199
+ }
200
+
201
+ function takeObject(idx) {
202
+ const ret = getObject(idx);
203
+ dropObject(idx);
204
+ return ret;
205
+ }
210
206
  /**
211
207
  * Initialize the WASM module with better panic messages
212
208
  */
@@ -231,39 +227,168 @@ export function get_version() {
231
227
  return getStringFromWasm0(r0, r1);
232
228
  } finally {
233
229
  wasm.__wbindgen_add_to_stack_pointer(16);
234
- wasm.__wbindgen_export(deferred1_0, deferred1_1, 1);
230
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
235
231
  }
236
232
  }
237
233
 
238
234
  /**
239
- * Apply a single fix to the content
235
+ * Get list of available rules as JSON
240
236
  *
241
- * Takes a JSON-encoded fix object with `start`, `end`, `replacement` fields.
242
- * Returns the content with the fix applied.
243
- * @param {string} content
244
- * @param {string} fix_json
237
+ * Returns a JSON array of rule info objects, each with:
238
+ * - `name`: Rule name (e.g., "MD001")
239
+ * - `description`: Rule description
245
240
  * @returns {string}
246
241
  */
247
- export function apply_fix(content, fix_json) {
248
- let deferred3_0;
249
- let deferred3_1;
242
+ export function get_available_rules() {
243
+ let deferred1_0;
244
+ let deferred1_1;
250
245
  try {
251
246
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
252
- const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
253
- const len0 = WASM_VECTOR_LEN;
254
- const ptr1 = passStringToWasm0(fix_json, wasm.__wbindgen_export2, wasm.__wbindgen_export3);
255
- const len1 = WASM_VECTOR_LEN;
256
- wasm.apply_fix(retptr, ptr0, len0, ptr1, len1);
247
+ wasm.get_available_rules(retptr);
257
248
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
258
249
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
259
- deferred3_0 = r0;
260
- deferred3_1 = r1;
250
+ deferred1_0 = r0;
251
+ deferred1_1 = r1;
261
252
  return getStringFromWasm0(r0, r1);
262
253
  } finally {
263
254
  wasm.__wbindgen_add_to_stack_pointer(16);
264
- wasm.__wbindgen_export(deferred3_0, deferred3_1, 1);
255
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
256
+ }
257
+ }
258
+
259
+ const LinterFinalization = (typeof FinalizationRegistry === 'undefined')
260
+ ? { register: () => {}, unregister: () => {} }
261
+ : new FinalizationRegistry(ptr => wasm.__wbg_linter_free(ptr >>> 0, 1));
262
+ /**
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.
267
+ */
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
+ }
265
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