@quillmark/wasm 0.100.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.
@@ -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 }
@@ -240,13 +241,60 @@ export type LineOp =
240
241
  | { op: "setContainers"; line: number; containers: ContentContainer[] }
241
242
  | { op: "setContinues"; line: number; continues: boolean };
242
243
 
244
+ /**
245
+ * An island edit: the only channel that reaches an island's payload, a table's
246
+ * cells or an image's url.
247
+ *
248
+ * Both ops move one island entry and leave the field's text and marks alone, so
249
+ * an island edit keeps every identity anchor in the field. That is why a table
250
+ * edit lowers to `applyChange` rather than `overwrite`, which drops them all.
251
+ *
252
+ * `set` addresses an existing island by `id`; an `id` no island carries throws
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.
271
+ *
272
+ * A `set` stores the `loss` it is given: nothing re-derives the class from the
273
+ * new `props`, so a write that changes what markdown can carry must say so.
274
+ *
275
+ * An island is *inline* (a slot inside a paragraph) unless its line says
276
+ * otherwise. A **block** island is one bundle of all three channels, in the
277
+ * order they apply: `delta` inserts the `\n` that opens the line, `islandOps`
278
+ * inserts the slot, `lineOps` tags the line `{ op: "setKind", kind: "island" }`.
279
+ * `{ op: "split" }` cannot open that line, since line ops run after island ops.
280
+ */
281
+ export type IslandOp =
282
+ | ({ op: "set" } & ContentIsland)
283
+ | ({ op: "insert"; at: number } & ContentIsland);
284
+
243
285
  /**
244
286
  * A committed content edit bundle for `applyChange`: a text `delta` (default no
245
- * text change), then `lineOps`, then `markOps` (mark ranges are in post-delta
246
- * coordinates). Every field is optional.
287
+ * text change), then `islandOps`, then `lineOps`, then `markOps` (mark ranges
288
+ * are in final-text coordinates: every earlier channel applied). Every field is
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`.
247
294
  */
248
295
  export interface ChangeBundle {
249
296
  delta?: Delta;
297
+ islandOps?: IslandOp[];
250
298
  lineOps?: LineOp[];
251
299
  markOps?: MarkOp[];
252
300
  }
@@ -722,11 +770,16 @@ export class Document {
722
770
  free(): void;
723
771
  [Symbol.dispose](): void;
724
772
  /**
725
- * **Apply** a committed content edit `bundle` (`{ delta?, lineOps?, markOps? }`)
726
- * at `addr`, the editor splice: text delta first, then line ops, then mark
727
- * ops (mark ranges in final-text coordinates), each all-or-nothing. An absent
773
+ * **Apply** a committed content edit `bundle`
774
+ * (`{ delta?, islandOps?, lineOps?, markOps? }`) at `addr`, the editor
775
+ * splice: text delta first, then island ops, then line ops, then mark ops
776
+ * (mark ranges in final-text coordinates), each all-or-nothing. An absent
728
777
  * `addr.field` targets the body, an absent `addr.card` the main card.
729
778
  *
779
+ * The island channel keeps a table or image edit on the op path: it moves
780
+ * the island alone, so the anchors elsewhere in the field survive an edit
781
+ * `overwrite` would clear.
782
+ *
730
783
  * Throws on an out-of-range card, a field that is not richtext, a malformed
731
784
  * bundle, or an op that applies out of bounds (the value is unchanged on a
732
785
  * failed apply).
@@ -739,6 +792,18 @@ export class Document {
739
792
  * uniform.
740
793
  */
741
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;
742
807
  /**
743
808
  * A single composable card by index: the whole `Card`, the card-indexed
744
809
  * twin of the [`main`](Self::main) getter, so reading one card need not
@@ -749,11 +814,11 @@ export class Document {
749
814
  card(index: number): Card;
750
815
  clone(): Document;
751
816
  /**
752
- * Schema version this build writes via [`toJson`](Document::to_json).
817
+ * Storage version this build writes via [`toJson`](Document::to_json).
753
818
  * Tracks the `Document` model version (not the running crate version):
754
819
  * the tag advances only when the wire format changes, not on every release.
755
820
  */
756
- static currentSchemaVersion(): string;
821
+ static currentStorageVersion(): string;
757
822
  /**
758
823
  * Structural equality (parse-time `warnings` excluded). Use to debounce
759
824
  * upstream prop updates instead of re-parsing on every keystroke.
@@ -800,18 +865,6 @@ export class Document {
800
865
  * `removeExtNamespace`). Throws on a present `field` or an out-of-range card.
801
866
  */
802
867
  getExtNamespace(addr: CardAddr, ns: string): unknown;
803
- /**
804
- * The **body** markdown projection (the main body, or a composable card's
805
- * body (`{ card }`)) the on-demand, lossy export (content-only marks do not
806
- * survive markdown). A body's type is a format fact, not a schema fact, so
807
- * this read stays quill-free; a body is never absent.
808
- *
809
- * `addr` is an optional **card address** (`{ card }`, absent = main). A
810
- * present `field` throws: a field's markdown is read through the
811
- * schema-plane `quill.reader(doc).get(field)`, which interprets by declared
812
- * type. An out-of-range `addr.card` throws.
813
- */
814
- getMarkdown(addr?: CardAddr): string;
815
868
  /**
816
869
  * Read the **verbatim stored value** at `addr`: the raw payload value of a
817
870
  * field, or the **body content** when `addr.field` is absent. A bare
@@ -820,7 +873,7 @@ export class Document {
820
873
  * throws `edit::index_out_of_range`. Needs no schema, so it lives on
821
874
  * `Document`: the read echo of the verbatim `store*` write, distinct from
822
875
  * the interpreted schema-plane [`reader.get`](Self::reader_get). For the
823
- * markdown projection use [`getMarkdown`](Self::get_markdown) (body) or
876
+ * markdown projection use [`bodyMarkdown`](Self::get_markdown) (body) or
824
877
  * `reader.get` (a field's declared type).
825
878
  *
826
879
  * **A content field at rest has one stored form per codec**: a `richtext`
@@ -829,7 +882,7 @@ export class Document {
829
882
  * `quill.conform`) is at rest, so this read no longer depends on which lane
830
883
  * built it. A document that came through the transport door
831
884
  * (`Document.fromMarkdown`, a legacy stored row) may rest as authored until
832
- * 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`
833
886
  * either way, use the schema-plane `reader.getContent`, which decodes
834
887
  * through the codec the field's declared type names.
835
888
  */
@@ -843,19 +896,6 @@ export class Document {
843
896
  * not a valid kind name, or if `at` is out of range.
844
897
  */
845
898
  insertCard(card: CardInput, at?: number): void;
846
- /**
847
- * **Install** a richtext value at `addr`: **value semantics**, content only.
848
- * Stores exactly `rt` (a canonical `Content` content object); the identity
849
- * anchors of any previous value are gone. An absent `addr.field` targets the
850
- * body, an absent `addr.card` the main card. For "here's new markdown," use
851
- * [`revise`](Document::revise); the cold-import path is spelled at the call
852
- * site as `install(addr, importMarkdown(md))`, so anchor loss is visible in
853
- * source.
854
- *
855
- * Throws on an out-of-range card, a malformed field name, or an `rt` that is
856
- * not a canonical content object.
857
- */
858
- install(addr: Addr | string, rt: Content): void;
859
899
  /**
860
900
  * Whether the field at `addr` is marked `!must_fill`. A bare string is `Addr`
861
901
  * shorthand for `{ field }`. `false` for an absent field (truthful: it isn't
@@ -904,6 +944,21 @@ export class Document {
904
944
  * Throws on an invalid quill reference. Mirrors Python `Document(quill_ref)`.
905
945
  */
906
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;
907
962
  /**
908
963
  * The canonical `$quill` reference grammar as author-facing text. Core is
909
964
  * the single source of truth: drive schema `describe` and validation
@@ -939,7 +994,7 @@ export class Document {
939
994
  * overlay or `undefined`; drops `$seed` entirely once empty. Sibling kinds
940
995
  * survive. `$seed` is main-only, so this takes no address.
941
996
  */
942
- removeSeedNamespace(card_kind: string): any;
997
+ removeSeedOverlay(card_kind: string): any;
943
998
  /**
944
999
  * **Revise** the richtext value at `addr` from a markdown string: **edit
945
1000
  * semantics**, the default write path, returning the text `Delta`. Imports
@@ -952,13 +1007,6 @@ export class Document {
952
1007
  * non-content field value, or an over-nested markdown input.
953
1008
  */
954
1009
  revise(addr: Addr | string, markdown: string): Delta;
955
- /**
956
- * Read the `schema` version tag from a raw storage DTO string without a
957
- * full parse, or `undefined`. Returns unknown future versions as-is:
958
- * useful to distinguish "build too old" from "payload corrupt" when
959
- * `fromJson` throws.
960
- */
961
- static schemaVersionOf(json: string): string | undefined;
962
1010
  /**
963
1011
  * The main card's `$seed` overlay object for `kind` (the `$seed[kind]`
964
1012
  * entry), or `undefined` when absent. The cheap read that feeds
@@ -977,6 +1025,18 @@ export class Document {
977
1025
  * Replace the QUILL reference string. Throws if `ref_str` is invalid.
978
1026
  */
979
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;
980
1040
  /**
981
1041
  * Replace the opaque `$ext` map on the card `addr` targets (a card address,
982
1042
  * absent `card` = main). `value` must be a plain object. `$ext` carries
@@ -999,7 +1059,7 @@ export class Document {
999
1059
  * shorthand for `{ field }`, so `doc.storeField("qty", 3)` reads as written;
1000
1060
  * `{ card: 2, field: "qty" }` targets a composable card. Clears any
1001
1061
  * `!must_fill` marker. A body address (no `field`) throws: a body is never
1002
- * opaque; write it with `revise` / `install` / `writer.setBody`. Throws on
1062
+ * opaque; write it with `revise` / `overwrite` / `writer.reviseBody`. Throws on
1003
1063
  * an out-of-range card or a malformed name.
1004
1064
  */
1005
1065
  storeField(addr: Addr | string, value: any): void;
@@ -1028,7 +1088,7 @@ export class Document {
1028
1088
  * cards of that kind spawn with. Quill-free and verbatim: an opaque `store`
1029
1089
  * verb. Throws if `overlay` cannot be serialized or nests too deep.
1030
1090
  */
1031
- storeSeedNamespace(card_kind: string, overlay: any): void;
1091
+ storeSeedOverlay(card_kind: string, overlay: any): void;
1032
1092
  /**
1033
1093
  * Serialize this document to a versioned storage DTO string.
1034
1094
  *
@@ -1090,15 +1150,6 @@ export class LiveSession {
1090
1150
  private constructor();
1091
1151
  free(): void;
1092
1152
  [Symbol.dispose](): void;
1093
- /**
1094
- * Recompile the session against `doc`: the edit verb of a live preview.
1095
- * The document is compiled through the same schema pipeline as `open`
1096
- * (same quill), then applied transactionally: on throw every read
1097
- * (`render`, `paint`, `pageSize`, `regions`, `fieldAt`) keeps serving the last-good
1098
- * compile, and the session recovers on the next successful `apply`. On
1099
- * success reads serve the new compile; repaint `dirtyPages ∩ visible`.
1100
- */
1101
- apply(doc: Document): ChangeSet;
1102
1153
  /**
1103
1154
  * The schema field whose content is under a point on `page`, the
1104
1155
  * forward (click → field) direction: hit-test a click against the
@@ -1177,6 +1228,19 @@ export class LiveSession {
1177
1228
  */
1178
1229
  regions(): FieldRegion[];
1179
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;
1180
1244
  /**
1181
1245
  * The backend that produced this session (e.g. `"typst"`).
1182
1246
  */
@@ -1233,8 +1297,8 @@ export class Quill {
1233
1297
  * ingestion path**, and the bound twin of the schema-free
1234
1298
  * `Document.fromMarkdown`. The returned document rests at its canonical
1235
1299
  * form (a `richtext` field as a content object, a `plaintext` field as its
1236
- * literal string), so `getStored` no longer answers "corpus or string?"
1237
- * 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.
1238
1302
  *
1239
1303
  * Parse warnings and the `conform::*` diagnostics both land on
1240
1304
  * `doc.warnings`. Throws on a parse failure, or when `markdown` declares a
@@ -1385,17 +1449,12 @@ export function formatDocPath(segs: DocPathSeg[]): string;
1385
1449
 
1386
1450
  /**
1387
1451
  * Import a markdown string to a canonical `Content` content: the pure,
1388
- * document-free codec. Pair with `install(addr, importMarkdown(md))` to spell
1452
+ * document-free codec. Pair with `overwrite(addr, importMarkdown(md))` to spell
1389
1453
  * the cold (anchor-losing) write at the call site; prefer `revise` for edit
1390
1454
  * semantics. Throws on an over-nested input.
1391
1455
  */
1392
1456
  export function importMarkdown(markdown: string): Content;
1393
1457
 
1394
- /**
1395
- * Initialize the WASM module with panic hooks for better error messages
1396
- */
1397
- export function init(): void;
1398
-
1399
1458
  /**
1400
1459
  * Map a base content position (a USV index into `Content.text`, not a UTF-16
1401
1460
  * offset) through a `delta` to its new USV position: the pure position-mapping
@@ -1423,3 +1482,142 @@ export function parseDocPath(path: string): DocPathSeg[];
1423
1482
  * markdown input or a non-content `base`.
1424
1483
  */
1425
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>;