@quillmark/wasm 0.116.0 → 0.117.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,84 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.117.0 - 2026-09-29
4
+
5
+ Upgrade path: [0.116 → 0.117](docs/migrations/0.116-to-0.117.md).
6
+
7
+ ### `example:` leaves the quill schema
8
+
9
+ - feat(core,wasm,python)!: **a `Quill.yaml` declaring `example:` fails to
10
+ load.** A slot declares one value, its `default:`. `example:` on a field at
11
+ any depth fails `quill::field_parse_error`, hinted to `description:`, and
12
+ `body.example` fails `quill::invalid_body`. The `quill::example_*` checks
13
+ and `quill::body_example_*` codes are deleted, and
14
+ `quill::richtext_example_import` is `quill::richtext_default_import`. The
15
+ blueprint drops its `# e.g.` and `# body e.g.` lines but a matrix's member
16
+ hint, `schema()` carries no `example`, and `FieldSchema::example`,
17
+ `BodyCardSchema::example`, WASM `QuillFieldSchema.example` and
18
+ `QuillCardBody.example` are deleted. (#1999)
19
+
20
+ ### The example document
21
+
22
+ - feat(core,cli,wasm,python)!: **`example.md` at the quill root is the
23
+ quill's example**, a filled-in page whose values are made up.
24
+ `Quill.yaml` declares nothing about it and the load never reads it.
25
+ `Quill::example_document()`, WASM `Quill.exampleDocument()` and Python
26
+ `Quill.example_document()` hand it out pinned to the quill's
27
+ `name@version`, or `None` without one; a `$quill` other than the quill's
28
+ bare name fails `quill::example_reference`. `quillmark` re-exports
29
+ `EXAMPLE_FILE`. `quillmark validate` reads, validates and renders it, and
30
+ fails the quill on any diagnostic it carries, a warning included
31
+ (`cli::example_not_clean`, `cli::example_render_failed`): a quill keeping a
32
+ root `example.md` for another purpose renames it. `status_report` and
33
+ `usaf_memo` ship one. (#2002, #2007, #2009)
34
+
35
+ ### Quill references
36
+
37
+ - refactor(core)!: **`$quill: name@latest` fails as
38
+ `parse::invalid_quill_reference`.** It was a second spelling of the bare
39
+ `name`, which matches the same versions. A selector is `MAJOR`,
40
+ `MAJOR.MINOR` or `MAJOR.MINOR.PATCH`, digits only, the grammar
41
+ `@quillmark/quiver`'s `parseQuillRef` enforces. `VersionSelector::Latest`
42
+ is `VersionSelector::Any`, and `QuillReference::latest` is deleted.
43
+ (#2000)
44
+ - refactor(core)!: `VersionSelector` has no `Display`: `Any` has no written
45
+ form outside a reference. `QuillReference`'s `Display` still writes `name`
46
+ or `name@selector`. (#2008)
47
+
48
+ ### Quill headers the load refuses
49
+
50
+ - fix(core)!: **`version: ""`, a tagged version such as `!!float 1.10`, and
51
+ a card kind named `main` fail to load**, as `quill::invalid_version` and
52
+ `quill::invalid_card_name`. None could hold what it seemed to. (#1994)
53
+ - fix(core)!: a `title` key on a matrix member in a document warns
54
+ `validation::unknown_field` at `<field>.<member>.title`: the member's title
55
+ is the quill's, and `quillmark check --strict` fails such a document.
56
+ (#1994)
57
+
58
+ ### Rendering
59
+
60
+ - fix(typst)!: **a quill shipping no fonts renders in Roboto**, where it
61
+ rendered in Figtree, which has no prime: a `"` or `'` after a digit in
62
+ richtext rendered as an empty box. The faces are variable Roboto, upright
63
+ and italic, weights 100 to 900. A font-less quill's text reflows, a plate
64
+ naming an unshipped `"Figtree"` warns `unknown font family`, and
65
+ `quillmark workspace` exports `fonts/Roboto.ttf` and
66
+ `fonts/Roboto-Italic.ttf`. (#2010)
67
+
68
+ ### The CLI
69
+
70
+ - fix(cli): `quillmark check` locates a diagnostic in the file it came from,
71
+ where every location read `input.md`; `quillmark` re-exports
72
+ `DOCUMENT_FILE`. (#1995)
73
+ - fix(cli): a missing path given to `quillmark check` draws
74
+ `cli::unreadable_document`, as an unreadable one does, where it stopped
75
+ the run; the remaining paths are still checked. (#1994)
76
+
77
+ ### Fixes
78
+
79
+ - fix(core): a field parse hint answers the key serde refused, at every
80
+ depth. (#1999)
81
+
3
82
  ## v0.116.0 - 2026-09-26
4
83
 
5
84
  Upgrade path: [0.115 → 0.116](docs/migrations/0.115-to-0.116.md).
package/README.md CHANGED
@@ -219,8 +219,12 @@ To render a form editor, read field definitions from `quill.schema` (walk
219
219
  values from the `Document` payload: there is no separate form-view projection.
220
220
  `quill.validate(doc)` scores it without invoking the backend.
221
221
 
222
+ `quill.exampleDocument()` returns the quill's example, a filled-in page whose
223
+ values are made up, pinned to the quill's `name@version`; `undefined` when
224
+ the quill has no `example.md` at its root.
225
+
222
226
  `quill.seedDocument()` returns a starter document: one card per kind, each body
223
- empty, every field absent (no `example:` is committed);
227
+ empty, every field absent;
224
228
  `quill.seedMain()` and `quill.seedCard(kind)` seed one card. All
225
229
  return the read `Card` shape of `doc.main` / `doc.cards`, which `doc.insertCard`
226
230
  accepts directly:
@@ -423,10 +427,6 @@ renders that value under a type-only `# <type>` annotation and the render path
423
427
  uses it when the document omits the field. Without one, the blueprint leaves the
424
428
  cell empty and an absent field blank-fills.
425
429
 
426
- **`example:`** — the schema's illustration of the field's shape.
427
- `quill.blueprint` shows it on a `# e.g.` line above the field; it never takes a
428
- cell and never renders.
429
-
430
430
  An unanswered field draws no diagnostic. Partial documents are accepted, and
431
431
  `engine.render(quill, doc)` throws only for malformed input.
432
432
 
package/core/wasm.d.ts CHANGED
@@ -407,16 +407,14 @@ export interface QuillCardUi {
407
407
  export interface QuillCardBody {
408
408
  /** When false, consumers must not accept or store body content for this card kind. Defaults to true. */
409
409
  enabled?: boolean;
410
- /** Example body content, shown on the blueprint's `# body e.g.` line above the body. */
411
- example?: string;
412
410
  }
413
411
 
414
412
  export type QuillFieldType = "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "richtext" | "plaintext" | "enum" | "matrix";
415
413
 
416
414
  /** Schema entry for a single field declared in a quill's `Quill.yaml`.
417
415
  *
418
- * `default` is the value an unanswered cell renders; `example` documents shape
419
- * and never renders. An absent field without a `default` blank-fills.
416
+ * `default` is the value an unanswered cell renders. An absent field without a
417
+ * `default` blank-fills.
420
418
  */
421
419
  export interface QuillFieldSchema {
422
420
  /** A trailing `?` marks the cell optional: unanswered, it renders `none`
@@ -428,7 +426,6 @@ export interface QuillFieldSchema {
428
426
  title?: string;
429
427
  description?: string;
430
428
  default?: unknown;
431
- example?: unknown;
432
429
  /** The closed set of allowed values. Required on `type: "enum"`, and valid
433
430
  * nowhere else. */
434
431
  values?: string[];
@@ -813,6 +810,15 @@ export class Quill {
813
810
  * reached by spelling the reference.
814
811
  */
815
812
  emptyDocument(): Document;
813
+ /**
814
+ * The quill's example document, `undefined` when the quill has no
815
+ * `example.md` at its root: a filled-in page whose values are made up to show the
816
+ * quill in use, never kept. It comes back pinned to this quill's
817
+ * `name@version` and conformed as `parse` conforms, its parse and
818
+ * `conform::*` warnings on `doc.warnings`. Throws when the file does not
819
+ * parse or its `$quill` is not this quill's bare name.
820
+ */
821
+ exampleDocument(): Document | undefined;
816
822
  /**
817
823
  * Build a quill from a file tree. Pure: the declared backend is resolved
818
824
  * later, at render time. Accepts a `Map<string, Uint8Array>` or a plain
@@ -846,8 +852,7 @@ export class Quill {
846
852
  /**
847
853
  * Seed a starter `Document` from the schema: the main card plus one instance
848
854
  * of each composable card kind, each body empty and every field absent
849
- * (interpolated at render as `default:`, else the field's blank). No
850
- * `example:` is committed (a field's or `body.example`).
855
+ * (interpolated at render as `default:`, else the field's blank).
851
856
  */
852
857
  seedDocument(): Document;
853
858
  /**
@@ -1062,6 +1067,7 @@ export interface InitOutput {
1062
1067
  readonly quill_blueprint: (a: number, b: number) => void;
1063
1068
  readonly quill_conform: (a: number, b: number, c: number) => void;
1064
1069
  readonly quill_emptyDocument: (a: number) => number;
1070
+ readonly quill_exampleDocument: (a: number, b: number) => void;
1065
1071
  readonly quill_fromTree: (a: number, b: number) => void;
1066
1072
  readonly quill_metadata: (a: number, b: number) => void;
1067
1073
  readonly quill_parse: (a: number, b: number, c: number, d: number) => void;
package/core/wasm.js CHANGED
@@ -1246,6 +1246,30 @@ export class Quill {
1246
1246
  const ret = wasm.quill_emptyDocument(this.__wbg_ptr);
1247
1247
  return Document.__wrap(ret);
1248
1248
  }
1249
+ /**
1250
+ * The quill's example document, `undefined` when the quill has no
1251
+ * `example.md` at its root: a filled-in page whose values are made up to show the
1252
+ * quill in use, never kept. It comes back pinned to this quill's
1253
+ * `name@version` and conformed as `parse` conforms, its parse and
1254
+ * `conform::*` warnings on `doc.warnings`. Throws when the file does not
1255
+ * parse or its `$quill` is not this quill's bare name.
1256
+ * @returns {Document | undefined}
1257
+ */
1258
+ exampleDocument() {
1259
+ try {
1260
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1261
+ wasm.quill_exampleDocument(retptr, this.__wbg_ptr);
1262
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1263
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1264
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1265
+ if (r2) {
1266
+ throw takeObject(r1);
1267
+ }
1268
+ return r0 === 0 ? undefined : Document.__wrap(r0);
1269
+ } finally {
1270
+ wasm.__wbindgen_add_to_stack_pointer(16);
1271
+ }
1272
+ }
1249
1273
  /**
1250
1274
  * Build a quill from a file tree. Pure: the declared backend is resolved
1251
1275
  * later, at render time. Accepts a `Map<string, Uint8Array>` or a plain
@@ -1374,8 +1398,7 @@ export class Quill {
1374
1398
  /**
1375
1399
  * Seed a starter `Document` from the schema: the main card plus one instance
1376
1400
  * of each composable card kind, each body empty and every field absent
1377
- * (interpolated at render as `default:`, else the field's blank). No
1378
- * `example:` is committed (a field's or `body.example`).
1401
+ * (interpolated at render as `default:`, else the field's blank).
1379
1402
  * @returns {Document}
1380
1403
  */
1381
1404
  seedDocument() {
package/core/wasm_bg.wasm CHANGED
Binary file
@@ -62,6 +62,7 @@ export const quill_backendId: (a: number, b: number) => void;
62
62
  export const quill_blueprint: (a: number, b: number) => void;
63
63
  export const quill_conform: (a: number, b: number, c: number) => void;
64
64
  export const quill_emptyDocument: (a: number) => number;
65
+ export const quill_exampleDocument: (a: number, b: number) => void;
65
66
  export const quill_fromTree: (a: number, b: number) => void;
66
67
  export const quill_metadata: (a: number, b: number) => void;
67
68
  export const quill_parse: (a: number, b: number, c: number, d: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.116.0",
3
+ "version": "0.117.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
@@ -418,16 +418,14 @@ export interface QuillCardUi {
418
418
  export interface QuillCardBody {
419
419
  /** When false, consumers must not accept or store body content for this card kind. Defaults to true. */
420
420
  enabled?: boolean;
421
- /** Example body content, shown on the blueprint's `# body e.g.` line above the body. */
422
- example?: string;
423
421
  }
424
422
 
425
423
  export type QuillFieldType = "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "richtext" | "plaintext" | "enum" | "matrix";
426
424
 
427
425
  /** Schema entry for a single field declared in a quill's `Quill.yaml`.
428
426
  *
429
- * `default` is the value an unanswered cell renders; `example` documents shape
430
- * and never renders. An absent field without a `default` blank-fills.
427
+ * `default` is the value an unanswered cell renders. An absent field without a
428
+ * `default` blank-fills.
431
429
  */
432
430
  export interface QuillFieldSchema {
433
431
  /** A trailing `?` marks the cell optional: unanswered, it renders `none`
@@ -439,7 +437,6 @@ export interface QuillFieldSchema {
439
437
  title?: string;
440
438
  description?: string;
441
439
  default?: unknown;
442
- example?: unknown;
443
440
  /** The closed set of allowed values. Required on `type: "enum"`, and valid
444
441
  * nowhere else. */
445
442
  values?: string[];
@@ -1046,6 +1043,15 @@ export class Quill {
1046
1043
  * reached by spelling the reference.
1047
1044
  */
1048
1045
  emptyDocument(): Document;
1046
+ /**
1047
+ * The quill's example document, `undefined` when the quill has no
1048
+ * `example.md` at its root: a filled-in page whose values are made up to show the
1049
+ * quill in use, never kept. It comes back pinned to this quill's
1050
+ * `name@version` and conformed as `parse` conforms, its parse and
1051
+ * `conform::*` warnings on `doc.warnings`. Throws when the file does not
1052
+ * parse or its `$quill` is not this quill's bare name.
1053
+ */
1054
+ exampleDocument(): Document | undefined;
1049
1055
  /**
1050
1056
  * Build a quill from a file tree. Pure: the declared backend is resolved
1051
1057
  * later, at render time. Accepts a `Map<string, Uint8Array>` or a plain
@@ -1079,8 +1085,7 @@ export class Quill {
1079
1085
  /**
1080
1086
  * Seed a starter `Document` from the schema: the main card plus one instance
1081
1087
  * of each composable card kind, each body empty and every field absent
1082
- * (interpolated at render as `default:`, else the field's blank). No
1083
- * `example:` is committed (a field's or `body.example`).
1088
+ * (interpolated at render as `default:`, else the field's blank).
1084
1089
  */
1085
1090
  seedDocument(): Document;
1086
1091
  /**
@@ -1337,6 +1342,7 @@ export interface InitOutput {
1337
1342
  readonly quill_blueprint: (a: number, b: number) => void;
1338
1343
  readonly quill_conform: (a: number, b: number, c: number) => void;
1339
1344
  readonly quill_emptyDocument: (a: number) => number;
1345
+ readonly quill_exampleDocument: (a: number, b: number) => void;
1340
1346
  readonly quill_fromTree: (a: number, b: number) => void;
1341
1347
  readonly quill_metadata: (a: number, b: number) => void;
1342
1348
  readonly quill_parse: (a: number, b: number, c: number, d: number) => void;
package/render/wasm.js CHANGED
@@ -1567,6 +1567,30 @@ export class Quill {
1567
1567
  const ret = wasm.quill_emptyDocument(this.__wbg_ptr);
1568
1568
  return Document.__wrap(ret);
1569
1569
  }
1570
+ /**
1571
+ * The quill's example document, `undefined` when the quill has no
1572
+ * `example.md` at its root: a filled-in page whose values are made up to show the
1573
+ * quill in use, never kept. It comes back pinned to this quill's
1574
+ * `name@version` and conformed as `parse` conforms, its parse and
1575
+ * `conform::*` warnings on `doc.warnings`. Throws when the file does not
1576
+ * parse or its `$quill` is not this quill's bare name.
1577
+ * @returns {Document | undefined}
1578
+ */
1579
+ exampleDocument() {
1580
+ try {
1581
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1582
+ wasm.quill_exampleDocument(retptr, this.__wbg_ptr);
1583
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1584
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1585
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1586
+ if (r2) {
1587
+ throw takeObject(r1);
1588
+ }
1589
+ return r0 === 0 ? undefined : Document.__wrap(r0);
1590
+ } finally {
1591
+ wasm.__wbindgen_add_to_stack_pointer(16);
1592
+ }
1593
+ }
1570
1594
  /**
1571
1595
  * Build a quill from a file tree. Pure: the declared backend is resolved
1572
1596
  * later, at render time. Accepts a `Map<string, Uint8Array>` or a plain
@@ -1695,8 +1719,7 @@ export class Quill {
1695
1719
  /**
1696
1720
  * Seed a starter `Document` from the schema: the main card plus one instance
1697
1721
  * of each composable card kind, each body empty and every field absent
1698
- * (interpolated at render as `default:`, else the field's blank). No
1699
- * `example:` is committed (a field's or `body.example`).
1722
+ * (interpolated at render as `default:`, else the field's blank).
1700
1723
  * @returns {Document}
1701
1724
  */
1702
1725
  seedDocument() {
Binary file
@@ -76,6 +76,7 @@ export const quill_backendId: (a: number, b: number) => void;
76
76
  export const quill_blueprint: (a: number, b: number) => void;
77
77
  export const quill_conform: (a: number, b: number, c: number) => void;
78
78
  export const quill_emptyDocument: (a: number) => number;
79
+ export const quill_exampleDocument: (a: number, b: number) => void;
79
80
  export const quill_fromTree: (a: number, b: number) => void;
80
81
  export const quill_metadata: (a: number, b: number) => void;
81
82
  export const quill_parse: (a: number, b: number, c: number, d: number) => void;