@quillmark/wasm 0.115.0 → 0.116.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.
@@ -11,7 +11,6 @@ export const document__readerGetContent: (a: number, b: number, c: number, d: nu
11
11
  export const document__readerGetContentAt: (a: number, b: number, c: number, d: number, e: number) => void;
12
12
  export const document__reviseField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
13
13
  export const document_applyChange: (a: number, b: number, c: number, d: number) => void;
14
- export const document_blueprintInstruction: (a: number, b: number, c: number) => void;
15
14
  export const document_bodyMarkdown: (a: number, b: number, c: number) => void;
16
15
  export const document_card: (a: number, b: number, c: number) => void;
17
16
  export const document_cardCount: (a: number) => number;
@@ -20,15 +19,14 @@ export const document_cards: (a: number, b: number) => void;
20
19
  export const document_clone: (a: number) => number;
21
20
  export const document_currentStorageVersion: (a: number) => void;
22
21
  export const document_equals: (a: number, b: number) => number;
23
- export const document_formatRules: (a: number) => void;
24
22
  export const document_fromMarkdown: (a: number, b: number, c: number) => void;
25
23
  export const document_fromStored: (a: number, b: number, c: number) => void;
26
24
  export const document_getExt: (a: number, b: number, c: number) => void;
27
25
  export const document_getStored: (a: number, b: number, c: number) => void;
28
26
  export const document_insertCard: (a: number, b: number, c: number, d: number) => void;
29
- export const document_isFill: (a: number, b: number, c: number) => void;
30
27
  export const document_loadStored: (a: number, b: number, c: number, d: number) => void;
31
28
  export const document_main: (a: number, b: number) => void;
29
+ export const document_markdownRules: (a: number) => void;
32
30
  export const document_moveCard: (a: number, b: number, c: number, d: number) => void;
33
31
  export const document_new: (a: number, b: number, c: number) => void;
34
32
  export const document_overwrite: (a: number, b: number, c: number, d: number) => void;
@@ -46,7 +44,6 @@ export const document_storageVersionOf: (a: number, b: number, c: number) => voi
46
44
  export const document_storeExt: (a: number, b: number, c: number, d: number) => void;
47
45
  export const document_storeField: (a: number, b: number, c: number, d: number) => void;
48
46
  export const document_storeFields: (a: number, b: number, c: number, d: number) => void;
49
- export const document_storeFill: (a: number, b: number, c: number, d: number) => void;
50
47
  export const document_storeSeedOverlay: (a: number, b: number, c: number, d: number, e: number) => void;
51
48
  export const document_toMarkdown: (a: number, b: number) => void;
52
49
  export const document_toStored: (a: number, b: number) => void;
@@ -55,10 +52,12 @@ export const exportMarkdown: (a: number, b: number) => void;
55
52
  export const formatDiagnostic: (a: number, b: number) => void;
56
53
  export const formatDocPath: (a: number, b: number) => void;
57
54
  export const importMarkdown: (a: number, b: number, c: number) => void;
55
+ export const isInline: (a: number, b: number) => void;
56
+ export const isPlain: (a: number, b: number) => void;
58
57
  export const mapMarks: (a: number, b: number, c: number) => void;
59
58
  export const mapPos: (a: number, b: number, c: number, d: number) => void;
60
59
  export const parseDocPath: (a: number, b: number, c: number) => void;
61
- export const quill__resolve: (a: number, b: number, c: number) => void;
60
+ export const quill__resolve: (a: number, b: number, c: number, d: number, e: number) => void;
62
61
  export const quill_backendId: (a: number, b: number) => void;
63
62
  export const quill_blueprint: (a: number, b: number) => void;
64
63
  export const quill_conform: (a: number, b: number, c: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillmark/wasm",
3
- "version": "0.115.0",
3
+ "version": "0.116.0",
4
4
  "description": "WebAssembly bindings for Quillmark, a schema-driven document engine",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/render/wasm.d.ts CHANGED
@@ -13,13 +13,6 @@ export type PayloadItem =
13
13
  type: "field";
14
14
  key: string;
15
15
  value: unknown;
16
- fill?: boolean;
17
- /**
18
- * Paths to `!must_fill` markers nested *inside* `value` (the `value`
19
- * projection itself is fill-free). Absent when the field has no nested
20
- * placeholders. Preserved across `insertCard`.
21
- */
22
- nestedFills?: PathStep[][];
23
16
  }
24
17
  | { type: "comment"; text: string; inline?: boolean };
25
18
 
@@ -27,9 +20,9 @@ export type PayloadItem =
27
20
  * A single card block, as read back from a document. Every `Card` is a valid
28
21
  * `CardInput`, so a card read from one document pushes straight into another.
29
22
  *
30
- * `$` system entries are hoisted to named fields: `kind` (the `$kind`, empty
31
- * string when none), `quill` (`$quill` `name@version`, main card only), `ext`
32
- * (`$ext`), and `seed` (the `$seed` per-kind overlay map, main card only).
23
+ * `$` system entries are hoisted to named fields: `kind` (the `$kind`),
24
+ * `quill` (`$quill` `name@version`, main card only), `ext` (`$ext`), and
25
+ * `seed` (the `$seed` per-kind overlay map, main card only).
33
26
  * `payloadItems` carries user fields and comments in order.
34
27
  */
35
28
  export interface Card {
@@ -326,58 +319,14 @@ export type DocPathSeg =
326
319
 
327
320
 
328
321
  /**
329
- * Page dimensions in points (1 pt = 1/72 inch). Report-only: the painter sizes
330
- * the canvas itself from `PaintOptions`. `pageSize` is for callers that need
331
- * page geometry up-front, e.g. to lay out a scrollable list of canvases.
322
+ * Page dimensions in points (1 pt = 1/72 inch). `pageSize` is for callers that
323
+ * need page geometry up-front, e.g. to lay out a scrollable list of canvases.
332
324
  */
333
325
  export interface PageSize {
334
326
  widthPt: number;
335
327
  heightPt: number;
336
328
  }
337
329
 
338
- /**
339
- * Inputs to `LiveSession.paint`. Both default to `1`, must be finite and `> 0`,
340
- * and multiply to the effective rasterization scale.
341
- *
342
- * - `layoutScale`: layout-space pixels per point — CSS pixels per pt for an
343
- * on-screen canvas — surfaced back as `layoutWidth` / `layoutHeight`.
344
- * - `densityScale`: backing-store density. Fold `window.devicePixelRatio`,
345
- * in-app zoom, and `visualViewport.scale` into this one value; the default
346
- * `1` produces a non-retina backing store.
347
- */
348
- export interface PaintOptions {
349
- layoutScale?: number;
350
- densityScale?: number;
351
- }
352
-
353
- /**
354
- * Returned by `LiveSession.paint`.
355
- *
356
- * - `layoutWidth` / `layoutHeight`: the display box, in CSS pixels for an
357
- * on-screen canvas, to drive `canvas.style.*`. Independent of `densityScale`.
358
- * - `pixelWidth` / `pixelHeight`: the backing store the painter wrote to
359
- * `canvas.width` / `canvas.height`, `round(layout * densityScale)` unless the
360
- * request exceeded 16384 px per side and `densityScale` was clamped to fit.
361
- * - `clamped`: `true` when that clamp fired, so the page renders soft at the
362
- * same `canvas.style` size.
363
- * - `effectiveDensityScale`: the `densityScale` actually applied.
364
- *
365
- * The painter owns `canvas.width` / `canvas.height` and never touches
366
- * `canvas.style.*`. The write is a whole-backing-store `putImageData`, which
367
- * bypasses the 2D context transform, `globalAlpha`, and clip: give each visible
368
- * page its own `<canvas>`, since no compositing, sub-rect, or transform reaches
369
- * through `paint`. Under `OffscreenCanvasRenderingContext2D` the layout
370
- * dimensions are informational — there is no CSS box to apply them to.
371
- */
372
- export interface PaintResult {
373
- layoutWidth: number;
374
- layoutHeight: number;
375
- pixelWidth: number;
376
- pixelHeight: number;
377
- clamped: boolean;
378
- effectiveDensityScale: number;
379
- }
380
-
381
330
 
382
331
 
383
332
  /**
@@ -412,11 +361,11 @@ export interface ResolvedMain {
412
361
 
413
362
  /**
414
363
  * One composable card's resolved rows in declaration order, with its authored
415
- * `kind` (`null` for an unknown-kind card), its document-array `index`, and its
364
+ * `kind` (an undeclared one included), its document-array `index`, and its
416
365
  * body row: `null` when the kind enables no body.
417
366
  */
418
367
  export interface ResolvedCard {
419
- kind: string | null;
368
+ kind: string;
420
369
  index: number;
421
370
  fields: ResolvedField[];
422
371
  body: ResolvedField | null;
@@ -424,7 +373,7 @@ export interface ResolvedCard {
424
373
 
425
374
  /**
426
375
  * The resolved-value view (`Quill.resolve`): the main card and every composable
427
- * card. Value and provenance only; completeness stays `Quill.validate`'s.
376
+ * card. Value and provenance only; diagnostics stay `Quill.validate`'s.
428
377
  */
429
378
  export interface Resolved {
430
379
  main: ResolvedMain;
@@ -436,7 +385,6 @@ export interface Resolved {
436
385
  /** UI layout hints for a single field. Display order is not a hint: key order
437
386
  * in the schema's `fields`/`properties` objects is the ordering contract. */
438
387
  export interface QuillFieldUi {
439
- title?: string;
440
388
  group?: string;
441
389
  compact?: boolean;
442
390
  multiline?: boolean;
@@ -460,47 +408,35 @@ export interface QuillGroupUi {
460
408
 
461
409
  /** UI layout hints for a card (main or named card kind). */
462
410
  export interface QuillCardUi {
463
- title?: string;
464
411
  /** The groups a field's `ui.group` may reference, keyed by group id. Key
465
412
  * order is the display-order contract, as with `fields`. Absent when the
466
413
  * card declares no groups. */
467
414
  groups?: Record<string, QuillGroupUi>;
468
415
  }
469
416
 
470
- /** A block construct a body can hold. `paragraph` is the floor and cannot be
471
- * declined, so it is absent. */
472
- export type QuillBlockConstruct =
473
- | "heading"
474
- | "rule"
475
- | "code"
476
- | "list"
477
- | "quote"
478
- | "table"
479
- | "image";
480
-
481
417
  /** Body namespace for a card (main or named card kind). */
482
418
  export interface QuillCardBody {
483
419
  /** When false, consumers must not accept or store body content for this card kind. Defaults to true. */
484
420
  enabled?: boolean;
485
- /** Example body content embedded verbatim in the blueprint body region. Fallback is "Write <card> body here." */
421
+ /** Example body content, shown on the blueprint's `# body e.g.` line above the body. */
486
422
  example?: string;
487
- /** Block constructs this quill's plate does not typeset in this body;
488
- * absent or empty declines nothing. A body that holds one anyway draws a
489
- * non-fatal `plate::unsupported_construct` warning. Nothing verifies the
490
- * claim: absence from this list is not a promise the plate typesets it. */
491
- unsupported?: QuillBlockConstruct[];
492
423
  }
493
424
 
425
+ export type QuillFieldType = "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "richtext" | "plaintext" | "enum" | "matrix";
426
+
494
427
  /** Schema entry for a single field declared in a quill's `Quill.yaml`.
495
428
  *
496
- * One declaration, and no `required` key. `default` and `example` say what the
497
- * cell holds, and `default`'s absence is the obligation: a field nobody
498
- * declared a value for carries a `!must_fill` marker in the blueprint and warns
499
- * `validation::must_fill` while the document leaves it unauthored. Neither
500
- * gates render: an absent field blank-fills.
429
+ * `default` is the value an unanswered cell renders; `example` documents shape
430
+ * and never renders. An absent field without a `default` blank-fills.
501
431
  */
502
432
  export interface QuillFieldSchema {
503
- type: "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "richtext" | "plaintext" | "enum" | "matrix";
433
+ /** A trailing `?` marks the cell optional: unanswered, it renders `none`
434
+ * rather than its type's blank, and it never carries a `default`. A
435
+ * consumer offers a way back to unanswered (`removeField`) on such a cell. */
436
+ type: QuillFieldType | `${Exclude<QuillFieldType, "object" | "matrix">}?`;
437
+ /** The field's label, a literal. Absent, the consumer humanizes the key
438
+ * (`memo_for` → "Memo For"). Never present on an array's `items`. */
439
+ title?: string;
504
440
  description?: string;
505
441
  default?: unknown;
506
442
  example?: unknown;
@@ -532,6 +468,9 @@ export interface QuillFieldSchema {
532
468
 
533
469
  /** Schema entry for the main card or a named card kind. */
534
470
  export interface QuillCardSchema {
471
+ /** The kind's label, a literal. Absent, the consumer humanizes the kind
472
+ * name. An instance takes its label from its own values. */
473
+ title?: string;
535
474
  description?: string;
536
475
  fields: Record<string, QuillFieldSchema>;
537
476
  ui?: QuillCardUi;
@@ -722,11 +661,6 @@ export class Document {
722
661
  * building `markOps` need not predict it.
723
662
  */
724
663
  applyChange(addr: Addr | string, bundle: ChangeBundle): void;
725
- /**
726
- * A blueprint's fill obligation for the given `quillName`, re-exposed from
727
- * core. Carries no tool name: pair it with your own next-step directive.
728
- */
729
- static blueprintInstruction(quill_name: string): string;
730
664
  /**
731
665
  * The **body** markdown projection: an on-demand, lossy export (content-only
732
666
  * marks do not survive markdown). A body's type is a format fact, not a
@@ -760,11 +694,6 @@ export class Document {
760
694
  * Structural equality, excluding parse-time `warnings`.
761
695
  */
762
696
  equals(other: Document): boolean;
763
- /**
764
- * Authoring-format rules for the card-yaml markdown surface, re-exposed from
765
- * core. Constant across calls; read once and cache.
766
- */
767
- static formatRules(): string;
768
697
  /**
769
698
  * Parse markdown into a typed Document. Throws on parse errors.
770
699
  */
@@ -810,12 +739,6 @@ export class Document {
810
739
  * `at` is out of range.
811
740
  */
812
741
  insertCard(card: CardInput, at?: number): void;
813
- /**
814
- * Whether the field at `addr` is marked `!must_fill`. A bare string is `Addr`
815
- * shorthand for `{ field }`. `false` for an absent field and for a body
816
- * address; only an out-of-range `addr.card` throws.
817
- */
818
- isFill(addr: Addr | string): boolean;
819
742
  /**
820
743
  * Replace this document's contents **in place** from a versioned storage DTO
821
744
  * string: the mutating twin of [`fromStored`](Document::from_stored).
@@ -824,6 +747,11 @@ export class Document {
824
747
  * variable.
825
748
  */
826
749
  loadStored(json: string): void;
750
+ /**
751
+ * The Quillmark Markdown rules, re-exposed from core. Constant across
752
+ * calls; read once and cache.
753
+ */
754
+ static markdownRules(): string;
827
755
  /**
828
756
  * Move the card at `from` to position `to`. `from == to` is a no-op.
829
757
  */
@@ -832,8 +760,8 @@ export class Document {
832
760
  * A blank document: a main card carrying only `$quill`, an empty body, and
833
761
  * no composable cards. Absent fields resolve at render time (`default`, else
834
762
  * the field's blank), so nothing the caller did not set reaches the output.
835
- * For an example-filled starter use `Quill.seedDocument()`. Throws on an
836
- * invalid quill reference.
763
+ * For one instance of every card kind use `Quill.seedDocument()`. Throws on
764
+ * an invalid quill reference.
837
765
  */
838
766
  constructor(quill_ref: string);
839
767
  /**
@@ -930,7 +858,7 @@ export class Document {
930
858
  * Store a field verbatim at `addr`, deferring coercion to render; the typed
931
859
  * write is [`commitField`](Document::commit_field). A bare string is `Addr`
932
860
  * shorthand for `{ field }`; `{ card: 2, field: "qty" }` targets a
933
- * composable card. Clears any `!must_fill` marker. A body address throws:
861
+ * composable card. A body address throws:
934
862
  * write a body with `revise` / `overwrite`. Throws on an out-of-range card
935
863
  * or a malformed name.
936
864
  */
@@ -943,11 +871,6 @@ export class Document {
943
871
  * one entry per offending field. Throws on an out-of-range card.
944
872
  */
945
873
  storeFields(addr: CardAddr, fields: Record<string, unknown>): void;
946
- /**
947
- * Store a field verbatim at `addr` and mark it `!must_fill`. A body address
948
- * throws; same validation as [`storeField`](Document::store_field).
949
- */
950
- storeFill(addr: Addr | string, value: any): void;
951
874
  /**
952
875
  * Merge a card-kind's seed `overlay` into the **main** card's `$seed` map
953
876
  * under `cardKind`, preserving sibling kinds; `$seed` is main-only, so this
@@ -1004,15 +927,17 @@ export class LiveSession {
1004
927
  * The schema field whose content is under a point on `page`: the `DocPath`
1005
928
  * address to focus in the editor, or `undefined` off any field's ink.
1006
929
  * `x`/`y` are PDF points with a **bottom-left** origin, the same space as
1007
- * `FieldRegion.rect`, so from a canvas click use
1008
- * `x = clickPx.x / renderScale`, `y = pageHeightPt - clickPx.y / renderScale`.
930
+ * `FieldRegion.rect`. A pointer event reports CSS pixels, so divide by the
931
+ * CSS px per point the page is shown at, `k = canvas.clientWidth /
932
+ * pageWidthPt`, not by `paint`'s `scale`, which carries `devicePixelRatio`:
933
+ * `x = e.offsetX / k`, `y = pageHeightPt - e.offsetY / k`.
1009
934
  * Unlike `regions()`, *every* placement answers, not just the first.
1010
935
  *
1011
936
  * `tolPt` is how far off the ink a click still counts, in the same points,
1012
937
  * and defaults to `0` — exact. Convert the pointer slack a surface wants
1013
- * from CSS pixels at the scale it drew the page (`slackPx / renderScale`),
1014
- * so it stays the same size under the cursor as the page zooms. The
1015
- * nearest placement answers, so raising it only fills a miss.
938
+ * from CSS pixels by the same `k` (`slackPx / k`), so it stays the same
939
+ * size under the cursor as the page zooms. The nearest placement answers,
940
+ * so raising it only fills a miss.
1016
941
  */
1017
942
  fieldAt(page: number, x: number, y: number, tol_pt?: number | null): string | undefined;
1018
943
  /**
@@ -1037,21 +962,20 @@ export class LiveSession {
1037
962
  pageSize(page: number): PageSize;
1038
963
  /**
1039
964
  * Paint `page` into a `CanvasRenderingContext2D` or
1040
- * `OffscreenCanvasRenderingContext2D`. The painter owns
1041
- * `canvas.width`/`height` (no `clearRect` needed); consumers own
1042
- * `canvas.style.*`. If `layoutScale * densityScale` exceeds 16384 px per
1043
- * side, `densityScale` is clamped and `PaintResult` reports it.
965
+ * `OffscreenCanvasRenderingContext2D` at `scale` backing-store pixels per
966
+ * point, reduced where it must be to keep both sides within
967
+ * `MAX_RASTER_SIDE` (16384 px). The painter owns `canvas.width`/`height`;
968
+ * consumers own `canvas.style.*`.
1044
969
  *
1045
970
  * `put_image_data` writes the whole backing store, bypassing the 2D
1046
971
  * context's transform, `globalAlpha`, and clip, so each visible page needs
1047
972
  * its own `<canvas>`: no compositing, sub-rect, or transform reaches through
1048
973
  * this call.
1049
974
  *
1050
- * Throws if `page` is out of range, `ctx` is the wrong type, either scale is
1051
- * non-finite or `<= 0`, or the page cannot be rasterized at the resulting
1052
- * scale (`backend::invalid_raster_scale`).
975
+ * Throws if `page` is out of range, `ctx` is the wrong type, or `scale` is
976
+ * not finite and positive (`backend::invalid_raster_scale`).
1053
977
  */
1054
- paint(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, page: number, opts: PaintOptions | undefined): PaintResult;
978
+ paint(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, page: number, scale: number): void;
1055
979
  /**
1056
980
  * A point → **content position**: the field *and* a USV offset into its
1057
981
  * `Content`, for placing a caret or mapping a selection into the content
@@ -1109,8 +1033,7 @@ export class Quill {
1109
1033
  * transport door (`fromMarkdown`, `fromStored`, a stored row).
1110
1034
  *
1111
1035
  * Idempotent: an equal value is not rewritten, so YAML comments and stored
1112
- * bytes survive. A `!must_fill` marker anywhere in a field's value skips
1113
- * that field, and a value the strict write refuses stays as authored with a
1036
+ * bytes survive. A value the strict write refuses stays as authored with a
1114
1037
  * diagnostic. Throws when `doc` declares a different `$quill`, before any
1115
1038
  * mutation.
1116
1039
  */
@@ -1144,9 +1067,9 @@ export class Quill {
1144
1067
  parse(markdown: string): Document;
1145
1068
  /**
1146
1069
  * Seed a starter composable `Card` of the given kind (carries `$kind`),
1147
- * layering an optional per-kind seed `overlay` over the schema-example base
1148
- * (`overlay › example › absent`). `undefined` when `cardKind` is not
1149
- * declared in this quill's schema.
1070
+ * committing an optional per-kind seed `overlay`'s fields and `$body`
1071
+ * (`overlay › absent`, body `overlay › empty`). `undefined` when
1072
+ * `cardKind` is not declared in this quill's schema.
1150
1073
  *
1151
1074
  * Pass `document.seedOverlay(cardKind)` as `overlay` so a card added to a
1152
1075
  * template-derived document inherits its curated starting values; omit it
@@ -1155,9 +1078,9 @@ export class Quill {
1155
1078
  seedCard(card_kind: string, overlay: Record<string, unknown> | undefined): Card | undefined;
1156
1079
  /**
1157
1080
  * Seed a starter `Document` from the schema: the main card plus one instance
1158
- * of each composable card kind, each committing its fields' `example:`
1159
- * values and leaving every other field absent (interpolated at render as
1160
- * `default:`, else the field's blank). A field with both renders its example.
1081
+ * of each composable card kind, each body empty and every field absent
1082
+ * (interpolated at render as `default:`, else the field's blank). No
1083
+ * `example:` is committed (a field's or `body.example`).
1161
1084
  */
1162
1085
  seedDocument(): Document;
1163
1086
  /**
@@ -1178,8 +1101,7 @@ export class Quill {
1178
1101
  /**
1179
1102
  * Validate `doc` against this quill's schema, returning every diagnostic
1180
1103
  * (empty when the document is valid). Forwards the canonical
1181
- * `validation::*` diagnostics the engine emits, including the non-fatal
1182
- * `validation::must_fill` warning per `!must_fill` marker left behind.
1104
+ * `validation::*` diagnostics the engine emits.
1183
1105
  */
1184
1106
  validate(doc: Document): Diagnostic[];
1185
1107
  /**
@@ -1217,15 +1139,17 @@ export class Quillmark {
1217
1139
  [Symbol.dispose](): void;
1218
1140
  constructor();
1219
1141
  /**
1220
- * Open a live render session for `doc` against `quill`'s backend.
1142
+ * Open a live render session for `doc` against `quill`'s backend, on the
1143
+ * render date `today` (`YYYY-MM-DD`, default the local date).
1221
1144
  */
1222
- open(quill: Quill, doc: Document): LiveSession;
1145
+ open(quill: Quill, doc: Document, today?: string | null): LiveSession;
1223
1146
  /**
1224
- * Render `doc` against `quill` in one shot. Convenience over `open` +
1225
- * `LiveSession.render`: an unset `output_format` falls back to the
1226
- * backend's first supported format.
1147
+ * Render `doc` against `quill` in one shot: `open` + `LiveSession.render`,
1148
+ * with `doc.warnings`, then every `quill.validate` warning, ahead of the
1149
+ * compile's in `warnings`. An unset `output_format` falls back to the
1150
+ * backend's first supported format. `today` reads as on `open`.
1227
1151
  */
1228
- render(quill: Quill, doc: Document, opts?: RenderOptions | null): RenderResult;
1152
+ render(quill: Quill, doc: Document, opts?: RenderOptions | null, today?: string | null): RenderResult;
1229
1153
  /**
1230
1154
  * The output formats `quill`'s backend can emit; resolves the backend but
1231
1155
  * compiles nothing. Throws `engine::backend_not_found` when no registered
@@ -1267,6 +1191,22 @@ export function formatDocPath(segs: DocPathSeg[]): string;
1267
1191
  */
1268
1192
  export function importMarkdown(markdown: string): Content;
1269
1193
 
1194
+ /**
1195
+ * Whether `content` satisfies the `inline` constraint of `richtext` and
1196
+ * `plaintext`: one `Para` line, in no container, with no islands. Judged on
1197
+ * the normalized content, which is what a write stores. Throws if `content` is
1198
+ * not canonical content.
1199
+ */
1200
+ export function isInline(content: Content): boolean;
1201
+
1202
+ /**
1203
+ * Whether `content` satisfies the `plaintext` constraint: no marks, no
1204
+ * islands, every line a `Para` in no container. Judged on the normalized
1205
+ * content, which is what a write stores. Throws if `content` is not canonical
1206
+ * content.
1207
+ */
1208
+ export function isPlain(content: Content): boolean;
1209
+
1270
1210
  /**
1271
1211
  * Where `bundle`'s text-moving channels (`delta`, then `islandOps`, then
1272
1212
  * `lineOps`) leave `content`'s marks: the final-text coordinates the bundle's
@@ -1334,7 +1274,6 @@ export interface InitOutput {
1334
1274
  readonly document__readerGetContentAt: (a: number, b: number, c: number, d: number, e: number) => void;
1335
1275
  readonly document__reviseField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1336
1276
  readonly document_applyChange: (a: number, b: number, c: number, d: number) => void;
1337
- readonly document_blueprintInstruction: (a: number, b: number, c: number) => void;
1338
1277
  readonly document_bodyMarkdown: (a: number, b: number, c: number) => void;
1339
1278
  readonly document_card: (a: number, b: number, c: number) => void;
1340
1279
  readonly document_cardCount: (a: number) => number;
@@ -1343,15 +1282,14 @@ export interface InitOutput {
1343
1282
  readonly document_clone: (a: number) => number;
1344
1283
  readonly document_currentStorageVersion: (a: number) => void;
1345
1284
  readonly document_equals: (a: number, b: number) => number;
1346
- readonly document_formatRules: (a: number) => void;
1347
1285
  readonly document_fromMarkdown: (a: number, b: number, c: number) => void;
1348
1286
  readonly document_fromStored: (a: number, b: number, c: number) => void;
1349
1287
  readonly document_getExt: (a: number, b: number, c: number) => void;
1350
1288
  readonly document_getStored: (a: number, b: number, c: number) => void;
1351
1289
  readonly document_insertCard: (a: number, b: number, c: number, d: number) => void;
1352
- readonly document_isFill: (a: number, b: number, c: number) => void;
1353
1290
  readonly document_loadStored: (a: number, b: number, c: number, d: number) => void;
1354
1291
  readonly document_main: (a: number, b: number) => void;
1292
+ readonly document_markdownRules: (a: number) => void;
1355
1293
  readonly document_moveCard: (a: number, b: number, c: number, d: number) => void;
1356
1294
  readonly document_new: (a: number, b: number, c: number) => void;
1357
1295
  readonly document_overwrite: (a: number, b: number, c: number, d: number) => void;
@@ -1369,7 +1307,6 @@ export interface InitOutput {
1369
1307
  readonly document_storeExt: (a: number, b: number, c: number, d: number) => void;
1370
1308
  readonly document_storeField: (a: number, b: number, c: number, d: number) => void;
1371
1309
  readonly document_storeFields: (a: number, b: number, c: number, d: number) => void;
1372
- readonly document_storeFill: (a: number, b: number, c: number, d: number) => void;
1373
1310
  readonly document_storeSeedOverlay: (a: number, b: number, c: number, d: number, e: number) => void;
1374
1311
  readonly document_toMarkdown: (a: number, b: number) => void;
1375
1312
  readonly document_toStored: (a: number, b: number) => void;
@@ -1378,6 +1315,8 @@ export interface InitOutput {
1378
1315
  readonly formatDiagnostic: (a: number, b: number) => void;
1379
1316
  readonly formatDocPath: (a: number, b: number) => void;
1380
1317
  readonly importMarkdown: (a: number, b: number, c: number) => void;
1318
+ readonly isInline: (a: number, b: number) => void;
1319
+ readonly isPlain: (a: number, b: number) => void;
1381
1320
  readonly livesession_backendId: (a: number, b: number) => void;
1382
1321
  readonly livesession_fieldAt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1383
1322
  readonly livesession_fieldBoxes: (a: number, b: number, c: number, d: number) => void;
@@ -1393,7 +1332,7 @@ export interface InitOutput {
1393
1332
  readonly mapMarks: (a: number, b: number, c: number) => void;
1394
1333
  readonly mapPos: (a: number, b: number, c: number, d: number) => void;
1395
1334
  readonly parseDocPath: (a: number, b: number, c: number) => void;
1396
- readonly quill__resolve: (a: number, b: number, c: number) => void;
1335
+ readonly quill__resolve: (a: number, b: number, c: number, d: number, e: number) => void;
1397
1336
  readonly quill_backendId: (a: number, b: number) => void;
1398
1337
  readonly quill_blueprint: (a: number, b: number) => void;
1399
1338
  readonly quill_conform: (a: number, b: number, c: number) => void;
@@ -1409,8 +1348,8 @@ export interface InitOutput {
1409
1348
  readonly quill_validate: (a: number, b: number, c: number) => void;
1410
1349
  readonly quill_warnings: (a: number, b: number) => void;
1411
1350
  readonly quillmark_new: () => number;
1412
- readonly quillmark_open: (a: number, b: number, c: number, d: number) => void;
1413
- readonly quillmark_render: (a: number, b: number, c: number, d: number, e: number) => void;
1351
+ readonly quillmark_open: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1352
+ readonly quillmark_render: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1414
1353
  readonly quillmark_supportedFormats: (a: number, b: number, c: number) => void;
1415
1354
  readonly rebase: (a: number, b: number, c: number, d: number) => void;
1416
1355
  readonly start: () => void;