@quillmark/wasm 0.87.1 → 0.87.3
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 +20 -0
- package/bundler/wasm.d.ts +52 -0
- package/bundler/wasm_bg.js +158 -0
- package/bundler/wasm_bg.wasm +0 -0
- package/bundler/wasm_bg.wasm.d.ts +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.87.3 - 2026-06-04
|
|
4
|
+
|
|
5
|
+
- Complete and consolidate the $ext mutator surface (#689)
|
|
6
|
+
- Complete the `$ext` mutator matrix with namespace-scoped removal and
|
|
7
|
+
card-indexed namespace ops: `remove_ext_namespace` (Rust `Card`,
|
|
8
|
+
`removeExtNamespace` WASM, `remove_ext_namespace` Python) plus
|
|
9
|
+
`setCardExtNamespace` / `removeCardExtNamespace`. Deleting a sub-namespace
|
|
10
|
+
is now the preferred way to clear `$ext` state — it preserves sibling
|
|
11
|
+
consumers' slots and drops `$ext` entirely once empty, where `removeExt`
|
|
12
|
+
remains a blunt clear-everything escape hatch.
|
|
13
|
+
- **Breaking (bindings):** the whole-map card mutator `updateCardExt` /
|
|
14
|
+
`update_card_ext` is renamed `setCardExt` / `set_card_ext` for naming
|
|
15
|
+
consistency with `setExt` on the main card.
|
|
16
|
+
|
|
17
|
+
## v0.87.2 - 2026-06-03
|
|
18
|
+
|
|
19
|
+
- Expose $ext write path through the editor surface and bindings (#687)
|
|
20
|
+
- Surface prose/canon entrypoint and fix canon documentation drift (#686)
|
|
21
|
+
|
|
22
|
+
|
|
3
23
|
## v0.87.1 - 2026-06-01
|
|
4
24
|
|
|
5
25
|
- Make $quill reference grammar a single source of truth (#684)
|
package/bundler/wasm.d.ts
CHANGED
|
@@ -325,11 +325,37 @@ export class Document {
|
|
|
325
325
|
*/
|
|
326
326
|
static quillRefHint(): string;
|
|
327
327
|
removeCard(index: number): Card | undefined;
|
|
328
|
+
/**
|
|
329
|
+
* Remove the `$ext` map from the composable card at `index` *entirely*,
|
|
330
|
+
* returning the previous map or `undefined`. Throws if out of range.
|
|
331
|
+
* Prefer `removeCardExtNamespace` to clear only one consumer's slot.
|
|
332
|
+
*/
|
|
333
|
+
removeCardExt(index: number): Record<string, unknown> | undefined;
|
|
334
|
+
/**
|
|
335
|
+
* Remove `namespace` from the composable card's `$ext` map, returning the
|
|
336
|
+
* value stored there or `undefined`; clears `$ext` entirely once empty.
|
|
337
|
+
* The card-indexed twin of `removeExtNamespace`. Throws if out of range.
|
|
338
|
+
*/
|
|
339
|
+
removeCardExtNamespace(index: number, namespace: string): any;
|
|
328
340
|
/**
|
|
329
341
|
* Remove a field on the card at `index`. Returns the removed value or
|
|
330
342
|
* `undefined`. Throws if `index` is out of range or `name` is invalid.
|
|
331
343
|
*/
|
|
332
344
|
removeCardField(index: number, name: string): any;
|
|
345
|
+
/**
|
|
346
|
+
* Remove the `$ext` map from the main card *entirely*, returning the
|
|
347
|
+
* previous map or `undefined`. This is a blunt escape hatch that discards
|
|
348
|
+
* every namespace at once — prefer `removeExtNamespace` to clear only your
|
|
349
|
+
* own slot while leaving sibling consumers' state intact.
|
|
350
|
+
*/
|
|
351
|
+
removeExt(): Record<string, unknown> | undefined;
|
|
352
|
+
/**
|
|
353
|
+
* Remove `namespace` from the main card's `$ext` map, returning the value
|
|
354
|
+
* stored there or `undefined`. This is the recommended way to clear `$ext`
|
|
355
|
+
* state: sibling namespaces survive, and when the last namespace is removed
|
|
356
|
+
* the `$ext` entry is dropped entirely (not left as `$ext: {}`).
|
|
357
|
+
*/
|
|
358
|
+
removeExtNamespace(namespace: string): any;
|
|
333
359
|
/**
|
|
334
360
|
* Remove a payload field on the main card, returning the removed value or
|
|
335
361
|
* `undefined`. Throws if `name` does not match `[a-z_][a-z0-9_]*`.
|
|
@@ -343,12 +369,38 @@ export class Document {
|
|
|
343
369
|
* `fromJson` throws.
|
|
344
370
|
*/
|
|
345
371
|
static schemaVersionOf(json: string): string | undefined;
|
|
372
|
+
/**
|
|
373
|
+
* Replace the `$ext` map on the composable card at `index`. Throws if out
|
|
374
|
+
* of range or `value` is not a plain object. Named to mirror `setExt` on
|
|
375
|
+
* the main card; `setCardExtNamespace` is the sibling-safe alternative.
|
|
376
|
+
*/
|
|
377
|
+
setCardExt(index: number, value: any): void;
|
|
378
|
+
/**
|
|
379
|
+
* Merge `value` into the composable card's `$ext` map under `namespace`,
|
|
380
|
+
* preserving sibling namespaces. The card-indexed twin of `setExtNamespace`.
|
|
381
|
+
* Throws if out of range or `value` cannot be serialized.
|
|
382
|
+
*/
|
|
383
|
+
setCardExtNamespace(index: number, namespace: string, value: any): void;
|
|
346
384
|
/**
|
|
347
385
|
* Replace the kind of the card at `index`. Payload and body are untouched;
|
|
348
386
|
* schema-aware migration is the caller's responsibility.
|
|
349
387
|
* Throws if `index` is out of range or `newKind` is invalid.
|
|
350
388
|
*/
|
|
351
389
|
setCardKind(index: number, new_kind: string): void;
|
|
390
|
+
/**
|
|
391
|
+
* Replace the opaque `$ext` map on the main card. `value` must be a plain
|
|
392
|
+
* object; throws otherwise. `$ext` carries out-of-band consumer state and
|
|
393
|
+
* never reaches the rendered output. Pass `{}` to record an explicit
|
|
394
|
+
* empty `$ext`.
|
|
395
|
+
*/
|
|
396
|
+
setExt(value: any): void;
|
|
397
|
+
/**
|
|
398
|
+
* Merge `value` into the main card's `$ext` map under `namespace`, creating
|
|
399
|
+
* the map when absent and replacing any existing value at that key. Sibling
|
|
400
|
+
* namespaces are preserved, so independent consumers (`$ext.presentation`,
|
|
401
|
+
* `$ext.agent`, …) don't clobber each other.
|
|
402
|
+
*/
|
|
403
|
+
setExtNamespace(namespace: string, value: any): void;
|
|
352
404
|
/**
|
|
353
405
|
* Update a payload field on the main card. Clears any existing `!fill` marker.
|
|
354
406
|
*
|
package/bundler/wasm_bg.js
CHANGED
|
@@ -308,6 +308,53 @@ export class Document {
|
|
|
308
308
|
const ret = wasm.document_removeCard(this.__wbg_ptr, index);
|
|
309
309
|
return takeObject(ret);
|
|
310
310
|
}
|
|
311
|
+
/**
|
|
312
|
+
* Remove the `$ext` map from the composable card at `index` *entirely*,
|
|
313
|
+
* returning the previous map or `undefined`. Throws if out of range.
|
|
314
|
+
* Prefer `removeCardExtNamespace` to clear only one consumer's slot.
|
|
315
|
+
* @param {number} index
|
|
316
|
+
* @returns {Record<string, unknown> | undefined}
|
|
317
|
+
*/
|
|
318
|
+
removeCardExt(index) {
|
|
319
|
+
try {
|
|
320
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
321
|
+
wasm.document_removeCardExt(retptr, this.__wbg_ptr, index);
|
|
322
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
323
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
324
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
325
|
+
if (r2) {
|
|
326
|
+
throw takeObject(r1);
|
|
327
|
+
}
|
|
328
|
+
return takeObject(r0);
|
|
329
|
+
} finally {
|
|
330
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Remove `namespace` from the composable card's `$ext` map, returning the
|
|
335
|
+
* value stored there or `undefined`; clears `$ext` entirely once empty.
|
|
336
|
+
* The card-indexed twin of `removeExtNamespace`. Throws if out of range.
|
|
337
|
+
* @param {number} index
|
|
338
|
+
* @param {string} namespace
|
|
339
|
+
* @returns {any}
|
|
340
|
+
*/
|
|
341
|
+
removeCardExtNamespace(index, namespace) {
|
|
342
|
+
try {
|
|
343
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
344
|
+
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
345
|
+
const len0 = WASM_VECTOR_LEN;
|
|
346
|
+
wasm.document_removeCardExtNamespace(retptr, this.__wbg_ptr, index, ptr0, len0);
|
|
347
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
348
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
349
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
350
|
+
if (r2) {
|
|
351
|
+
throw takeObject(r1);
|
|
352
|
+
}
|
|
353
|
+
return takeObject(r0);
|
|
354
|
+
} finally {
|
|
355
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
311
358
|
/**
|
|
312
359
|
* Remove a field on the card at `index`. Returns the removed value or
|
|
313
360
|
* `undefined`. Throws if `index` is out of range or `name` is invalid.
|
|
@@ -332,6 +379,31 @@ export class Document {
|
|
|
332
379
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
333
380
|
}
|
|
334
381
|
}
|
|
382
|
+
/**
|
|
383
|
+
* Remove the `$ext` map from the main card *entirely*, returning the
|
|
384
|
+
* previous map or `undefined`. This is a blunt escape hatch that discards
|
|
385
|
+
* every namespace at once — prefer `removeExtNamespace` to clear only your
|
|
386
|
+
* own slot while leaving sibling consumers' state intact.
|
|
387
|
+
* @returns {Record<string, unknown> | undefined}
|
|
388
|
+
*/
|
|
389
|
+
removeExt() {
|
|
390
|
+
const ret = wasm.document_removeExt(this.__wbg_ptr);
|
|
391
|
+
return takeObject(ret);
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Remove `namespace` from the main card's `$ext` map, returning the value
|
|
395
|
+
* stored there or `undefined`. This is the recommended way to clear `$ext`
|
|
396
|
+
* state: sibling namespaces survive, and when the last namespace is removed
|
|
397
|
+
* the `$ext` entry is dropped entirely (not left as `$ext: {}`).
|
|
398
|
+
* @param {string} namespace
|
|
399
|
+
* @returns {any}
|
|
400
|
+
*/
|
|
401
|
+
removeExtNamespace(namespace) {
|
|
402
|
+
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
403
|
+
const len0 = WASM_VECTOR_LEN;
|
|
404
|
+
const ret = wasm.document_removeExtNamespace(this.__wbg_ptr, ptr0, len0);
|
|
405
|
+
return takeObject(ret);
|
|
406
|
+
}
|
|
335
407
|
/**
|
|
336
408
|
* Remove a payload field on the main card, returning the removed value or
|
|
337
409
|
* `undefined`. Throws if `name` does not match `[a-z_][a-z0-9_]*`.
|
|
@@ -389,6 +461,49 @@ export class Document {
|
|
|
389
461
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
390
462
|
}
|
|
391
463
|
}
|
|
464
|
+
/**
|
|
465
|
+
* Replace the `$ext` map on the composable card at `index`. Throws if out
|
|
466
|
+
* of range or `value` is not a plain object. Named to mirror `setExt` on
|
|
467
|
+
* the main card; `setCardExtNamespace` is the sibling-safe alternative.
|
|
468
|
+
* @param {number} index
|
|
469
|
+
* @param {any} value
|
|
470
|
+
*/
|
|
471
|
+
setCardExt(index, value) {
|
|
472
|
+
try {
|
|
473
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
474
|
+
wasm.document_setCardExt(retptr, this.__wbg_ptr, index, addHeapObject(value));
|
|
475
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
476
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
477
|
+
if (r1) {
|
|
478
|
+
throw takeObject(r0);
|
|
479
|
+
}
|
|
480
|
+
} finally {
|
|
481
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Merge `value` into the composable card's `$ext` map under `namespace`,
|
|
486
|
+
* preserving sibling namespaces. The card-indexed twin of `setExtNamespace`.
|
|
487
|
+
* Throws if out of range or `value` cannot be serialized.
|
|
488
|
+
* @param {number} index
|
|
489
|
+
* @param {string} namespace
|
|
490
|
+
* @param {any} value
|
|
491
|
+
*/
|
|
492
|
+
setCardExtNamespace(index, namespace, value) {
|
|
493
|
+
try {
|
|
494
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
495
|
+
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
496
|
+
const len0 = WASM_VECTOR_LEN;
|
|
497
|
+
wasm.document_setCardExtNamespace(retptr, this.__wbg_ptr, index, ptr0, len0, addHeapObject(value));
|
|
498
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
499
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
500
|
+
if (r1) {
|
|
501
|
+
throw takeObject(r0);
|
|
502
|
+
}
|
|
503
|
+
} finally {
|
|
504
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
505
|
+
}
|
|
506
|
+
}
|
|
392
507
|
/**
|
|
393
508
|
* Replace the kind of the card at `index`. Payload and body are untouched;
|
|
394
509
|
* schema-aware migration is the caller's responsibility.
|
|
@@ -411,6 +526,49 @@ export class Document {
|
|
|
411
526
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
412
527
|
}
|
|
413
528
|
}
|
|
529
|
+
/**
|
|
530
|
+
* Replace the opaque `$ext` map on the main card. `value` must be a plain
|
|
531
|
+
* object; throws otherwise. `$ext` carries out-of-band consumer state and
|
|
532
|
+
* never reaches the rendered output. Pass `{}` to record an explicit
|
|
533
|
+
* empty `$ext`.
|
|
534
|
+
* @param {any} value
|
|
535
|
+
*/
|
|
536
|
+
setExt(value) {
|
|
537
|
+
try {
|
|
538
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
539
|
+
wasm.document_setExt(retptr, this.__wbg_ptr, addHeapObject(value));
|
|
540
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
541
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
542
|
+
if (r1) {
|
|
543
|
+
throw takeObject(r0);
|
|
544
|
+
}
|
|
545
|
+
} finally {
|
|
546
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Merge `value` into the main card's `$ext` map under `namespace`, creating
|
|
551
|
+
* the map when absent and replacing any existing value at that key. Sibling
|
|
552
|
+
* namespaces are preserved, so independent consumers (`$ext.presentation`,
|
|
553
|
+
* `$ext.agent`, …) don't clobber each other.
|
|
554
|
+
* @param {string} namespace
|
|
555
|
+
* @param {any} value
|
|
556
|
+
*/
|
|
557
|
+
setExtNamespace(namespace, value) {
|
|
558
|
+
try {
|
|
559
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
560
|
+
const ptr0 = passStringToWasm0(namespace, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
561
|
+
const len0 = WASM_VECTOR_LEN;
|
|
562
|
+
wasm.document_setExtNamespace(retptr, this.__wbg_ptr, ptr0, len0, addHeapObject(value));
|
|
563
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
564
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
565
|
+
if (r1) {
|
|
566
|
+
throw takeObject(r0);
|
|
567
|
+
}
|
|
568
|
+
} finally {
|
|
569
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
414
572
|
/**
|
|
415
573
|
* Update a payload field on the main card. Clears any existing `!fill` marker.
|
|
416
574
|
*
|
package/bundler/wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -22,11 +22,19 @@ export const document_pushCard: (a: number, b: number, c: number) => void;
|
|
|
22
22
|
export const document_quillRef: (a: number, b: number) => void;
|
|
23
23
|
export const document_quillRefHint: (a: number) => void;
|
|
24
24
|
export const document_removeCard: (a: number, b: number) => number;
|
|
25
|
+
export const document_removeCardExt: (a: number, b: number, c: number) => void;
|
|
26
|
+
export const document_removeCardExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
25
27
|
export const document_removeCardField: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
28
|
+
export const document_removeExt: (a: number) => number;
|
|
29
|
+
export const document_removeExtNamespace: (a: number, b: number, c: number) => number;
|
|
26
30
|
export const document_removeField: (a: number, b: number, c: number, d: number) => void;
|
|
27
31
|
export const document_replaceBody: (a: number, b: number, c: number) => void;
|
|
28
32
|
export const document_schemaVersionOf: (a: number, b: number, c: number) => void;
|
|
33
|
+
export const document_setCardExt: (a: number, b: number, c: number, d: number) => void;
|
|
34
|
+
export const document_setCardExtNamespace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
29
35
|
export const document_setCardKind: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
36
|
+
export const document_setExt: (a: number, b: number, c: number) => void;
|
|
37
|
+
export const document_setExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
30
38
|
export const document_setField: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
31
39
|
export const document_setFill: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
32
40
|
export const document_setQuillRef: (a: number, b: number, c: number, d: number) => void;
|