@quillmark/quiver 0.10.0 → 0.12.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/PROGRAM.md +1 -1
- package/README.md +6 -4
- package/dist/bin/quiver.js +2 -2
- package/dist/engine-types.d.ts +14 -2
- package/dist/engine-types.js +1 -1
- package/dist/preview.d.ts +9 -7
- package/dist/preview.js +10 -8
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +4 -4
- package/package.json +3 -3
package/PROGRAM.md
CHANGED
|
@@ -465,7 +465,7 @@ const result = quill.render(doc, { format: "pdf" });
|
|
|
465
465
|
test runners wire their own loops against the main API.
|
|
466
466
|
|
|
467
467
|
**Dependencies:**
|
|
468
|
-
- Peer: `@quillmark/wasm@>=0.
|
|
468
|
+
- Peer: `@quillmark/wasm@>=0.86.0` with `Quillmark`, `Document.fromMarkdown`, `engine.quill(tree)`, `quill.render(doc, opts?)`, and `quill.example` (renderable sample document) APIs.
|
|
469
469
|
- Runtime: `fflate ^0.8.2` for zip read/write (Node + browser)
|
|
470
470
|
- Dev-only: `node:crypto` (MD5 hashing in `build()` — never reached at runtime)
|
|
471
471
|
- No test-runner peer dependency; `/testing` uses `node:test` (built-in)
|
package/README.md
CHANGED
|
@@ -45,8 +45,8 @@ my-quiver/
|
|
|
45
45
|
|
|
46
46
|
Recommended CI: use the bundled `@quillmark/quiver/testing` harness — it
|
|
47
47
|
loads with `Quiver.fromDir`, compiles every quill, and renders each quill's
|
|
48
|
-
|
|
49
|
-
build. The harness uses `node:test` (built into Node 18+); no extra
|
|
48
|
+
example document so validation errors surface on publish, not on the
|
|
49
|
+
consumer's build. The harness uses `node:test` (built into Node 18+); no extra
|
|
50
50
|
test-runner dependency required. If you prefer vitest/jest/mocha, write a
|
|
51
51
|
12-line loop against the main API instead.
|
|
52
52
|
|
|
@@ -68,8 +68,10 @@ await renderQuiverSamples(import.meta.url, {
|
|
|
68
68
|
// → writes ./preview/<name>@<version>.<fmt> + index.html
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
-
It renders every quill's
|
|
72
|
-
|
|
71
|
+
It renders every quill's illustrative example document (`quill.example` — a
|
|
72
|
+
fully filled-out, always-renderable sample; the blueprint itself carries
|
|
73
|
+
`<must-fill>` sentinels and is not directly renderable), writes the artifacts
|
|
74
|
+
to `outDir` (default `preview/`), and emits an `index.html`
|
|
73
75
|
gallery. A `.gitignore` is written into `outDir` so the generated artifacts
|
|
74
76
|
are never accidentally committed. A quill that throws is recorded as failed —
|
|
75
77
|
with every diagnostic, not just the first — without aborting the run, so one
|
package/dist/bin/quiver.js
CHANGED
|
@@ -95,10 +95,10 @@ async function test() {
|
|
|
95
95
|
const ref = `${name}@${version}`;
|
|
96
96
|
try {
|
|
97
97
|
const quill = await quiver.getQuill(ref, { engine });
|
|
98
|
-
const doc = Document.fromMarkdown(quill.
|
|
98
|
+
const doc = Document.fromMarkdown(quill.example);
|
|
99
99
|
const result = quill.render(doc);
|
|
100
100
|
if (!Array.isArray(result.artifacts) || result.artifacts.length === 0) {
|
|
101
|
-
throw new Error("
|
|
101
|
+
throw new Error("example render produced no artifacts");
|
|
102
102
|
}
|
|
103
103
|
console.log(`pass ${ref}`);
|
|
104
104
|
pass++;
|
package/dist/engine-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Minimal structural types matching @quillmark/wasm >=0.
|
|
2
|
+
* Minimal structural types matching @quillmark/wasm >=0.86.0.
|
|
3
3
|
*
|
|
4
4
|
* Shape:
|
|
5
5
|
* class Quillmark { quill(tree: Map<string, Uint8Array>): Quill }
|
|
@@ -23,6 +23,18 @@ export interface QuillmarkLike {
|
|
|
23
23
|
export interface QuillLike {
|
|
24
24
|
render(doc: unknown, opts?: unknown): unknown;
|
|
25
25
|
open?: (doc: unknown) => unknown;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Auto-generated annotated Markdown blueprint for LLM/authoring consumers.
|
|
28
|
+
* Carries `<must-fill>` sentinels for Must Fill fields, so it is *not*
|
|
29
|
+
* directly renderable — render `example` instead.
|
|
30
|
+
*/
|
|
27
31
|
blueprint: string;
|
|
32
|
+
/**
|
|
33
|
+
* The illustrative "filled-out" reference document — always renderable.
|
|
34
|
+
* Each field resolves to its `example:`, else its `default:`, else a
|
|
35
|
+
* type-empty zero value, with no `<must-fill>` sentinels. Introduced in
|
|
36
|
+
* @quillmark/wasm >=0.86.0. Used by Quiver's preview/testing helpers to
|
|
37
|
+
* render a sample artifact for each quill.
|
|
38
|
+
*/
|
|
39
|
+
example: string;
|
|
28
40
|
}
|
package/dist/engine-types.js
CHANGED
package/dist/preview.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `runQuiverTests` (`@quillmark/quiver/testing`) proves every quill *compiles*
|
|
5
5
|
* — it never produces a rendered artifact a human can look at. This module
|
|
6
|
-
* closes that gap: it renders each quill's
|
|
7
|
-
* a directory, and emits an `index.html` gallery so an author can
|
|
8
|
-
* output before publishing.
|
|
6
|
+
* closes that gap: it renders each quill's example document, writes the
|
|
7
|
+
* artifacts to a directory, and emits an `index.html` gallery so an author can
|
|
8
|
+
* eyeball real output before publishing.
|
|
9
9
|
*
|
|
10
10
|
* Node-only: writes files and loads a source quiver from disk.
|
|
11
11
|
*
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
* });
|
|
21
21
|
* // → open ./preview/index.html
|
|
22
22
|
*
|
|
23
|
-
* The sample document is the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* The sample document is the illustrative example (`quill.example`) for each
|
|
24
|
+
* quill version — a fully filled-out, always-renderable document (the
|
|
25
|
+
* blueprint itself carries `<must-fill>` sentinels and is not renderable).
|
|
26
|
+
* Every quill always has an example, so no quills are skipped for lack of a
|
|
27
|
+
* sample document.
|
|
26
28
|
*
|
|
27
29
|
* A `.gitignore` is written into `outDir` so the generated artifacts are not
|
|
28
30
|
* accidentally committed.
|
|
@@ -74,7 +76,7 @@ export interface RenderedSample {
|
|
|
74
76
|
reasons: string[];
|
|
75
77
|
}
|
|
76
78
|
/**
|
|
77
|
-
* Renders every quill's
|
|
79
|
+
* Renders every quill's example document and writes the artifacts plus an
|
|
78
80
|
* `index.html` gallery to `outDir`.
|
|
79
81
|
*
|
|
80
82
|
* Does NOT fail fast: a quill that throws is recorded as `failed` and the
|
package/dist/preview.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `runQuiverTests` (`@quillmark/quiver/testing`) proves every quill *compiles*
|
|
5
5
|
* — it never produces a rendered artifact a human can look at. This module
|
|
6
|
-
* closes that gap: it renders each quill's
|
|
7
|
-
* a directory, and emits an `index.html` gallery so an author can
|
|
8
|
-
* output before publishing.
|
|
6
|
+
* closes that gap: it renders each quill's example document, writes the
|
|
7
|
+
* artifacts to a directory, and emits an `index.html` gallery so an author can
|
|
8
|
+
* eyeball real output before publishing.
|
|
9
9
|
*
|
|
10
10
|
* Node-only: writes files and loads a source quiver from disk.
|
|
11
11
|
*
|
|
@@ -20,9 +20,11 @@
|
|
|
20
20
|
* });
|
|
21
21
|
* // → open ./preview/index.html
|
|
22
22
|
*
|
|
23
|
-
* The sample document is the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* The sample document is the illustrative example (`quill.example`) for each
|
|
24
|
+
* quill version — a fully filled-out, always-renderable document (the
|
|
25
|
+
* blueprint itself carries `<must-fill>` sentinels and is not renderable).
|
|
26
|
+
* Every quill always has an example, so no quills are skipped for lack of a
|
|
27
|
+
* sample document.
|
|
26
28
|
*
|
|
27
29
|
* A `.gitignore` is written into `outDir` so the generated artifacts are not
|
|
28
30
|
* accidentally committed.
|
|
@@ -33,7 +35,7 @@ import { Quiver } from "./node.js";
|
|
|
33
35
|
/** Default directory rendered artifacts are written to. */
|
|
34
36
|
const DEFAULT_OUT_DIR = "preview";
|
|
35
37
|
/**
|
|
36
|
-
* Renders every quill's
|
|
38
|
+
* Renders every quill's example document and writes the artifacts plus an
|
|
37
39
|
* `index.html` gallery to `outDir`.
|
|
38
40
|
*
|
|
39
41
|
* Does NOT fail fast: a quill that throws is recorded as `failed` and the
|
|
@@ -87,7 +89,7 @@ async function renderOne(quiver, name, version, outDir, opts) {
|
|
|
87
89
|
let result;
|
|
88
90
|
try {
|
|
89
91
|
const quill = await quiver.getQuill(ref, { engine: opts.engine });
|
|
90
|
-
const markdown = quill.
|
|
92
|
+
const markdown = quill.example;
|
|
91
93
|
const doc = opts.Document.fromMarkdown(markdown);
|
|
92
94
|
result = quill.render(doc, opts.format ? { format: opts.format } : undefined);
|
|
93
95
|
}
|
package/dist/testing.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ import type { DocumentFactoryLike } from "./preview.js";
|
|
|
25
25
|
*
|
|
26
26
|
* Validation covers the full loading pipeline: Quiver.yaml, Quill.yaml,
|
|
27
27
|
* all template files, engine compilation via engine.quill(tree), and a
|
|
28
|
-
* full render of each quill's
|
|
28
|
+
* full render of each quill's example document.
|
|
29
29
|
*/
|
|
30
30
|
export declare function runQuiverTests(metaUrlOrDir: string, engine: QuillmarkLike, Document: DocumentFactoryLike): void;
|
package/dist/testing.js
CHANGED
|
@@ -28,7 +28,7 @@ import { Quiver } from "./node.js";
|
|
|
28
28
|
*
|
|
29
29
|
* Validation covers the full loading pipeline: Quiver.yaml, Quill.yaml,
|
|
30
30
|
* all template files, engine compilation via engine.quill(tree), and a
|
|
31
|
-
* full render of each quill's
|
|
31
|
+
* full render of each quill's example document.
|
|
32
32
|
*/
|
|
33
33
|
export function runQuiverTests(metaUrlOrDir, engine, Document) {
|
|
34
34
|
describe("Quiver", () => {
|
|
@@ -41,15 +41,15 @@ export function runQuiverTests(metaUrlOrDir, engine, Document) {
|
|
|
41
41
|
throw new Error("Quiver has no quills");
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
|
-
it("compiles and renders every quill's
|
|
44
|
+
it("compiles and renders every quill's example without error", async () => {
|
|
45
45
|
for (const name of quiver.quillNames()) {
|
|
46
46
|
for (const version of quiver.versionsOf(name)) {
|
|
47
47
|
const ref = `${name}@${version}`;
|
|
48
48
|
const quill = await quiver.getQuill(ref, { engine });
|
|
49
|
-
const doc = Document.fromMarkdown(quill.
|
|
49
|
+
const doc = Document.fromMarkdown(quill.example);
|
|
50
50
|
const result = quill.render(doc);
|
|
51
51
|
if (!Array.isArray(result.artifacts) || result.artifacts.length === 0) {
|
|
52
|
-
throw new Error(`${ref}:
|
|
52
|
+
throw new Error(`${ref}: example render produced no artifacts`);
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quillmark/quiver",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Quiver registry and build tooling for Quillmark",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
"README.md"
|
|
52
52
|
],
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@quillmark/wasm": ">=0.
|
|
54
|
+
"@quillmark/wasm": ">=0.86.0"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
57
|
"fflate": "^0.8.2",
|
|
58
58
|
"yaml": "^2.8.3"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@quillmark/wasm": "^0.
|
|
61
|
+
"@quillmark/wasm": "^0.86.0",
|
|
62
62
|
"@types/node": "^25.3.3",
|
|
63
63
|
"typescript": "^5.9.3",
|
|
64
64
|
"vitest": "^4.0.18"
|