@quillmark/wasm 0.82.0 → 0.83.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 CHANGED
@@ -263,7 +263,7 @@ compilation failures. The same shape applies to every throw site:
263
263
  - `Document.fromMarkdown` — parse errors (missing root `$quill` metadata, YAML
264
264
  errors, `parse::input_too_large` for inputs > 10 MB).
265
265
  - `Document` mutators (`setField`, `updateCardField`, etc.) — `EditError`
266
- variants (`ReservedName`, `InvalidFieldName`, `InvalidKindName`,
266
+ variants (`InvalidFieldName`, `InvalidKindName`, `ReservedKind`,
267
267
  `IndexOutOfRange`) appear in `diagnostics[0].message` with the
268
268
  `[EditError::<Variant>]` prefix.
269
269
  - `quill.render` / `session.render` — backend compilation failures and
package/bundler/wasm.d.ts CHANGED
@@ -130,8 +130,9 @@ export interface QuillCardSchema {
130
130
  /**
131
131
  * Document schema returned by `Quill.schema`. Includes optional `ui` keys.
132
132
  *
133
- * `main.fields.QUILL` and `card_kinds[name].fields.CARD` are required
134
- * reserved fields with `const` values telling consumers what to write.
133
+ * Describes only the user-fillable fields. The quill reference
134
+ * (constructed as `${metadata.name}@${metadata.version}`) and card-kind
135
+ * discriminators are document-level metadata, not schema fields.
135
136
  */
136
137
  export interface QuillSchema {
137
138
  main: QuillCardSchema;
@@ -202,6 +203,7 @@ export interface Artifact {
202
203
  export interface Card {
203
204
  kind: string;
204
205
  payloadItems: PayloadItem[];
206
+ ext?: Record<string, unknown> | undefined;
205
207
  body: string;
206
208
  }
207
209
 
@@ -294,8 +296,7 @@ export class Document {
294
296
  removeCardField(index: number, name: string): any;
295
297
  /**
296
298
  * Remove a payload field on the main card, returning the removed value or
297
- * `undefined`. Throws if `name` is reserved or does not match
298
- * `[a-z_][a-z0-9_]*`.
299
+ * `undefined`. Throws if `name` does not match `[a-z_][a-z0-9_]*`.
299
300
  */
300
301
  removeField(name: string): any;
301
302
  replaceBody(body: string): void;
@@ -315,8 +316,7 @@ export class Document {
315
316
  /**
316
317
  * Update a payload field on the main card. Clears any existing `!fill` marker.
317
318
  *
318
- * Throws if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`) or does
319
- * not match `[a-z_][a-z0-9_]*`.
319
+ * Throws if `name` does not match `[a-z_][a-z0-9_]*`.
320
320
  */
321
321
  setField(name: string, value: any): void;
322
322
  /**
@@ -239,8 +239,7 @@ export class Document {
239
239
  }
240
240
  /**
241
241
  * Remove a payload field on the main card, returning the removed value or
242
- * `undefined`. Throws if `name` is reserved or does not match
243
- * `[a-z_][a-z0-9_]*`.
242
+ * `undefined`. Throws if `name` does not match `[a-z_][a-z0-9_]*`.
244
243
  * @param {string} name
245
244
  * @returns {any}
246
245
  */
@@ -320,8 +319,7 @@ export class Document {
320
319
  /**
321
320
  * Update a payload field on the main card. Clears any existing `!fill` marker.
322
321
  *
323
- * Throws if `name` is reserved (`BODY`, `CARDS`, `QUILL`, `CARD`) or does
324
- * not match `[a-z_][a-z0-9_]*`.
322
+ * Throws if `name` does not match `[a-z_][a-z0-9_]*`.
325
323
  * @param {string} name
326
324
  * @param {any} value
327
325
  */
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.82.0",
3
+ "version": "0.83.0",
4
4
  "description": "WebAssembly bindings for quillmark",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",