@quillmark/wasm 0.117.0 → 0.119.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/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.119.0 - 2026-09-30
4
+
5
+ ### `ui.layout: flat`
6
+
7
+ - feat(core,wasm): **`ui.layout: flat` asks an editor to draw a typed
8
+ dictionary without a frame of its own**, its properties standing at the
9
+ depth of the field list around it. It is valid on any `object` but an array's
10
+ element, and `quill::invalid_ui` anywhere else. The value, its addresses,
11
+ the plate and the blueprint are unchanged. WASM `QuillFieldUi.layout` is
12
+ `"table" | "flat"`. (#2019)
13
+
14
+ ## v0.118.0 - 2026-09-30
15
+
16
+ Upgrade path: [0.117 → 0.118](docs/migrations/0.117-to-0.118.md).
17
+
18
+ ### Kind seeds
19
+
20
+ - feat(core,wasm,python)!: **a card kind declares `seed:`**, what
21
+ `seed_card` writes into a new card of that kind: the `$seed.<kind>` shape,
22
+ fields plus an optional `$body`. `seed_document()` carries each kind's seed,
23
+ and `schema()` emits it (WASM `QuillCardSchema.seed`). `CardSchema` gains a
24
+ public `seed` field. A document's `$seed.<kind>` replaces the kind's seed
25
+ whole, `$body` included, and `$seed.<kind>: {}` seeds nothing. A kind's
26
+ seed is checked as the card it makes and fails the load under
27
+ `quill::seed_*`, plus `quill::seed_redundant` for a seed that renders as the
28
+ unanswered field does; `main` declares none (`quill::invalid_card_schema`).
29
+ (#2016)
30
+
31
+ ### Document `$seed`
32
+
33
+ - feat(core)!: **a document's `$seed` warns wherever the card it seeds
34
+ would**: an undeclared key below a seeded field
35
+ (`validation::unknown_field`), a cell outside its variant world
36
+ (`validation::out_of_variant`), a `$body` that is not a markdown string or
37
+ does not import (`validation::seed_overlay_shape`), and a seeded array past
38
+ its `max:` (`validation::cardinality`). `quillmark validate` fails a quill
39
+ whose `example.md` carries one. A `null` in `$seed.<kind>` commits nothing,
40
+ where the new card carried `field:`. (#2016)
41
+ - refactor(cli): `quillmark validate` names `seed_document`'s output
42
+ `seeded` in its render report, where it said `seed`. (#2014)
43
+
44
+
3
45
  ## v0.117.0 - 2026-09-29
4
46
 
5
47
  Upgrade path: [0.116 → 0.117](docs/migrations/0.116-to-0.117.md).
package/README.md CHANGED
@@ -223,8 +223,8 @@ values from the `Document` payload: there is no separate form-view projection.
223
223
  values are made up, pinned to the quill's `name@version`; `undefined` when
224
224
  the quill has no `example.md` at its root.
225
225
 
226
- `quill.seedDocument()` returns a starter document: one card per kind, each body
227
- empty, every field absent;
226
+ `quill.seedDocument()` returns a starter document: one card per kind, each
227
+ carrying the kind's `seed` from `Quill.yaml` and no other field;
228
228
  `quill.seedMain()` and `quill.seedCard(kind)` seed one card. All
229
229
  return the read `Card` shape of `doc.main` / `doc.cards`, which `doc.insertCard`
230
230
  accepts directly:
package/core/wasm.d.ts CHANGED
@@ -383,9 +383,11 @@ export interface QuillFieldUi {
383
383
  /** The control the field asks for, where the shape admits more than one.
384
384
  * `"table"` is valid only on an `array` whose `items` is an `object`.
385
385
  * Every column is a leaf, a contract refused at load as
386
- * `quill::table_column_not_flat`. Drawing the grid is a request: a
387
- * consumer that cannot falls back to its own choice for the type. */
388
- layout?: "table";
386
+ * `quill::table_column_not_flat`. `"flat"` is valid only on an `object`
387
+ * that is not an array's element: its properties stand at the depth of the
388
+ * field list around it, with no frame of their own. Either is a
389
+ * request: a consumer that cannot draws its own choice for the type. */
390
+ layout?: "table" | "flat";
389
391
  }
390
392
 
391
393
  /** One entry in a card's `ui.groups` registry: a display-label override for the
@@ -461,6 +463,10 @@ export interface QuillCardSchema {
461
463
  fields: Record<string, QuillFieldSchema>;
462
464
  ui?: QuillCardUi;
463
465
  body?: QuillCardBody;
466
+ /** What `seedCard` writes into a new card of this kind where the
467
+ * document's `$seed` carries no entry for it: the `$seed[kind]` shape, fields plus
468
+ * an optional `$body`. Never present on `main`. */
469
+ seed?: Record<string, unknown>;
464
470
  }
465
471
 
466
472
  /**
@@ -840,19 +846,20 @@ export class Quill {
840
846
  parse(markdown: string): Document;
841
847
  /**
842
848
  * Seed a starter composable `Card` of the given kind (carries `$kind`),
843
- * committing an optional per-kind seed `overlay`'s fields and `$body`
844
- * (`overlay › absent`, body `overlay › empty`). `undefined` when
845
- * `cardKind` is not declared in this quill's schema.
849
+ * committing an optional per-kind seed `overlay`'s fields and `$body` in
850
+ * place of the kind's own `seed`, else that seed's. `undefined` when `cardKind` is
851
+ * not declared in this quill's schema.
846
852
  *
847
853
  * Pass `document.seedOverlay(cardKind)` as `overlay` so a card added to a
848
854
  * template-derived document inherits its curated starting values; omit it
849
- * for the bare schema seed.
855
+ * for a card carrying the kind's seed alone.
850
856
  */
851
857
  seedCard(card_kind: string, overlay: Record<string, unknown> | undefined): Card | undefined;
852
858
  /**
853
859
  * Seed a starter `Document` from the schema: the main card plus one instance
854
- * of each composable card kind, each body empty and every field absent
855
- * (interpolated at render as `default:`, else the field's blank).
860
+ * of each composable card kind, each carrying its kind's `seed` and every
861
+ * other field absent (interpolated at render as `default:`, else the
862
+ * field's blank).
856
863
  */
857
864
  seedDocument(): Document;
858
865
  /**
package/core/wasm.js CHANGED
@@ -1367,13 +1367,13 @@ export class Quill {
1367
1367
  }
1368
1368
  /**
1369
1369
  * Seed a starter composable `Card` of the given kind (carries `$kind`),
1370
- * committing an optional per-kind seed `overlay`'s fields and `$body`
1371
- * (`overlay › absent`, body `overlay › empty`). `undefined` when
1372
- * `cardKind` is not declared in this quill's schema.
1370
+ * committing an optional per-kind seed `overlay`'s fields and `$body` in
1371
+ * place of the kind's own `seed`, else that seed's. `undefined` when `cardKind` is
1372
+ * not declared in this quill's schema.
1373
1373
  *
1374
1374
  * Pass `document.seedOverlay(cardKind)` as `overlay` so a card added to a
1375
1375
  * template-derived document inherits its curated starting values; omit it
1376
- * for the bare schema seed.
1376
+ * for a card carrying the kind's seed alone.
1377
1377
  * @param {string} card_kind
1378
1378
  * @param {Record<string, unknown> | undefined} overlay
1379
1379
  * @returns {Card | undefined}
@@ -1397,8 +1397,9 @@ export class Quill {
1397
1397
  }
1398
1398
  /**
1399
1399
  * Seed a starter `Document` from the schema: the main card plus one instance
1400
- * of each composable card kind, each body empty and every field absent
1401
- * (interpolated at render as `default:`, else the field's blank).
1400
+ * of each composable card kind, each carrying its kind's `seed` and every
1401
+ * other field absent (interpolated at render as `default:`, else the
1402
+ * field's blank).
1402
1403
  * @returns {Document}
1403
1404
  */
1404
1405
  seedDocument() {
package/core/wasm_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.117.0",
3
+ "version": "0.119.0",
4
4
  "description": "WebAssembly bindings for Quillmark, a schema-driven document engine",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/render/wasm.d.ts CHANGED
@@ -394,9 +394,11 @@ export interface QuillFieldUi {
394
394
  /** The control the field asks for, where the shape admits more than one.
395
395
  * `"table"` is valid only on an `array` whose `items` is an `object`.
396
396
  * Every column is a leaf, a contract refused at load as
397
- * `quill::table_column_not_flat`. Drawing the grid is a request: a
398
- * consumer that cannot falls back to its own choice for the type. */
399
- layout?: "table";
397
+ * `quill::table_column_not_flat`. `"flat"` is valid only on an `object`
398
+ * that is not an array's element: its properties stand at the depth of the
399
+ * field list around it, with no frame of their own. Either is a
400
+ * request: a consumer that cannot draws its own choice for the type. */
401
+ layout?: "table" | "flat";
400
402
  }
401
403
 
402
404
  /** One entry in a card's `ui.groups` registry: a display-label override for the
@@ -472,6 +474,10 @@ export interface QuillCardSchema {
472
474
  fields: Record<string, QuillFieldSchema>;
473
475
  ui?: QuillCardUi;
474
476
  body?: QuillCardBody;
477
+ /** What `seedCard` writes into a new card of this kind where the
478
+ * document's `$seed` carries no entry for it: the `$seed[kind]` shape, fields plus
479
+ * an optional `$body`. Never present on `main`. */
480
+ seed?: Record<string, unknown>;
475
481
  }
476
482
 
477
483
  /**
@@ -1073,19 +1079,20 @@ export class Quill {
1073
1079
  parse(markdown: string): Document;
1074
1080
  /**
1075
1081
  * Seed a starter composable `Card` of the given kind (carries `$kind`),
1076
- * committing an optional per-kind seed `overlay`'s fields and `$body`
1077
- * (`overlay › absent`, body `overlay › empty`). `undefined` when
1078
- * `cardKind` is not declared in this quill's schema.
1082
+ * committing an optional per-kind seed `overlay`'s fields and `$body` in
1083
+ * place of the kind's own `seed`, else that seed's. `undefined` when `cardKind` is
1084
+ * not declared in this quill's schema.
1079
1085
  *
1080
1086
  * Pass `document.seedOverlay(cardKind)` as `overlay` so a card added to a
1081
1087
  * template-derived document inherits its curated starting values; omit it
1082
- * for the bare schema seed.
1088
+ * for a card carrying the kind's seed alone.
1083
1089
  */
1084
1090
  seedCard(card_kind: string, overlay: Record<string, unknown> | undefined): Card | undefined;
1085
1091
  /**
1086
1092
  * Seed a starter `Document` from the schema: the main card plus one instance
1087
- * of each composable card kind, each body empty and every field absent
1088
- * (interpolated at render as `default:`, else the field's blank).
1093
+ * of each composable card kind, each carrying its kind's `seed` and every
1094
+ * other field absent (interpolated at render as `default:`, else the
1095
+ * field's blank).
1089
1096
  */
1090
1097
  seedDocument(): Document;
1091
1098
  /**
package/render/wasm.js CHANGED
@@ -1688,13 +1688,13 @@ export class Quill {
1688
1688
  }
1689
1689
  /**
1690
1690
  * Seed a starter composable `Card` of the given kind (carries `$kind`),
1691
- * committing an optional per-kind seed `overlay`'s fields and `$body`
1692
- * (`overlay › absent`, body `overlay › empty`). `undefined` when
1693
- * `cardKind` is not declared in this quill's schema.
1691
+ * committing an optional per-kind seed `overlay`'s fields and `$body` in
1692
+ * place of the kind's own `seed`, else that seed's. `undefined` when `cardKind` is
1693
+ * not declared in this quill's schema.
1694
1694
  *
1695
1695
  * Pass `document.seedOverlay(cardKind)` as `overlay` so a card added to a
1696
1696
  * template-derived document inherits its curated starting values; omit it
1697
- * for the bare schema seed.
1697
+ * for a card carrying the kind's seed alone.
1698
1698
  * @param {string} card_kind
1699
1699
  * @param {Record<string, unknown> | undefined} overlay
1700
1700
  * @returns {Card | undefined}
@@ -1718,8 +1718,9 @@ export class Quill {
1718
1718
  }
1719
1719
  /**
1720
1720
  * Seed a starter `Document` from the schema: the main card plus one instance
1721
- * of each composable card kind, each body empty and every field absent
1722
- * (interpolated at render as `default:`, else the field's blank).
1721
+ * of each composable card kind, each carrying its kind's `seed` and every
1722
+ * other field absent (interpolated at render as `default:`, else the
1723
+ * field's blank).
1723
1724
  * @returns {Document}
1724
1725
  */
1725
1726
  seedDocument() {
Binary file