@quillmark/wasm 0.99.0 → 0.101.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.
@@ -169,7 +169,48 @@ export class Document {
169
169
  }
170
170
  }
171
171
  /**
172
- * Revise the richtext field at `addr` from markdown, typed *and*
172
+ * Interpreted **corpus** read at `addr`: the stable ABI under the runtime
173
+ * `reader.getContent` / `reader.card(i).getContent`. The corpus twin of
174
+ * [`reader.get`](Self::reader_get), which projects; this decodes the stored
175
+ * value through the codec the field's declared type names (`richtext` as
176
+ * markdown, `plaintext` as literal text) and returns the canonical `Content`.
177
+ *
178
+ * Total over the storage form: a committed field holds a content object and
179
+ * a parsed one holds the authored string, and both read back as a corpus
180
+ * here, so a consumer mounting a corpus editor stops branching on how the
181
+ * document was built.
182
+ *
183
+ * A bare string is `Addr` shorthand for `{ field }`; `{ card, field }`
184
+ * targets a composable card. Returns `undefined` for an **absent** field. An
185
+ * absent `addr.field` reads the **body** corpus, quill-free, mirroring
186
+ * [`getStored`](Self::get_stored). Throws `edit::unknown_field` for a name
187
+ * the schema does not declare, `edit::field_not_content` for a declared type
188
+ * that is not a content leaf (`array<richtext>` carries content and still has
189
+ * no one corpus), `edit::field_richtext_decode` for a stored value
190
+ * that decodes under neither encoding, and `edit::index_out_of_range` for a
191
+ * bad `addr.card`.
192
+ * @param {Quill} quill
193
+ * @param {Addr | string} addr
194
+ * @returns {Content | undefined}
195
+ */
196
+ _readerGetContent(quill, addr) {
197
+ try {
198
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
199
+ _assertClass(quill, Quill);
200
+ wasm.document__readerGetContent(retptr, this.__wbg_ptr, quill.__wbg_ptr, addHeapObject(addr));
201
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
202
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
203
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
204
+ if (r2) {
205
+ throw takeObject(r1);
206
+ }
207
+ return takeObject(r0);
208
+ } finally {
209
+ wasm.__wbindgen_add_to_stack_pointer(16);
210
+ }
211
+ }
212
+ /**
213
+ * Revise the content field at `addr` from authored text, typed *and*
173
214
  * anchor-preserving: the ABI under `writer.reviseField`. Resolves the
174
215
  * field's schema from `quill` (main card, or the addressed card's `$kind`)
175
216
  * and defers to [`TypedWriter::revise_field`](quillmark_core::TypedWriter::revise_field):
@@ -178,6 +219,9 @@ export class Document {
178
219
  * multi-block result with `edit::field_richtext_not_inline`. Returns the
179
220
  * text `Delta`.
180
221
  *
222
+ * The codec is the declared type's: `richtext` diffs markdown, `plaintext`
223
+ * the literal text.
224
+ *
181
225
  * `addr` must name a field (a bare string is `{ field }`); a body address
182
226
  * throws (a body carries no field schema: use [`revise`](Self::revise)). A
183
227
  * name the schema does not declare throws `edit::unknown_field`. Throws
@@ -185,14 +229,14 @@ export class Document {
185
229
  * `writer.reviseField` in the runtime layer.
186
230
  * @param {Quill} quill
187
231
  * @param {Addr | string} addr
188
- * @param {string} markdown
232
+ * @param {string} text
189
233
  * @returns {Delta}
190
234
  */
191
- _reviseField(quill, addr, markdown) {
235
+ _reviseField(quill, addr, text) {
192
236
  try {
193
237
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
194
238
  _assertClass(quill, Quill);
195
- const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export, wasm.__wbindgen_export2);
239
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
196
240
  const len0 = WASM_VECTOR_LEN;
197
241
  wasm.document__reviseField(retptr, this.__wbg_ptr, quill.__wbg_ptr, addHeapObject(addr), ptr0, len0);
198
242
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -207,11 +251,16 @@ export class Document {
207
251
  }
208
252
  }
209
253
  /**
210
- * **Apply** a committed content edit `bundle` (`{ delta?, lineOps?, markOps? }`)
211
- * at `addr`, the editor splice: text delta first, then line ops, then mark
212
- * ops (mark ranges in final-text coordinates), each all-or-nothing. An absent
254
+ * **Apply** a committed content edit `bundle`
255
+ * (`{ delta?, islandOps?, lineOps?, markOps? }`) at `addr`, the editor
256
+ * splice: text delta first, then island ops, then line ops, then mark ops
257
+ * (mark ranges in final-text coordinates), each all-or-nothing. An absent
213
258
  * `addr.field` targets the body, an absent `addr.card` the main card.
214
259
  *
260
+ * The island channel keeps a table or image edit on the op path: it moves
261
+ * the island alone, so the anchors elsewhere in the field survive an edit
262
+ * `install` would clear.
263
+ *
215
264
  * Throws on an out-of-range card, a field that is not richtext, a malformed
216
265
  * bundle, or an op that applies out of bounds (the value is unchanged on a
217
266
  * failed apply).
@@ -289,20 +338,6 @@ export class Document {
289
338
  const ret = wasm.document_cardCount(this.__wbg_ptr);
290
339
  return ret >>> 0;
291
340
  }
292
- /**
293
- * The index of the composable card whose `$id` equals `id`, or
294
- * `undefined` when none carries it. Resolves the durable card handle
295
- * without a hand-rolled scan over [`cards`](Self::cards); `$id` is
296
- * unique per document, so at most one card matches.
297
- * @param {string} id
298
- * @returns {number | undefined}
299
- */
300
- cardIndexById(id) {
301
- const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
302
- const len0 = WASM_VECTOR_LEN;
303
- const ret = wasm.document_cardIndexById(this.__wbg_ptr, ptr0, len0);
304
- return takeObject(ret);
305
- }
306
341
  /**
307
342
  * @returns {Card[]}
308
343
  */
@@ -536,8 +571,7 @@ export class Document {
536
571
  }
537
572
  /**
538
573
  * Read the **verbatim stored value** at `addr`: the raw payload value of a
539
- * field (a content object for a richtext field, a scalar/array/object
540
- * otherwise), or the **body content** when `addr.field` is absent. A bare
574
+ * field, or the **body content** when `addr.field` is absent. A bare
541
575
  * string is `Addr` shorthand for `{ field }`. Reads are total over the field
542
576
  * axis: an absent field is `undefined`; only an out-of-range `addr.card`
543
577
  * throws `edit::index_out_of_range`. Needs no schema, so it lives on
@@ -545,6 +579,16 @@ export class Document {
545
579
  * the interpreted schema-plane [`reader.get`](Self::reader_get). For the
546
580
  * markdown projection use [`getMarkdown`](Self::get_markdown) (body) or
547
581
  * `reader.get` (a field's declared type).
582
+ *
583
+ * **A content field at rest has one stored form per codec**: a `richtext`
584
+ * field holds the canonical content object, a `plaintext` field its literal
585
+ * string. A document that came through the bound door (`quill.parse` /
586
+ * `quill.conform`) is at rest, so this read no longer depends on which lane
587
+ * built it. A document that came through the transport door
588
+ * (`Document.fromMarkdown`, a legacy stored row) may rest as authored until
589
+ * it is conformed, and this read reports what is there. For the corpus
590
+ * either way, use the schema-plane `reader.getContent`, which decodes
591
+ * through the codec the field's declared type names.
548
592
  * @param {Addr | string} addr
549
593
  * @returns {unknown}
550
594
  */
@@ -1254,6 +1298,10 @@ export class Document {
1254
1298
  return ret === 0 ? undefined : Document.__wrap(ret);
1255
1299
  }
1256
1300
  /**
1301
+ * The non-fatal diagnostics of the load that produced this document: parse
1302
+ * warnings, plus the `conform::*` warnings when it came through
1303
+ * `quill.parse`. Session state, not document value: `equals` and the
1304
+ * storage DTO exclude it, and `fromJson` / `loadJson` clear it.
1257
1305
  * @returns {Diagnostic[]}
1258
1306
  */
1259
1307
  get warnings() {
@@ -1649,6 +1697,40 @@ export class Quill {
1649
1697
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1650
1698
  }
1651
1699
  }
1700
+ /**
1701
+ * Land `doc`'s declared content fields at their canonical rest **in
1702
+ * place**, returning the `conform::*` diagnostics for the values that would
1703
+ * not commit (an empty array when everything rested).
1704
+ *
1705
+ * The read-repair verb: a document that arrived through the transport door
1706
+ * (`fromMarkdown`, `fromJson`, a stored row) converges here, and is then
1707
+ * eligible for rewrite under its current schema tag. Idempotent, and a
1708
+ * no-op on an already-canonical document: an equal value is not rewritten,
1709
+ * so YAML comments and stored bytes survive.
1710
+ *
1711
+ * A `!must_fill` marker anywhere in a field's value skips that field (the
1712
+ * marker is the state), and a value the strict write refuses stays as
1713
+ * authored with a diagnostic. Throws when `doc` declares a different
1714
+ * `$quill`, before any mutation.
1715
+ * @param {Document} doc
1716
+ * @returns {Diagnostic[]}
1717
+ */
1718
+ conform(doc) {
1719
+ try {
1720
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1721
+ _assertClass(doc, Document);
1722
+ wasm.quill_conform(retptr, this.__wbg_ptr, doc.__wbg_ptr);
1723
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1724
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1725
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1726
+ if (r2) {
1727
+ throw takeObject(r1);
1728
+ }
1729
+ return takeObject(r0);
1730
+ } finally {
1731
+ wasm.__wbindgen_add_to_stack_pointer(16);
1732
+ }
1733
+ }
1652
1734
  /**
1653
1735
  * Build a quill from a file tree. Pure: no backend, no engine; the
1654
1736
  * declared backend is resolved later, at render time.
@@ -1697,6 +1779,39 @@ export class Quill {
1697
1779
  wasm.__wbindgen_add_to_stack_pointer(16);
1698
1780
  }
1699
1781
  }
1782
+ /**
1783
+ * Parse `markdown` and conform it against this quill: the **primary
1784
+ * ingestion path**, and the bound twin of the schema-free
1785
+ * `Document.fromMarkdown`. The returned document rests at its canonical
1786
+ * form (a `richtext` field as a content object, a `plaintext` field as its
1787
+ * literal string), so `getStored` no longer answers "corpus or string?"
1788
+ * with "depends how this document was built".
1789
+ *
1790
+ * Parse warnings and the `conform::*` diagnostics both land on
1791
+ * `doc.warnings`. Throws on a parse failure, or when `markdown` declares a
1792
+ * `$quill` this quill does not answer to: nothing conforms under the wrong
1793
+ * schema. To open a document whose `$quill` is stale, use the transport
1794
+ * door (`Document.fromMarkdown`, `setQuillRef`, then `quill.conform`).
1795
+ * @param {string} markdown
1796
+ * @returns {Document}
1797
+ */
1798
+ parse(markdown) {
1799
+ try {
1800
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1801
+ const ptr0 = passStringToWasm0(markdown, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1802
+ const len0 = WASM_VECTOR_LEN;
1803
+ wasm.quill_parse(retptr, this.__wbg_ptr, ptr0, len0);
1804
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1805
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1806
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1807
+ if (r2) {
1808
+ throw takeObject(r1);
1809
+ }
1810
+ return Document.__wrap(r0);
1811
+ } finally {
1812
+ wasm.__wbindgen_add_to_stack_pointer(16);
1813
+ }
1814
+ }
1700
1815
  /**
1701
1816
  * The resolved-value view of `doc` against this quill's schema: for every
1702
1817
  * declared field the value the render projection would use and the
Binary file
@@ -9,12 +9,12 @@ export const document__addCard: (a: number, b: number, c: number, d: number, e:
9
9
  export const document__commitField: (a: number, b: number, c: number, d: number, e: number) => void;
10
10
  export const document__commitFields: (a: number, b: number, c: number, d: number, e: number) => void;
11
11
  export const document__readerGet: (a: number, b: number, c: number, d: number) => void;
12
+ export const document__readerGetContent: (a: number, b: number, c: number, d: number) => void;
12
13
  export const document__reviseField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
13
14
  export const document_applyChange: (a: number, b: number, c: number, d: number) => void;
14
15
  export const document_blueprintInstruction: (a: number, b: number, c: number) => void;
15
16
  export const document_card: (a: number, b: number, c: number) => void;
16
17
  export const document_cardCount: (a: number) => number;
17
- export const document_cardIndexById: (a: number, b: number, c: number) => number;
18
18
  export const document_cards: (a: number, b: number) => void;
19
19
  export const document_clone: (a: number) => number;
20
20
  export const document_currentSchemaVersion: (a: number) => void;
@@ -78,8 +78,10 @@ export const mapPos: (a: number, b: number, c: number, d: number) => void;
78
78
  export const parseDocPath: (a: number, b: number, c: number) => void;
79
79
  export const quill_backendId: (a: number, b: number) => void;
80
80
  export const quill_blueprint: (a: number, b: number) => void;
81
+ export const quill_conform: (a: number, b: number, c: number) => void;
81
82
  export const quill_fromTree: (a: number, b: number) => void;
82
83
  export const quill_metadata: (a: number, b: number) => void;
84
+ export const quill_parse: (a: number, b: number, c: number, d: number) => void;
83
85
  export const quill_resolve: (a: number, b: number, c: number) => void;
84
86
  export const quill_schema: (a: number, b: number) => void;
85
87
  export const quill_seedCard: (a: number, b: number, c: number, d: number, e: number) => void;
@@ -32,14 +32,13 @@ export type PayloadItem =
32
32
  *
33
33
  * `$` system entries are hoisted to named fields: `kind` (the `$kind`, empty
34
34
  * string when none), optional `quill` (the `$quill` `name@version`, main card
35
- * only), optional `id` (`$id`), optional `ext` (`$ext`), and optional `seed`
35
+ * only), optional `ext` (`$ext`), and optional `seed`
36
36
  * (the `$seed` per-kind overlay map, main card only). `payloadItems` carries
37
37
  * user fields and comments in order.
38
38
  */
39
39
  export interface Card {
40
40
  kind: string;
41
41
  quill?: string;
42
- id?: string;
43
42
  ext?: Record<string, unknown>;
44
43
  seed?: Record<string, unknown>;
45
44
  payloadItems: PayloadItem[];
@@ -63,7 +62,6 @@ export interface Card {
63
62
  export interface CardInput {
64
63
  kind: string;
65
64
  quill?: string;
66
- id?: string;
67
65
  ext?: Record<string, unknown>;
68
66
  seed?: Record<string, unknown>;
69
67
  payloadItems?: PayloadItem[];
@@ -242,13 +240,42 @@ export type LineOp =
242
240
  | { op: "setContainers"; line: number; containers: ContentContainer[] }
243
241
  | { op: "setContinues"; line: number; continues: boolean };
244
242
 
243
+ /**
244
+ * An island edit: the only channel that reaches an island's payload, a table's
245
+ * cells or an image's url.
246
+ *
247
+ * Both ops move one island entry and leave the field's text and marks alone, so
248
+ * an island edit keeps every identity anchor in the field. That is why a table
249
+ * edit lowers to `applyChange` rather than `install`, which drops them all.
250
+ *
251
+ * `set` addresses an existing island by `id`; an `id` no island carries throws
252
+ * rather than passing silently. `insert` places a new island's slot at `at` (a
253
+ * post-delta USV position) together with its entry, so a slot never exists
254
+ * without an island behind it; its `id` must be non-empty and unused. Deleting
255
+ * an island needs no op: a `delta` that removes its slot drops the island.
256
+ *
257
+ * A `set` stores the `loss` it is given: nothing re-derives the class from the
258
+ * new `props`, so a write that changes what markdown can carry must say so.
259
+ *
260
+ * An island is *inline* (a slot inside a paragraph) unless its line says
261
+ * otherwise. A **block** island is one bundle of all three channels, in the
262
+ * order they apply: `delta` inserts the `\n` that opens the line, `islandOps`
263
+ * inserts the slot, `lineOps` tags the line `{ op: "setKind", kind: "island" }`.
264
+ * `{ op: "split" }` cannot open that line, since line ops run after island ops.
265
+ */
266
+ export type IslandOp =
267
+ | ({ op: "set" } & ContentIsland)
268
+ | ({ op: "insert"; at: number } & ContentIsland);
269
+
245
270
  /**
246
271
  * A committed content edit bundle for `applyChange`: a text `delta` (default no
247
- * text change), then `lineOps`, then `markOps` (mark ranges are in post-delta
248
- * coordinates). Every field is optional.
272
+ * text change), then `islandOps`, then `lineOps`, then `markOps` (mark ranges
273
+ * are in final-text coordinates: every earlier channel applied). Every field is
274
+ * optional.
249
275
  */
250
276
  export interface ChangeBundle {
251
277
  delta?: Delta;
278
+ islandOps?: IslandOp[];
252
279
  lineOps?: LineOp[];
253
280
  markOps?: MarkOp[];
254
281
  }
@@ -593,6 +620,16 @@ export interface Diagnostic {
593
620
  */
594
621
  path?: string;
595
622
  hint?: string;
623
+ /**
624
+ * The facts `message` interpolates, keyed by name. With `code`, the
625
+ * substitution unit needed to word this diagnostic in another language;
626
+ * `prose/canon/ERROR.md` § \"Diagnostic args\" tabulates the keys per code.
627
+ *
628
+ * Declared optional explicitly because `tsify` does not read
629
+ * `skip_serializing_if`: without this, a field the runtime omits is
630
+ * declared required. `sourceChain` carries that mismatch.
631
+ */
632
+ args?: Record<string, unknown>;
596
633
  sourceChain?: string[];
597
634
  }
598
635
 
@@ -714,11 +751,16 @@ export class Document {
714
751
  free(): void;
715
752
  [Symbol.dispose](): void;
716
753
  /**
717
- * **Apply** a committed content edit `bundle` (`{ delta?, lineOps?, markOps? }`)
718
- * at `addr`, the editor splice: text delta first, then line ops, then mark
719
- * ops (mark ranges in final-text coordinates), each all-or-nothing. An absent
754
+ * **Apply** a committed content edit `bundle`
755
+ * (`{ delta?, islandOps?, lineOps?, markOps? }`) at `addr`, the editor
756
+ * splice: text delta first, then island ops, then line ops, then mark ops
757
+ * (mark ranges in final-text coordinates), each all-or-nothing. An absent
720
758
  * `addr.field` targets the body, an absent `addr.card` the main card.
721
759
  *
760
+ * The island channel keeps a table or image edit on the op path: it moves
761
+ * the island alone, so the anchors elsewhere in the field survive an edit
762
+ * `install` would clear.
763
+ *
722
764
  * Throws on an out-of-range card, a field that is not richtext, a malformed
723
765
  * bundle, or an op that applies out of bounds (the value is unchanged on a
724
766
  * failed apply).
@@ -739,13 +781,6 @@ export class Document {
739
781
  * verbs.
740
782
  */
741
783
  card(index: number): Card;
742
- /**
743
- * The index of the composable card whose `$id` equals `id`, or
744
- * `undefined` when none carries it. Resolves the durable card handle
745
- * without a hand-rolled scan over [`cards`](Self::cards); `$id` is
746
- * unique per document, so at most one card matches.
747
- */
748
- cardIndexById(id: string): number | undefined;
749
784
  clone(): Document;
750
785
  /**
751
786
  * Schema version this build writes via [`toJson`](Document::to_json).
@@ -813,8 +848,7 @@ export class Document {
813
848
  getMarkdown(addr?: CardAddr): string;
814
849
  /**
815
850
  * Read the **verbatim stored value** at `addr`: the raw payload value of a
816
- * field (a content object for a richtext field, a scalar/array/object
817
- * otherwise), or the **body content** when `addr.field` is absent. A bare
851
+ * field, or the **body content** when `addr.field` is absent. A bare
818
852
  * string is `Addr` shorthand for `{ field }`. Reads are total over the field
819
853
  * axis: an absent field is `undefined`; only an out-of-range `addr.card`
820
854
  * throws `edit::index_out_of_range`. Needs no schema, so it lives on
@@ -822,6 +856,16 @@ export class Document {
822
856
  * the interpreted schema-plane [`reader.get`](Self::reader_get). For the
823
857
  * markdown projection use [`getMarkdown`](Self::get_markdown) (body) or
824
858
  * `reader.get` (a field's declared type).
859
+ *
860
+ * **A content field at rest has one stored form per codec**: a `richtext`
861
+ * field holds the canonical content object, a `plaintext` field its literal
862
+ * string. A document that came through the bound door (`quill.parse` /
863
+ * `quill.conform`) is at rest, so this read no longer depends on which lane
864
+ * built it. A document that came through the transport door
865
+ * (`Document.fromMarkdown`, a legacy stored row) may rest as authored until
866
+ * it is conformed, and this read reports what is there. For the corpus
867
+ * either way, use the schema-plane `reader.getContent`, which decodes
868
+ * through the codec the field's declared type names.
825
869
  */
826
870
  getStored(addr: Addr | string): unknown;
827
871
  /**
@@ -1054,6 +1098,12 @@ export class Document {
1054
1098
  */
1055
1099
  readonly main: Card;
1056
1100
  readonly quillRef: string;
1101
+ /**
1102
+ * The non-fatal diagnostics of the load that produced this document: parse
1103
+ * warnings, plus the `conform::*` warnings when it came through
1104
+ * `quill.parse`. Session state, not document value: `equals` and the
1105
+ * storage DTO exclude it, and `fromJson` / `loadJson` clear it.
1106
+ */
1057
1107
  readonly warnings: Diagnostic[];
1058
1108
  }
1059
1109
 
@@ -1185,6 +1235,23 @@ export class Quill {
1185
1235
  private constructor();
1186
1236
  free(): void;
1187
1237
  [Symbol.dispose](): void;
1238
+ /**
1239
+ * Land `doc`'s declared content fields at their canonical rest **in
1240
+ * place**, returning the `conform::*` diagnostics for the values that would
1241
+ * not commit (an empty array when everything rested).
1242
+ *
1243
+ * The read-repair verb: a document that arrived through the transport door
1244
+ * (`fromMarkdown`, `fromJson`, a stored row) converges here, and is then
1245
+ * eligible for rewrite under its current schema tag. Idempotent, and a
1246
+ * no-op on an already-canonical document: an equal value is not rewritten,
1247
+ * so YAML comments and stored bytes survive.
1248
+ *
1249
+ * A `!must_fill` marker anywhere in a field's value skips that field (the
1250
+ * marker is the state), and a value the strict write refuses stays as
1251
+ * authored with a diagnostic. Throws when `doc` declares a different
1252
+ * `$quill`, before any mutation.
1253
+ */
1254
+ conform(doc: Document): Diagnostic[];
1188
1255
  /**
1189
1256
  * Build a quill from a file tree. Pure: no backend, no engine; the
1190
1257
  * declared backend is resolved later, at render time.
@@ -1195,6 +1262,21 @@ export class Quill {
1195
1262
  * canonical shape.
1196
1263
  */
1197
1264
  static fromTree(tree: Map<string, Uint8Array>): Quill;
1265
+ /**
1266
+ * Parse `markdown` and conform it against this quill: the **primary
1267
+ * ingestion path**, and the bound twin of the schema-free
1268
+ * `Document.fromMarkdown`. The returned document rests at its canonical
1269
+ * form (a `richtext` field as a content object, a `plaintext` field as its
1270
+ * literal string), so `getStored` no longer answers "corpus or string?"
1271
+ * with "depends how this document was built".
1272
+ *
1273
+ * Parse warnings and the `conform::*` diagnostics both land on
1274
+ * `doc.warnings`. Throws on a parse failure, or when `markdown` declares a
1275
+ * `$quill` this quill does not answer to: nothing conforms under the wrong
1276
+ * schema. To open a document whose `$quill` is stale, use the transport
1277
+ * door (`Document.fromMarkdown`, `setQuillRef`, then `quill.conform`).
1278
+ */
1279
+ parse(markdown: string): Document;
1198
1280
  /**
1199
1281
  * The resolved-value view of `doc` against this quill's schema: for every
1200
1282
  * declared field the value the render projection would use and the