@quillmark/wasm 0.119.0 → 0.120.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/CHANGELOG.md +21 -0
- package/README.md +18 -3
- package/core/wasm.d.ts +1 -1
- package/core/wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/render/wasm.d.ts +1 -1
- package/render/wasm_bg.wasm +0 -0
- package/runtime/runtime.d.ts +13 -0
- package/runtime/runtime.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v0.120.0 - 2026-09-30
|
|
4
|
+
|
|
5
|
+
Upgrade path: [0.119 → 0.120](docs/migrations/0.119-to-0.120.md).
|
|
6
|
+
|
|
7
|
+
### `Engine.load`
|
|
8
|
+
|
|
9
|
+
- feat(wasm): **`engine.load(quill)` loads and instantiates a quill's backend
|
|
10
|
+
build without a document**, cloning no quill. It is the memoized load
|
|
11
|
+
`render` and `open` await, so a host can start the render build's fetch once
|
|
12
|
+
the quill resolves and mount its editor on core meanwhile. Awaiting it before
|
|
13
|
+
`open` makes the session's first compile read the current document. A failed
|
|
14
|
+
load rejects, `runtime::backend_load_failed` for the built-ins, and the next
|
|
15
|
+
call retries. (#2027)
|
|
16
|
+
|
|
17
|
+
### `quill::table_column_not_leaf`
|
|
18
|
+
|
|
19
|
+
- refactor(core)!: **a `ui.layout: table` column that is not a leaf fails to
|
|
20
|
+
load as `quill::table_column_not_leaf`**, where it was
|
|
21
|
+
`quill::table_column_not_flat`. Its trigger and message are unchanged.
|
|
22
|
+
(#2021)
|
|
23
|
+
|
|
3
24
|
## v0.119.0 - 2026-09-30
|
|
4
25
|
|
|
5
26
|
### `ui.layout: flat`
|
package/README.md
CHANGED
|
@@ -119,8 +119,8 @@ A load failure surfaces as `runtime::init_failed`, whose hint names that line.
|
|
|
119
119
|
Create the render dispatcher. Routes each quill to its backend by
|
|
120
120
|
`quill.backendId`, lazily loads that backend binary, and renders: cloning the
|
|
121
121
|
quill/document into the backend's memory and freeing the clones internally.
|
|
122
|
-
`render`, `open`, and `supportedFormats` are **async** (the first call
|
|
123
|
-
a backend). Pass `{ backends }` to register or override backend descriptors.
|
|
122
|
+
`render`, `open`, `load`, and `supportedFormats` are **async** (the first call
|
|
123
|
+
may load a backend). Pass `{ backends }` to register or override backend descriptors.
|
|
124
124
|
Each entry is a descriptor (`{ [backendId]: { load, formats } }`) where `load`
|
|
125
125
|
is the lazy thunk returning the backend module and `formats` is the
|
|
126
126
|
**required** static capability manifest. A malformed descriptor throws at
|
|
@@ -131,6 +131,21 @@ is the lazy thunk returning the backend module and `formats` is the
|
|
|
131
131
|
manifest: never loading the multi-MB backend binary and never cloning the
|
|
132
132
|
quill. Use it as a non-failing pre-render probe.
|
|
133
133
|
|
|
134
|
+
**An editor does not wait on the render build.** `open` reads the document
|
|
135
|
+
before it awaits the backend load, so a session opened while the build loads
|
|
136
|
+
compiles the document as it stood at the call. Mount the editor on core, start
|
|
137
|
+
the load, and open once it lands:
|
|
138
|
+
|
|
139
|
+
```js
|
|
140
|
+
void engine.load(quill); // start the fetch as soon as the quill resolves
|
|
141
|
+
mountEditor(quill, doc); // core alone
|
|
142
|
+
await engine.load(quill); // memoized: the same load
|
|
143
|
+
const session = await engine.open(quill, doc); // one compile, current document
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
`load` reads only `quill.backendId` and clones nothing. A failed load rejects
|
|
147
|
+
with `runtime::backend_load_failed`, and the next call retries.
|
|
148
|
+
|
|
134
149
|
### The two doors: `Document.fromMarkdown` vs `quill.parse` / `quill.conform`
|
|
135
150
|
|
|
136
151
|
`Document.fromMarkdown` is the quill-free **transport door** (migrations, `$ext`
|
|
@@ -451,7 +466,7 @@ try {
|
|
|
451
466
|
|
|
452
467
|
**Delivery follows the function, not the failure.** A synchronous method throws;
|
|
453
468
|
a promise-returning one rejects. The promise-returning surface is `init` and the
|
|
454
|
-
|
|
469
|
+
four `Engine` verbs (`render`, `open`, `load`, `supportedFormats`), so a programming
|
|
455
470
|
error reached through one of them (a foreign handle, an unregistered backend)
|
|
456
471
|
rejects like any other failure. Nothing here both returns
|
|
457
472
|
a promise and throws, so a `.catch` on a promise-returning call is a whole
|
package/core/wasm.d.ts
CHANGED
|
@@ -383,7 +383,7 @@ export interface QuillFieldUi {
|
|
|
383
383
|
/** The control the field asks for, where the shape admits more than one.
|
|
384
384
|
* `"table"` is valid only on an `array` whose `items` is an `object`.
|
|
385
385
|
* Every column is a leaf, a contract refused at load as
|
|
386
|
-
* `quill::
|
|
386
|
+
* `quill::table_column_not_leaf`. `"flat"` is valid only on an `object`
|
|
387
387
|
* that is not an array's element: its properties stand at the depth of the
|
|
388
388
|
* field list around it, with no frame of their own. Either is a
|
|
389
389
|
* request: a consumer that cannot draws its own choice for the type. */
|
package/core/wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/render/wasm.d.ts
CHANGED
|
@@ -394,7 +394,7 @@ export interface QuillFieldUi {
|
|
|
394
394
|
/** The control the field asks for, where the shape admits more than one.
|
|
395
395
|
* `"table"` is valid only on an `array` whose `items` is an `object`.
|
|
396
396
|
* Every column is a leaf, a contract refused at load as
|
|
397
|
-
* `quill::
|
|
397
|
+
* `quill::table_column_not_leaf`. `"flat"` is valid only on an `object`
|
|
398
398
|
* that is not an array's element: its properties stand at the depth of the
|
|
399
399
|
* field list around it, with no frame of their own. Either is a
|
|
400
400
|
* request: a consumer that cannot draws its own choice for the type. */
|
package/render/wasm_bg.wasm
CHANGED
|
Binary file
|
package/runtime/runtime.d.ts
CHANGED
|
@@ -423,6 +423,19 @@ export declare class Engine {
|
|
|
423
423
|
*/
|
|
424
424
|
open(quill: Quill, doc: Document, today?: string): Promise<LiveSession>;
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Load and instantiate `quill`'s backend build, reading no document and
|
|
428
|
+
* cloning no quill. It is the memoized load `render` and `open` await, so a
|
|
429
|
+
* host can start the fetch before it has a document to open. Only
|
|
430
|
+
* `quill.backendId` is read, before the first await. A failed load rejects
|
|
431
|
+
* (`runtime::backend_load_failed` for the built-ins) and the next call
|
|
432
|
+
* retries.
|
|
433
|
+
*
|
|
434
|
+
* `open` snapshots its document before awaiting this load: await `load`
|
|
435
|
+
* first, and the session's first compile is of the current document.
|
|
436
|
+
*/
|
|
437
|
+
load(quill: Quill): Promise<void>;
|
|
438
|
+
|
|
426
439
|
/**
|
|
427
440
|
* Output formats `quill`'s backend can emit. An always-free pre-render probe:
|
|
428
441
|
* it answers from the descriptor's `formats` manifest without loading the
|
package/runtime/runtime.js
CHANGED
|
@@ -553,6 +553,14 @@ export class Engine {
|
|
|
553
553
|
);
|
|
554
554
|
}
|
|
555
555
|
|
|
556
|
+
/**
|
|
557
|
+
* @param {Quill} quill
|
|
558
|
+
* @returns {Promise<void>}
|
|
559
|
+
*/
|
|
560
|
+
async load(quill) {
|
|
561
|
+
await this.#resolveBackend(this.#backendOf(quill, 'engine.load(quill)'));
|
|
562
|
+
}
|
|
563
|
+
|
|
556
564
|
/**
|
|
557
565
|
* @param {Quill} quill
|
|
558
566
|
* @returns {Promise<import('./runtime.js').OutputFormat[]>}
|