@quillmark/wasm 0.115.0 → 0.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/core/wasm_bg.wasm CHANGED
Binary file
@@ -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,14 +52,17 @@ 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;
65
64
  export const quill_emptyDocument: (a: number) => number;
65
+ export const quill_exampleDocument: (a: number, b: number) => void;
66
66
  export const quill_fromTree: (a: number, b: number) => void;
67
67
  export const quill_metadata: (a: number, b: number) => void;
68
68
  export const quill_parse: (a: number, b: number, c: number, d: 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.117.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,50 +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." */
486
- 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
421
  }
493
422
 
423
+ export type QuillFieldType = "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "richtext" | "plaintext" | "enum" | "matrix";
424
+
494
425
  /** Schema entry for a single field declared in a quill's `Quill.yaml`.
495
426
  *
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.
427
+ * `default` is the value an unanswered cell renders. An absent field without a
428
+ * `default` blank-fills.
501
429
  */
502
430
  export interface QuillFieldSchema {
503
- type: "string" | "number" | "integer" | "boolean" | "array" | "object" | "date" | "datetime" | "richtext" | "plaintext" | "enum" | "matrix";
431
+ /** A trailing `?` marks the cell optional: unanswered, it renders `none`
432
+ * rather than its type's blank, and it never carries a `default`. A
433
+ * consumer offers a way back to unanswered (`removeField`) on such a cell. */
434
+ type: QuillFieldType | `${Exclude<QuillFieldType, "object" | "matrix">}?`;
435
+ /** The field's label, a literal. Absent, the consumer humanizes the key
436
+ * (`memo_for` → "Memo For"). Never present on an array's `items`. */
437
+ title?: string;
504
438
  description?: string;
505
439
  default?: unknown;
506
- example?: unknown;
507
440
  /** The closed set of allowed values. Required on `type: "enum"`, and valid
508
441
  * nowhere else. */
509
442
  values?: string[];
@@ -532,6 +465,9 @@ export interface QuillFieldSchema {
532
465
 
533
466
  /** Schema entry for the main card or a named card kind. */
534
467
  export interface QuillCardSchema {
468
+ /** The kind's label, a literal. Absent, the consumer humanizes the kind
469
+ * name. An instance takes its label from its own values. */
470
+ title?: string;
535
471
  description?: string;
536
472
  fields: Record<string, QuillFieldSchema>;
537
473
  ui?: QuillCardUi;
@@ -722,11 +658,6 @@ export class Document {
722
658
  * building `markOps` need not predict it.
723
659
  */
724
660
  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
661
  /**
731
662
  * The **body** markdown projection: an on-demand, lossy export (content-only
732
663
  * marks do not survive markdown). A body's type is a format fact, not a
@@ -760,11 +691,6 @@ export class Document {
760
691
  * Structural equality, excluding parse-time `warnings`.
761
692
  */
762
693
  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
694
  /**
769
695
  * Parse markdown into a typed Document. Throws on parse errors.
770
696
  */
@@ -810,12 +736,6 @@ export class Document {
810
736
  * `at` is out of range.
811
737
  */
812
738
  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
739
  /**
820
740
  * Replace this document's contents **in place** from a versioned storage DTO
821
741
  * string: the mutating twin of [`fromStored`](Document::from_stored).
@@ -824,6 +744,11 @@ export class Document {
824
744
  * variable.
825
745
  */
826
746
  loadStored(json: string): void;
747
+ /**
748
+ * The Quillmark Markdown rules, re-exposed from core. Constant across
749
+ * calls; read once and cache.
750
+ */
751
+ static markdownRules(): string;
827
752
  /**
828
753
  * Move the card at `from` to position `to`. `from == to` is a no-op.
829
754
  */
@@ -832,8 +757,8 @@ export class Document {
832
757
  * A blank document: a main card carrying only `$quill`, an empty body, and
833
758
  * no composable cards. Absent fields resolve at render time (`default`, else
834
759
  * 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.
760
+ * For one instance of every card kind use `Quill.seedDocument()`. Throws on
761
+ * an invalid quill reference.
837
762
  */
838
763
  constructor(quill_ref: string);
839
764
  /**
@@ -930,7 +855,7 @@ export class Document {
930
855
  * Store a field verbatim at `addr`, deferring coercion to render; the typed
931
856
  * write is [`commitField`](Document::commit_field). A bare string is `Addr`
932
857
  * shorthand for `{ field }`; `{ card: 2, field: "qty" }` targets a
933
- * composable card. Clears any `!must_fill` marker. A body address throws:
858
+ * composable card. A body address throws:
934
859
  * write a body with `revise` / `overwrite`. Throws on an out-of-range card
935
860
  * or a malformed name.
936
861
  */
@@ -943,11 +868,6 @@ export class Document {
943
868
  * one entry per offending field. Throws on an out-of-range card.
944
869
  */
945
870
  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
871
  /**
952
872
  * Merge a card-kind's seed `overlay` into the **main** card's `$seed` map
953
873
  * under `cardKind`, preserving sibling kinds; `$seed` is main-only, so this
@@ -1004,15 +924,17 @@ export class LiveSession {
1004
924
  * The schema field whose content is under a point on `page`: the `DocPath`
1005
925
  * address to focus in the editor, or `undefined` off any field's ink.
1006
926
  * `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`.
927
+ * `FieldRegion.rect`. A pointer event reports CSS pixels, so divide by the
928
+ * CSS px per point the page is shown at, `k = canvas.clientWidth /
929
+ * pageWidthPt`, not by `paint`'s `scale`, which carries `devicePixelRatio`:
930
+ * `x = e.offsetX / k`, `y = pageHeightPt - e.offsetY / k`.
1009
931
  * Unlike `regions()`, *every* placement answers, not just the first.
1010
932
  *
1011
933
  * `tolPt` is how far off the ink a click still counts, in the same points,
1012
934
  * 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.
935
+ * from CSS pixels by the same `k` (`slackPx / k`), so it stays the same
936
+ * size under the cursor as the page zooms. The nearest placement answers,
937
+ * so raising it only fills a miss.
1016
938
  */
1017
939
  fieldAt(page: number, x: number, y: number, tol_pt?: number | null): string | undefined;
1018
940
  /**
@@ -1037,21 +959,20 @@ export class LiveSession {
1037
959
  pageSize(page: number): PageSize;
1038
960
  /**
1039
961
  * 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.
962
+ * `OffscreenCanvasRenderingContext2D` at `scale` backing-store pixels per
963
+ * point, reduced where it must be to keep both sides within
964
+ * `MAX_RASTER_SIDE` (16384 px). The painter owns `canvas.width`/`height`;
965
+ * consumers own `canvas.style.*`.
1044
966
  *
1045
967
  * `put_image_data` writes the whole backing store, bypassing the 2D
1046
968
  * context's transform, `globalAlpha`, and clip, so each visible page needs
1047
969
  * its own `<canvas>`: no compositing, sub-rect, or transform reaches through
1048
970
  * this call.
1049
971
  *
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`).
972
+ * Throws if `page` is out of range, `ctx` is the wrong type, or `scale` is
973
+ * not finite and positive (`backend::invalid_raster_scale`).
1053
974
  */
1054
- paint(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, page: number, opts: PaintOptions | undefined): PaintResult;
975
+ paint(ctx: CanvasRenderingContext2D | OffscreenCanvasRenderingContext2D, page: number, scale: number): void;
1055
976
  /**
1056
977
  * A point → **content position**: the field *and* a USV offset into its
1057
978
  * `Content`, for placing a caret or mapping a selection into the content
@@ -1109,8 +1030,7 @@ export class Quill {
1109
1030
  * transport door (`fromMarkdown`, `fromStored`, a stored row).
1110
1031
  *
1111
1032
  * 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
1033
+ * bytes survive. A value the strict write refuses stays as authored with a
1114
1034
  * diagnostic. Throws when `doc` declares a different `$quill`, before any
1115
1035
  * mutation.
1116
1036
  */
@@ -1123,6 +1043,15 @@ export class Quill {
1123
1043
  * reached by spelling the reference.
1124
1044
  */
1125
1045
  emptyDocument(): Document;
1046
+ /**
1047
+ * The quill's example document, `undefined` when the quill has no
1048
+ * `example.md` at its root: a filled-in page whose values are made up to show the
1049
+ * quill in use, never kept. It comes back pinned to this quill's
1050
+ * `name@version` and conformed as `parse` conforms, its parse and
1051
+ * `conform::*` warnings on `doc.warnings`. Throws when the file does not
1052
+ * parse or its `$quill` is not this quill's bare name.
1053
+ */
1054
+ exampleDocument(): Document | undefined;
1126
1055
  /**
1127
1056
  * Build a quill from a file tree. Pure: the declared backend is resolved
1128
1057
  * later, at render time. Accepts a `Map<string, Uint8Array>` or a plain
@@ -1144,9 +1073,9 @@ export class Quill {
1144
1073
  parse(markdown: string): Document;
1145
1074
  /**
1146
1075
  * 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.
1076
+ * committing an optional per-kind seed `overlay`'s fields and `$body`
1077
+ * (`overlay › absent`, body `overlay › empty`). `undefined` when
1078
+ * `cardKind` is not declared in this quill's schema.
1150
1079
  *
1151
1080
  * Pass `document.seedOverlay(cardKind)` as `overlay` so a card added to a
1152
1081
  * template-derived document inherits its curated starting values; omit it
@@ -1155,9 +1084,8 @@ export class Quill {
1155
1084
  seedCard(card_kind: string, overlay: Record<string, unknown> | undefined): Card | undefined;
1156
1085
  /**
1157
1086
  * 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.
1087
+ * of each composable card kind, each body empty and every field absent
1088
+ * (interpolated at render as `default:`, else the field's blank).
1161
1089
  */
1162
1090
  seedDocument(): Document;
1163
1091
  /**
@@ -1178,8 +1106,7 @@ export class Quill {
1178
1106
  /**
1179
1107
  * Validate `doc` against this quill's schema, returning every diagnostic
1180
1108
  * (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.
1109
+ * `validation::*` diagnostics the engine emits.
1183
1110
  */
1184
1111
  validate(doc: Document): Diagnostic[];
1185
1112
  /**
@@ -1217,15 +1144,17 @@ export class Quillmark {
1217
1144
  [Symbol.dispose](): void;
1218
1145
  constructor();
1219
1146
  /**
1220
- * Open a live render session for `doc` against `quill`'s backend.
1147
+ * Open a live render session for `doc` against `quill`'s backend, on the
1148
+ * render date `today` (`YYYY-MM-DD`, default the local date).
1221
1149
  */
1222
- open(quill: Quill, doc: Document): LiveSession;
1150
+ open(quill: Quill, doc: Document, today?: string | null): LiveSession;
1223
1151
  /**
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.
1152
+ * Render `doc` against `quill` in one shot: `open` + `LiveSession.render`,
1153
+ * with `doc.warnings`, then every `quill.validate` warning, ahead of the
1154
+ * compile's in `warnings`. An unset `output_format` falls back to the
1155
+ * backend's first supported format. `today` reads as on `open`.
1227
1156
  */
1228
- render(quill: Quill, doc: Document, opts?: RenderOptions | null): RenderResult;
1157
+ render(quill: Quill, doc: Document, opts?: RenderOptions | null, today?: string | null): RenderResult;
1229
1158
  /**
1230
1159
  * The output formats `quill`'s backend can emit; resolves the backend but
1231
1160
  * compiles nothing. Throws `engine::backend_not_found` when no registered
@@ -1267,6 +1196,22 @@ export function formatDocPath(segs: DocPathSeg[]): string;
1267
1196
  */
1268
1197
  export function importMarkdown(markdown: string): Content;
1269
1198
 
1199
+ /**
1200
+ * Whether `content` satisfies the `inline` constraint of `richtext` and
1201
+ * `plaintext`: one `Para` line, in no container, with no islands. Judged on
1202
+ * the normalized content, which is what a write stores. Throws if `content` is
1203
+ * not canonical content.
1204
+ */
1205
+ export function isInline(content: Content): boolean;
1206
+
1207
+ /**
1208
+ * Whether `content` satisfies the `plaintext` constraint: no marks, no
1209
+ * islands, every line a `Para` in no container. Judged on the normalized
1210
+ * content, which is what a write stores. Throws if `content` is not canonical
1211
+ * content.
1212
+ */
1213
+ export function isPlain(content: Content): boolean;
1214
+
1270
1215
  /**
1271
1216
  * Where `bundle`'s text-moving channels (`delta`, then `islandOps`, then
1272
1217
  * `lineOps`) leave `content`'s marks: the final-text coordinates the bundle's
@@ -1334,7 +1279,6 @@ export interface InitOutput {
1334
1279
  readonly document__readerGetContentAt: (a: number, b: number, c: number, d: number, e: number) => void;
1335
1280
  readonly document__reviseField: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1336
1281
  readonly document_applyChange: (a: number, b: number, c: number, d: number) => void;
1337
- readonly document_blueprintInstruction: (a: number, b: number, c: number) => void;
1338
1282
  readonly document_bodyMarkdown: (a: number, b: number, c: number) => void;
1339
1283
  readonly document_card: (a: number, b: number, c: number) => void;
1340
1284
  readonly document_cardCount: (a: number) => number;
@@ -1343,15 +1287,14 @@ export interface InitOutput {
1343
1287
  readonly document_clone: (a: number) => number;
1344
1288
  readonly document_currentStorageVersion: (a: number) => void;
1345
1289
  readonly document_equals: (a: number, b: number) => number;
1346
- readonly document_formatRules: (a: number) => void;
1347
1290
  readonly document_fromMarkdown: (a: number, b: number, c: number) => void;
1348
1291
  readonly document_fromStored: (a: number, b: number, c: number) => void;
1349
1292
  readonly document_getExt: (a: number, b: number, c: number) => void;
1350
1293
  readonly document_getStored: (a: number, b: number, c: number) => void;
1351
1294
  readonly document_insertCard: (a: number, b: number, c: number, d: number) => void;
1352
- readonly document_isFill: (a: number, b: number, c: number) => void;
1353
1295
  readonly document_loadStored: (a: number, b: number, c: number, d: number) => void;
1354
1296
  readonly document_main: (a: number, b: number) => void;
1297
+ readonly document_markdownRules: (a: number) => void;
1355
1298
  readonly document_moveCard: (a: number, b: number, c: number, d: number) => void;
1356
1299
  readonly document_new: (a: number, b: number, c: number) => void;
1357
1300
  readonly document_overwrite: (a: number, b: number, c: number, d: number) => void;
@@ -1369,7 +1312,6 @@ export interface InitOutput {
1369
1312
  readonly document_storeExt: (a: number, b: number, c: number, d: number) => void;
1370
1313
  readonly document_storeField: (a: number, b: number, c: number, d: number) => void;
1371
1314
  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
1315
  readonly document_storeSeedOverlay: (a: number, b: number, c: number, d: number, e: number) => void;
1374
1316
  readonly document_toMarkdown: (a: number, b: number) => void;
1375
1317
  readonly document_toStored: (a: number, b: number) => void;
@@ -1378,6 +1320,8 @@ export interface InitOutput {
1378
1320
  readonly formatDiagnostic: (a: number, b: number) => void;
1379
1321
  readonly formatDocPath: (a: number, b: number) => void;
1380
1322
  readonly importMarkdown: (a: number, b: number, c: number) => void;
1323
+ readonly isInline: (a: number, b: number) => void;
1324
+ readonly isPlain: (a: number, b: number) => void;
1381
1325
  readonly livesession_backendId: (a: number, b: number) => void;
1382
1326
  readonly livesession_fieldAt: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1383
1327
  readonly livesession_fieldBoxes: (a: number, b: number, c: number, d: number) => void;
@@ -1393,11 +1337,12 @@ export interface InitOutput {
1393
1337
  readonly mapMarks: (a: number, b: number, c: number) => void;
1394
1338
  readonly mapPos: (a: number, b: number, c: number, d: number) => void;
1395
1339
  readonly parseDocPath: (a: number, b: number, c: number) => void;
1396
- readonly quill__resolve: (a: number, b: number, c: number) => void;
1340
+ readonly quill__resolve: (a: number, b: number, c: number, d: number, e: number) => void;
1397
1341
  readonly quill_backendId: (a: number, b: number) => void;
1398
1342
  readonly quill_blueprint: (a: number, b: number) => void;
1399
1343
  readonly quill_conform: (a: number, b: number, c: number) => void;
1400
1344
  readonly quill_emptyDocument: (a: number) => number;
1345
+ readonly quill_exampleDocument: (a: number, b: number) => void;
1401
1346
  readonly quill_fromTree: (a: number, b: number) => void;
1402
1347
  readonly quill_metadata: (a: number, b: number) => void;
1403
1348
  readonly quill_parse: (a: number, b: number, c: number, d: number) => void;
@@ -1409,8 +1354,8 @@ export interface InitOutput {
1409
1354
  readonly quill_validate: (a: number, b: number, c: number) => void;
1410
1355
  readonly quill_warnings: (a: number, b: number) => void;
1411
1356
  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;
1357
+ readonly quillmark_open: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1358
+ readonly quillmark_render: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1414
1359
  readonly quillmark_supportedFormats: (a: number, b: number, c: number) => void;
1415
1360
  readonly rebase: (a: number, b: number, c: number, d: number) => void;
1416
1361
  readonly start: () => void;