@quillmark/wasm 0.101.0 → 0.102.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.
Binary file
@@ -13,11 +13,12 @@ export const document__readerGetContent: (a: number, b: number, c: number, d: nu
13
13
  export const document__reviseField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
14
14
  export const document_applyChange: (a: number, b: number, c: number, d: number) => void;
15
15
  export const document_blueprintInstruction: (a: number, b: number, c: number) => void;
16
+ export const document_bodyMarkdown: (a: number, b: number, c: number) => void;
16
17
  export const document_card: (a: number, b: number, c: number) => void;
17
18
  export const document_cardCount: (a: number) => number;
18
19
  export const document_cards: (a: number, b: number) => void;
19
20
  export const document_clone: (a: number) => number;
20
- export const document_currentSchemaVersion: (a: number) => void;
21
+ export const document_currentStorageVersion: (a: number) => void;
21
22
  export const document_equals: (a: number, b: number) => number;
22
23
  export const document_formatDiagnostic: (a: number, b: number) => void;
23
24
  export const document_formatRules: (a: number) => void;
@@ -25,34 +26,33 @@ export const document_fromJson: (a: number, b: number, c: number) => void;
25
26
  export const document_fromMarkdown: (a: number, b: number, c: number) => void;
26
27
  export const document_getExt: (a: number, b: number, c: number) => void;
27
28
  export const document_getExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
28
- export const document_getMarkdown: (a: number, b: number, c: number) => void;
29
29
  export const document_getStored: (a: number, b: number, c: number) => void;
30
30
  export const document_insertCard: (a: number, b: number, c: number, d: number) => void;
31
- export const document_install: (a: number, b: number, c: number, d: number) => void;
32
31
  export const document_isFill: (a: number, b: number, c: number) => void;
33
32
  export const document_loadJson: (a: number, b: number, c: number, d: number) => void;
34
33
  export const document_main: (a: number, b: number) => void;
35
34
  export const document_makeCard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
36
35
  export const document_moveCard: (a: number, b: number, c: number, d: number) => void;
37
36
  export const document_new: (a: number, b: number, c: number) => void;
37
+ export const document_overwrite: (a: number, b: number, c: number, d: number) => void;
38
38
  export const document_quillRef: (a: number, b: number) => void;
39
39
  export const document_quillRefHint: (a: number) => void;
40
40
  export const document_removeCard: (a: number, b: number, c: number) => void;
41
41
  export const document_removeExt: (a: number, b: number, c: number) => void;
42
42
  export const document_removeExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
43
43
  export const document_removeField: (a: number, b: number, c: number) => void;
44
- export const document_removeSeedNamespace: (a: number, b: number, c: number, d: number) => void;
44
+ export const document_removeSeedOverlay: (a: number, b: number, c: number, d: number) => void;
45
45
  export const document_revise: (a: number, b: number, c: number, d: number, e: number) => void;
46
- export const document_schemaVersionOf: (a: number, b: number, c: number) => void;
47
46
  export const document_seedOverlay: (a: number, b: number, c: number, d: number) => void;
48
47
  export const document_setCardKind: (a: number, b: number, c: number, d: number, e: number) => void;
49
48
  export const document_setQuillRef: (a: number, b: number, c: number, d: number) => void;
49
+ export const document_storageVersionOf: (a: number, b: number, c: number) => void;
50
50
  export const document_storeExt: (a: number, b: number, c: number, d: number) => void;
51
51
  export const document_storeExtNamespace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
52
52
  export const document_storeField: (a: number, b: number, c: number, d: number) => void;
53
53
  export const document_storeFields: (a: number, b: number, c: number, d: number) => void;
54
54
  export const document_storeFill: (a: number, b: number, c: number, d: number) => void;
55
- export const document_storeSeedNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
55
+ export const document_storeSeedOverlay: (a: number, b: number, c: number, d: number, e: number) => void;
56
56
  export const document_toJson: (a: number, b: number) => void;
57
57
  export const document_toMarkdown: (a: number, b: number) => void;
58
58
  export const document_tryFromJson: (a: number, b: number) => number;
@@ -60,8 +60,6 @@ export const document_warnings: (a: number, b: number) => void;
60
60
  export const exportMarkdown: (a: number, b: number) => void;
61
61
  export const formatDocPath: (a: number, b: number) => void;
62
62
  export const importMarkdown: (a: number, b: number, c: number) => void;
63
- export const init: () => void;
64
- export const livesession_apply: (a: number, b: number, c: number) => void;
65
63
  export const livesession_backendId: (a: number, b: number) => void;
66
64
  export const livesession_fieldAt: (a: number, b: number, c: number, d: number, e: number) => void;
67
65
  export const livesession_fieldBoxes: (a: number, b: number, c: number, d: number) => void;
@@ -73,6 +71,7 @@ export const livesession_positionAt: (a: number, b: number, c: number, d: number
73
71
  export const livesession_regions: (a: number, b: number) => void;
74
72
  export const livesession_render: (a: number, b: number, c: number) => void;
75
73
  export const livesession_supportsCanvas: (a: number) => number;
74
+ export const livesession_update: (a: number, b: number, c: number) => void;
76
75
  export const livesession_warnings: (a: number, b: number) => void;
77
76
  export const mapPos: (a: number, b: number, c: number, d: number) => void;
78
77
  export const parseDocPath: (a: number, b: number, c: number) => void;
@@ -95,6 +94,7 @@ export const quillmark_render: (a: number, b: number, c: number, d: number, e: n
95
94
  export const quillmark_supportedFormats: (a: number, b: number, c: number) => void;
96
95
  export const quillmark_supportsCanvas: (a: number, b: number) => number;
97
96
  export const rebase: (a: number, b: number, c: number, d: number) => void;
97
+ export const start: () => void;
98
98
  export const __wbindgen_export: (a: number, b: number) => number;
99
99
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
100
100
  export const __wbindgen_export3: (a: number) => void;
@@ -46,7 +46,7 @@ export interface Card {
46
46
  * The card body as canonical `Content`: the source-of-truth content model.
47
47
  * Always this content shape on read, never a markdown string. For the markdown
48
48
  * projection call the codec `exportMarkdown(card.body)`. Write a body back
49
- * with `doc.install(addr, rt)` / `doc.revise(addr, md)`, or via `CardInput.body`.
49
+ * with `doc.overwrite(addr, rt)` / `doc.revise(addr, md)`, or via `CardInput.body`.
50
50
  */
51
51
  body: Content;
52
52
  }
@@ -227,11 +227,12 @@ export type MarkOp =
227
227
  | { op: "removeAnchor"; id: string };
228
228
 
229
229
  /**
230
- * A line/block edit. `split`/`join` splice `\n`; `setKind`/`setContainers`/
231
- * `setContinues` touch metadata. `setContinues` sets/clears a line's within-block
232
- * hard-break flag (`ContentLine.continues`): the op-grained way to lower a
233
- * Shift+Enter hard break or a new code-fence interior line; `continues: true` on
234
- * line 0 is rejected (nothing precedes it to continue).
230
+ * A line/block edit. `split`/`join` splice `\n` in post-`delta`, post-`islandOps`
231
+ * coordinates; `setKind`/`setContainers`/`setContinues` touch metadata.
232
+ * `setContinues` sets/clears a line's within-block hard-break flag
233
+ * (`ContentLine.continues`): the op-grained way to lower a Shift+Enter hard
234
+ * break or a new code-fence interior line; `continues: true` on line 0 is
235
+ * rejected (nothing precedes it to continue).
235
236
  */
236
237
  export type LineOp =
237
238
  | { op: "split"; at: number }
@@ -246,13 +247,27 @@ export type LineOp =
246
247
  *
247
248
  * Both ops move one island entry and leave the field's text and marks alone, so
248
249
  * 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
+ * edit lowers to `applyChange` rather than `overwrite`, which drops them all.
250
251
  *
251
252
  * `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.
253
+ * rather than passing silently. `insert` places a new island's slot at `at`
254
+ * together with its entry, so a slot never exists without an island behind it;
255
+ * its `id` must be non-empty and unused. `at` is a position in the text the
256
+ * `delta` and this bundle's earlier island ops left: each insert splices its
257
+ * slot before the next op reads the text, so slots after `a` and `b` of `abc`
258
+ * go in at 1 and 3. A stale frame misplaces slots and never throws.
259
+ *
260
+ * A `delta` insert string may not carry a slot, which would orphan. A producer
261
+ * that computes one splice over the whole field text carries slots in it on any
262
+ * paste of an island or undo of a deletion; that splice splits into the
263
+ * slot-free `delta` plus one `insert` per slot.
264
+ *
265
+ * Deleting an island needs no op, and the drop is whole: a `delta` that removes
266
+ * its slot drops the island from the store. Re-landing it is an `insert` of the
267
+ * full island under its original id, and only the producer that deleted it
268
+ * still holds that value. A pasted copy of a live island is new and mints fresh
269
+ * (DOCUMENT_STORAGE § Island-id determinism). A block island's line demotes to
270
+ * `para` when its slot goes, so re-landing one re-tags the line too.
256
271
  *
257
272
  * A `set` stores the `loss` it is given: nothing re-derives the class from the
258
273
  * new `props`, so a write that changes what markdown can carry must say so.
@@ -272,6 +287,10 @@ export type IslandOp =
272
287
  * text change), then `islandOps`, then `lineOps`, then `markOps` (mark ranges
273
288
  * are in final-text coordinates: every earlier channel applied). Every field is
274
289
  * optional.
290
+ *
291
+ * Within each channel ops apply in sequence, each against the state the earlier
292
+ * ones left: an island `insert`'s `at` counts earlier ops' slots, and `lineOps`
293
+ * positions and indices renumber through earlier `split`/`join`.
275
294
  */
276
295
  export interface ChangeBundle {
277
296
  delta?: Delta;
@@ -759,7 +778,7 @@ export class Document {
759
778
  *
760
779
  * The island channel keeps a table or image edit on the op path: it moves
761
780
  * the island alone, so the anchors elsewhere in the field survive an edit
762
- * `install` would clear.
781
+ * `overwrite` would clear.
763
782
  *
764
783
  * Throws on an out-of-range card, a field that is not richtext, a malformed
765
784
  * bundle, or an op that applies out of bounds (the value is unchanged on a
@@ -773,6 +792,18 @@ export class Document {
773
792
  * uniform.
774
793
  */
775
794
  static blueprintInstruction(quill_name: string): string;
795
+ /**
796
+ * The **body** markdown projection (the main body, or a composable card's
797
+ * body (`{ card }`)) the on-demand, lossy export (content-only marks do not
798
+ * survive markdown). A body's type is a format fact, not a schema fact, so
799
+ * this read stays quill-free; a body is never absent.
800
+ *
801
+ * `addr` is an optional **card address** (`{ card }`, absent = main). A
802
+ * present `field` throws: a field's markdown is read through the
803
+ * schema-plane `quill.reader(doc).get(field)`, which interprets by declared
804
+ * type. An out-of-range `addr.card` throws.
805
+ */
806
+ bodyMarkdown(addr?: CardAddr): string;
776
807
  /**
777
808
  * A single composable card by index: the whole `Card`, the card-indexed
778
809
  * twin of the [`main`](Self::main) getter, so reading one card need not
@@ -783,11 +814,11 @@ export class Document {
783
814
  card(index: number): Card;
784
815
  clone(): Document;
785
816
  /**
786
- * Schema version this build writes via [`toJson`](Document::to_json).
817
+ * Storage version this build writes via [`toJson`](Document::to_json).
787
818
  * Tracks the `Document` model version (not the running crate version):
788
819
  * the tag advances only when the wire format changes, not on every release.
789
820
  */
790
- static currentSchemaVersion(): string;
821
+ static currentStorageVersion(): string;
791
822
  /**
792
823
  * Structural equality (parse-time `warnings` excluded). Use to debounce
793
824
  * upstream prop updates instead of re-parsing on every keystroke.
@@ -834,18 +865,6 @@ export class Document {
834
865
  * `removeExtNamespace`). Throws on a present `field` or an out-of-range card.
835
866
  */
836
867
  getExtNamespace(addr: CardAddr, ns: string): unknown;
837
- /**
838
- * The **body** markdown projection (the main body, or a composable card's
839
- * body (`{ card }`)) the on-demand, lossy export (content-only marks do not
840
- * survive markdown). A body's type is a format fact, not a schema fact, so
841
- * this read stays quill-free; a body is never absent.
842
- *
843
- * `addr` is an optional **card address** (`{ card }`, absent = main). A
844
- * present `field` throws: a field's markdown is read through the
845
- * schema-plane `quill.reader(doc).get(field)`, which interprets by declared
846
- * type. An out-of-range `addr.card` throws.
847
- */
848
- getMarkdown(addr?: CardAddr): string;
849
868
  /**
850
869
  * Read the **verbatim stored value** at `addr`: the raw payload value of a
851
870
  * field, or the **body content** when `addr.field` is absent. A bare
@@ -854,7 +873,7 @@ export class Document {
854
873
  * throws `edit::index_out_of_range`. Needs no schema, so it lives on
855
874
  * `Document`: the read echo of the verbatim `store*` write, distinct from
856
875
  * the interpreted schema-plane [`reader.get`](Self::reader_get). For the
857
- * markdown projection use [`getMarkdown`](Self::get_markdown) (body) or
876
+ * markdown projection use [`bodyMarkdown`](Self::get_markdown) (body) or
858
877
  * `reader.get` (a field's declared type).
859
878
  *
860
879
  * **A content field at rest has one stored form per codec**: a `richtext`
@@ -863,7 +882,7 @@ export class Document {
863
882
  * `quill.conform`) is at rest, so this read no longer depends on which lane
864
883
  * built it. A document that came through the transport door
865
884
  * (`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
885
+ * it is conformed, and this read reports what is there. For the `Content`
867
886
  * either way, use the schema-plane `reader.getContent`, which decodes
868
887
  * through the codec the field's declared type names.
869
888
  */
@@ -877,19 +896,6 @@ export class Document {
877
896
  * not a valid kind name, or if `at` is out of range.
878
897
  */
879
898
  insertCard(card: CardInput, at?: number): void;
880
- /**
881
- * **Install** a richtext value at `addr`: **value semantics**, content only.
882
- * Stores exactly `rt` (a canonical `Content` content object); the identity
883
- * anchors of any previous value are gone. An absent `addr.field` targets the
884
- * body, an absent `addr.card` the main card. For "here's new markdown," use
885
- * [`revise`](Document::revise); the cold-import path is spelled at the call
886
- * site as `install(addr, importMarkdown(md))`, so anchor loss is visible in
887
- * source.
888
- *
889
- * Throws on an out-of-range card, a malformed field name, or an `rt` that is
890
- * not a canonical content object.
891
- */
892
- install(addr: Addr | string, rt: Content): void;
893
899
  /**
894
900
  * Whether the field at `addr` is marked `!must_fill`. A bare string is `Addr`
895
901
  * shorthand for `{ field }`. `false` for an absent field (truthful: it isn't
@@ -938,6 +944,21 @@ export class Document {
938
944
  * Throws on an invalid quill reference. Mirrors Python `Document(quill_ref)`.
939
945
  */
940
946
  constructor(quill_ref: string);
947
+ /**
948
+ * **Overwrite** the content value at `addr`: **value semantics**, content
949
+ * only. Stores exactly `rt` (a canonical `Content` content object); the
950
+ * identity anchors of any previous value are gone. The bottom rung of the
951
+ * content lane's ladder by anchor fate: `overwrite` destroys,
952
+ * [`revise`](Document::revise) rebases,
953
+ * [`applyChange`](Document::apply_change) preserves. An absent `addr.field`
954
+ * targets the body, an absent `addr.card` the main card. Cold-importing
955
+ * markdown is spelled `overwrite(addr, importMarkdown(md))` at the call
956
+ * site, where the anchor loss is visible.
957
+ *
958
+ * Throws on an out-of-range card, a malformed field name, or an `rt` that is
959
+ * not a canonical content object.
960
+ */
961
+ overwrite(addr: Addr | string, rt: Content): void;
941
962
  /**
942
963
  * The canonical `$quill` reference grammar as author-facing text. Core is
943
964
  * the single source of truth: drive schema `describe` and validation
@@ -973,7 +994,7 @@ export class Document {
973
994
  * overlay or `undefined`; drops `$seed` entirely once empty. Sibling kinds
974
995
  * survive. `$seed` is main-only, so this takes no address.
975
996
  */
976
- removeSeedNamespace(card_kind: string): any;
997
+ removeSeedOverlay(card_kind: string): any;
977
998
  /**
978
999
  * **Revise** the richtext value at `addr` from a markdown string: **edit
979
1000
  * semantics**, the default write path, returning the text `Delta`. Imports
@@ -986,13 +1007,6 @@ export class Document {
986
1007
  * non-content field value, or an over-nested markdown input.
987
1008
  */
988
1009
  revise(addr: Addr | string, markdown: string): Delta;
989
- /**
990
- * Read the `schema` version tag from a raw storage DTO string without a
991
- * full parse, or `undefined`. Returns unknown future versions as-is:
992
- * useful to distinguish "build too old" from "payload corrupt" when
993
- * `fromJson` throws.
994
- */
995
- static schemaVersionOf(json: string): string | undefined;
996
1010
  /**
997
1011
  * The main card's `$seed` overlay object for `kind` (the `$seed[kind]`
998
1012
  * entry), or `undefined` when absent. The cheap read that feeds
@@ -1011,6 +1025,18 @@ export class Document {
1011
1025
  * Replace the QUILL reference string. Throws if `ref_str` is invalid.
1012
1026
  */
1013
1027
  setQuillRef(ref_str: string): void;
1028
+ /**
1029
+ * Read the storage version tag from a raw storage DTO string without a
1030
+ * full parse, or `undefined`. Returns unknown future versions as-is:
1031
+ * useful to distinguish "build too old" from "payload corrupt" when
1032
+ * `fromJson` throws.
1033
+ *
1034
+ * The storage version, not a field schema ([`schema`](Quill::schema) is the
1035
+ * quill's field declarations). The JSON key is spelled `"schema"`: it is
1036
+ * the DTO's serde tag, and retagging it would break the version dispatch
1037
+ * it drives.
1038
+ */
1039
+ static storageVersionOf(json: string): string | undefined;
1014
1040
  /**
1015
1041
  * Replace the opaque `$ext` map on the card `addr` targets (a card address,
1016
1042
  * absent `card` = main). `value` must be a plain object. `$ext` carries
@@ -1033,7 +1059,7 @@ export class Document {
1033
1059
  * shorthand for `{ field }`, so `doc.storeField("qty", 3)` reads as written;
1034
1060
  * `{ card: 2, field: "qty" }` targets a composable card. Clears any
1035
1061
  * `!must_fill` marker. A body address (no `field`) throws: a body is never
1036
- * opaque; write it with `revise` / `install` / `writer.setBody`. Throws on
1062
+ * opaque; write it with `revise` / `overwrite` / `writer.reviseBody`. Throws on
1037
1063
  * an out-of-range card or a malformed name.
1038
1064
  */
1039
1065
  storeField(addr: Addr | string, value: any): void;
@@ -1062,7 +1088,7 @@ export class Document {
1062
1088
  * cards of that kind spawn with. Quill-free and verbatim: an opaque `store`
1063
1089
  * verb. Throws if `overlay` cannot be serialized or nests too deep.
1064
1090
  */
1065
- storeSeedNamespace(card_kind: string, overlay: any): void;
1091
+ storeSeedOverlay(card_kind: string, overlay: any): void;
1066
1092
  /**
1067
1093
  * Serialize this document to a versioned storage DTO string.
1068
1094
  *
@@ -1124,15 +1150,6 @@ export class LiveSession {
1124
1150
  private constructor();
1125
1151
  free(): void;
1126
1152
  [Symbol.dispose](): void;
1127
- /**
1128
- * Recompile the session against `doc`: the edit verb of a live preview.
1129
- * The document is compiled through the same schema pipeline as `open`
1130
- * (same quill), then applied transactionally: on throw every read
1131
- * (`render`, `paint`, `pageSize`, `regions`, `fieldAt`) keeps serving the last-good
1132
- * compile, and the session recovers on the next successful `apply`. On
1133
- * success reads serve the new compile; repaint `dirtyPages ∩ visible`.
1134
- */
1135
- apply(doc: Document): ChangeSet;
1136
1153
  /**
1137
1154
  * The schema field whose content is under a point on `page`, the
1138
1155
  * forward (click → field) direction: hit-test a click against the
@@ -1211,6 +1228,19 @@ export class LiveSession {
1211
1228
  */
1212
1229
  regions(): FieldRegion[];
1213
1230
  render(opts?: RenderOptions | null): RenderResult;
1231
+ /**
1232
+ * Recompile the session against `doc`: the edit verb of a live preview.
1233
+ * The document is compiled through the same schema pipeline as `open`
1234
+ * (same quill), then swapped in transactionally: on throw every read
1235
+ * (`render`, `paint`, `pageSize`, `regions`, `fieldAt`) keeps serving the last-good
1236
+ * compile, and the session recovers on the next successful `update`. On
1237
+ * success reads serve the new compile; repaint `dirtyPages ∩ visible`.
1238
+ *
1239
+ * Distinct from the content lane's [`applyChange`](Document::apply_change),
1240
+ * which splices ops into a document: this one recompiles a whole document
1241
+ * the caller already mutated.
1242
+ */
1243
+ update(doc: Document): ChangeSet;
1214
1244
  /**
1215
1245
  * The backend that produced this session (e.g. `"typst"`).
1216
1246
  */
@@ -1267,8 +1297,8 @@ export class Quill {
1267
1297
  * ingestion path**, and the bound twin of the schema-free
1268
1298
  * `Document.fromMarkdown`. The returned document rests at its canonical
1269
1299
  * 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".
1300
+ * literal string), so `getStored` answers "content object or string?" by the
1301
+ * field's declared codec rather than by how the document was built.
1272
1302
  *
1273
1303
  * Parse warnings and the `conform::*` diagnostics both land on
1274
1304
  * `doc.warnings`. Throws on a parse failure, or when `markdown` declares a
@@ -1419,17 +1449,12 @@ export function formatDocPath(segs: DocPathSeg[]): string;
1419
1449
 
1420
1450
  /**
1421
1451
  * Import a markdown string to a canonical `Content` content: the pure,
1422
- * document-free codec. Pair with `install(addr, importMarkdown(md))` to spell
1452
+ * document-free codec. Pair with `overwrite(addr, importMarkdown(md))` to spell
1423
1453
  * the cold (anchor-losing) write at the call site; prefer `revise` for edit
1424
1454
  * semantics. Throws on an over-nested input.
1425
1455
  */
1426
1456
  export function importMarkdown(markdown: string): Content;
1427
1457
 
1428
- /**
1429
- * Initialize the WASM module with panic hooks for better error messages
1430
- */
1431
- export function init(): void;
1432
-
1433
1458
  /**
1434
1459
  * Map a base content position (a USV index into `Content.text`, not a UTF-16
1435
1460
  * offset) through a `delta` to its new USV position: the pure position-mapping
@@ -1457,3 +1482,142 @@ export function parseDocPath(path: string): DocPathSeg[];
1457
1482
  * markdown input or a non-content `base`.
1458
1483
  */
1459
1484
  export function rebase(base: Content, markdown: string): { content: Content; delta: Delta };
1485
+
1486
+ /**
1487
+ * Runs at instantiation (the wasm-bindgen start section): installs the panic
1488
+ * hook, so a Rust panic reaches the console as a stack trace rather than
1489
+ * `unreachable`.
1490
+ *
1491
+ * Not the package's `init`. That name belongs to the hand-written runtime,
1492
+ * which owns instantiation itself (`runtime/runtime.js`); this runs as part of
1493
+ * the instantiation it awaits.
1494
+ */
1495
+ export function start(): void;
1496
+
1497
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
1498
+
1499
+ export interface InitOutput {
1500
+ readonly memory: WebAssembly.Memory;
1501
+ readonly __wbg_document_free: (a: number, b: number) => void;
1502
+ readonly __wbg_livesession_free: (a: number, b: number) => void;
1503
+ readonly __wbg_quill_free: (a: number, b: number) => void;
1504
+ readonly __wbg_quillmark_free: (a: number, b: number) => void;
1505
+ readonly document__addCard: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1506
+ readonly document__commitField: (a: number, b: number, c: number, d: number, e: number) => void;
1507
+ readonly document__commitFields: (a: number, b: number, c: number, d: number, e: number) => void;
1508
+ readonly document__readerGet: (a: number, b: number, c: number, d: number) => void;
1509
+ readonly document__readerGetContent: (a: number, b: number, c: number, d: number) => void;
1510
+ readonly document__reviseField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1511
+ readonly document_applyChange: (a: number, b: number, c: number, d: number) => void;
1512
+ readonly document_blueprintInstruction: (a: number, b: number, c: number) => void;
1513
+ readonly document_bodyMarkdown: (a: number, b: number, c: number) => void;
1514
+ readonly document_card: (a: number, b: number, c: number) => void;
1515
+ readonly document_cardCount: (a: number) => number;
1516
+ readonly document_cards: (a: number, b: number) => void;
1517
+ readonly document_clone: (a: number) => number;
1518
+ readonly document_currentStorageVersion: (a: number) => void;
1519
+ readonly document_equals: (a: number, b: number) => number;
1520
+ readonly document_formatDiagnostic: (a: number, b: number) => void;
1521
+ readonly document_formatRules: (a: number) => void;
1522
+ readonly document_fromJson: (a: number, b: number, c: number) => void;
1523
+ readonly document_fromMarkdown: (a: number, b: number, c: number) => void;
1524
+ readonly document_getExt: (a: number, b: number, c: number) => void;
1525
+ readonly document_getExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
1526
+ readonly document_getStored: (a: number, b: number, c: number) => void;
1527
+ readonly document_insertCard: (a: number, b: number, c: number, d: number) => void;
1528
+ readonly document_isFill: (a: number, b: number, c: number) => void;
1529
+ readonly document_loadJson: (a: number, b: number, c: number, d: number) => void;
1530
+ readonly document_main: (a: number, b: number) => void;
1531
+ readonly document_makeCard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1532
+ readonly document_moveCard: (a: number, b: number, c: number, d: number) => void;
1533
+ readonly document_new: (a: number, b: number, c: number) => void;
1534
+ readonly document_overwrite: (a: number, b: number, c: number, d: number) => void;
1535
+ readonly document_quillRef: (a: number, b: number) => void;
1536
+ readonly document_quillRefHint: (a: number) => void;
1537
+ readonly document_removeCard: (a: number, b: number, c: number) => void;
1538
+ readonly document_removeExt: (a: number, b: number, c: number) => void;
1539
+ readonly document_removeExtNamespace: (a: number, b: number, c: number, d: number, e: number) => void;
1540
+ readonly document_removeField: (a: number, b: number, c: number) => void;
1541
+ readonly document_removeSeedOverlay: (a: number, b: number, c: number, d: number) => void;
1542
+ readonly document_revise: (a: number, b: number, c: number, d: number, e: number) => void;
1543
+ readonly document_seedOverlay: (a: number, b: number, c: number, d: number) => void;
1544
+ readonly document_setCardKind: (a: number, b: number, c: number, d: number, e: number) => void;
1545
+ readonly document_setQuillRef: (a: number, b: number, c: number, d: number) => void;
1546
+ readonly document_storageVersionOf: (a: number, b: number, c: number) => void;
1547
+ readonly document_storeExt: (a: number, b: number, c: number, d: number) => void;
1548
+ readonly document_storeExtNamespace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1549
+ readonly document_storeField: (a: number, b: number, c: number, d: number) => void;
1550
+ readonly document_storeFields: (a: number, b: number, c: number, d: number) => void;
1551
+ readonly document_storeFill: (a: number, b: number, c: number, d: number) => void;
1552
+ readonly document_storeSeedOverlay: (a: number, b: number, c: number, d: number, e: number) => void;
1553
+ readonly document_toJson: (a: number, b: number) => void;
1554
+ readonly document_toMarkdown: (a: number, b: number) => void;
1555
+ readonly document_tryFromJson: (a: number, b: number) => number;
1556
+ readonly document_warnings: (a: number, b: number) => void;
1557
+ readonly exportMarkdown: (a: number, b: number) => void;
1558
+ readonly formatDocPath: (a: number, b: number) => void;
1559
+ readonly importMarkdown: (a: number, b: number, c: number) => void;
1560
+ readonly livesession_backendId: (a: number, b: number) => void;
1561
+ readonly livesession_fieldAt: (a: number, b: number, c: number, d: number, e: number) => void;
1562
+ readonly livesession_fieldBoxes: (a: number, b: number, c: number, d: number) => void;
1563
+ readonly livesession_locate: (a: number, b: number, c: number, d: number) => number;
1564
+ readonly livesession_pageCount: (a: number) => number;
1565
+ readonly livesession_pageSize: (a: number, b: number, c: number) => void;
1566
+ readonly livesession_paint: (a: number, b: number, c: number, d: number, e: number) => void;
1567
+ readonly livesession_positionAt: (a: number, b: number, c: number, d: number) => number;
1568
+ readonly livesession_regions: (a: number, b: number) => void;
1569
+ readonly livesession_render: (a: number, b: number, c: number) => void;
1570
+ readonly livesession_supportsCanvas: (a: number) => number;
1571
+ readonly livesession_update: (a: number, b: number, c: number) => void;
1572
+ readonly livesession_warnings: (a: number, b: number) => void;
1573
+ readonly mapPos: (a: number, b: number, c: number, d: number) => void;
1574
+ readonly parseDocPath: (a: number, b: number, c: number) => void;
1575
+ readonly quill_backendId: (a: number, b: number) => void;
1576
+ readonly quill_blueprint: (a: number, b: number) => void;
1577
+ readonly quill_conform: (a: number, b: number, c: number) => void;
1578
+ readonly quill_fromTree: (a: number, b: number) => void;
1579
+ readonly quill_metadata: (a: number, b: number) => void;
1580
+ readonly quill_parse: (a: number, b: number, c: number, d: number) => void;
1581
+ readonly quill_resolve: (a: number, b: number, c: number) => void;
1582
+ readonly quill_schema: (a: number, b: number) => void;
1583
+ readonly quill_seedCard: (a: number, b: number, c: number, d: number, e: number) => void;
1584
+ readonly quill_seedDocument: (a: number) => number;
1585
+ readonly quill_seedMain: (a: number, b: number) => void;
1586
+ readonly quill_toTree: (a: number) => number;
1587
+ readonly quill_validate: (a: number, b: number, c: number) => void;
1588
+ readonly quillmark_new: () => number;
1589
+ readonly quillmark_open: (a: number, b: number, c: number, d: number) => void;
1590
+ readonly quillmark_render: (a: number, b: number, c: number, d: number, e: number) => void;
1591
+ readonly quillmark_supportedFormats: (a: number, b: number, c: number) => void;
1592
+ readonly quillmark_supportsCanvas: (a: number, b: number) => number;
1593
+ readonly rebase: (a: number, b: number, c: number, d: number) => void;
1594
+ readonly start: () => void;
1595
+ readonly __wbindgen_export: (a: number, b: number) => number;
1596
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1597
+ readonly __wbindgen_export3: (a: number) => void;
1598
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
1599
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
1600
+ readonly __wbindgen_start: () => void;
1601
+ }
1602
+
1603
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
1604
+
1605
+ /**
1606
+ * Instantiates the given `module`, which can either be bytes or
1607
+ * a precompiled `WebAssembly.Module`.
1608
+ *
1609
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
1610
+ *
1611
+ * @returns {InitOutput}
1612
+ */
1613
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
1614
+
1615
+ /**
1616
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
1617
+ * for everything else, calls `WebAssembly.instantiate` directly.
1618
+ *
1619
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
1620
+ *
1621
+ * @returns {Promise<InitOutput>}
1622
+ */
1623
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;