@quillmark/wasm 0.81.0 → 0.82.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/README.md +13 -11
- package/bundler/wasm.d.ts +81 -378
- package/bundler/wasm_bg.js +76 -349
- package/bundler/wasm_bg.wasm +0 -0
- package/bundler/wasm_bg.wasm.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,10 +34,11 @@ 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 =
|
|
38
|
-
|
|
37
|
+
const markdown = `~~~card-yaml
|
|
38
|
+
$quill: my_quill
|
|
39
|
+
$kind: main
|
|
39
40
|
title: My Document
|
|
40
|
-
|
|
41
|
+
~~~
|
|
41
42
|
|
|
42
43
|
# Hello`;
|
|
43
44
|
|
|
@@ -55,9 +56,9 @@ Build + validate + attach backend. Returns a render-ready `Quill`.
|
|
|
55
56
|
|
|
56
57
|
### `Document.fromMarkdown(markdown)`
|
|
57
58
|
Parse markdown to a parsed document. Throws a JS `Error` (with `.diagnostics`
|
|
58
|
-
attached, see [Errors](#errors)) on any parse failure, including missing
|
|
59
|
-
`
|
|
60
|
-
limit.
|
|
59
|
+
attached, see [Errors](#errors)) on any parse failure, including a missing
|
|
60
|
+
root `$quill` metadata line, malformed YAML, and inputs over the 10 MB
|
|
61
|
+
`parse::input_too_large` limit.
|
|
61
62
|
|
|
62
63
|
### `doc.toMarkdown()`
|
|
63
64
|
Emit canonical Quillmark Markdown. Type-fidelity round-trip safe:
|
|
@@ -259,10 +260,10 @@ backend compilation errors. `message` is derived from `diagnostics`
|
|
|
259
260
|
Read `err.diagnostics[0]` for the primary diagnostic; iterate the array for
|
|
260
261
|
compilation failures. The same shape applies to every throw site:
|
|
261
262
|
|
|
262
|
-
- `Document.fromMarkdown` — parse errors (missing `
|
|
263
|
-
`parse::input_too_large` for inputs > 10 MB).
|
|
263
|
+
- `Document.fromMarkdown` — parse errors (missing root `$quill` metadata, YAML
|
|
264
|
+
errors, `parse::input_too_large` for inputs > 10 MB).
|
|
264
265
|
- `Document` mutators (`setField`, `updateCardField`, etc.) — `EditError`
|
|
265
|
-
variants (`ReservedName`, `InvalidFieldName`, `
|
|
266
|
+
variants (`ReservedName`, `InvalidFieldName`, `InvalidKindName`,
|
|
266
267
|
`IndexOutOfRange`) appear in `diagnostics[0].message` with the
|
|
267
268
|
`[EditError::<Variant>]` prefix.
|
|
268
269
|
- `quill.render` / `session.render` — backend compilation failures and
|
|
@@ -297,8 +298,9 @@ try {
|
|
|
297
298
|
|
|
298
299
|
## Notes
|
|
299
300
|
|
|
300
|
-
- Parsed markdown requires
|
|
301
|
-
|
|
301
|
+
- Parsed markdown requires a root `~~~card-yaml` block with a
|
|
302
|
+
`$quill` system-metadata line. Empty input surfaces a dedicated
|
|
303
|
+
"Empty markdown input cannot be parsed" message.
|
|
302
304
|
- QUILL mismatch during `quill.render(parsed)` is a warning (`quill::ref_mismatch`), not an error.
|
|
303
305
|
- Output schema APIs are no longer engine-level in WASM.
|
|
304
306
|
|