@quillmark/wasm 0.85.0 → 0.86.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 ADDED
@@ -0,0 +1,73 @@
1
+ # Changelog
2
+
3
+ ## v0.86.0 - 2026-05-31
4
+
5
+ Documents now render even when incomplete, the canonical card-yaml fence
6
+ becomes a bare `~~~`, and the way placeholder/illustrative values are
7
+ produced is reworked. This release also fixes two markdown→Typst
8
+ conversion bugs and stamps a PDF `/Producer` field.
9
+
10
+ ### Breaking changes
11
+
12
+ - **Bare `~~~` is now the canonical card-yaml fence** (was `~~~card-yaml`)
13
+ (#662). Existing `~~~card-yaml` documents still parse, but `to_markdown`
14
+ re-emits the bare `~~~` form, so a document's canonical bytes change on
15
+ its first re-emit (relevant if you content-hash or byte-compare emitted
16
+ markdown, or store blueprint goldens). A side effect: a column-zero
17
+ `~~~` fence in a prose body is now read as a card-yaml block — use a
18
+ backtick fence or a non-`card-yaml` info string (e.g. `~~~rust`) for a
19
+ literal code block. Full details and corpus-migration steps:
20
+ `docs/migrations/0.85-to-0.86.md`.
21
+ - **`fill_blueprint()` removed** from `quillmark_core` and `quillmark`,
22
+ along with its re-exports (#657, #665). Callers no longer post-process a
23
+ blueprint string: fillable/illustrative documents come from
24
+ `QuillConfig::example()`, and the render path fills placeholders itself
25
+ (see below).
26
+
27
+ ### Behavioral changes
28
+
29
+ - **Incomplete documents render instead of erroring** (#665). An absent
30
+ Must Fill field is no longer a render error. On the render path each
31
+ schema field resolves to its authored value, else its `default:`, else a
32
+ type-empty zero value — applied to the plate projection only, never
33
+ persisted to the document. Only malformed input stays fatal: a surviving
34
+ `<must-fill>` sentinel, or a value that won't coerce/validate.
35
+ `quill.form(doc)` still reports completeness independently of the render
36
+ gate.
37
+ - **`default` vs `example` clarified** (#665, #663, #658). `default` is the
38
+ value most authors want and is interpolated when a field is omitted (an
39
+ authored value always wins); `example` documents a field's shape only and
40
+ never renders into output. Preview and illustrative fills now draw from a
41
+ field's `example:` when present, falling back to the leanest type-valid
42
+ value (`""`, `0`, `false`, `[]`, `{}`, first enum variant, empty body).
43
+
44
+ ### Markdown → Typst fixes (#661)
45
+
46
+ - Code is now emitted as `#raw(...)` with a string literal instead of a
47
+ backtick fence. This fixes fenced or inline code whose content contained
48
+ a run of three-or-more backticks, which previously closed the block early
49
+ and rendered as markup.
50
+ - Ordered-list start numbers are preserved — a list written `3.` / `4.` now
51
+ renders starting at 3 instead of restarting at 1.
52
+
53
+ ### New API
54
+
55
+ - `QuillConfig::example()`, plus `example` getters on the Python and WASM
56
+ bindings (#665).
57
+ - `quillmark_core::zero_value` — the single source of truth for a field's
58
+ type-minimal value, shared by blueprint emission and the render path
59
+ (#665).
60
+ - `RenderOptions.producer` on the core, WASM, and Python render APIs (#656)
61
+ — overrides the PDF `/Info` `/Producer` string, which now defaults to
62
+ `Quillmark <version>` on every Typst-rendered PDF.
63
+
64
+ ### Other fixes
65
+
66
+ - PDF rendering folds the `/Producer` stamp and the signature-field
67
+ AcroForm injection into a single incremental-update pass, preserving
68
+ Typst's `/Creator` (#656).
69
+ - `usaf_memo`: the signature widget is now overlaid at the 4.5in signature
70
+ block (AFH 33-337) instead of the 1in left margin, and no longer consumes
71
+ layout flow that could push the block out of position (#660); empty
72
+ signature fields no longer carry the `APPEND_ONLY` flag (#654).
73
+
package/README.md CHANGED
@@ -34,7 +34,7 @@ import { Document, Quillmark } from "@quillmark-test/wasm";
34
34
  const engine = new Quillmark();
35
35
  const quill = engine.quill(tree);
36
36
 
37
- const markdown = `~~~card-yaml
37
+ const markdown = `~~~
38
38
  $quill: my_quill
39
39
  $kind: main
40
40
  title: My Document
@@ -316,12 +316,19 @@ try {
316
316
 
317
317
  ## Notes
318
318
 
319
- - Parsed markdown requires a root `~~~card-yaml` block with a
320
- `$quill` system-metadata line. Empty input surfaces a dedicated
319
+ - Parsed markdown requires a root `~~~` block (a bare three-tilde fence;
320
+ the legacy `~~~card-yaml` opener is still accepted but non-canonical)
321
+ with a `$quill` system-metadata line. Empty input surfaces a dedicated
321
322
  "Empty markdown input cannot be parsed" message.
322
323
  - QUILL mismatch during `quill.render(parsed)` is a warning (`quill::ref_mismatch`), not an error.
323
324
  - Output schema APIs are no longer engine-level in WASM.
324
325
 
326
+ ## Changelog
327
+
328
+ See the [changelog](https://github.com/quillmark-org/quillmark/blob/main/CHANGELOG.md)
329
+ and the [GitHub Releases](https://github.com/quillmark-org/quillmark/releases) page for
330
+ release notes and version history.
331
+
325
332
  ## License
326
333
 
327
334
  Apache-2.0
package/bundler/wasm.d.ts CHANGED
@@ -113,7 +113,8 @@ export interface QuillCardBody {
113
113
  * without a `default` is **Must Fill** (the blueprint carries a
114
114
  * `<must-fill>` sentinel and validation reports
115
115
  * `validation::must_fill_absent` if the field is absent at validate
116
- * time). There is no separate `required` axis.
116
+ * time a non-fatal signal, since the render path zero-fills an absent
117
+ * field). There is no separate `required` axis.
117
118
  */
118
119
  export interface QuillFieldSchema {
119
120
  type: "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "markdown";
@@ -234,6 +235,7 @@ export interface RenderOptions {
234
235
  format?: OutputFormat;
235
236
  ppi?: number;
236
237
  pages?: number[];
238
+ producer?: string;
237
239
  }
238
240
 
239
241
  export interface RenderResult {
@@ -427,6 +429,13 @@ export class Quill {
427
429
  */
428
430
  readonly backendId: string;
429
431
  readonly blueprint: string;
432
+ /**
433
+ * The `example` reference document — the illustrative "show me a
434
+ * filled-out one." Each field renders its `example:`, else its
435
+ * `default:`, else the type-empty zero value, with no `<must-fill>`
436
+ * sentinels. See `prose/canon/BLUEPRINT.md`.
437
+ */
438
+ readonly example: string;
430
439
  /**
431
440
  * Identity snapshot of the `quill:` section of `Quill.yaml`, plus
432
441
  * `supportedFormats` and any extra `quill:` keys.
@@ -664,6 +664,29 @@ export class Quill {
664
664
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
665
665
  }
666
666
  }
667
+ /**
668
+ * The `example` reference document — the illustrative "show me a
669
+ * filled-out one." Each field renders its `example:`, else its
670
+ * `default:`, else the type-empty zero value, with no `<must-fill>`
671
+ * sentinels. See `prose/canon/BLUEPRINT.md`.
672
+ * @returns {string}
673
+ */
674
+ get example() {
675
+ let deferred1_0;
676
+ let deferred1_1;
677
+ try {
678
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
679
+ wasm.quill_example(retptr, this.__wbg_ptr);
680
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
681
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
682
+ deferred1_0 = r0;
683
+ deferred1_1 = r1;
684
+ return getStringFromWasm0(r0, r1);
685
+ } finally {
686
+ wasm.__wbindgen_add_to_stack_pointer(16);
687
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
688
+ }
689
+ }
667
690
  /**
668
691
  * The schema-aware form view of `doc`. Read-only snapshot at call time;
669
692
  * subsequent edits to `doc` require calling `form` again.
Binary file
@@ -40,6 +40,7 @@ export const quill_backendId: (a: number, b: number) => void;
40
40
  export const quill_blankCard: (a: number, b: number, c: number, d: number) => void;
41
41
  export const quill_blankMain: (a: number, b: number) => void;
42
42
  export const quill_blueprint: (a: number, b: number) => void;
43
+ export const quill_example: (a: number, b: number) => void;
43
44
  export const quill_form: (a: number, b: number, c: number) => void;
44
45
  export const quill_metadata: (a: number) => number;
45
46
  export const quill_open: (a: number, b: number, c: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.85.0",
3
+ "version": "0.86.0",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",
@@ -16,7 +16,8 @@
16
16
  "bundler/wasm_bg.js",
17
17
  "bundler/wasm_bg.wasm.d.ts",
18
18
  "bundler/wasm.js",
19
- "bundler/wasm.d.ts"
19
+ "bundler/wasm.d.ts",
20
+ "CHANGELOG.md"
20
21
  ],
21
22
  "main": "./bundler/wasm.js",
22
23
  "module": "./bundler/wasm.js",