@quillmark/wasm 0.86.0 → 0.87.1

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,113 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.87.1 - 2026-06-01
4
+
5
+ - Make $quill reference grammar a single source of truth (#684)
6
+ - Remove stale FieldType::Date references and add rejection test (#683)
7
+
8
+
9
+ ## v0.87.0 - 2026-06-01
10
+
11
+ Arrays become first-class typed fields via a required `items` element
12
+ schema, datetime is unified under a single `type: datetime` accepting the
13
+ full YAML-1.1-style timestamp range (`FieldType::Date` is gone), and object
14
+ zero values are now shape-valid. This release tightens schema-load
15
+ validation in several places — empty `properties` maps and deeper array
16
+ nesting are now rejected — and consolidates the example/default conformance
17
+ checks behind one shared primitive. Documentation now ships from GitHub
18
+ Pages instead of Read the Docs.
19
+
20
+ ### Breaking changes
21
+
22
+ These are schema-load cutovers for `Quill.yaml` authors; full before/after
23
+ steps are in `docs/migrations/0.86-to-0.87.md`.
24
+
25
+ - **Array fields now require an `items` element schema** (#672). Arrays
26
+ previously carried a single untyped `Array` type; scalar arrays were
27
+ never coerced or validated element-wise and were always annotated
28
+ `array<string>`. Every array field must now declare `items`, and schema
29
+ load rejects arrays without it. The bare-`properties`-on-an-array form
30
+ (the old "typed table") is **removed** in favor of
31
+ `items: { type: object, properties: … }`. Migration for a typed table:
32
+
33
+ ```yaml
34
+ # before
35
+ rows:
36
+ type: array
37
+ properties: { name: { type: string }, qty: { type: integer } }
38
+ # after
39
+ rows:
40
+ type: array
41
+ items:
42
+ type: object
43
+ properties: { name: { type: string }, qty: { type: integer } }
44
+ ```
45
+
46
+ A scalar array adds `items` directly, e.g.
47
+ `counts: { type: array, items: { type: integer } }`. Elements now coerce
48
+ and validate against `items` (failing at the indexed path, e.g.
49
+ `counts[1]`), and blueprint annotations reflect the element type
50
+ (`array<integer>`, `array<markdown>`, …). Bundled quills and the
51
+ `usaf_memo` golden schema are migrated.
52
+ - **`FieldType::Date` removed; use `type: datetime`** (#679). `type: date`
53
+ no longer exists. `type: datetime` now accepts the full range from a bare
54
+ `YYYY-MM-DD` date through RFC 3339 with offset (seconds optional, `T` or
55
+ space separator). Datetime values gain calendar validation (e.g. Feb 30
56
+ is now rejected), and JSON Schema output emits `format: date-time` for
57
+ all datetime fields. The WASM `FieldType` union drops `"date"`. The
58
+ blueprint hint is now `datetime<YYYY-MM-DD[Thh:mm:ss]>`.
59
+ - **Empty `properties: {}` on an object field is rejected** (#678). An
60
+ empty properties map carries no information (the only conforming value is
61
+ `{}`) and is almost always a mistake. It is now treated like a missing
62
+ `properties` key and surfaces `quill::object_empty_properties`.
63
+ - **Deeper array nesting is rejected** (#673). The documented "one level of
64
+ nesting" contract is now enforced in a single recursive pass, closing a
65
+ gap where `array<object<array>>` and `object<array>` were silently
66
+ accepted. A typed table row and a typed dictionary may carry scalar
67
+ columns/properties only; deeper shapes fail with
68
+ `quill::nested_array_not_supported`.
69
+
70
+ ### Behavioral changes
71
+
72
+ - **Object zero values are now shape-valid** (#677). `zero_value` returned
73
+ a bare `{}` for every object field, which failed validation on any object
74
+ with `properties` (each absent property reported as `MustFillUnset`), so
75
+ the zero-filled render path broke for object fields. An object with
76
+ `properties` now recurses, zero-filling each property to its own
77
+ type-empty leaf. `{}` remains the zero only for the property-less edge
78
+ case.
79
+ - **`example:` values are now validated** (#680). The conformance check for
80
+ `example`/`default` literals recurses into array items and object
81
+ properties and validates datetime format — capabilities the old
82
+ load-time path lacked, so previously-unvalidated `example:` values are
83
+ now caught.
84
+
85
+ ### Documentation & infrastructure
86
+
87
+ - **Docs hosting moved from Read the Docs to GitHub Pages** (#671). A new
88
+ `docs.yml` workflow builds MkDocs (strict build as a PR check) and
89
+ deploys to Pages on a published release; RCs are skipped. `.readthedocs.yaml`
90
+ is removed and homepage/User Guide links point at the Pages URL.
91
+ - **Canon + docs: partial documents are first-class citizens** (#670). The
92
+ docs and binding READMEs no longer claim Must Fill fields must be supplied
93
+ before shipping. The only hard render gate is well-formedness (values
94
+ coerce, no surviving `<must-fill>` sentinel); completeness is a hint
95
+ surfaced by the form view. The `format-designer/` docs tree is renamed to
96
+ `quills/`.
97
+ - A Migration section overview page was added and wired into the nav (#674).
98
+
99
+ ### Internal
100
+
101
+ - Example/default validation is consolidated behind a single
102
+ `validate_schema_literal` conformance core shared by `quillmark-core`
103
+ config loading and the CLI `validate` command, with author-friendly
104
+ diagnostics preserved (#680).
105
+ - Array and markdown handling collapse into recursive passes over the
106
+ schema in both schema-shape validation and the Typst markdown transform
107
+ (#673).
108
+ - Doc/comment fixes from the array-items review (#675).
109
+
110
+
3
111
  ## v0.86.0 - 2026-05-31
4
112
 
5
113
  Documents now render even when incomplete, the canonical card-yaml fence
package/README.md CHANGED
@@ -249,10 +249,11 @@ canvas.style.height = `${result.layoutHeight}px`;
249
249
  A field's *cell* is inferred from whether its schema declares a `default:`:
250
250
 
251
251
  - **Must Fill** (no `default:`) — `quill.blueprint` renders `<must-fill>`
252
- in the value cell, and `quill.render(doc)` throws with
253
- `validation::must_fill_absent` when the field is absent at
254
- validate time, or `validation::must_fill_sentinel` when the
255
- `<must-fill>` sentinel survives into the document.
252
+ in the value cell. An absent Must Fill field is a non-fatal signal
253
+ (`validation::must_fill_absent`) the render path zero-fills it
254
+ silently. A surviving `<must-fill>` sentinel is fatal
255
+ (`validation::must_fill_sentinel`). Partial documents are
256
+ first-class; `quill.render(doc)` only throws for malformed input.
256
257
  - **Endorsed** (with `default:`) — `quill.blueprint` renders the
257
258
  default value followed by a `; delete-ok` annotation, and the default
258
259
  is used when the document omits the field.
package/bundler/wasm.d.ts CHANGED
@@ -117,7 +117,7 @@ export interface QuillCardBody {
117
117
  * field). There is no separate `required` axis.
118
118
  */
119
119
  export interface QuillFieldSchema {
120
- type: "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "markdown";
120
+ type: "string" | "number" | "integer" | "boolean" | "array" | "object" | "datetime" | "markdown";
121
121
  description?: string;
122
122
  default?: unknown;
123
123
  example?: unknown;
@@ -316,6 +316,14 @@ 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;
320
328
  /**
321
329
  * Remove a field on the card at `index`. Returns the removed value or
@@ -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}
Binary file
@@ -20,6 +20,7 @@ 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;
24
25
  export const document_removeCardField: (a: number, b: number, c: number, d: number, e: number) => void;
25
26
  export const document_removeField: (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.86.0",
3
+ "version": "0.87.1",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",