@quillmark/wasm 0.15.0 → 0.15.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.
Binary file
@@ -0,0 +1,770 @@
1
+ let wasm;
2
+ let wasmModule;
3
+ export function __wbg_set_wasm(exports, module) {
4
+ wasm = exports;
5
+ wasmModule = module;
6
+ }
7
+
8
+
9
+ let cachedUint8ArrayMemory0 = null;
10
+
11
+ function getUint8ArrayMemory0() {
12
+ if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
13
+ cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
14
+ }
15
+ return cachedUint8ArrayMemory0;
16
+ }
17
+
18
+ let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
19
+
20
+ cachedTextDecoder.decode();
21
+
22
+ function decodeText(ptr, len) {
23
+ return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
24
+ }
25
+
26
+ function getStringFromWasm0(ptr, len) {
27
+ ptr = ptr >>> 0;
28
+ return decodeText(ptr, len);
29
+ }
30
+
31
+ let heap = new Array(128).fill(undefined);
32
+
33
+ heap.push(undefined, null, true, false);
34
+
35
+ let heap_next = heap.length;
36
+
37
+ function addHeapObject(obj) {
38
+ if (heap_next === heap.length) heap.push(heap.length + 1);
39
+ const idx = heap_next;
40
+ heap_next = heap[idx];
41
+
42
+ heap[idx] = obj;
43
+ return idx;
44
+ }
45
+
46
+ function getObject(idx) { return heap[idx]; }
47
+
48
+ let WASM_VECTOR_LEN = 0;
49
+
50
+ const cachedTextEncoder = new TextEncoder();
51
+
52
+ if (!('encodeInto' in cachedTextEncoder)) {
53
+ cachedTextEncoder.encodeInto = function (arg, view) {
54
+ const buf = cachedTextEncoder.encode(arg);
55
+ view.set(buf);
56
+ return {
57
+ read: arg.length,
58
+ written: buf.length
59
+ };
60
+ }
61
+ }
62
+
63
+ function passStringToWasm0(arg, malloc, realloc) {
64
+
65
+ if (realloc === undefined) {
66
+ const buf = cachedTextEncoder.encode(arg);
67
+ const ptr = malloc(buf.length, 1) >>> 0;
68
+ getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
69
+ WASM_VECTOR_LEN = buf.length;
70
+ return ptr;
71
+ }
72
+
73
+ let len = arg.length;
74
+ let ptr = malloc(len, 1) >>> 0;
75
+
76
+ const mem = getUint8ArrayMemory0();
77
+
78
+ let offset = 0;
79
+
80
+ for (; offset < len; offset++) {
81
+ const code = arg.charCodeAt(offset);
82
+ if (code > 0x7F) break;
83
+ mem[ptr + offset] = code;
84
+ }
85
+
86
+ if (offset !== len) {
87
+ if (offset !== 0) {
88
+ arg = arg.slice(offset);
89
+ }
90
+ ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
91
+ const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
92
+ const ret = cachedTextEncoder.encodeInto(arg, view);
93
+
94
+ offset += ret.written;
95
+ ptr = realloc(ptr, len, offset, 1) >>> 0;
96
+ }
97
+
98
+ WASM_VECTOR_LEN = offset;
99
+ return ptr;
100
+ }
101
+
102
+ let cachedDataViewMemory0 = null;
103
+
104
+ function getDataViewMemory0() {
105
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
106
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
107
+ }
108
+ return cachedDataViewMemory0;
109
+ }
110
+
111
+ function handleError(f, args) {
112
+ try {
113
+ return f.apply(this, args);
114
+ } catch (e) {
115
+ wasm.__wbindgen_export_2(addHeapObject(e));
116
+ }
117
+ }
118
+
119
+ function getArrayU8FromWasm0(ptr, len) {
120
+ ptr = ptr >>> 0;
121
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
122
+ }
123
+
124
+ function dropObject(idx) {
125
+ if (idx < 132) return;
126
+ heap[idx] = heap_next;
127
+ heap_next = idx;
128
+ }
129
+
130
+ function takeObject(idx) {
131
+ const ret = getObject(idx);
132
+ dropObject(idx);
133
+ return ret;
134
+ }
135
+
136
+ function isLikeNone(x) {
137
+ return x === undefined || x === null;
138
+ }
139
+
140
+ function debugString(val) {
141
+ // primitive types
142
+ const type = typeof val;
143
+ if (type == 'number' || type == 'boolean' || val == null) {
144
+ return `${val}`;
145
+ }
146
+ if (type == 'string') {
147
+ return `"${val}"`;
148
+ }
149
+ if (type == 'symbol') {
150
+ const description = val.description;
151
+ if (description == null) {
152
+ return 'Symbol';
153
+ } else {
154
+ return `Symbol(${description})`;
155
+ }
156
+ }
157
+ if (type == 'function') {
158
+ const name = val.name;
159
+ if (typeof name == 'string' && name.length > 0) {
160
+ return `Function(${name})`;
161
+ } else {
162
+ return 'Function';
163
+ }
164
+ }
165
+ // objects
166
+ if (Array.isArray(val)) {
167
+ const length = val.length;
168
+ let debug = '[';
169
+ if (length > 0) {
170
+ debug += debugString(val[0]);
171
+ }
172
+ for(let i = 1; i < length; i++) {
173
+ debug += ', ' + debugString(val[i]);
174
+ }
175
+ debug += ']';
176
+ return debug;
177
+ }
178
+ // Test for built-in
179
+ const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
180
+ let className;
181
+ if (builtInMatches && builtInMatches.length > 1) {
182
+ className = builtInMatches[1];
183
+ } else {
184
+ // Failed to match the standard '[object ClassName]'
185
+ return toString.call(val);
186
+ }
187
+ if (className == 'Object') {
188
+ // we're a user defined class or Object
189
+ // JSON.stringify avoids problems with cycles, and is generally much
190
+ // easier than looping through ownProperties of `val`.
191
+ try {
192
+ return 'Object(' + JSON.stringify(val) + ')';
193
+ } catch (_) {
194
+ return 'Object';
195
+ }
196
+ }
197
+ // errors
198
+ if (val instanceof Error) {
199
+ return `${val.name}: ${val.message}\n${val.stack}`;
200
+ }
201
+ // TODO we could test for more things here, like `Set`s and `Map`s.
202
+ return className;
203
+ }
204
+
205
+ function getArrayJsValueFromWasm0(ptr, len) {
206
+ ptr = ptr >>> 0;
207
+ const mem = getDataViewMemory0();
208
+ const result = [];
209
+ for (let i = ptr; i < ptr + 4 * len; i += 4) {
210
+ result.push(takeObject(mem.getUint32(i, true)));
211
+ }
212
+ return result;
213
+ }
214
+ /**
215
+ * Initialize the WASM module with panic hooks for better error messages
216
+ */
217
+ export function init() {
218
+ wasm.init();
219
+ }
220
+
221
+ const QuillmarkFinalization = (typeof FinalizationRegistry === 'undefined')
222
+ ? { register: () => {}, unregister: () => {} }
223
+ : new FinalizationRegistry(ptr => wasm.__wbg_quillmark_free(ptr >>> 0, 1));
224
+ /**
225
+ * Quillmark WASM Engine
226
+ *
227
+ * Create once, register Quills, render markdown. That's it.
228
+ */
229
+ export class Quillmark {
230
+
231
+ __destroy_into_raw() {
232
+ const ptr = this.__wbg_ptr;
233
+ this.__wbg_ptr = 0;
234
+ QuillmarkFinalization.unregister(this);
235
+ return ptr;
236
+ }
237
+
238
+ free() {
239
+ const ptr = this.__destroy_into_raw();
240
+ wasm.__wbg_quillmark_free(ptr, 0);
241
+ }
242
+ /**
243
+ * JavaScript constructor: `new Quillmark()`
244
+ */
245
+ constructor() {
246
+ const ret = wasm.quillmark_new();
247
+ this.__wbg_ptr = ret >>> 0;
248
+ QuillmarkFinalization.register(this, this.__wbg_ptr, this);
249
+ return this;
250
+ }
251
+ /**
252
+ * Parse markdown into a ParsedDocument
253
+ *
254
+ * This is the first step in the workflow. The returned ParsedDocument contains
255
+ * the parsed YAML frontmatter fields and the quill_tag (from QUILL field or "__default__").
256
+ * @param {string} markdown
257
+ * @returns {ParsedDocument}
258
+ */
259
+ static parseMarkdown(markdown) {
260
+ try {
261
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
262
+ const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
263
+ const len0 = WASM_VECTOR_LEN;
264
+ wasm.quillmark_parseMarkdown(retptr, ptr0, len0);
265
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
266
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
267
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
268
+ if (r2) {
269
+ throw takeObject(r1);
270
+ }
271
+ return takeObject(r0);
272
+ } finally {
273
+ wasm.__wbindgen_add_to_stack_pointer(16);
274
+ }
275
+ }
276
+ /**
277
+ * Register a Quill template bundle
278
+ *
279
+ * Accepts either a JSON string or a JsValue object representing the Quill file tree.
280
+ * Validation happens automatically on registration.
281
+ * @param {any} quill_json
282
+ * @returns {QuillInfo}
283
+ */
284
+ registerQuill(quill_json) {
285
+ try {
286
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
287
+ wasm.quillmark_registerQuill(retptr, this.__wbg_ptr, addHeapObject(quill_json));
288
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
289
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
290
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
291
+ if (r2) {
292
+ throw takeObject(r1);
293
+ }
294
+ return takeObject(r0);
295
+ } finally {
296
+ wasm.__wbindgen_add_to_stack_pointer(16);
297
+ }
298
+ }
299
+ /**
300
+ * Get shallow information about a registered Quill
301
+ *
302
+ * This returns metadata, backend info, field schemas, and supported formats
303
+ * that consumers need to configure render options for the next step.
304
+ * @param {string} name
305
+ * @returns {QuillInfo}
306
+ */
307
+ getQuillInfo(name) {
308
+ try {
309
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
310
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
311
+ const len0 = WASM_VECTOR_LEN;
312
+ wasm.quillmark_getQuillInfo(retptr, this.__wbg_ptr, ptr0, len0);
313
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
314
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
315
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
316
+ if (r2) {
317
+ throw takeObject(r1);
318
+ }
319
+ return takeObject(r0);
320
+ } finally {
321
+ wasm.__wbindgen_add_to_stack_pointer(16);
322
+ }
323
+ }
324
+ /**
325
+ * Process markdown through template engine (debugging)
326
+ *
327
+ * Returns template source code (Typst, LaTeX, etc.)
328
+ * @param {string} quill_name
329
+ * @param {string} markdown
330
+ * @returns {string}
331
+ */
332
+ processPlate(quill_name, markdown) {
333
+ let deferred4_0;
334
+ let deferred4_1;
335
+ try {
336
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
337
+ const ptr0 = passStringToWasm0(quill_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
338
+ const len0 = WASM_VECTOR_LEN;
339
+ const ptr1 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
340
+ const len1 = WASM_VECTOR_LEN;
341
+ wasm.quillmark_processPlate(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
342
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
343
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
344
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
345
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
346
+ var ptr3 = r0;
347
+ var len3 = r1;
348
+ if (r3) {
349
+ ptr3 = 0; len3 = 0;
350
+ throw takeObject(r2);
351
+ }
352
+ deferred4_0 = ptr3;
353
+ deferred4_1 = len3;
354
+ return getStringFromWasm0(ptr3, len3);
355
+ } finally {
356
+ wasm.__wbindgen_add_to_stack_pointer(16);
357
+ wasm.__wbindgen_export_3(deferred4_0, deferred4_1, 1);
358
+ }
359
+ }
360
+ /**
361
+ * Perform a dry run validation without backend compilation.
362
+ *
363
+ * Executes parsing, schema validation, and template composition to
364
+ * surface input errors quickly. Returns successfully on valid input,
365
+ * or throws an error with diagnostic payload on failure.
366
+ *
367
+ * This is useful for fast feedback loops in LLM-driven document generation.
368
+ * @param {string} quill_name
369
+ * @param {string} markdown
370
+ */
371
+ dryRun(quill_name, markdown) {
372
+ try {
373
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
374
+ const ptr0 = passStringToWasm0(quill_name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
375
+ const len0 = WASM_VECTOR_LEN;
376
+ const ptr1 = passStringToWasm0(markdown, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
377
+ const len1 = WASM_VECTOR_LEN;
378
+ wasm.quillmark_dryRun(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
379
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
380
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
381
+ if (r1) {
382
+ throw takeObject(r0);
383
+ }
384
+ } finally {
385
+ wasm.__wbindgen_add_to_stack_pointer(16);
386
+ }
387
+ }
388
+ /**
389
+ * Render a ParsedDocument to final artifacts (PDF, SVG, TXT)
390
+ *
391
+ * Uses the Quill specified in options.quill_name if provided,
392
+ * otherwise infers it from the ParsedDocument's quill_tag field.
393
+ * @param {ParsedDocument} parsed_wasm
394
+ * @param {RenderOptions} opts
395
+ * @returns {RenderResult}
396
+ */
397
+ render(parsed_wasm, opts) {
398
+ try {
399
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
400
+ wasm.quillmark_render(retptr, this.__wbg_ptr, addHeapObject(parsed_wasm), addHeapObject(opts));
401
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
402
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
403
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
404
+ if (r2) {
405
+ throw takeObject(r1);
406
+ }
407
+ return takeObject(r0);
408
+ } finally {
409
+ wasm.__wbindgen_add_to_stack_pointer(16);
410
+ }
411
+ }
412
+ /**
413
+ * List registered Quill names
414
+ * @returns {string[]}
415
+ */
416
+ listQuills() {
417
+ try {
418
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
419
+ wasm.quillmark_listQuills(retptr, this.__wbg_ptr);
420
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
421
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
422
+ var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
423
+ wasm.__wbindgen_export_3(r0, r1 * 4, 4);
424
+ return v1;
425
+ } finally {
426
+ wasm.__wbindgen_add_to_stack_pointer(16);
427
+ }
428
+ }
429
+ /**
430
+ * Unregister a Quill (free memory)
431
+ * @param {string} name
432
+ */
433
+ unregisterQuill(name) {
434
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
435
+ const len0 = WASM_VECTOR_LEN;
436
+ wasm.quillmark_unregisterQuill(this.__wbg_ptr, ptr0, len0);
437
+ }
438
+ }
439
+ if (Symbol.dispose) Quillmark.prototype[Symbol.dispose] = Quillmark.prototype.free;
440
+
441
+ export function __wbg_Error_e17e777aac105295(arg0, arg1) {
442
+ const ret = Error(getStringFromWasm0(arg0, arg1));
443
+ return addHeapObject(ret);
444
+ };
445
+
446
+ export function __wbg_String_eecc4a11987127d6(arg0, arg1) {
447
+ const ret = String(getObject(arg1));
448
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
449
+ const len1 = WASM_VECTOR_LEN;
450
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
451
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
452
+ };
453
+
454
+ export function __wbg_call_13410aac570ffff7() { return handleError(function (arg0, arg1) {
455
+ const ret = getObject(arg0).call(getObject(arg1));
456
+ return addHeapObject(ret);
457
+ }, arguments) };
458
+
459
+ export function __wbg_done_75ed0ee6dd243d9d(arg0) {
460
+ const ret = getObject(arg0).done;
461
+ return ret;
462
+ };
463
+
464
+ export function __wbg_entries_2be2f15bd5554996(arg0) {
465
+ const ret = Object.entries(getObject(arg0));
466
+ return addHeapObject(ret);
467
+ };
468
+
469
+ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
470
+ let deferred0_0;
471
+ let deferred0_1;
472
+ try {
473
+ deferred0_0 = arg0;
474
+ deferred0_1 = arg1;
475
+ console.error(getStringFromWasm0(arg0, arg1));
476
+ } finally {
477
+ wasm.__wbindgen_export_3(deferred0_0, deferred0_1, 1);
478
+ }
479
+ };
480
+
481
+ export function __wbg_getRandomValues_1c61fac11405ffdc() { return handleError(function (arg0, arg1) {
482
+ globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
483
+ }, arguments) };
484
+
485
+ export function __wbg_getTime_6bb3f64e0f18f817(arg0) {
486
+ const ret = getObject(arg0).getTime();
487
+ return ret;
488
+ };
489
+
490
+ export function __wbg_getUTCDate_e0a363240ba1c112(arg0) {
491
+ const ret = getObject(arg0).getUTCDate();
492
+ return ret;
493
+ };
494
+
495
+ export function __wbg_getUTCFullYear_811e319dd2642ac0(arg0) {
496
+ const ret = getObject(arg0).getUTCFullYear();
497
+ return ret;
498
+ };
499
+
500
+ export function __wbg_getUTCMonth_ed74da16cf6f6c98(arg0) {
501
+ const ret = getObject(arg0).getUTCMonth();
502
+ return ret;
503
+ };
504
+
505
+ export function __wbg_get_0da715ceaecea5c8(arg0, arg1) {
506
+ const ret = getObject(arg0)[arg1 >>> 0];
507
+ return addHeapObject(ret);
508
+ };
509
+
510
+ export function __wbg_get_458e874b43b18b25() { return handleError(function (arg0, arg1) {
511
+ const ret = Reflect.get(getObject(arg0), getObject(arg1));
512
+ return addHeapObject(ret);
513
+ }, arguments) };
514
+
515
+ export function __wbg_getwithrefkey_6550b2c093d2eb18(arg0, arg1) {
516
+ const ret = getObject(arg0)[getObject(arg1)];
517
+ return addHeapObject(ret);
518
+ };
519
+
520
+ export function __wbg_instanceof_ArrayBuffer_67f3012529f6a2dd(arg0) {
521
+ let result;
522
+ try {
523
+ result = getObject(arg0) instanceof ArrayBuffer;
524
+ } catch (_) {
525
+ result = false;
526
+ }
527
+ const ret = result;
528
+ return ret;
529
+ };
530
+
531
+ export function __wbg_instanceof_Uint8Array_9a8378d955933db7(arg0) {
532
+ let result;
533
+ try {
534
+ result = getObject(arg0) instanceof Uint8Array;
535
+ } catch (_) {
536
+ result = false;
537
+ }
538
+ const ret = result;
539
+ return ret;
540
+ };
541
+
542
+ export function __wbg_isArray_030cce220591fb41(arg0) {
543
+ const ret = Array.isArray(getObject(arg0));
544
+ return ret;
545
+ };
546
+
547
+ export function __wbg_isSafeInteger_1c0d1af5542e102a(arg0) {
548
+ const ret = Number.isSafeInteger(getObject(arg0));
549
+ return ret;
550
+ };
551
+
552
+ export function __wbg_iterator_f370b34483c71a1c() {
553
+ const ret = Symbol.iterator;
554
+ return addHeapObject(ret);
555
+ };
556
+
557
+ export function __wbg_length_186546c51cd61acd(arg0) {
558
+ const ret = getObject(arg0).length;
559
+ return ret;
560
+ };
561
+
562
+ export function __wbg_length_6bb7e81f9d7713e4(arg0) {
563
+ const ret = getObject(arg0).length;
564
+ return ret;
565
+ };
566
+
567
+ export function __wbg_new0_b0a0a38c201e6df5() {
568
+ const ret = new Date();
569
+ return addHeapObject(ret);
570
+ };
571
+
572
+ export function __wbg_new_19c25a3f2fa63a02() {
573
+ const ret = new Object();
574
+ return addHeapObject(ret);
575
+ };
576
+
577
+ export function __wbg_new_1f3a344cf3123716() {
578
+ const ret = new Array();
579
+ return addHeapObject(ret);
580
+ };
581
+
582
+ export function __wbg_new_2ff1f68f3676ea53() {
583
+ const ret = new Map();
584
+ return addHeapObject(ret);
585
+ };
586
+
587
+ export function __wbg_new_5a2ae4557f92b50e(arg0) {
588
+ const ret = new Date(getObject(arg0));
589
+ return addHeapObject(ret);
590
+ };
591
+
592
+ export function __wbg_new_638ebfaedbf32a5e(arg0) {
593
+ const ret = new Uint8Array(getObject(arg0));
594
+ return addHeapObject(ret);
595
+ };
596
+
597
+ export function __wbg_new_8a6f238a6ece86ea() {
598
+ const ret = new Error();
599
+ return addHeapObject(ret);
600
+ };
601
+
602
+ export function __wbg_next_5b3530e612fde77d(arg0) {
603
+ const ret = getObject(arg0).next;
604
+ return addHeapObject(ret);
605
+ };
606
+
607
+ export function __wbg_next_692e82279131b03c() { return handleError(function (arg0) {
608
+ const ret = getObject(arg0).next();
609
+ return addHeapObject(ret);
610
+ }, arguments) };
611
+
612
+ export function __wbg_now_1e80617bcee43265() {
613
+ const ret = Date.now();
614
+ return ret;
615
+ };
616
+
617
+ export function __wbg_prototypesetcall_3d4a26c1ed734349(arg0, arg1, arg2) {
618
+ Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
619
+ };
620
+
621
+ export function __wbg_set_3807d5f0bfc24aa7(arg0, arg1, arg2) {
622
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
623
+ };
624
+
625
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
626
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
627
+ };
628
+
629
+ export function __wbg_set_90f6c0f7bd8c0415(arg0, arg1, arg2) {
630
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
631
+ };
632
+
633
+ export function __wbg_set_b7f1cf4fae26fe2a(arg0, arg1, arg2) {
634
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
635
+ return addHeapObject(ret);
636
+ };
637
+
638
+ export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
639
+ const ret = getObject(arg1).stack;
640
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
641
+ const len1 = WASM_VECTOR_LEN;
642
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
643
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
644
+ };
645
+
646
+ export function __wbg_stringify_b98c93d0a190446a() { return handleError(function (arg0) {
647
+ const ret = JSON.stringify(getObject(arg0));
648
+ return addHeapObject(ret);
649
+ }, arguments) };
650
+
651
+ export function __wbg_value_dd9372230531eade(arg0) {
652
+ const ret = getObject(arg0).value;
653
+ return addHeapObject(ret);
654
+ };
655
+
656
+ export function __wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1(arg0, arg1) {
657
+ const v = getObject(arg1);
658
+ const ret = typeof(v) === 'bigint' ? v : undefined;
659
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
660
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
661
+ };
662
+
663
+ export function __wbg_wbindgenbooleanget_3fe6f642c7d97746(arg0) {
664
+ const v = getObject(arg0);
665
+ const ret = typeof(v) === 'boolean' ? v : undefined;
666
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
667
+ };
668
+
669
+ export function __wbg_wbindgendebugstring_99ef257a3ddda34d(arg0, arg1) {
670
+ const ret = debugString(getObject(arg1));
671
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
672
+ const len1 = WASM_VECTOR_LEN;
673
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
674
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
675
+ };
676
+
677
+ export function __wbg_wbindgenin_d7a1ee10933d2d55(arg0, arg1) {
678
+ const ret = getObject(arg0) in getObject(arg1);
679
+ return ret;
680
+ };
681
+
682
+ export function __wbg_wbindgenisbigint_ecb90cc08a5a9154(arg0) {
683
+ const ret = typeof(getObject(arg0)) === 'bigint';
684
+ return ret;
685
+ };
686
+
687
+ export function __wbg_wbindgenisfunction_8cee7dce3725ae74(arg0) {
688
+ const ret = typeof(getObject(arg0)) === 'function';
689
+ return ret;
690
+ };
691
+
692
+ export function __wbg_wbindgenisobject_307a53c6bd97fbf8(arg0) {
693
+ const val = getObject(arg0);
694
+ const ret = typeof(val) === 'object' && val !== null;
695
+ return ret;
696
+ };
697
+
698
+ export function __wbg_wbindgenisstring_d4fa939789f003b0(arg0) {
699
+ const ret = typeof(getObject(arg0)) === 'string';
700
+ return ret;
701
+ };
702
+
703
+ export function __wbg_wbindgenisundefined_c4b71d073b92f3c5(arg0) {
704
+ const ret = getObject(arg0) === undefined;
705
+ return ret;
706
+ };
707
+
708
+ export function __wbg_wbindgenjsvaleq_e6f2ad59ccae1b58(arg0, arg1) {
709
+ const ret = getObject(arg0) === getObject(arg1);
710
+ return ret;
711
+ };
712
+
713
+ export function __wbg_wbindgenjsvallooseeq_9bec8c9be826bed1(arg0, arg1) {
714
+ const ret = getObject(arg0) == getObject(arg1);
715
+ return ret;
716
+ };
717
+
718
+ export function __wbg_wbindgennumberget_f74b4c7525ac05cb(arg0, arg1) {
719
+ const obj = getObject(arg1);
720
+ const ret = typeof(obj) === 'number' ? obj : undefined;
721
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
722
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
723
+ };
724
+
725
+ export function __wbg_wbindgenstringget_0f16a6ddddef376f(arg0, arg1) {
726
+ const obj = getObject(arg1);
727
+ const ret = typeof(obj) === 'string' ? obj : undefined;
728
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
729
+ var len1 = WASM_VECTOR_LEN;
730
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
731
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
732
+ };
733
+
734
+ export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
735
+ throw new Error(getStringFromWasm0(arg0, arg1));
736
+ };
737
+
738
+ export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
739
+ // Cast intrinsic for `Ref(String) -> Externref`.
740
+ const ret = getStringFromWasm0(arg0, arg1);
741
+ return addHeapObject(ret);
742
+ };
743
+
744
+ export function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
745
+ // Cast intrinsic for `U64 -> Externref`.
746
+ const ret = BigInt.asUintN(64, arg0);
747
+ return addHeapObject(ret);
748
+ };
749
+
750
+ export function __wbindgen_cast_9ae0607507abb057(arg0) {
751
+ // Cast intrinsic for `I64 -> Externref`.
752
+ const ret = arg0;
753
+ return addHeapObject(ret);
754
+ };
755
+
756
+ export function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
757
+ // Cast intrinsic for `F64 -> Externref`.
758
+ const ret = arg0;
759
+ return addHeapObject(ret);
760
+ };
761
+
762
+ export function __wbindgen_object_clone_ref(arg0) {
763
+ const ret = getObject(arg0);
764
+ return addHeapObject(ret);
765
+ };
766
+
767
+ export function __wbindgen_object_drop_ref(arg0) {
768
+ takeObject(arg0);
769
+ };
770
+
Binary file
@@ -0,0 +1,33 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export const memory: WebAssembly.Memory;
4
+ export const __wbg_quillmark_free: (a: number, b: number) => void;
5
+ export const quillmark_new: () => number;
6
+ export const quillmark_parseMarkdown: (a: number, b: number, c: number) => void;
7
+ export const quillmark_registerQuill: (a: number, b: number, c: number) => void;
8
+ export const quillmark_getQuillInfo: (a: number, b: number, c: number, d: number) => void;
9
+ export const quillmark_processPlate: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
10
+ export const quillmark_dryRun: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
11
+ export const quillmark_render: (a: number, b: number, c: number, d: number) => void;
12
+ export const quillmark_listQuills: (a: number, b: number) => void;
13
+ export const quillmark_unregisterQuill: (a: number, b: number, c: number) => void;
14
+ export const init: () => void;
15
+ export const qcms_profile_is_bogus: (a: number) => number;
16
+ export const qcms_white_point_sRGB: (a: number) => void;
17
+ export const qcms_profile_precache_output_transform: (a: number) => void;
18
+ export const qcms_transform_data_rgb_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
19
+ export const qcms_transform_data_rgba_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
20
+ export const qcms_transform_data_bgra_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
21
+ export const qcms_transform_data_rgb_out_lut: (a: number, b: number, c: number, d: number) => void;
22
+ export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
23
+ export const qcms_transform_data_bgra_out_lut: (a: number, b: number, c: number, d: number) => void;
24
+ export const qcms_transform_release: (a: number) => void;
25
+ export const qcms_enable_iccv4: () => void;
26
+ export const lut_interp_linear16: (a: number, b: number, c: number) => number;
27
+ export const lut_inverse_interp16: (a: number, b: number, c: number) => number;
28
+ export const __wbindgen_export_0: (a: number, b: number) => number;
29
+ export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
30
+ export const __wbindgen_export_2: (a: number) => void;
31
+ export const __wbindgen_export_3: (a: number, b: number, c: number) => void;
32
+ export const __wbindgen_add_to_stack_pointer: (a: number) => number;
33
+ export const __wbindgen_start: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",
@@ -15,6 +15,8 @@
15
15
  "bundler/wasm.js",
16
16
  "bundler/wasm.d.ts",
17
17
  "node-esm/wasm_bg.wasm",
18
+ "node-esm/wasm_bg.js",
19
+ "node-esm/wasm_bg.wasm.d.ts",
18
20
  "node-esm/wasm.js",
19
21
  "node-esm/wasm.d.ts"
20
22
  ],