@quillmark/wasm 0.78.0 → 0.80.0

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/README.md CHANGED
@@ -69,19 +69,19 @@ semantic equality.
69
69
 
70
70
  ### `doc.equals(other)`
71
71
  Structural equality between two `Document` handles. Compares `main` and
72
- `leaves` by value; parse-time `warnings` are intentionally excluded.
72
+ `cards` by value; parse-time `warnings` are intentionally excluded.
73
73
 
74
74
  Use this to debounce upstream prop updates: keep the last parsed `Document`
75
75
  and compare instead of re-parsing on every keystroke.
76
76
 
77
- ### `doc.leafCount`
78
- O(1) getter for the number of composable leaves (excluding the main leaf).
79
- Use this to validate indices before calling leaf mutators (`removeLeaf`,
80
- `updateLeafField`, etc.) without allocating the full `leaves` array.
77
+ ### `doc.cardCount`
78
+ O(1) getter for the number of composable cards (excluding the main card).
79
+ Use this to validate indices before calling card mutators (`removeCard`,
80
+ `updateCardField`, etc.) without allocating the full `cards` array.
81
81
 
82
82
  ### `quill.form(doc)`
83
83
 
84
- Returns `{ main, leaves, diagnostics }` — a schema-aware snapshot of `doc`
84
+ Returns `{ main, cards, diagnostics }` — a schema-aware snapshot of `doc`
85
85
  without invoking the backend. `diagnostics` contains validation errors and
86
86
  warnings; an empty array means the document is valid. Useful for validating
87
87
  content without rendering:
@@ -181,7 +181,7 @@ compilation failures. The same shape applies to every throw site:
181
181
 
182
182
  - `Document.fromMarkdown` — parse errors (missing `QUILL`, YAML errors,
183
183
  `parse::input_too_large` for inputs > 10 MB).
184
- - `Document` mutators (`setField`, `updateLeafField`, etc.) — `EditError`
184
+ - `Document` mutators (`setField`, `updateCardField`, etc.) — `EditError`
185
185
  variants (`ReservedName`, `InvalidFieldName`, `InvalidTagName`,
186
186
  `IndexOutOfRange`) appear in `diagnostics[0].message` with the
187
187
  `[EditError::<Variant>]` prefix.
package/bundler/wasm.d.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  /* eslint-disable */
3
3
 
4
4
  /**
5
- * Input shape for `Document.pushLeaf` and `Document.insertLeaf`.
5
+ * Input shape for `Document.pushCard` and `Document.insertCard`.
6
6
  *
7
7
  * Only `tag` is required. `fields` defaults to `{}`, `body` to `""`.
8
8
  */
9
- export interface LeafInput {
9
+ export interface CardInput {
10
10
  tag: string;
11
11
  fields?: Record<string, unknown>;
12
12
  body?: string;
@@ -93,16 +93,16 @@ export interface QuillFieldUi {
93
93
  multiline?: boolean;
94
94
  }
95
95
 
96
- /** UI layout hints for a leaf (main or named leaf type). */
97
- export interface QuillLeafUi {
96
+ /** UI layout hints for a card (main or named card kind). */
97
+ export interface QuillCardUi {
98
98
  title?: string;
99
99
  }
100
100
 
101
- /** Body namespace for a leaf (main or named leaf type). */
102
- export interface QuillLeafBody {
103
- /** When false, consumers must not accept or store body content for this leaf type. Defaults to true. */
101
+ /** Body namespace for a card (main or named card kind). */
102
+ export interface QuillCardBody {
103
+ /** When false, consumers must not accept or store body content for this card kind. Defaults to true. */
104
104
  enabled?: boolean;
105
- /** Example body content embedded verbatim in the blueprint body region. Fallback is "Write <leaf> body here." */
105
+ /** Example body content embedded verbatim in the blueprint body region. Fallback is "Write <card> body here." */
106
106
  example?: string;
107
107
  }
108
108
 
@@ -119,29 +119,29 @@ export interface QuillFieldSchema {
119
119
  items?: QuillFieldSchema;
120
120
  }
121
121
 
122
- /** Schema entry for the main leaf or a named leaf type. */
123
- export interface QuillLeafSchema {
122
+ /** Schema entry for the main card or a named card kind. */
123
+ export interface QuillCardSchema {
124
124
  description?: string;
125
125
  fields: Record<string, QuillFieldSchema>;
126
- ui?: QuillLeafUi;
127
- body?: QuillLeafBody;
126
+ ui?: QuillCardUi;
127
+ body?: QuillCardBody;
128
128
  }
129
129
 
130
130
  /**
131
131
  * Document schema returned by `Quill.schema`. Includes optional `ui` keys.
132
132
  *
133
- * `main.fields.QUILL` and `leaf_kinds[name].fields.KIND` are required
133
+ * `main.fields.QUILL` and `card_kinds[name].fields.CARD` are required
134
134
  * sentinels with `const` values telling consumers what to write.
135
135
  */
136
136
  export interface QuillSchema {
137
- main: QuillLeafSchema;
138
- /** Present only when the quill declares at least one named leaf type. */
139
- leaf_kinds?: Record<string, QuillLeafSchema>;
137
+ main: QuillCardSchema;
138
+ /** Present only when the quill declares at least one named card kind. */
139
+ card_kinds?: Record<string, QuillCardSchema>;
140
140
  }
141
141
 
142
142
  /**
143
143
  * Identity snapshot mirroring the `quill:` section of `Quill.yaml`.
144
- * The schema lives on `Quill.schema`; the example on `Quill.example`.
144
+ * The schema lives on `Quill.schema`.
145
145
  * Extra `quill:` keys appear as `unknown`.
146
146
  */
147
147
  export interface QuillMetadata {
@@ -158,7 +158,7 @@ export interface QuillMetadata {
158
158
  export type FormFieldSource = "document" | "default" | "missing";
159
159
 
160
160
  /**
161
- * A single field's view within a `FormLeaf`.
161
+ * A single field's view within a `FormCard`.
162
162
  *
163
163
  * - `value` — the document-supplied value (`null` when absent).
164
164
  * - `default` — the schema default (`null` when no default is declared).
@@ -171,24 +171,24 @@ export interface FormFieldValue {
171
171
  }
172
172
 
173
173
  /**
174
- * A leaf viewed through its schema, as returned by `Quill.form`,
175
- * `Quill.blankMain`, and `Quill.blankLeaf`.
174
+ * A card viewed through its schema, as returned by `Quill.form`,
175
+ * `Quill.blankMain`, and `Quill.blankCard`.
176
176
  */
177
- export interface FormLeaf {
178
- schema: QuillLeafSchema;
177
+ export interface FormCard {
178
+ schema: QuillCardSchema;
179
179
  values: Record<string, FormFieldValue>;
180
180
  }
181
181
 
182
182
  /**
183
183
  * Schema-aware form view of a document, returned by `Quill.form`.
184
184
  *
185
- * - `main` — the main leaf viewed through the quill's main schema.
186
- * - `leaves` — composable leaf blocks, in document order (unknown tags excluded).
187
- * - `diagnostics` — diagnostics from unknown leaf tags and validation.
185
+ * - `main` — the main card viewed through the quill's main schema.
186
+ * - `cards` — composable card blocks, in document order (unknown tags excluded).
187
+ * - `diagnostics` — diagnostics from unknown card tags and validation.
188
188
  */
189
189
  export interface Form {
190
- main: FormLeaf;
191
- leaves: FormLeaf[];
190
+ main: FormCard;
191
+ cards: FormCard[];
192
192
  diagnostics: Diagnostic[];
193
193
  }
194
194
 
@@ -199,6 +199,14 @@ export interface Artifact {
199
199
  mimeType: string;
200
200
  }
201
201
 
202
+ export interface Card {
203
+ sentinel: string;
204
+ tag: string;
205
+ frontmatter: Record<string, unknown>;
206
+ frontmatterItems: FrontmatterItem[];
207
+ body: string;
208
+ }
209
+
202
210
  export interface Diagnostic {
203
211
  severity: Severity;
204
212
  code?: string;
@@ -209,14 +217,6 @@ export interface Diagnostic {
209
217
  sourceChain: string[];
210
218
  }
211
219
 
212
- export interface Leaf {
213
- sentinel: string;
214
- tag: string;
215
- frontmatter: Record<string, unknown>;
216
- frontmatterItems: FrontmatterItem[];
217
- body: string;
218
- }
219
-
220
220
  export interface Location {
221
221
  file: string;
222
222
  line: number;
@@ -250,7 +250,7 @@ export type Severity = "error" | "warning" | "note";
250
250
  * - `quillRef` (string)
251
251
  * - `frontmatter` (JS object/Record)
252
252
  * - `body` (string)
253
- * - `leaves` (array of Leaf objects)
253
+ * - `cards` (array of Card objects)
254
254
  * - `warnings` (array of Diagnostic objects)
255
255
  *
256
256
  * `toMarkdown()` emits canonical Quillmark Markdown that round-trips back to
@@ -272,7 +272,7 @@ export class Document {
272
272
  /**
273
273
  * Structural equality against another `Document`.
274
274
  *
275
- * Compares `main` and `leaves` by value (matching core's [`PartialEq`]).
275
+ * Compares `main` and `cards` by value (matching core's [`PartialEq`]).
276
276
  * Parse-time `warnings` are intentionally excluded — they describe the
277
277
  * source text, not the document's content.
278
278
  *
@@ -288,38 +288,54 @@ export class Document {
288
288
  */
289
289
  static fromMarkdown(markdown: string): Document;
290
290
  /**
291
- * Insert a leaf at the given index.
291
+ * Insert a card at the given index.
292
292
  *
293
- * `index` must be in `0..=leaves.length`. Out-of-range throws an `Error`.
293
+ * `index` must be in `0..=cards.length`. Out-of-range throws an `Error`.
294
294
  *
295
295
  * Mutators never modify `warnings`.
296
296
  */
297
- insertLeaf(index: number, leaf: LeafInput): void;
297
+ insertCard(index: number, card: CardInput): void;
298
298
  /**
299
- * Move the leaf at `from` to position `to`.
299
+ * Move the card at `from` to position `to`.
300
300
  *
301
- * `from == to` is a no-op. Both indices must be in `0..leaves.length`.
301
+ * `from == to` is a no-op. Both indices must be in `0..cards.length`.
302
302
  * Out-of-range throws an `Error`.
303
303
  *
304
304
  * Mutators never modify `warnings`.
305
305
  */
306
- moveLeaf(from: number, to: number): void;
306
+ moveCard(from: number, to: number): void;
307
307
  /**
308
- * Append a leaf to the end of the leaf list.
308
+ * Append a card to the end of the card list.
309
309
  *
310
- * `leaf` must be a JS object with a `tag` string field and optional
310
+ * `card` must be a JS object with a `tag` string field and optional
311
311
  * `fields` (object) and `body` (string).
312
312
  *
313
- * Throws an `Error` if `leaf.tag` is not a valid tag name.
313
+ * Throws an `Error` if `card.tag` is not a valid tag name.
314
+ *
315
+ * Mutators never modify `warnings`.
316
+ */
317
+ pushCard(card: CardInput): void;
318
+ /**
319
+ * Remove the card at `index` and return it, or `undefined` if out of range.
320
+ *
321
+ * Mutators never modify `warnings`.
322
+ */
323
+ removeCard(index: number): Card | undefined;
324
+ /**
325
+ * Remove a frontmatter field on the card at `index`, returning the
326
+ * removed value or `undefined` if the field was absent.
327
+ *
328
+ * Throws if `index` is out of range, `name` is reserved, or `name` does
329
+ * not match `[a-z_][a-z0-9_]*`.
314
330
  *
315
331
  * Mutators never modify `warnings`.
316
332
  */
317
- pushLeaf(leaf: LeafInput): void;
333
+ removeCardField(index: number, name: string): any;
318
334
  /**
319
- * Remove a frontmatter field on the main leaf, returning the removed value or `undefined`.
335
+ * Remove a frontmatter field on the main card, returning the removed value or `undefined`.
320
336
  *
321
337
  * Throws an `Error` whose message includes the `EditError` variant name
322
- * and details if `name` is reserved (`BODY`, `LEAVES`, `QUILL`, `KIND`)
338
+ * and details if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`)
323
339
  * or does not match `[a-z_][a-z0-9_]*`. Absence of an otherwise-valid
324
340
  * name returns `undefined`.
325
341
  *
@@ -327,42 +343,40 @@ export class Document {
327
343
  */
328
344
  removeField(name: string): any;
329
345
  /**
330
- * Remove the leaf at `index` and return it, or `undefined` if out of range.
346
+ * Replace the main card's body (the global Markdown body).
331
347
  *
332
348
  * Mutators never modify `warnings`.
333
349
  */
334
- removeLeaf(index: number): Leaf | undefined;
350
+ replaceBody(body: string): void;
335
351
  /**
336
- * Remove a frontmatter field on the leaf at `index`, returning the
337
- * removed value or `undefined` if the field was absent.
352
+ * Replace the tag of the composable card at `index`.
338
353
  *
339
- * Throws if `index` is out of range, `name` is reserved, or `name` does
340
- * not match `[a-z_][a-z0-9_]*`.
354
+ * Mutates only the sentinel the card's frontmatter and body are
355
+ * untouched. Schema-aware migration (clearing orphan fields, applying
356
+ * new defaults) is the caller's responsibility; `setCardTag` is a
357
+ * structural primitive.
341
358
  *
342
- * Mutators never modify `warnings`.
343
- */
344
- removeLeafField(index: number, name: string): any;
345
- /**
346
- * Replace the main leaf's body (the global Markdown body).
359
+ * Throws if `index` is out of range or if `newTag` does not match
360
+ * `[a-z_][a-z0-9_]*`.
347
361
  *
348
362
  * Mutators never modify `warnings`.
349
363
  */
350
- replaceBody(body: string): void;
364
+ setCardTag(index: number, new_tag: string): void;
351
365
  /**
352
- * Update a frontmatter field on the main leaf.
366
+ * Update a frontmatter field on the main card.
353
367
  *
354
368
  * Convenience method: equivalent to `doc.mainMut().setField(name, value)`.
355
369
  * Clears any existing `!fill` marker on the field.
356
370
  *
357
371
  * Throws an `Error` whose message includes the `EditError` variant name and
358
- * details if `name` is reserved (`BODY`, `LEAVES`, `QUILL`, `KIND`) or does
372
+ * details if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`) or does
359
373
  * not match `[a-z_][a-z0-9_]*`.
360
374
  *
361
375
  * Mutators never modify `warnings`.
362
376
  */
363
377
  setField(name: string, value: any): void;
364
378
  /**
365
- * Update a frontmatter field on the main leaf AND mark it as `!fill`.
379
+ * Update a frontmatter field on the main card AND mark it as `!fill`.
366
380
  *
367
381
  * Convenience method: equivalent to `doc.mainMut().setFill(name, value)`.
368
382
  *
@@ -371,20 +385,6 @@ export class Document {
371
385
  * Mutators never modify `warnings`.
372
386
  */
373
387
  setFill(name: string, value: any): void;
374
- /**
375
- * Replace the tag of the composable leaf at `index`.
376
- *
377
- * Mutates only the sentinel — the leaf's frontmatter and body are
378
- * untouched. Schema-aware migration (clearing orphan fields, applying
379
- * new defaults) is the caller's responsibility; `setLeafKind` is a
380
- * structural primitive.
381
- *
382
- * Throws if `index` is out of range or if `newTag` does not match
383
- * `[a-z_][a-z0-9_]*`.
384
- *
385
- * Mutators never modify `warnings`.
386
- */
387
- setLeafKind(index: number, new_tag: string): void;
388
388
  /**
389
389
  * Replace the QUILL reference string.
390
390
  *
@@ -402,37 +402,37 @@ export class Document {
402
402
  */
403
403
  toMarkdown(): string;
404
404
  /**
405
- * Replace the body of the leaf at `index`.
405
+ * Replace the body of the card at `index`.
406
406
  *
407
407
  * Throws if `index` is out of range.
408
408
  *
409
409
  * Mutators never modify `warnings`.
410
410
  */
411
- updateLeafBody(index: number, body: string): void;
411
+ updateCardBody(index: number, body: string): void;
412
412
  /**
413
- * Update a field on the leaf at `index`.
413
+ * Update a field on the card at `index`.
414
414
  *
415
- * Convenience method: equivalent to `doc.leaf_mut(index)?.set_field(name, value)`.
415
+ * Convenience method: equivalent to `doc.card_mut(index)?.set_field(name, value)`.
416
416
  *
417
417
  * Throws if `index` is out of range, `name` is reserved or invalid, or
418
418
  * `value` cannot be serialized.
419
419
  *
420
420
  * Mutators never modify `warnings`.
421
421
  */
422
- updateLeafField(index: number, name: string, value: any): void;
422
+ updateCardField(index: number, name: string, value: any): void;
423
423
  /**
424
- * Number of composable leaves (excludes the main leaf).
424
+ * Number of composable cards (excludes the main card).
425
425
  *
426
- * O(1). Use this to validate indices before calling leaf mutators
427
- * instead of allocating the full `leaves` array.
426
+ * O(1). Use this to validate indices before calling card mutators
427
+ * instead of allocating the full `cards` array.
428
428
  */
429
- readonly leafCount: number;
429
+ readonly cardCount: number;
430
430
  /**
431
- * Ordered list of composable leaf blocks as typed `Leaf` objects.
431
+ * Ordered list of composable card blocks as typed `Card` objects.
432
432
  */
433
- readonly leaves: Leaf[];
433
+ readonly cards: Card[];
434
434
  /**
435
- * The document's main (entry) leaf.
435
+ * The document's main (entry) card.
436
436
  *
437
437
  * Carries the QUILL sentinel, the document-level frontmatter, and the
438
438
  * global body. Frontmatter/body reads and mutations go through this
@@ -440,7 +440,7 @@ export class Document {
440
440
  *
441
441
  * Allocates and serializes on each call — cache locally if read in a hot loop.
442
442
  */
443
- readonly main: Leaf;
443
+ readonly main: Card;
444
444
  /**
445
445
  * The QUILL reference string (e.g. `"usaf_memo@0.1"`).
446
446
  */
@@ -459,17 +459,17 @@ export class Quill {
459
459
  free(): void;
460
460
  [Symbol.dispose](): void;
461
461
  /**
462
- * A blank form for a leaf of the given type — no document values supplied.
462
+ * A blank form for a card of the given kind — no document values supplied.
463
463
  *
464
- * Returns `null` if `leafKind` is not declared in this quill's schema.
464
+ * Returns `null` if `cardKind` is not declared in this quill's schema.
465
465
  * Otherwise returns a plain JS object shaped like a single entry in
466
- * [`Form::leaves`].
466
+ * [`Form::cards`].
467
467
  *
468
- * [`Form::leaves`]: quillmark::form::Form::leaves
468
+ * [`Form::cards`]: quillmark::form::Form::cards
469
469
  */
470
- blankLeaf(leaf_kind: string): FormLeaf | null;
470
+ blankCard(card_kind: string): FormCard | null;
471
471
  /**
472
- * A blank form for the main leaf — no document values supplied.
472
+ * A blank form for the main card — no document values supplied.
473
473
  *
474
474
  * Returns a plain JS object with the same shape as one entry in
475
475
  * [`Form::main`]. Every declared field's `source` is `"default"` (when
@@ -477,7 +477,7 @@ export class Quill {
477
477
  *
478
478
  * [`Form::main`]: quillmark::form::Form::main
479
479
  */
480
- blankMain(): FormLeaf;
480
+ blankMain(): FormCard;
481
481
  /**
482
482
  * The schema-aware form view of `doc`.
483
483
  *
@@ -487,7 +487,7 @@ export class Quill {
487
487
  * ```json
488
488
  * {
489
489
  * "main": { "schema": {...}, "values": { "field": {...} } },
490
- * "leaves": [ ... ],
490
+ * "cards": [ ... ],
491
491
  * "diagnostics": [ ... ]
492
492
  * }
493
493
  * ```
@@ -514,10 +514,6 @@ export class Quill {
514
514
  * Auto-generated annotated Markdown blueprint for LLM consumers.
515
515
  */
516
516
  readonly blueprint: string;
517
- /**
518
- * Bundled example document, or `undefined` if none was declared.
519
- */
520
- readonly example: string | undefined;
521
517
  /**
522
518
  * Identity snapshot of the `quill:` section of `Quill.yaml`, plus
523
519
  * `supportedFormats` and any custom `quill:` keys.
@@ -5,7 +5,7 @@
5
5
  * - `quillRef` (string)
6
6
  * - `frontmatter` (JS object/Record)
7
7
  * - `body` (string)
8
- * - `leaves` (array of Leaf objects)
8
+ * - `cards` (array of Card objects)
9
9
  * - `warnings` (array of Diagnostic objects)
10
10
  *
11
11
  * `toMarkdown()` emits canonical Quillmark Markdown that round-trips back to
@@ -29,6 +29,25 @@ export class Document {
29
29
  const ptr = this.__destroy_into_raw();
30
30
  wasm.__wbg_document_free(ptr, 0);
31
31
  }
32
+ /**
33
+ * Number of composable cards (excludes the main card).
34
+ *
35
+ * O(1). Use this to validate indices before calling card mutators
36
+ * instead of allocating the full `cards` array.
37
+ * @returns {number}
38
+ */
39
+ get cardCount() {
40
+ const ret = wasm.document_cardCount(this.__wbg_ptr);
41
+ return ret >>> 0;
42
+ }
43
+ /**
44
+ * Ordered list of composable card blocks as typed `Card` objects.
45
+ * @returns {Card[]}
46
+ */
47
+ get cards() {
48
+ const ret = wasm.document_cards(this.__wbg_ptr);
49
+ return takeObject(ret);
50
+ }
32
51
  /**
33
52
  * Return a fresh `Document` handle with the same parse state.
34
53
  *
@@ -45,7 +64,7 @@ export class Document {
45
64
  /**
46
65
  * Structural equality against another `Document`.
47
66
  *
48
- * Compares `main` and `leaves` by value (matching core's [`PartialEq`]).
67
+ * Compares `main` and `cards` by value (matching core's [`PartialEq`]).
49
68
  * Parse-time `warnings` are intentionally excluded — they describe the
50
69
  * source text, not the document's content.
51
70
  *
@@ -85,18 +104,18 @@ export class Document {
85
104
  }
86
105
  }
87
106
  /**
88
- * Insert a leaf at the given index.
107
+ * Insert a card at the given index.
89
108
  *
90
- * `index` must be in `0..=leaves.length`. Out-of-range throws an `Error`.
109
+ * `index` must be in `0..=cards.length`. Out-of-range throws an `Error`.
91
110
  *
92
111
  * Mutators never modify `warnings`.
93
112
  * @param {number} index
94
- * @param {LeafInput} leaf
113
+ * @param {CardInput} card
95
114
  */
96
- insertLeaf(index, leaf) {
115
+ insertCard(index, card) {
97
116
  try {
98
117
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
99
- wasm.document_insertLeaf(retptr, this.__wbg_ptr, index, addHeapObject(leaf));
118
+ wasm.document_insertCard(retptr, this.__wbg_ptr, index, addHeapObject(card));
100
119
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
101
120
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
102
121
  if (r1) {
@@ -107,52 +126,33 @@ export class Document {
107
126
  }
108
127
  }
109
128
  /**
110
- * Number of composable leaves (excludes the main leaf).
111
- *
112
- * O(1). Use this to validate indices before calling leaf mutators
113
- * instead of allocating the full `leaves` array.
114
- * @returns {number}
115
- */
116
- get leafCount() {
117
- const ret = wasm.document_leafCount(this.__wbg_ptr);
118
- return ret >>> 0;
119
- }
120
- /**
121
- * Ordered list of composable leaf blocks as typed `Leaf` objects.
122
- * @returns {Leaf[]}
123
- */
124
- get leaves() {
125
- const ret = wasm.document_leaves(this.__wbg_ptr);
126
- return takeObject(ret);
127
- }
128
- /**
129
- * The document's main (entry) leaf.
129
+ * The document's main (entry) card.
130
130
  *
131
131
  * Carries the QUILL sentinel, the document-level frontmatter, and the
132
132
  * global body. Frontmatter/body reads and mutations go through this
133
133
  * handle — there are no document-level shortcuts after the rework.
134
134
  *
135
135
  * Allocates and serializes on each call — cache locally if read in a hot loop.
136
- * @returns {Leaf}
136
+ * @returns {Card}
137
137
  */
138
138
  get main() {
139
139
  const ret = wasm.document_main(this.__wbg_ptr);
140
140
  return takeObject(ret);
141
141
  }
142
142
  /**
143
- * Move the leaf at `from` to position `to`.
143
+ * Move the card at `from` to position `to`.
144
144
  *
145
- * `from == to` is a no-op. Both indices must be in `0..leaves.length`.
145
+ * `from == to` is a no-op. Both indices must be in `0..cards.length`.
146
146
  * Out-of-range throws an `Error`.
147
147
  *
148
148
  * Mutators never modify `warnings`.
149
149
  * @param {number} from
150
150
  * @param {number} to
151
151
  */
152
- moveLeaf(from, to) {
152
+ moveCard(from, to) {
153
153
  try {
154
154
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
155
- wasm.document_moveLeaf(retptr, this.__wbg_ptr, from, to);
155
+ wasm.document_moveCard(retptr, this.__wbg_ptr, from, to);
156
156
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
157
157
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
158
158
  if (r1) {
@@ -163,20 +163,20 @@ export class Document {
163
163
  }
164
164
  }
165
165
  /**
166
- * Append a leaf to the end of the leaf list.
166
+ * Append a card to the end of the card list.
167
167
  *
168
- * `leaf` must be a JS object with a `tag` string field and optional
168
+ * `card` must be a JS object with a `tag` string field and optional
169
169
  * `fields` (object) and `body` (string).
170
170
  *
171
- * Throws an `Error` if `leaf.tag` is not a valid tag name.
171
+ * Throws an `Error` if `card.tag` is not a valid tag name.
172
172
  *
173
173
  * Mutators never modify `warnings`.
174
- * @param {LeafInput} leaf
174
+ * @param {CardInput} card
175
175
  */
176
- pushLeaf(leaf) {
176
+ pushCard(card) {
177
177
  try {
178
178
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
179
- wasm.document_pushLeaf(retptr, this.__wbg_ptr, addHeapObject(leaf));
179
+ wasm.document_pushCard(retptr, this.__wbg_ptr, addHeapObject(card));
180
180
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
181
181
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
182
182
  if (r1) {
@@ -207,23 +207,34 @@ export class Document {
207
207
  }
208
208
  }
209
209
  /**
210
- * Remove a frontmatter field on the main leaf, returning the removed value or `undefined`.
210
+ * Remove the card at `index` and return it, or `undefined` if out of range.
211
211
  *
212
- * Throws an `Error` whose message includes the `EditError` variant name
213
- * and details if `name` is reserved (`BODY`, `LEAVES`, `QUILL`, `KIND`)
214
- * or does not match `[a-z_][a-z0-9_]*`. Absence of an otherwise-valid
215
- * name returns `undefined`.
212
+ * Mutators never modify `warnings`.
213
+ * @param {number} index
214
+ * @returns {Card | undefined}
215
+ */
216
+ removeCard(index) {
217
+ const ret = wasm.document_removeCard(this.__wbg_ptr, index);
218
+ return takeObject(ret);
219
+ }
220
+ /**
221
+ * Remove a frontmatter field on the card at `index`, returning the
222
+ * removed value or `undefined` if the field was absent.
223
+ *
224
+ * Throws if `index` is out of range, `name` is reserved, or `name` does
225
+ * not match `[a-z_][a-z0-9_]*`.
216
226
  *
217
227
  * Mutators never modify `warnings`.
228
+ * @param {number} index
218
229
  * @param {string} name
219
230
  * @returns {any}
220
231
  */
221
- removeField(name) {
232
+ removeCardField(index, name) {
222
233
  try {
223
234
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
224
235
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
225
236
  const len0 = WASM_VECTOR_LEN;
226
- wasm.document_removeField(retptr, this.__wbg_ptr, ptr0, len0);
237
+ wasm.document_removeCardField(retptr, this.__wbg_ptr, index, ptr0, len0);
227
238
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
228
239
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
229
240
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -236,34 +247,23 @@ export class Document {
236
247
  }
237
248
  }
238
249
  /**
239
- * Remove the leaf at `index` and return it, or `undefined` if out of range.
240
- *
241
- * Mutators never modify `warnings`.
242
- * @param {number} index
243
- * @returns {Leaf | undefined}
244
- */
245
- removeLeaf(index) {
246
- const ret = wasm.document_removeLeaf(this.__wbg_ptr, index);
247
- return takeObject(ret);
248
- }
249
- /**
250
- * Remove a frontmatter field on the leaf at `index`, returning the
251
- * removed value or `undefined` if the field was absent.
250
+ * Remove a frontmatter field on the main card, returning the removed value or `undefined`.
252
251
  *
253
- * Throws if `index` is out of range, `name` is reserved, or `name` does
254
- * not match `[a-z_][a-z0-9_]*`.
252
+ * Throws an `Error` whose message includes the `EditError` variant name
253
+ * and details if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`)
254
+ * or does not match `[a-z_][a-z0-9_]*`. Absence of an otherwise-valid
255
+ * name returns `undefined`.
255
256
  *
256
257
  * Mutators never modify `warnings`.
257
- * @param {number} index
258
258
  * @param {string} name
259
259
  * @returns {any}
260
260
  */
261
- removeLeafField(index, name) {
261
+ removeField(name) {
262
262
  try {
263
263
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
264
264
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
265
265
  const len0 = WASM_VECTOR_LEN;
266
- wasm.document_removeLeafField(retptr, this.__wbg_ptr, index, ptr0, len0);
266
+ wasm.document_removeField(retptr, this.__wbg_ptr, ptr0, len0);
267
267
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
268
268
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
269
269
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -276,7 +276,7 @@ export class Document {
276
276
  }
277
277
  }
278
278
  /**
279
- * Replace the main leaf's body (the global Markdown body).
279
+ * Replace the main card's body (the global Markdown body).
280
280
  *
281
281
  * Mutators never modify `warnings`.
282
282
  * @param {string} body
@@ -287,25 +287,26 @@ export class Document {
287
287
  wasm.document_replaceBody(this.__wbg_ptr, ptr0, len0);
288
288
  }
289
289
  /**
290
- * Update a frontmatter field on the main leaf.
290
+ * Replace the tag of the composable card at `index`.
291
291
  *
292
- * Convenience method: equivalent to `doc.mainMut().setField(name, value)`.
293
- * Clears any existing `!fill` marker on the field.
292
+ * Mutates only the sentinel the card's frontmatter and body are
293
+ * untouched. Schema-aware migration (clearing orphan fields, applying
294
+ * new defaults) is the caller's responsibility; `setCardTag` is a
295
+ * structural primitive.
294
296
  *
295
- * Throws an `Error` whose message includes the `EditError` variant name and
296
- * details if `name` is reserved (`BODY`, `LEAVES`, `QUILL`, `KIND`) or does
297
- * not match `[a-z_][a-z0-9_]*`.
297
+ * Throws if `index` is out of range or if `newTag` does not match
298
+ * `[a-z_][a-z0-9_]*`.
298
299
  *
299
300
  * Mutators never modify `warnings`.
300
- * @param {string} name
301
- * @param {any} value
301
+ * @param {number} index
302
+ * @param {string} new_tag
302
303
  */
303
- setField(name, value) {
304
+ setCardTag(index, new_tag) {
304
305
  try {
305
306
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
306
- const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
307
+ const ptr0 = passStringToWasm0(new_tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
307
308
  const len0 = WASM_VECTOR_LEN;
308
- wasm.document_setField(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
309
+ wasm.document_setCardTag(retptr, this.__wbg_ptr, index, ptr0, len0);
309
310
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
310
311
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
311
312
  if (r1) {
@@ -316,22 +317,25 @@ export class Document {
316
317
  }
317
318
  }
318
319
  /**
319
- * Update a frontmatter field on the main leaf AND mark it as `!fill`.
320
+ * Update a frontmatter field on the main card.
320
321
  *
321
- * Convenience method: equivalent to `doc.mainMut().setFill(name, value)`.
322
+ * Convenience method: equivalent to `doc.mainMut().setField(name, value)`.
323
+ * Clears any existing `!fill` marker on the field.
322
324
  *
323
- * Throws on invalid name (see [`setField`](Document::set_field)).
325
+ * Throws an `Error` whose message includes the `EditError` variant name and
326
+ * details if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`) or does
327
+ * not match `[a-z_][a-z0-9_]*`.
324
328
  *
325
329
  * Mutators never modify `warnings`.
326
330
  * @param {string} name
327
331
  * @param {any} value
328
332
  */
329
- setFill(name, value) {
333
+ setField(name, value) {
330
334
  try {
331
335
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
332
336
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
333
337
  const len0 = WASM_VECTOR_LEN;
334
- wasm.document_setFill(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
338
+ wasm.document_setField(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
335
339
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
336
340
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
337
341
  if (r1) {
@@ -342,26 +346,22 @@ export class Document {
342
346
  }
343
347
  }
344
348
  /**
345
- * Replace the tag of the composable leaf at `index`.
349
+ * Update a frontmatter field on the main card AND mark it as `!fill`.
346
350
  *
347
- * Mutates only the sentinel the leaf's frontmatter and body are
348
- * untouched. Schema-aware migration (clearing orphan fields, applying
349
- * new defaults) is the caller's responsibility; `setLeafKind` is a
350
- * structural primitive.
351
+ * Convenience method: equivalent to `doc.mainMut().setFill(name, value)`.
351
352
  *
352
- * Throws if `index` is out of range or if `newTag` does not match
353
- * `[a-z_][a-z0-9_]*`.
353
+ * Throws on invalid name (see [`setField`](Document::set_field)).
354
354
  *
355
355
  * Mutators never modify `warnings`.
356
- * @param {number} index
357
- * @param {string} new_tag
356
+ * @param {string} name
357
+ * @param {any} value
358
358
  */
359
- setLeafKind(index, new_tag) {
359
+ setFill(name, value) {
360
360
  try {
361
361
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
362
- const ptr0 = passStringToWasm0(new_tag, wasm.__wbindgen_export, wasm.__wbindgen_export2);
362
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
363
363
  const len0 = WASM_VECTOR_LEN;
364
- wasm.document_setLeafKind(retptr, this.__wbg_ptr, index, ptr0, len0);
364
+ wasm.document_setFill(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
365
365
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
366
366
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
367
367
  if (r1) {
@@ -419,7 +419,7 @@ export class Document {
419
419
  }
420
420
  }
421
421
  /**
422
- * Replace the body of the leaf at `index`.
422
+ * Replace the body of the card at `index`.
423
423
  *
424
424
  * Throws if `index` is out of range.
425
425
  *
@@ -427,12 +427,12 @@ export class Document {
427
427
  * @param {number} index
428
428
  * @param {string} body
429
429
  */
430
- updateLeafBody(index, body) {
430
+ updateCardBody(index, body) {
431
431
  try {
432
432
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
433
433
  const ptr0 = passStringToWasm0(body, wasm.__wbindgen_export, wasm.__wbindgen_export2);
434
434
  const len0 = WASM_VECTOR_LEN;
435
- wasm.document_updateLeafBody(retptr, this.__wbg_ptr, index, ptr0, len0);
435
+ wasm.document_updateCardBody(retptr, this.__wbg_ptr, index, ptr0, len0);
436
436
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
437
437
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
438
438
  if (r1) {
@@ -443,9 +443,9 @@ export class Document {
443
443
  }
444
444
  }
445
445
  /**
446
- * Update a field on the leaf at `index`.
446
+ * Update a field on the card at `index`.
447
447
  *
448
- * Convenience method: equivalent to `doc.leaf_mut(index)?.set_field(name, value)`.
448
+ * Convenience method: equivalent to `doc.card_mut(index)?.set_field(name, value)`.
449
449
  *
450
450
  * Throws if `index` is out of range, `name` is reserved or invalid, or
451
451
  * `value` cannot be serialized.
@@ -455,12 +455,12 @@ export class Document {
455
455
  * @param {string} name
456
456
  * @param {any} value
457
457
  */
458
- updateLeafField(index, name, value) {
458
+ updateCardField(index, name, value) {
459
459
  try {
460
460
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
461
461
  const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
462
462
  const len0 = WASM_VECTOR_LEN;
463
- wasm.document_updateLeafField(retptr, this.__wbg_ptr, index, ptr0, len0, addHeapObject(value));
463
+ wasm.document_updateCardField(retptr, this.__wbg_ptr, index, ptr0, len0, addHeapObject(value));
464
464
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
465
465
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
466
466
  if (r1) {
@@ -523,22 +523,22 @@ export class Quill {
523
523
  }
524
524
  }
525
525
  /**
526
- * A blank form for a leaf of the given type — no document values supplied.
526
+ * A blank form for a card of the given kind — no document values supplied.
527
527
  *
528
- * Returns `null` if `leafKind` is not declared in this quill's schema.
528
+ * Returns `null` if `cardKind` is not declared in this quill's schema.
529
529
  * Otherwise returns a plain JS object shaped like a single entry in
530
- * [`Form::leaves`].
530
+ * [`Form::cards`].
531
531
  *
532
- * [`Form::leaves`]: quillmark::form::Form::leaves
533
- * @param {string} leaf_kind
534
- * @returns {FormLeaf | null}
532
+ * [`Form::cards`]: quillmark::form::Form::cards
533
+ * @param {string} card_kind
534
+ * @returns {FormCard | null}
535
535
  */
536
- blankLeaf(leaf_kind) {
536
+ blankCard(card_kind) {
537
537
  try {
538
538
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
539
- const ptr0 = passStringToWasm0(leaf_kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
539
+ const ptr0 = passStringToWasm0(card_kind, wasm.__wbindgen_export, wasm.__wbindgen_export2);
540
540
  const len0 = WASM_VECTOR_LEN;
541
- wasm.quill_blankLeaf(retptr, this.__wbg_ptr, ptr0, len0);
541
+ wasm.quill_blankCard(retptr, this.__wbg_ptr, ptr0, len0);
542
542
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
543
543
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
544
544
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
@@ -551,14 +551,14 @@ export class Quill {
551
551
  }
552
552
  }
553
553
  /**
554
- * A blank form for the main leaf — no document values supplied.
554
+ * A blank form for the main card — no document values supplied.
555
555
  *
556
556
  * Returns a plain JS object with the same shape as one entry in
557
557
  * [`Form::main`]. Every declared field's `source` is `"default"` (when
558
558
  * the schema declares a default) or `"missing"`.
559
559
  *
560
560
  * [`Form::main`]: quillmark::form::Form::main
561
- * @returns {FormLeaf}
561
+ * @returns {FormCard}
562
562
  */
563
563
  blankMain() {
564
564
  try {
@@ -595,26 +595,6 @@ export class Quill {
595
595
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
596
596
  }
597
597
  }
598
- /**
599
- * Bundled example document, or `undefined` if none was declared.
600
- * @returns {string | undefined}
601
- */
602
- get example() {
603
- try {
604
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
605
- wasm.quill_example(retptr, this.__wbg_ptr);
606
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
607
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
608
- let v1;
609
- if (r0 !== 0) {
610
- v1 = getStringFromWasm0(r0, r1).slice();
611
- wasm.__wbindgen_export4(r0, r1 * 1, 1);
612
- }
613
- return v1;
614
- } finally {
615
- wasm.__wbindgen_add_to_stack_pointer(16);
616
- }
617
- }
618
598
  /**
619
599
  * The schema-aware form view of `doc`.
620
600
  *
@@ -624,7 +604,7 @@ export class Quill {
624
604
  * ```json
625
605
  * {
626
606
  * "main": { "schema": {...}, "values": { "field": {...} } },
627
- * "leaves": [ ... ],
607
+ * "cards": [ ... ],
628
608
  * "diagnostics": [ ... ]
629
609
  * }
630
610
  * ```
Binary file
@@ -1,66 +1,65 @@
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;
7
- export const __wbg_document_free: (a: number, b: number) => void;
8
- export const quillmark_new: () => number;
9
- export const quillmark_quill: (a: number, b: number, c: number) => void;
10
- export const quill_render: (a: number, b: number, c: number, d: number) => void;
11
- export const quill_open: (a: number, b: number, c: number) => void;
12
- export const quill_backendId: (a: number, b: number) => void;
13
- export const quill_supportsCanvas: (a: number) => number;
14
- export const quill_example: (a: number, b: number) => void;
15
- export const quill_blueprint: (a: number, b: number) => void;
16
- export const quill_schema: (a: number) => number;
17
- export const quill_metadata: (a: number) => number;
18
- export const quill_form: (a: number, b: number, c: number) => void;
19
- export const quill_blankMain: (a: number, b: number) => void;
20
- export const quill_blankLeaf: (a: number, b: number, c: number, d: number) => void;
21
- export const document_fromMarkdown: (a: number, b: number, c: number) => void;
22
- export const document_toMarkdown: (a: number, b: number) => void;
8
+ export const document_cardCount: (a: number) => number;
9
+ export const document_cards: (a: number) => number;
23
10
  export const document_clone: (a: number) => number;
24
- export const document_quillRef: (a: number, b: number) => void;
25
- export const document_main: (a: number) => number;
26
- export const document_leaves: (a: number) => number;
27
- export const document_leafCount: (a: number) => number;
28
11
  export const document_equals: (a: number, b: number) => number;
29
- export const document_warnings: (a: number) => number;
12
+ export const document_fromMarkdown: (a: number, b: number, c: number) => void;
13
+ export const document_insertCard: (a: number, b: number, c: number, d: number) => void;
14
+ export const document_main: (a: number) => number;
15
+ export const document_moveCard: (a: number, b: number, c: number, d: number) => void;
16
+ export const document_pushCard: (a: number, b: number, c: number) => void;
17
+ export const document_quillRef: (a: number, b: number) => void;
18
+ export const document_removeCard: (a: number, b: number) => number;
19
+ export const document_removeCardField: (a: number, b: number, c: number, d: number, e: number) => void;
20
+ export const document_removeField: (a: number, b: number, c: number, d: number) => void;
21
+ export const document_replaceBody: (a: number, b: number, c: number) => void;
22
+ export const document_setCardTag: (a: number, b: number, c: number, d: number, e: number) => void;
30
23
  export const document_setField: (a: number, b: number, c: number, d: number, e: number) => void;
31
24
  export const document_setFill: (a: number, b: number, c: number, d: number, e: number) => void;
32
- export const document_removeField: (a: number, b: number, c: number, d: number) => void;
33
25
  export const document_setQuillRef: (a: number, b: number, c: number, d: number) => void;
34
- export const document_replaceBody: (a: number, b: number, c: number) => void;
35
- export const document_pushLeaf: (a: number, b: number, c: number) => void;
36
- export const document_insertLeaf: (a: number, b: number, c: number, d: number) => void;
37
- export const document_removeLeaf: (a: number, b: number) => number;
38
- export const document_moveLeaf: (a: number, b: number, c: number, d: number) => void;
39
- export const document_setLeafKind: (a: number, b: number, c: number, d: number, e: number) => void;
40
- export const document_updateLeafField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
41
- export const document_removeLeafField: (a: number, b: number, c: number, d: number, e: number) => void;
42
- export const document_updateLeafBody: (a: number, b: number, c: number, d: number, e: number) => void;
43
- export const rendersession_pageCount: (a: number) => number;
26
+ export const document_toMarkdown: (a: number, b: number) => void;
27
+ export const document_updateCardBody: (a: number, b: number, c: number, d: number, e: number) => void;
28
+ export const document_updateCardField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
29
+ export const document_warnings: (a: number) => number;
30
+ export const init: () => void;
31
+ export const quill_backendId: (a: number, b: number) => void;
32
+ export const quill_blankCard: (a: number, b: number, c: number, d: number) => void;
33
+ export const quill_blankMain: (a: number, b: number) => void;
34
+ export const quill_blueprint: (a: number, b: number) => void;
35
+ export const quill_form: (a: number, b: number, c: number) => void;
36
+ export const quill_metadata: (a: number) => number;
37
+ export const quill_open: (a: number, b: number, c: number) => void;
38
+ export const quill_render: (a: number, b: number, c: number, d: number) => void;
39
+ export const quill_schema: (a: number) => number;
40
+ export const quill_supportsCanvas: (a: number) => number;
41
+ export const quillmark_new: () => number;
42
+ export const quillmark_quill: (a: number, b: number, c: number) => void;
44
43
  export const rendersession_backendId: (a: number, b: number) => void;
45
- export const rendersession_supportsCanvas: (a: number) => number;
46
- export const rendersession_warnings: (a: number) => number;
47
- export const rendersession_render: (a: number, b: number, c: number) => void;
44
+ export const rendersession_pageCount: (a: number) => number;
48
45
  export const rendersession_pageSize: (a: number, b: number, c: number) => void;
49
46
  export const rendersession_paint: (a: number, b: number, c: number, d: number, e: number) => void;
50
- export const init: () => void;
51
- export const qcms_profile_is_bogus: (a: number) => number;
52
- export const qcms_white_point_sRGB: (a: number) => void;
47
+ export const rendersession_render: (a: number, b: number, c: number) => void;
48
+ export const rendersession_supportsCanvas: (a: number) => number;
49
+ export const rendersession_warnings: (a: number) => number;
50
+ export const lut_inverse_interp16: (a: number, b: number, c: number) => number;
53
51
  export const qcms_profile_precache_output_transform: (a: number) => void;
54
- export const qcms_transform_data_rgb_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
55
- export const qcms_transform_data_rgba_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
56
- export const qcms_transform_data_bgra_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
52
+ export const qcms_white_point_sRGB: (a: number) => void;
57
53
  export const qcms_transform_data_rgb_out_lut: (a: number, b: number, c: number, d: number) => void;
58
54
  export const qcms_transform_data_rgba_out_lut: (a: number, b: number, c: number, d: number) => void;
59
55
  export const qcms_transform_data_bgra_out_lut: (a: number, b: number, c: number, d: number) => void;
60
- export const qcms_transform_release: (a: number) => void;
61
- export const qcms_enable_iccv4: () => void;
56
+ export const qcms_transform_data_rgb_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
57
+ export const qcms_transform_data_rgba_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
58
+ export const qcms_transform_data_bgra_out_lut_precache: (a: number, b: number, c: number, d: number) => void;
62
59
  export const lut_interp_linear16: (a: number, b: number, c: number) => number;
63
- export const lut_inverse_interp16: (a: number, b: number, c: number) => number;
60
+ export const qcms_enable_iccv4: () => void;
61
+ export const qcms_profile_is_bogus: (a: number) => number;
62
+ export const qcms_transform_release: (a: number) => void;
64
63
  export const __wbindgen_export: (a: number, b: number) => number;
65
64
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
66
65
  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.78.0",
3
+ "version": "0.80.0",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",