@quillmark/wasm 0.87.0 → 0.87.2
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/CHANGELOG.md +12 -0
- package/bundler/wasm.d.ts +37 -0
- package/bundler/wasm_bg.js +116 -0
- package/bundler/wasm_bg.wasm +0 -0
- package/bundler/wasm_bg.wasm.d.ts +6 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.87.2 - 2026-06-03
|
|
4
|
+
|
|
5
|
+
- Expose $ext write path through the editor surface and bindings (#687)
|
|
6
|
+
- Surface prose/canon entrypoint and fix canon documentation drift (#686)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## v0.87.1 - 2026-06-01
|
|
10
|
+
|
|
11
|
+
- Make $quill reference grammar a single source of truth (#684)
|
|
12
|
+
- Remove stale FieldType::Date references and add rejection test (#683)
|
|
13
|
+
|
|
14
|
+
|
|
3
15
|
## v0.87.0 - 2026-06-01
|
|
4
16
|
|
|
5
17
|
Arrays become first-class typed fields via a required `items` element
|
package/bundler/wasm.d.ts
CHANGED
|
@@ -316,12 +316,30 @@ export class Document {
|
|
|
316
316
|
* Throws if `card.kind` is not a valid kind name.
|
|
317
317
|
*/
|
|
318
318
|
pushCard(card: CardInput): void;
|
|
319
|
+
/**
|
|
320
|
+
* The canonical `$quill` reference grammar as author-facing text. Single
|
|
321
|
+
* source of truth (CLI, Python, MCP): drive schema `describe` and
|
|
322
|
+
* validation messages from this instead of re-stating the rule — it
|
|
323
|
+
* matches the `hint` on `parse::invalid_quill_reference`. Cache it; the
|
|
324
|
+
* value never changes.
|
|
325
|
+
*/
|
|
326
|
+
static quillRefHint(): string;
|
|
319
327
|
removeCard(index: number): Card | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* Remove the `$ext` map from the card at `index`, returning the previous
|
|
330
|
+
* map or `undefined`. Throws if out of range.
|
|
331
|
+
*/
|
|
332
|
+
removeCardExt(index: number): Record<string, unknown> | undefined;
|
|
320
333
|
/**
|
|
321
334
|
* Remove a field on the card at `index`. Returns the removed value or
|
|
322
335
|
* `undefined`. Throws if `index` is out of range or `name` is invalid.
|
|
323
336
|
*/
|
|
324
337
|
removeCardField(index: number, name: string): any;
|
|
338
|
+
/**
|
|
339
|
+
* Remove the `$ext` map from the main card, returning the previous map or
|
|
340
|
+
* `undefined`.
|
|
341
|
+
*/
|
|
342
|
+
removeExt(): Record<string, unknown> | undefined;
|
|
325
343
|
/**
|
|
326
344
|
* Remove a payload field on the main card, returning the removed value or
|
|
327
345
|
* `undefined`. Throws if `name` does not match `[a-z_][a-z0-9_]*`.
|
|
@@ -341,6 +359,20 @@ export class Document {
|
|
|
341
359
|
* Throws if `index` is out of range or `newKind` is invalid.
|
|
342
360
|
*/
|
|
343
361
|
setCardKind(index: number, new_kind: string): void;
|
|
362
|
+
/**
|
|
363
|
+
* Replace the opaque `$ext` map on the main card. `value` must be a plain
|
|
364
|
+
* object; throws otherwise. `$ext` carries out-of-band consumer state and
|
|
365
|
+
* never reaches the rendered output. Pass `{}` to record an explicit
|
|
366
|
+
* empty `$ext`.
|
|
367
|
+
*/
|
|
368
|
+
setExt(value: any): void;
|
|
369
|
+
/**
|
|
370
|
+
* Merge `value` into the main card's `$ext` map under `namespace`, creating
|
|
371
|
+
* the map when absent and replacing any existing value at that key. Sibling
|
|
372
|
+
* namespaces are preserved, so independent consumers (`$ext.presentation`,
|
|
373
|
+
* `$ext.agent`, …) don't clobber each other.
|
|
374
|
+
*/
|
|
375
|
+
setExtNamespace(namespace: string, value: any): void;
|
|
344
376
|
/**
|
|
345
377
|
* Update a payload field on the main card. Clears any existing `!fill` marker.
|
|
346
378
|
*
|
|
@@ -384,6 +416,11 @@ export class Document {
|
|
|
384
416
|
* Replace the body of the card at `index`. Throws if out of range.
|
|
385
417
|
*/
|
|
386
418
|
updateCardBody(index: number, body: string): void;
|
|
419
|
+
/**
|
|
420
|
+
* Replace the `$ext` map on the card at `index`. Throws if out of range or
|
|
421
|
+
* `value` is not a plain object.
|
|
422
|
+
*/
|
|
423
|
+
updateCardExt(index: number, value: any): void;
|
|
387
424
|
/**
|
|
388
425
|
* Update a field on the card at `index`.
|
|
389
426
|
* Throws if `index` is out of range, `name` is reserved or invalid.
|
package/bundler/wasm_bg.js
CHANGED
|
@@ -276,6 +276,30 @@ export class Document {
|
|
|
276
276
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* The canonical `$quill` reference grammar as author-facing text. Single
|
|
281
|
+
* source of truth (CLI, Python, MCP): drive schema `describe` and
|
|
282
|
+
* validation messages from this instead of re-stating the rule — it
|
|
283
|
+
* matches the `hint` on `parse::invalid_quill_reference`. Cache it; the
|
|
284
|
+
* value never changes.
|
|
285
|
+
* @returns {string}
|
|
286
|
+
*/
|
|
287
|
+
static quillRefHint() {
|
|
288
|
+
let deferred1_0;
|
|
289
|
+
let deferred1_1;
|
|
290
|
+
try {
|
|
291
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
292
|
+
wasm.document_quillRefHint(retptr);
|
|
293
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
294
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
295
|
+
deferred1_0 = r0;
|
|
296
|
+
deferred1_1 = r1;
|
|
297
|
+
return getStringFromWasm0(r0, r1);
|
|
298
|
+
} finally {
|
|
299
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
300
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
279
303
|
/**
|
|
280
304
|
* @param {number} index
|
|
281
305
|
* @returns {Card | undefined}
|
|
@@ -284,6 +308,27 @@ export class Document {
|
|
|
284
308
|
const ret = wasm.document_removeCard(this.__wbg_ptr, index);
|
|
285
309
|
return takeObject(ret);
|
|
286
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Remove the `$ext` map from the card at `index`, returning the previous
|
|
313
|
+
* map or `undefined`. Throws if out of range.
|
|
314
|
+
* @param {number} index
|
|
315
|
+
* @returns {Record<string, unknown> | undefined}
|
|
316
|
+
*/
|
|
317
|
+
removeCardExt(index) {
|
|
318
|
+
try {
|
|
319
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
320
|
+
wasm.document_removeCardExt(retptr, this.__wbg_ptr, index);
|
|
321
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
322
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
323
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
324
|
+
if (r2) {
|
|
325
|
+
throw takeObject(r1);
|
|
326
|
+
}
|
|
327
|
+
return takeObject(r0);
|
|
328
|
+
} finally {
|
|
329
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
287
332
|
/**
|
|
288
333
|
* Remove a field on the card at `index`. Returns the removed value or
|
|
289
334
|
* `undefined`. Throws if `index` is out of range or `name` is invalid.
|
|
@@ -308,6 +353,15 @@ export class Document {
|
|
|
308
353
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
309
354
|
}
|
|
310
355
|
}
|
|
356
|
+
/**
|
|
357
|
+
* Remove the `$ext` map from the main card, returning the previous map or
|
|
358
|
+
* `undefined`.
|
|
359
|
+
* @returns {Record<string, unknown> | undefined}
|
|
360
|
+
*/
|
|
361
|
+
removeExt() {
|
|
362
|
+
const ret = wasm.document_removeExt(this.__wbg_ptr);
|
|
363
|
+
return takeObject(ret);
|
|
364
|
+
}
|
|
311
365
|
/**
|
|
312
366
|
* Remove a payload field on the main card, returning the removed value or
|
|
313
367
|
* `undefined`. Throws if `name` does not match `[a-z_][a-z0-9_]*`.
|
|
@@ -387,6 +441,49 @@ export class Document {
|
|
|
387
441
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
388
442
|
}
|
|
389
443
|
}
|
|
444
|
+
/**
|
|
445
|
+
* Replace the opaque `$ext` map on the main card. `value` must be a plain
|
|
446
|
+
* object; throws otherwise. `$ext` carries out-of-band consumer state and
|
|
447
|
+
* never reaches the rendered output. Pass `{}` to record an explicit
|
|
448
|
+
* empty `$ext`.
|
|
449
|
+
* @param {any} value
|
|
450
|
+
*/
|
|
451
|
+
setExt(value) {
|
|
452
|
+
try {
|
|
453
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
454
|
+
wasm.document_setExt(retptr, this.__wbg_ptr, addHeapObject(value));
|
|
455
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
456
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
457
|
+
if (r1) {
|
|
458
|
+
throw takeObject(r0);
|
|
459
|
+
}
|
|
460
|
+
} finally {
|
|
461
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Merge `value` into the main card's `$ext` map under `namespace`, creating
|
|
466
|
+
* the map when absent and replacing any existing value at that key. Sibling
|
|
467
|
+
* namespaces are preserved, so independent consumers (`$ext.presentation`,
|
|
468
|
+
* `$ext.agent`, …) don't clobber each other.
|
|
469
|
+
* @param {string} namespace
|
|
470
|
+
* @param {any} value
|
|
471
|
+
*/
|
|
472
|
+
setExtNamespace(namespace, value) {
|
|
473
|
+
try {
|
|
474
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
475
|
+
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
476
|
+
const len0 = WASM_VECTOR_LEN;
|
|
477
|
+
wasm.document_setExtNamespace(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
|
|
478
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
479
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
480
|
+
if (r1) {
|
|
481
|
+
throw takeObject(r0);
|
|
482
|
+
}
|
|
483
|
+
} finally {
|
|
484
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
390
487
|
/**
|
|
391
488
|
* Update a payload field on the main card. Clears any existing `!fill` marker.
|
|
392
489
|
*
|
|
@@ -532,6 +629,25 @@ export class Document {
|
|
|
532
629
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
533
630
|
}
|
|
534
631
|
}
|
|
632
|
+
/**
|
|
633
|
+
* Replace the `$ext` map on the card at `index`. Throws if out of range or
|
|
634
|
+
* `value` is not a plain object.
|
|
635
|
+
* @param {number} index
|
|
636
|
+
* @param {any} value
|
|
637
|
+
*/
|
|
638
|
+
updateCardExt(index, value) {
|
|
639
|
+
try {
|
|
640
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
641
|
+
wasm.document_updateCardExt(retptr, this.__wbg_ptr, index, addHeapObject(value));
|
|
642
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
643
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
644
|
+
if (r1) {
|
|
645
|
+
throw takeObject(r0);
|
|
646
|
+
}
|
|
647
|
+
} finally {
|
|
648
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
535
651
|
/**
|
|
536
652
|
* Update a field on the card at `index`.
|
|
537
653
|
* Throws if `index` is out of range, `name` is reserved or invalid.
|
package/bundler/wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -20,12 +20,17 @@ export const document_main: (a: number) => number;
|
|
|
20
20
|
export const document_moveCard: (a: number, b: number, c: number, d: number) => void;
|
|
21
21
|
export const document_pushCard: (a: number, b: number, c: number) => void;
|
|
22
22
|
export const document_quillRef: (a: number, b: number) => void;
|
|
23
|
+
export const document_quillRefHint: (a: number) => void;
|
|
23
24
|
export const document_removeCard: (a: number, b: number) => number;
|
|
25
|
+
export const document_removeCardExt: (a: number, b: number, c: number) => void;
|
|
24
26
|
export const document_removeCardField: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
27
|
+
export const document_removeExt: (a: number) => number;
|
|
25
28
|
export const document_removeField: (a: number, b: number, c: number, d: number) => void;
|
|
26
29
|
export const document_replaceBody: (a: number, b: number, c: number) => void;
|
|
27
30
|
export const document_schemaVersionOf: (a: number, b: number, c: number) => void;
|
|
28
31
|
export const document_setCardKind: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
32
|
+
export const document_setExt: (a: number, b: number, c: number) => void;
|
|
33
|
+
export const document_setExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
29
34
|
export const document_setField: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
30
35
|
export const document_setFill: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
31
36
|
export const document_setQuillRef: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -33,6 +38,7 @@ export const document_toJson: (a: number, b: number) => void;
|
|
|
33
38
|
export const document_toMarkdown: (a: number, b: number) => void;
|
|
34
39
|
export const document_tryFromJson: (a: number, b: number) => number;
|
|
35
40
|
export const document_updateCardBody: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
41
|
+
export const document_updateCardExt: (a: number, b: number, c: number, d: number) => void;
|
|
36
42
|
export const document_updateCardField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
37
43
|
export const document_warnings: (a: number) => number;
|
|
38
44
|
export const init: () => void;
|