@quillmark/wasm 0.58.0 → 0.58.2-rc.4

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/node-esm/wasm.js CHANGED
@@ -2,41 +2,362 @@
2
2
  import { readFileSync } from 'node:fs';
3
3
 
4
4
 
5
- export class ParsedDocument {
5
+ /**
6
+ * Typed in-memory Quillmark document.
7
+ *
8
+ * Created via `Document.fromMarkdown(markdown)`. Exposes:
9
+ * - `quillRef` (string)
10
+ * - `frontmatter` (JS object/Record)
11
+ * - `body` (string)
12
+ * - `cards` (array of Card objects)
13
+ * - `warnings` (array of Diagnostic objects)
14
+ *
15
+ * `toMarkdown()` emits canonical Quillmark Markdown that round-trips back to
16
+ * an equal `Document` by value and by type.
17
+ */
18
+ export class Document {
19
+ static __wrap(ptr) {
20
+ ptr = ptr >>> 0;
21
+ const obj = Object.create(Document.prototype);
22
+ obj.__wbg_ptr = ptr;
23
+ DocumentFinalization.register(obj, obj.__wbg_ptr, obj);
24
+ return obj;
25
+ }
6
26
  __destroy_into_raw() {
7
27
  const ptr = this.__wbg_ptr;
8
28
  this.__wbg_ptr = 0;
9
- ParsedDocumentFinalization.unregister(this);
29
+ DocumentFinalization.unregister(this);
10
30
  return ptr;
11
31
  }
12
32
  free() {
13
33
  const ptr = this.__destroy_into_raw();
14
- wasm.__wbg_parseddocument_free(ptr, 0);
34
+ wasm.__wbg_document_free(ptr, 0);
35
+ }
36
+ /**
37
+ * Global Markdown body between frontmatter and the first card.
38
+ *
39
+ * Trailing newlines are stripped — those are structural separators in
40
+ * the Markdown wire format, not content the consumer wrote.
41
+ *
42
+ * Empty string when no body is present.
43
+ * @returns {string}
44
+ */
45
+ get body() {
46
+ let deferred1_0;
47
+ let deferred1_1;
48
+ try {
49
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
50
+ wasm.document_body(retptr, this.__wbg_ptr);
51
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
52
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
53
+ deferred1_0 = r0;
54
+ deferred1_1 = r1;
55
+ return getStringFromWasm0(r0, r1);
56
+ } finally {
57
+ wasm.__wbindgen_add_to_stack_pointer(16);
58
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
59
+ }
15
60
  }
16
61
  /**
17
- * Parse markdown into a ParsedDocument.
62
+ * Ordered list of card blocks as JS objects with `tag`, `fields`, and `body`.
63
+ * @returns {any}
64
+ */
65
+ get cards() {
66
+ const ret = wasm.document_cards(this.__wbg_ptr);
67
+ return takeObject(ret);
68
+ }
69
+ /**
70
+ * Parse markdown into a typed Document.
71
+ *
72
+ * Returns the document with any parse-time warnings accessible via `.warnings`.
73
+ * Throws on parse errors.
18
74
  * @param {string} markdown
19
- * @returns {ParsedDocument}
75
+ * @returns {Document}
20
76
  */
21
77
  static fromMarkdown(markdown) {
22
78
  try {
23
79
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
24
80
  const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export, wasm.__wbindgen_export2);
25
81
  const len0 = WASM_VECTOR_LEN;
26
- wasm.parseddocument_fromMarkdown(retptr, ptr0, len0);
82
+ wasm.document_fromMarkdown(retptr, ptr0, len0);
27
83
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
28
84
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
29
85
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
30
86
  if (r2) {
31
87
  throw takeObject(r1);
32
88
  }
33
- return takeObject(r0);
89
+ return Document.__wrap(r0);
90
+ } finally {
91
+ wasm.__wbindgen_add_to_stack_pointer(16);
92
+ }
93
+ }
94
+ /**
95
+ * Typed YAML frontmatter fields as a JS object (no QUILL, BODY, or CARDS keys).
96
+ * @returns {any}
97
+ */
98
+ get frontmatter() {
99
+ const ret = wasm.document_frontmatter(this.__wbg_ptr);
100
+ return takeObject(ret);
101
+ }
102
+ /**
103
+ * Insert a card at the given index.
104
+ *
105
+ * `index` must be in `0..=cards.length`. Out-of-range throws an `Error`.
106
+ *
107
+ * Mutators never modify `warnings`.
108
+ * @param {number} index
109
+ * @param {any} card
110
+ */
111
+ insertCard(index, card) {
112
+ try {
113
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
114
+ wasm.document_insertCard(retptr, this.__wbg_ptr, index, addHeapObject(card));
115
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
116
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
117
+ if (r1) {
118
+ throw takeObject(r0);
119
+ }
120
+ } finally {
121
+ wasm.__wbindgen_add_to_stack_pointer(16);
122
+ }
123
+ }
124
+ /**
125
+ * Move the card at `from` to position `to`.
126
+ *
127
+ * `from == to` is a no-op. Both indices must be in `0..cards.length`.
128
+ * Out-of-range throws an `Error`.
129
+ *
130
+ * Mutators never modify `warnings`.
131
+ * @param {number} from
132
+ * @param {number} to
133
+ */
134
+ moveCard(from, to) {
135
+ try {
136
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
137
+ wasm.document_moveCard(retptr, this.__wbg_ptr, from, to);
138
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
139
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
140
+ if (r1) {
141
+ throw takeObject(r0);
142
+ }
143
+ } finally {
144
+ wasm.__wbindgen_add_to_stack_pointer(16);
145
+ }
146
+ }
147
+ /**
148
+ * Append a card to the end of the card list.
149
+ *
150
+ * `card` must be a JS object with a `tag` string field and optional
151
+ * `fields` (object) and `body` (string).
152
+ *
153
+ * Throws an `Error` if `card.tag` is not a valid tag name.
154
+ *
155
+ * Mutators never modify `warnings`.
156
+ * @param {any} card
157
+ */
158
+ pushCard(card) {
159
+ try {
160
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
161
+ wasm.document_pushCard(retptr, this.__wbg_ptr, addHeapObject(card));
162
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
163
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
164
+ if (r1) {
165
+ throw takeObject(r0);
166
+ }
167
+ } finally {
168
+ wasm.__wbindgen_add_to_stack_pointer(16);
169
+ }
170
+ }
171
+ /**
172
+ * The QUILL reference string (e.g. `"usaf_memo@0.1"`).
173
+ * @returns {string}
174
+ */
175
+ get quillRef() {
176
+ let deferred1_0;
177
+ let deferred1_1;
178
+ try {
179
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
180
+ wasm.document_quillRef(retptr, this.__wbg_ptr);
181
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
182
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
183
+ deferred1_0 = r0;
184
+ deferred1_1 = r1;
185
+ return getStringFromWasm0(r0, r1);
186
+ } finally {
187
+ wasm.__wbindgen_add_to_stack_pointer(16);
188
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
189
+ }
190
+ }
191
+ /**
192
+ * Remove the card at `index` and return it, or `undefined` if out of range.
193
+ *
194
+ * Mutators never modify `warnings`.
195
+ * @param {number} index
196
+ * @returns {any}
197
+ */
198
+ removeCard(index) {
199
+ const ret = wasm.document_removeCard(this.__wbg_ptr, index);
200
+ return takeObject(ret);
201
+ }
202
+ /**
203
+ * Remove a frontmatter field, returning the removed value or `undefined`.
204
+ *
205
+ * Mutators never modify `warnings`.
206
+ * @param {string} name
207
+ * @returns {any}
208
+ */
209
+ removeField(name) {
210
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
211
+ const len0 = WASM_VECTOR_LEN;
212
+ const ret = wasm.document_removeField(this.__wbg_ptr, ptr0, len0);
213
+ return takeObject(ret);
214
+ }
215
+ /**
216
+ * Replace the global Markdown body.
217
+ *
218
+ * Mutators never modify `warnings`.
219
+ * @param {string} body
220
+ */
221
+ replaceBody(body) {
222
+ const ptr0 = passStringToWasm0(body, wasm.__wbindgen_export, wasm.__wbindgen_export2);
223
+ const len0 = WASM_VECTOR_LEN;
224
+ wasm.document_replaceBody(this.__wbg_ptr, ptr0, len0);
225
+ }
226
+ /**
227
+ * Set a frontmatter field.
228
+ *
229
+ * Throws an `Error` whose message includes the `EditError` variant name and
230
+ * details if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`) or does
231
+ * not match `[a-z_][a-z0-9_]*`.
232
+ *
233
+ * Mutators never modify `warnings`.
234
+ * @param {string} name
235
+ * @param {any} value
236
+ */
237
+ setField(name, value) {
238
+ try {
239
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
240
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
241
+ const len0 = WASM_VECTOR_LEN;
242
+ wasm.document_setField(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
243
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
244
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
245
+ if (r1) {
246
+ throw takeObject(r0);
247
+ }
34
248
  } finally {
35
249
  wasm.__wbindgen_add_to_stack_pointer(16);
36
250
  }
37
251
  }
252
+ /**
253
+ * Replace the QUILL reference string.
254
+ *
255
+ * Throws if `ref_str` is not a valid `QuillReference`.
256
+ *
257
+ * Mutators never modify `warnings`.
258
+ * @param {string} ref_str
259
+ */
260
+ setQuillRef(ref_str) {
261
+ try {
262
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
263
+ const ptr0 = passStringToWasm0(ref_str, wasm.__wbindgen_export, wasm.__wbindgen_export2);
264
+ const len0 = WASM_VECTOR_LEN;
265
+ wasm.document_setQuillRef(retptr, this.__wbg_ptr, ptr0, len0);
266
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
267
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
268
+ if (r1) {
269
+ throw takeObject(r0);
270
+ }
271
+ } finally {
272
+ wasm.__wbindgen_add_to_stack_pointer(16);
273
+ }
274
+ }
275
+ /**
276
+ * Emit canonical Quillmark Markdown.
277
+ *
278
+ * Returns the document serialised as a Quillmark Markdown string.
279
+ * The output is type-fidelity round-trip safe: re-parsing the result
280
+ * produces a `Document` equal to `self` by value and by type.
281
+ * @returns {string}
282
+ */
283
+ toMarkdown() {
284
+ let deferred1_0;
285
+ let deferred1_1;
286
+ try {
287
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
288
+ wasm.document_toMarkdown(retptr, this.__wbg_ptr);
289
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
290
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
291
+ deferred1_0 = r0;
292
+ deferred1_1 = r1;
293
+ return getStringFromWasm0(r0, r1);
294
+ } finally {
295
+ wasm.__wbindgen_add_to_stack_pointer(16);
296
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
297
+ }
298
+ }
299
+ /**
300
+ * Replace the body of the card at `index`.
301
+ *
302
+ * Throws if `index` is out of range.
303
+ *
304
+ * Mutators never modify `warnings`.
305
+ * @param {number} index
306
+ * @param {string} body
307
+ */
308
+ updateCardBody(index, body) {
309
+ try {
310
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
311
+ const ptr0 = passStringToWasm0(body, wasm.__wbindgen_export, wasm.__wbindgen_export2);
312
+ const len0 = WASM_VECTOR_LEN;
313
+ wasm.document_updateCardBody(retptr, this.__wbg_ptr, index, ptr0, len0);
314
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
315
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
316
+ if (r1) {
317
+ throw takeObject(r0);
318
+ }
319
+ } finally {
320
+ wasm.__wbindgen_add_to_stack_pointer(16);
321
+ }
322
+ }
323
+ /**
324
+ * Update a field on the card at `index`.
325
+ *
326
+ * Convenience method: equivalent to `doc.card_mut(index)?.set_field(name, value)`.
327
+ *
328
+ * Throws if `index` is out of range, `name` is reserved or invalid, or
329
+ * `value` cannot be serialized.
330
+ *
331
+ * Mutators never modify `warnings`.
332
+ * @param {number} index
333
+ * @param {string} name
334
+ * @param {any} value
335
+ */
336
+ updateCardField(index, name, value) {
337
+ try {
338
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
339
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
340
+ const len0 = WASM_VECTOR_LEN;
341
+ wasm.document_updateCardField(retptr, this.__wbg_ptr, index, ptr0, len0, addHeapObject(value));
342
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
343
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
344
+ if (r1) {
345
+ throw takeObject(r0);
346
+ }
347
+ } finally {
348
+ wasm.__wbindgen_add_to_stack_pointer(16);
349
+ }
350
+ }
351
+ /**
352
+ * Non-fatal parse-time warnings as a JS array of Diagnostic objects.
353
+ * @returns {any}
354
+ */
355
+ get warnings() {
356
+ const ret = wasm.document_warnings(this.__wbg_ptr);
357
+ return takeObject(ret);
358
+ }
38
359
  }
39
- if (Symbol.dispose) ParsedDocument.prototype[Symbol.dispose] = ParsedDocument.prototype.free;
360
+ if (Symbol.dispose) Document.prototype[Symbol.dispose] = Document.prototype.free;
40
361
 
41
362
  /**
42
363
  * Opaque, shareable Quill handle.
@@ -59,15 +380,37 @@ export class Quill {
59
380
  const ptr = this.__destroy_into_raw();
60
381
  wasm.__wbg_quill_free(ptr, 0);
61
382
  }
383
+ /**
384
+ * The resolved backend identifier (e.g. `"typst"`).
385
+ * @returns {string}
386
+ */
387
+ get backendId() {
388
+ let deferred1_0;
389
+ let deferred1_1;
390
+ try {
391
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
392
+ wasm.quill_backendId(retptr, this.__wbg_ptr);
393
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
394
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
395
+ deferred1_0 = r0;
396
+ deferred1_1 = r1;
397
+ return getStringFromWasm0(r0, r1);
398
+ } finally {
399
+ wasm.__wbindgen_add_to_stack_pointer(16);
400
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
401
+ }
402
+ }
62
403
  /**
63
404
  * Open an iterative render session for page-selective rendering.
64
- * @param {ParsedDocument} parsed
405
+ * @param {Document} doc
65
406
  * @returns {RenderSession}
66
407
  */
67
- open(parsed) {
408
+ open(doc) {
68
409
  try {
69
410
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
70
- wasm.quill_open(retptr, this.__wbg_ptr, addHeapObject(parsed));
411
+ _assertClass(doc, Document);
412
+ var ptr0 = doc.__destroy_into_raw();
413
+ wasm.quill_open(retptr, this.__wbg_ptr, ptr0);
71
414
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
72
415
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
73
416
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -79,16 +422,56 @@ export class Quill {
79
422
  wasm.__wbindgen_add_to_stack_pointer(16);
80
423
  }
81
424
  }
425
+ /**
426
+ * Project a document through this quill's schema.
427
+ *
428
+ * Returns a plain JS object (not a class) that is immediately
429
+ * `JSON.stringify`-able. The shape mirrors [`FormProjection`]:
430
+ *
431
+ * ```json
432
+ * {
433
+ * "main": { "schema": {...}, "values": { "field": {...} } },
434
+ * "cards": [ ... ],
435
+ * "diagnostics": [ ... ]
436
+ * }
437
+ * ```
438
+ *
439
+ * **Snapshot semantics.** This is a read-only snapshot of the document
440
+ * at call time. Subsequent edits to `doc` require calling `projectForm`
441
+ * again.
442
+ *
443
+ * [`FormProjection`]: quillmark::form::FormProjection
444
+ * @param {Document} doc
445
+ * @returns {any}
446
+ */
447
+ projectForm(doc) {
448
+ try {
449
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
450
+ _assertClass(doc, Document);
451
+ wasm.quill_projectForm(retptr, this.__wbg_ptr, doc.__wbg_ptr);
452
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
453
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
454
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
455
+ if (r2) {
456
+ throw takeObject(r1);
457
+ }
458
+ return takeObject(r0);
459
+ } finally {
460
+ wasm.__wbindgen_add_to_stack_pointer(16);
461
+ }
462
+ }
82
463
  /**
83
464
  * Render a document to final artifacts.
84
- * @param {ParsedDocument} parsed
85
- * @param {RenderOptions} opts
465
+ * @param {Document} doc
466
+ * @param {RenderOptions | null} [opts]
86
467
  * @returns {RenderResult}
87
468
  */
88
- render(parsed, opts) {
469
+ render(doc, opts) {
89
470
  try {
90
471
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
91
- wasm.quill_render(retptr, this.__wbg_ptr, addHeapObject(parsed), addHeapObject(opts));
472
+ _assertClass(doc, Document);
473
+ var ptr0 = doc.__destroy_into_raw();
474
+ wasm.quill_render(retptr, this.__wbg_ptr, ptr0, isLikeNone(opts) ? 0 : addHeapObject(opts));
92
475
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
93
476
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
94
477
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -179,13 +562,13 @@ export class RenderSession {
179
562
  }
180
563
  /**
181
564
  * Render all or selected pages from this session.
182
- * @param {RenderOptions} opts
565
+ * @param {RenderOptions | null} [opts]
183
566
  * @returns {RenderResult}
184
567
  */
185
568
  render(opts) {
186
569
  try {
187
570
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
188
- wasm.rendersession_render(retptr, this.__wbg_ptr, addHeapObject(opts));
571
+ wasm.rendersession_render(retptr, this.__wbg_ptr, isLikeNone(opts) ? 0 : addHeapObject(opts));
189
572
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
190
573
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
191
574
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -213,6 +596,17 @@ function __wbg_get_imports() {
213
596
  const ret = Error(getStringFromWasm0(arg0, arg1));
214
597
  return addHeapObject(ret);
215
598
  },
599
+ __wbg_Number_32bf70a599af1d4b: function(arg0) {
600
+ const ret = Number(getObject(arg0));
601
+ return ret;
602
+ },
603
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
604
+ const ret = String(getObject(arg1));
605
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
606
+ const len1 = WASM_VECTOR_LEN;
607
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
608
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
609
+ },
216
610
  __wbg_String_b51de6b05a10845b: function(arg0, arg1) {
217
611
  const ret = String(getObject(arg1));
218
612
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -350,6 +744,10 @@ function __wbg_get_imports() {
350
744
  const ret = getObject(arg0)[arg1 >>> 0];
351
745
  return addHeapObject(ret);
352
746
  },
747
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
748
+ const ret = getObject(arg0)[getObject(arg1)];
749
+ return addHeapObject(ret);
750
+ },
353
751
  __wbg_get_with_ref_key_f64427178466f623: function(arg0, arg1) {
354
752
  const ret = getObject(arg0)[getObject(arg1)];
355
753
  return addHeapObject(ret);
@@ -420,6 +818,10 @@ function __wbg_get_imports() {
420
818
  const ret = new Map();
421
819
  return addHeapObject(ret);
422
820
  },
821
+ __wbg_new_5e360d2ff7b9e1c3: function(arg0, arg1) {
822
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
823
+ return addHeapObject(ret);
824
+ },
423
825
  __wbg_new_682678e2f47e32bc: function() {
424
826
  const ret = new Array();
425
827
  return addHeapObject(ret);
@@ -447,6 +849,10 @@ function __wbg_get_imports() {
447
849
  __wbg_prototypesetcall_a6b02eb00b0f4ce2: function(arg0, arg1, arg2) {
448
850
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
449
851
  },
852
+ __wbg_set_022bee52d0b05b19: function() { return handleError(function (arg0, arg1, arg2) {
853
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
854
+ return ret;
855
+ }, arguments); },
450
856
  __wbg_set_3bf1de9fab0cd644: function(arg0, arg1, arg2) {
451
857
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
452
858
  },
@@ -505,9 +911,9 @@ function __wbg_get_imports() {
505
911
  };
506
912
  }
507
913
 
508
- const ParsedDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
914
+ const DocumentFinalization = (typeof FinalizationRegistry === 'undefined')
509
915
  ? { register: () => {}, unregister: () => {} }
510
- : new FinalizationRegistry(ptr => wasm.__wbg_parseddocument_free(ptr >>> 0, 1));
916
+ : new FinalizationRegistry(ptr => wasm.__wbg_document_free(ptr >>> 0, 1));
511
917
  const QuillFinalization = (typeof FinalizationRegistry === 'undefined')
512
918
  ? { register: () => {}, unregister: () => {} }
513
919
  : new FinalizationRegistry(ptr => wasm.__wbg_quill_free(ptr >>> 0, 1));
@@ -527,6 +933,12 @@ function addHeapObject(obj) {
527
933
  return idx;
528
934
  }
529
935
 
936
+ function _assertClass(instance, klass) {
937
+ if (!(instance instanceof klass)) {
938
+ throw new Error(`expected instance of ${klass.name}`);
939
+ }
940
+ }
941
+
530
942
  function debugString(val) {
531
943
  // primitive types
532
944
  const type = typeof val;
Binary file
@@ -1,30 +1,49 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  export const memory: WebAssembly.Memory;
4
- export const __wbg_quillmark_free: (a: number, b: number) => void;
4
+ export const __wbg_document_free: (a: number, b: number) => void;
5
5
  export const __wbg_quill_free: (a: number, b: number) => void;
6
+ export const __wbg_quillmark_free: (a: number, b: number) => void;
6
7
  export const __wbg_rendersession_free: (a: number, b: number) => void;
8
+ export const document_body: (a: number, b: number) => void;
9
+ export const document_cards: (a: number) => number;
10
+ export const document_fromMarkdown: (a: number, b: number, c: number) => void;
11
+ export const document_frontmatter: (a: number) => number;
12
+ export const document_insertCard: (a: number, b: number, c: number, d: number) => void;
13
+ export const document_moveCard: (a: number, b: number, c: number, d: number) => void;
14
+ export const document_pushCard: (a: number, b: number, c: number) => void;
15
+ export const document_quillRef: (a: number, b: number) => void;
16
+ export const document_removeCard: (a: number, b: number) => number;
17
+ export const document_removeField: (a: number, b: number, c: number) => number;
18
+ export const document_replaceBody: (a: number, b: number, c: number) => void;
19
+ export const document_setField: (a: number, b: number, c: number, d: number, e: number) => void;
20
+ export const document_setQuillRef: (a: number, b: number, c: number, d: number) => void;
21
+ export const document_toMarkdown: (a: number, b: number) => void;
22
+ export const document_updateCardBody: (a: number, b: number, c: number, d: number, e: number) => void;
23
+ export const document_updateCardField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
24
+ export const document_warnings: (a: number) => number;
25
+ export const init: () => void;
26
+ export const quill_backendId: (a: number, b: number) => void;
27
+ export const quill_open: (a: number, b: number, c: number) => void;
28
+ export const quill_projectForm: (a: number, b: number, c: number) => void;
29
+ export const quill_render: (a: number, b: number, c: number, d: number) => void;
7
30
  export const quillmark_new: () => number;
8
31
  export const quillmark_quill: (a: number, b: number, c: number) => void;
9
- export const quill_render: (a: number, b: number, c: number, d: number) => void;
10
- export const quill_open: (a: number, b: number, c: number) => void;
11
- export const parseddocument_fromMarkdown: (a: number, b: number, c: number) => void;
12
32
  export const rendersession_pageCount: (a: number) => number;
13
33
  export const rendersession_render: (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;
34
+ export const lut_inverse_interp16: (a: number, b: number, c: number) => number;
17
35
  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;
36
+ export const qcms_white_point_sRGB: (a: number) => void;
21
37
  export const qcms_transform_data_rgb_out_lut: (a: number, b: number, c: number, d: number) => void;
22
38
  export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
23
39
  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;
40
+ export const qcms_transform_data_rgb_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
41
+ export const qcms_transform_data_rgba_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
42
+ export const qcms_transform_data_bgra_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
26
43
  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;
44
+ export const qcms_enable_iccv4: () => void;
45
+ export const qcms_profile_is_bogus: (a: number) => number;
46
+ export const qcms_transform_release: (a: number) => void;
28
47
  export const __wbindgen_export: (a: number, b: number) => number;
29
48
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
30
49
  export const __wbindgen_export3: (a: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.58.0",
3
+ "version": "0.58.2-rc.4",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",