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