@xmachines/play-dom 5.0.2 → 6.1.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/README.md +40 -45
- package/dist/PlayRenderer.d.ts +12 -1
- package/dist/PlayRenderer.d.ts.map +1 -1
- package/dist/PlayRenderer.js +54 -26
- package/dist/PlayRenderer.js.map +1 -1
- package/dist/create-play-ui.d.ts +4 -16
- package/dist/create-play-ui.d.ts.map +1 -1
- package/dist/create-play-ui.js +2 -3
- package/dist/create-play-ui.js.map +1 -1
- package/dist/create-renderer.d.ts +1 -2
- package/dist/create-renderer.d.ts.map +1 -1
- package/dist/create-renderer.js +1 -2
- package/dist/create-renderer.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -8
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/package.json +13 -13
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Vanilla DOM renderer for XMachines Play architecture with atom-driven rendering.
|
|
4
4
|
|
|
5
|
-
[](https://opensource.org/licenses/MIT) [](https://opensource.org/licenses/MIT) [](https://www.npmjs.com/package/@xmachines/play-dom)
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -13,9 +13,11 @@ pnpm add @xmachines/play-dom
|
|
|
13
13
|
**Peer dependencies:**
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
pnpm add @xmachines/play @xmachines/play-atom @xstate/store @xmachines/json-render-core @xmachines/json-render-dom @xmachines/json-render-xstate
|
|
16
|
+
pnpm add @xmachines/core @xmachines/play @xmachines/play-atom @xstate/store @xmachines/json-render-core @xmachines/json-render-dom @xmachines/json-render-xstate
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
[`@xmachines/play`](../play/README.md) is the peer of [`@xmachines/play-view`](../play-view/README.md), which this package depends on. Install ONE copy of it.
|
|
20
|
+
|
|
19
21
|
`@xstate/store` is the peer of [`@xmachines/play-atom`](../play-atom/README.md), and not of this
|
|
20
22
|
package: this package reads the atom through [`@xmachines/play-atom`](../play-atom/README.md) and
|
|
21
23
|
imports the engine in no source file. Install ONE copy of it.
|
|
@@ -204,7 +206,7 @@ const mount = createPlayUI(registryResult, {
|
|
|
204
206
|
});
|
|
205
207
|
```
|
|
206
208
|
|
|
207
|
-
Without `functions`, every `$computed` expression resolves to `undefined
|
|
209
|
+
Without `functions`, every `$computed` expression resolves to `undefined`, and nothing throws.
|
|
208
210
|
|
|
209
211
|
### `validationFunctions` — custom field validation
|
|
210
212
|
|
|
@@ -283,32 +285,27 @@ The order of the arguments is the same as in the `RenderErrorHandler` type of `@
|
|
|
283
285
|
|
|
284
286
|
Without `onRenderError`, the renderer writes all three types of error to `console.error`, then stops them. No exception goes to the caller, and no promise rejection stays unhandled.
|
|
285
287
|
|
|
286
|
-
### The renderer contains a failed rebuild
|
|
288
|
+
### The renderer contains a failed rebuild
|
|
287
289
|
|
|
288
290
|
**Read this if you catch what `mount()` or `connect()` throws.**
|
|
289
291
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
In 2.3.0 the renderer contains such a failure ALWAYS. No option turns the containment on,
|
|
295
|
-
and no option turns it off. The renderer clears the container, it shows the `fallback`,
|
|
296
|
-
and `mount()` returns normally. A host that shows its own error page from a `catch` around
|
|
297
|
-
`mount()` sees that `catch` never again.
|
|
292
|
+
The renderer contains a view that fails the rebuild ALWAYS. No option turns the
|
|
293
|
+
containment on, and no option turns it off. The renderer clears the container, it shows
|
|
294
|
+
the `fallback`, and `mount()` returns normally. A host that shows its own error page from
|
|
295
|
+
a `catch` around `mount()` never sees that `catch` run.
|
|
298
296
|
|
|
299
297
|
The four framework renderers contain a failed render always, because an error boundary of
|
|
300
|
-
a framework is not an option that a caller turns off.
|
|
301
|
-
same rule.
|
|
298
|
+
a framework is not an option that a caller turns off. play-dom follows the same rule.
|
|
302
299
|
|
|
303
|
-
**To escalate a failure, raise it from a task of your own
|
|
300
|
+
**To escalate a failure, raise it from a task of your own.** The example imports `rethrowLater` from [`@xmachines/core/utils`](../core/README.md). Install that package next to this one, because your code imports it and a package manager such as pnpm does not let your code import a package that it does not declare:
|
|
304
301
|
|
|
305
302
|
```typescript
|
|
303
|
+
import { rethrowLater } from "@xmachines/core/utils";
|
|
304
|
+
|
|
306
305
|
const mount = createPlayUI(registryResult, {
|
|
307
306
|
onError: (err) => {
|
|
308
307
|
reportToSentry(err);
|
|
309
|
-
|
|
310
|
-
throw err; // the page keeps its own global handler
|
|
311
|
-
});
|
|
308
|
+
rethrowLater(err); // the page keeps its own global handler
|
|
312
309
|
},
|
|
313
310
|
});
|
|
314
311
|
```
|
|
@@ -321,7 +318,7 @@ this one rule, so a host learns it one time and writes the same handler for each
|
|
|
321
318
|
|
|
322
319
|
`onRenderError` covers one element: the inner renderer contains a render error of a component, and a rejection of an action handler, per element, and the rebuild continues. Some failures escape that boundary — a `$computed` function that throws during the resolution of a prop, for example — and they abort the complete rebuild.
|
|
323
320
|
|
|
324
|
-
`onError` receives such a failure. The renderer contains it with this option and without it: it resets the state of the failed rebuild, so that the next emission makes a complete render again, and it clears the container. `connect()` renders the first view synchronously,
|
|
321
|
+
`onError` receives such a failure. The renderer contains it with this option and without it: it resets the state of the failed rebuild, so that the next emission makes a complete render again, and it clears the container. `connect()` renders the first view synchronously, and a bad initial view does not make `connect()` throw.
|
|
325
322
|
|
|
326
323
|
A write of the store takes the same path. The renderer resolves the props of every element that the write touched, so a `$computed` function that throws on the new state aborts that render too. The renderer contains such a failure as well, and the action handler that wrote the state receives no exception.
|
|
327
324
|
|
|
@@ -365,35 +362,33 @@ const Home: ComponentFn<typeof catalog, "Home"> = ({ ctx }) => {
|
|
|
365
362
|
|
|
366
363
|
### XMachines Layer
|
|
367
364
|
|
|
368
|
-
| Export | Kind | Description
|
|
369
|
-
| ---------------------------------------- | -------- |
|
|
370
|
-
| `createRenderer(catalog, components)` | function | The one-call factory. Its `mount` hands a
|
|
371
|
-
| `createPlayUI(registryResult, options?)` | function | The complete factory. It returns a `MountFn`
|
|
372
|
-
| `PlayRenderer` | class | The renderer class, with a `connect()` and `disconnect()` lifecycle
|
|
373
|
-
| `defineRegistry(catalog, options)` | function | Build a catalog-typed `DomRegistry` with typed handlers
|
|
374
|
-
| `renderSpec(...)` | function | The pure low-level Spec → DOM renderer
|
|
375
|
-
| `schema` | const | The `@xmachines/json-render-dom` schema — pass to `defineCatalog()`
|
|
376
|
-
| `asCleanup`, `Cleanup` | — | The release a mount returns, re-exported from [`@xmachines/play`](../play/README.md) |
|
|
365
|
+
| Export | Kind | Description |
|
|
366
|
+
| ---------------------------------------- | -------- | ------------------------------------------------------------------- |
|
|
367
|
+
| `createRenderer(catalog, components)` | function | The one-call factory. Its `mount` hands a plain release back |
|
|
368
|
+
| `createPlayUI(registryResult, options?)` | function | The complete factory. It returns a `MountFn` |
|
|
369
|
+
| `PlayRenderer` | class | The renderer class, with a `connect()` and `disconnect()` lifecycle |
|
|
370
|
+
| `defineRegistry(catalog, options)` | function | Build a catalog-typed `DomRegistry` with typed handlers |
|
|
371
|
+
| `renderSpec(...)` | function | The pure low-level Spec → DOM renderer |
|
|
372
|
+
| `schema` | const | The `@xmachines/json-render-dom` schema — pass to `defineCatalog()` |
|
|
377
373
|
|
|
378
374
|
### Key Types
|
|
379
375
|
|
|
380
|
-
| Type | Description
|
|
381
|
-
| ------------------------ |
|
|
382
|
-
| `ComponentFn<C, K>` | Catalog-typed component function — returns `HTMLElement \| Text \| null`
|
|
383
|
-
| `ComponentContext<C, K>` | The context of each component: `props`, `children`, `emit`, `on`, `bindings`, and `ctx`
|
|
384
|
-
| `ActionFn<C, K>` | Catalog-typed action function — receives `(params, setState, state)`
|
|
385
|
-
| `EventHandle` | The handle that `on(eventName)` returns. It has `emit()`, `shouldPreventDefault`, and `bound`
|
|
386
|
-
| `SetState` | State updater: `(prev => next) => void`
|
|
387
|
-
| `DefineRegistryResult` | The result of `defineRegistry`. It has `registry`, `handlers`, and `executeAction`
|
|
388
|
-
| `PlayDomOptions` | Options for `PlayRenderer` — extends `UIProviderOptions`, adds `fallback` and `onError`
|
|
389
|
-
| `CreatePlayUIOptions` | Options for `createPlayUI` — extends `UIProviderOptions`, adds `fallback` and `onError`
|
|
390
|
-
| `MountOptions` | Per-mount options for `MountFn`: `store`, `loading`
|
|
391
|
-
| `MountFn` | The mount: `(actor, container, options?) →
|
|
392
|
-
| `UIProviderOptions` | Shared options: `functions`, `validationFunctions`, `navigate`, `onRenderError`
|
|
393
|
-
| `BaseComponentProps<P>` | Catalog-agnostic component props for shared component libraries
|
|
394
|
-
| `DomRegistry` | Raw registry type: `Record<string, DomComponentRenderer>`
|
|
395
|
-
| `DomSchema` | Type of the `schema` export
|
|
396
|
-
| `Cleanup` | The release of a mount, re-exported from [`@xmachines/play`](../play/README.md) |
|
|
376
|
+
| Type | Description |
|
|
377
|
+
| ------------------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
378
|
+
| `ComponentFn<C, K>` | Catalog-typed component function — returns `HTMLElement \| Text \| null` |
|
|
379
|
+
| `ComponentContext<C, K>` | The context of each component: `props`, `children`, `emit`, `on`, `bindings`, and `ctx` |
|
|
380
|
+
| `ActionFn<C, K>` | Catalog-typed action function — receives `(params, setState, state)` |
|
|
381
|
+
| `EventHandle` | The handle that `on(eventName)` returns. It has `emit()`, `shouldPreventDefault`, and `bound` |
|
|
382
|
+
| `SetState` | State updater: `(prev => next) => void` |
|
|
383
|
+
| `DefineRegistryResult` | The result of `defineRegistry`. It has `registry`, `handlers`, and `executeAction` |
|
|
384
|
+
| `PlayDomOptions` | Options for `PlayRenderer` — extends `UIProviderOptions`, adds `fallback` and `onError` |
|
|
385
|
+
| `CreatePlayUIOptions` | Options for `createPlayUI` — extends `UIProviderOptions`, adds `fallback` and `onError` |
|
|
386
|
+
| `MountOptions` | Per-mount options for `MountFn`: `store`, `loading` |
|
|
387
|
+
| `MountFn` | The mount: `(actor, container, options?) → () => void`. `createPlayUI` returns one, and a consumer may write one |
|
|
388
|
+
| `UIProviderOptions` | Shared options: `functions`, `validationFunctions`, `navigate`, `onRenderError` |
|
|
389
|
+
| `BaseComponentProps<P>` | Catalog-agnostic component props for shared component libraries |
|
|
390
|
+
| `DomRegistry` | Raw registry type: `Record<string, DomComponentRenderer>` |
|
|
391
|
+
| `DomSchema` | Type of the `schema` export |
|
|
397
392
|
|
|
398
393
|
## Rendering Behavior
|
|
399
394
|
|
package/dist/PlayRenderer.d.ts
CHANGED
|
@@ -96,6 +96,17 @@ export declare class PlayRenderer {
|
|
|
96
96
|
*/
|
|
97
97
|
private lastViewKey;
|
|
98
98
|
private currentStore;
|
|
99
|
+
/**
|
|
100
|
+
* The incremental renderer of the live tree, and the `root` and `elements` of the
|
|
101
|
+
* spec that it renders. An emission with the same viewKey and the same two
|
|
102
|
+
* references moved the /context projection alone. An emission with the same
|
|
103
|
+
* viewKey and a new `elements` object is a new spec of the same view — a composed
|
|
104
|
+
* view whose page changed, or a streamed chunk — and the renderer takes it in place
|
|
105
|
+
* through `setSpec`.
|
|
106
|
+
*/
|
|
107
|
+
private incremental;
|
|
108
|
+
private lastRoot;
|
|
109
|
+
private lastElements;
|
|
99
110
|
/** The fallback element, built at the first moment that the renderer shows it. */
|
|
100
111
|
private fallbackElement;
|
|
101
112
|
/**
|
|
@@ -193,7 +204,7 @@ export declare class PlayRenderer {
|
|
|
193
204
|
* what the empty container shows. The four framework renderers hold the same rule,
|
|
194
205
|
* because an error boundary of a framework is not an option that a caller turns off.
|
|
195
206
|
* A host that must escalate a failure raises it from a task of its own —
|
|
196
|
-
* `
|
|
207
|
+
* `rethrowLater(error)` of `@xmachines/core/utils` — because the guard contains a handler
|
|
197
208
|
* that throws, exactly as the four framework renderers do.
|
|
198
209
|
*
|
|
199
210
|
* The container is cleared FIRST. The fast path of a slice holds the live tree of the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayRenderer.d.ts","sourceRoot":"","sources":["../src/PlayRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,KAAK,EAAmC,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"PlayRenderer.d.ts","sourceRoot":"","sources":["../src/PlayRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,KAAK,EAAmC,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAKvF,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAsDjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,qBAAa,YAAY;IA0GvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IA5GzB;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,OAAO,CAA6B;IAC5C,OAAO,CAAC,gBAAgB,CAA6B;IACrD;;;;;;;OAOG;IACH,OAAO,CAAC,aAAa,CAAyB;IAC9C;;;;;;;;;;OAUG;IACH,OAAO,CAAC,WAAW,CAAiC;IACpD,OAAO,CAAC,YAAY,CAA2B;IAC/C;;;;;;;OAOG;IACH,OAAO,CAAC,WAAW,CAAuC;IAC1D,OAAO,CAAC,QAAQ,CAAiC;IACjD,OAAO,CAAC,YAAY,CAA+C;IACnE,kFAAkF;IAClF,OAAO,CAAC,eAAe,CAA4B;IACnD;;;;;;;OAOG;IACH,OAAO,CAAC,QAAQ,CAAC,cAAc,CAE7B;IACF;;;;;OAKG;IACH,OAAO,CAAC,KAAK,CAAQ;IAErB;;;;;;;;;OASG;IAGH,OAAO,CAAC,KAAK,CAAkD;IAE/D;;;;;;OAMG;IACH,OAAO,CAAC,KAAK,CAAwC;IAErD;;;;;;;;;;;;;;;OAeG;gBAEe,SAAS,EAAE,WAAW,EACtB,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,cAAmB;IAG9C;;;;;;;;OAQG;IACH,OAAO,IAAI,IAAI;IAyCf;;OAEG;IACH,UAAU,IAAI,IAAI;IA+BlB;;;;;;OAMG;IACH,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED,OAAO,CAAC,MAAM;IA8Gd;;;;;;;;;;OAUG;IACH,OAAO,CAAC,QAAQ;IAKhB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,OAAO;IAiBf;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,OAAO;IAOf;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IA4BpB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,kBAAkB;IA0B1B;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;CAgIlB"}
|
package/dist/PlayRenderer.js
CHANGED
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import { createAtom, watchAtom } from "@xmachines/play-atom";
|
|
14
14
|
import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
|
|
15
15
|
import { createReportGuard, createViewStoreLifecycle, refreshContextSubtree, } from "@xmachines/play-view";
|
|
16
|
+
import { releaseQuietly } from "@xmachines/core/utils";
|
|
16
17
|
import { createIncrementalRenderer } from "@xmachines/json-render-dom";
|
|
17
18
|
/**
|
|
18
19
|
* What the report guard writes, and what it lets through.
|
|
@@ -34,11 +35,13 @@ const GUARD_MESSAGES = {
|
|
|
34
35
|
"PlayRenderer contained the failure of the view all the same.",
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
+
* Reports a failure of one release of a caller, for `releaseQuietly` of `@xmachines/core/utils`.
|
|
38
39
|
*
|
|
39
|
-
* Every release that
|
|
40
|
-
* `unsubscribe` of a store that the host gave, and the watch cleanups
|
|
41
|
-
* renderer registered. Each one can throw, and a throw must stop
|
|
40
|
+
* Every release that `disconnect()`, `render()`, and `resetFailedRebuild()` run is CODE
|
|
41
|
+
* OF A CALLER: the `unsubscribe` of a store that the host gave, and the watch cleanups
|
|
42
|
+
* that the inner renderer registered. Each one can throw, and a throw must stop no path.
|
|
43
|
+
* `render()` releases the registrations of the previous view on the path of a view that
|
|
44
|
+
* works, and the comment at that call gives its reason.
|
|
42
45
|
*
|
|
43
46
|
* `resetFailedRebuild()` runs the releases of a FAILED rebuild, BEFORE the renderer
|
|
44
47
|
* contains the failure of the view. A throw there takes the containment down with it: the
|
|
@@ -53,16 +56,9 @@ const GUARD_MESSAGES = {
|
|
|
53
56
|
*
|
|
54
57
|
* Each release therefore stands alone, and a failure of one goes to `console.error`.
|
|
55
58
|
*/
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
try {
|
|
60
|
-
release();
|
|
61
|
-
}
|
|
62
|
-
catch (releaseFailure) {
|
|
63
|
-
console.error("[@xmachines/play-dom] a release of PlayRenderer threw. " +
|
|
64
|
-
"The renderer completed the teardown all the same.", releaseFailure);
|
|
65
|
-
}
|
|
59
|
+
function reportReleaseFailure(releaseFailure) {
|
|
60
|
+
console.error("[@xmachines/play-dom] a release of PlayRenderer threw. " +
|
|
61
|
+
"The renderer completed the teardown all the same.", releaseFailure);
|
|
66
62
|
}
|
|
67
63
|
/**
|
|
68
64
|
* PlayRenderer connects the `currentView` atom of an actor to the DOM renderer.
|
|
@@ -147,6 +143,17 @@ export class PlayRenderer {
|
|
|
147
143
|
*/
|
|
148
144
|
lastViewKey = undefined;
|
|
149
145
|
currentStore = null;
|
|
146
|
+
/**
|
|
147
|
+
* The incremental renderer of the live tree, and the `root` and `elements` of the
|
|
148
|
+
* spec that it renders. An emission with the same viewKey and the same two
|
|
149
|
+
* references moved the /context projection alone. An emission with the same
|
|
150
|
+
* viewKey and a new `elements` object is a new spec of the same view — a composed
|
|
151
|
+
* view whose page changed, or a streamed chunk — and the renderer takes it in place
|
|
152
|
+
* through `setSpec`.
|
|
153
|
+
*/
|
|
154
|
+
incremental = null;
|
|
155
|
+
lastRoot = undefined;
|
|
156
|
+
lastElements = undefined;
|
|
150
157
|
/** The fallback element, built at the first moment that the renderer shows it. */
|
|
151
158
|
fallbackElement = null;
|
|
152
159
|
/**
|
|
@@ -266,7 +273,7 @@ export class PlayRenderer {
|
|
|
266
273
|
disconnect() {
|
|
267
274
|
this.connected = false;
|
|
268
275
|
this.guard.dispose();
|
|
269
|
-
releaseQuietly(this.unwatch);
|
|
276
|
+
releaseQuietly(this.unwatch, reportReleaseFailure);
|
|
270
277
|
this.unwatch = null;
|
|
271
278
|
// Set the refs to null first. A rerender callback that is still in flight therefore
|
|
272
279
|
// sees null, and it stops.
|
|
@@ -281,14 +288,17 @@ export class PlayRenderer {
|
|
|
281
288
|
// Set alive = false before the storeUnsub() call. A synchronous rerender callback
|
|
282
289
|
// from inside unsubscribe() therefore returns at once.
|
|
283
290
|
this.alive = false;
|
|
284
|
-
// See
|
|
285
|
-
releaseQuietly(storeUnsub);
|
|
291
|
+
// See reportReleaseFailure: a throw of one release must skip none of the work below it.
|
|
292
|
+
releaseQuietly(storeUnsub, reportReleaseFailure);
|
|
286
293
|
for (const cleanup of watchCleanups)
|
|
287
|
-
releaseQuietly(cleanup);
|
|
294
|
+
releaseQuietly(cleanup, reportReleaseFailure);
|
|
288
295
|
this.container.replaceChildren();
|
|
289
296
|
// The rule of the lifetime: the store that stays alive dies with the connection.
|
|
290
297
|
this.lastViewKey = undefined;
|
|
291
298
|
this.currentStore = null;
|
|
299
|
+
this.incremental = null;
|
|
300
|
+
this.lastRoot = undefined;
|
|
301
|
+
this.lastElements = undefined;
|
|
292
302
|
this.storeLifecycle.reset();
|
|
293
303
|
}
|
|
294
304
|
/**
|
|
@@ -323,7 +333,19 @@ export class PlayRenderer {
|
|
|
323
333
|
// spec with an accessor that throws escaped the callback of watchAtom
|
|
324
334
|
// uncontained, with the stale tree still on the screen.
|
|
325
335
|
try {
|
|
326
|
-
|
|
336
|
+
if (view.root === this.lastRoot && view.elements === this.lastElements) {
|
|
337
|
+
refreshContextSubtree(this.currentStore, view);
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
// The lifecycle refreshes /context, and it seeds the authored state of the
|
|
341
|
+
// views that a composed view shows for the first time. The store update
|
|
342
|
+
// reaches the incremental renderer first, on the spec that it holds, and
|
|
343
|
+
// setSpec then renders the new spec against the store of NOW.
|
|
344
|
+
this.storeLifecycle.resolve(this.actor, view, this.options.store);
|
|
345
|
+
this.incremental?.setSpec(view);
|
|
346
|
+
this.lastRoot = view.root;
|
|
347
|
+
this.lastElements = view.elements;
|
|
348
|
+
}
|
|
327
349
|
}
|
|
328
350
|
catch (error) {
|
|
329
351
|
this.failView(error);
|
|
@@ -336,13 +358,13 @@ export class PlayRenderer {
|
|
|
336
358
|
// callback sees a live storeUnsubscribe, and it enters the rerender path again with
|
|
337
359
|
// an old view and an old store.
|
|
338
360
|
// disconnect() uses the same capture-then-clear pattern.
|
|
339
|
-
// See
|
|
361
|
+
// See reportReleaseFailure. This release is code of a caller, and it runs on the path of a
|
|
340
362
|
// view that WORKS: a throw here would abort the render of a good view, and it would
|
|
341
363
|
// leave the renderer with the tree of the previous view on the screen and half of
|
|
342
364
|
// its registrations released.
|
|
343
365
|
const oldUnsub = this.storeUnsubscribe;
|
|
344
366
|
this.storeUnsubscribe = null;
|
|
345
|
-
releaseQuietly(oldUnsub);
|
|
367
|
+
releaseQuietly(oldUnsub, reportReleaseFailure);
|
|
346
368
|
// Release the watch cleanups of the first render of the previous view.
|
|
347
369
|
// Without this step, the watch subscriptions of the previous view stay active between
|
|
348
370
|
// a view transition and the first store update of the new view. They then hold a
|
|
@@ -351,7 +373,7 @@ export class PlayRenderer {
|
|
|
351
373
|
const prevWatchCleanups = [...this.watchCleanups];
|
|
352
374
|
this.watchCleanups = new Set();
|
|
353
375
|
for (const cleanup of prevWatchCleanups)
|
|
354
|
-
releaseQuietly(cleanup);
|
|
376
|
+
releaseQuietly(cleanup, reportReleaseFailure);
|
|
355
377
|
this.container.replaceChildren();
|
|
356
378
|
// A null emission is a gap between two views, and not a new view: keep lastViewKey
|
|
357
379
|
// and currentStore. A return to the same identity therefore uses the store below
|
|
@@ -418,7 +440,7 @@ export class PlayRenderer {
|
|
|
418
440
|
* what the empty container shows. The four framework renderers hold the same rule,
|
|
419
441
|
* because an error boundary of a framework is not an option that a caller turns off.
|
|
420
442
|
* A host that must escalate a failure raises it from a task of its own —
|
|
421
|
-
* `
|
|
443
|
+
* `rethrowLater(error)` of `@xmachines/core/utils` — because the guard contains a handler
|
|
422
444
|
* that throws, exactly as the four framework renderers do.
|
|
423
445
|
*
|
|
424
446
|
* The container is cleared FIRST. The fast path of a slice holds the live tree of the
|
|
@@ -529,13 +551,16 @@ export class PlayRenderer {
|
|
|
529
551
|
this.storeUnsubscribe = null;
|
|
530
552
|
this.watchCleanups = new Set();
|
|
531
553
|
this.alive = false;
|
|
532
|
-
// See
|
|
554
|
+
// See reportReleaseFailure. This method runs BEFORE contain(), so a throw here would take
|
|
533
555
|
// the place of the failure of the view that the renderer contains.
|
|
534
|
-
releaseQuietly(failedUnsub);
|
|
556
|
+
releaseQuietly(failedUnsub, reportReleaseFailure);
|
|
535
557
|
for (const cleanup of failedWatchCleanups)
|
|
536
|
-
releaseQuietly(cleanup);
|
|
558
|
+
releaseQuietly(cleanup, reportReleaseFailure);
|
|
537
559
|
this.lastViewKey = undefined;
|
|
538
560
|
this.currentStore = null;
|
|
561
|
+
this.incremental = null;
|
|
562
|
+
this.lastRoot = undefined;
|
|
563
|
+
this.lastElements = undefined;
|
|
539
564
|
this.storeLifecycle.reset();
|
|
540
565
|
}
|
|
541
566
|
/**
|
|
@@ -630,6 +655,9 @@ export class PlayRenderer {
|
|
|
630
655
|
// selection, and the scroll position survive an update of another element. A view
|
|
631
656
|
// transition still rebuilds everything, because this method runs again.
|
|
632
657
|
const incremental = createIncrementalRenderer(view, guardedStore, this.registry, this.container, renderOptions);
|
|
658
|
+
this.incremental = incremental;
|
|
659
|
+
this.lastRoot = view.root;
|
|
660
|
+
this.lastElements = view.elements;
|
|
633
661
|
// subscribe passes through the guard without a change, and it keeps the same function
|
|
634
662
|
// reference. The guard wraps set and update only.
|
|
635
663
|
this.storeUnsubscribe = guardedStore.subscribe(() => {
|
package/dist/PlayRenderer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PlayRenderer.js","sourceRoot":"","sources":["../src/PlayRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAE7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AAKvE;;;;;;;;;;;;GAYG;AACH,MAAM,cAAc,GAAG;IACtB,SAAS,EACR,6EAA6E;QAC7E,uCAAuC;IACxC,YAAY,EACX,+DAA+D;QAC/D,8DAA8D;CAC/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,cAAc,CAAC,OAAwC;IAC/D,IAAI,CAAC,OAAO;QAAE,OAAO;IACrB,IAAI,CAAC;QACJ,OAAO,EAAE,CAAC;IACX,CAAC;IAAC,OAAO,cAAc,EAAE,CAAC;QACzB,OAAO,CAAC,KAAK,CACZ,yDAAyD;YACxD,mDAAmD,EACpD,cAAc,CACd,CAAC;IACH,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAO,YAAY;IA+FN;IACA;IACA;IACA;IAj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AAC;QAEF,2EAA2E;QAC3E,gFAAgF;QAChF,sFAAsF;QACtF,sFAAsF;QACtF,uFAAuF;QACvF,kFAAkF;QAClF,wEAAwE;QACxE,MAAM,WAAW,GAAG,yBAAyB,CAC5C,IAAI,EACJ,YAAY,EACZ,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,SAAS,EACd,aAAa,CACb,CAAC;QACF,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;QAC1B,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC;QAElC,sFAAsF;QACtF,kDAAkD;QAClD,IAAI,CAAC,gBAAgB,GAAG,YAAY,CAAC,SAAS,CAAC,GAAG,EAAE;YACnD,+DAA+D;YAC/D,iFAAiF;YACjF,6DAA6D;YAC7D,IAAI,CAAC,IAAI,CAAC,KAAK;gBAAE,OAAO;YACxB,8EAA8E;YAC9E,kFAAkF;YAClF,iFAAiF;YACjF,+EAA+E;YAC/E,iFAAiF;YACjF,+EAA+E;YAC/E,+EAA+E;YAC/E,gFAAgF;YAChF,+EAA+E;YAC/E,oCAAoC;YACpC,IAAI,CAAC;gBACJ,WAAW,CAAC,MAAM,EAAE,CAAC;YACtB,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBAChB,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACF,CAAC,CAAC,CAAC;QACH,WAAW,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;CACD"}
|
package/dist/create-play-ui.d.ts
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
*
|
|
32
32
|
* @packageDocumentation
|
|
33
33
|
*/
|
|
34
|
-
import { type Cleanup } from "@xmachines/play";
|
|
35
34
|
import type { ViewActor } from "@xmachines/play-view";
|
|
36
35
|
import type { StateStore } from "@xmachines/json-render-core";
|
|
37
36
|
import type { DefineRegistryResult } from "@xmachines/json-render-dom";
|
|
@@ -65,29 +64,18 @@ export interface MountOptions {
|
|
|
65
64
|
* It returns a `disconnect` cleanup function. That function stops the render and
|
|
66
65
|
* clears the container.
|
|
67
66
|
*
|
|
68
|
-
* The return is
|
|
67
|
+
* The return is a plain function. A caller runs it, or it publishes the release with
|
|
68
|
+
* `asDisposable` of `@xmachines/core/utils`, and a scope releases it:
|
|
69
69
|
*
|
|
70
70
|
* ```ts
|
|
71
71
|
* const mount = createPlayUI(registryResult);
|
|
72
72
|
* {
|
|
73
|
-
* using stop = mount(actor, container);
|
|
73
|
+
* using stop = asDisposable(mount(actor, container));
|
|
74
74
|
* // stop() runs at the end of the scope, and after an exception too
|
|
75
75
|
* }
|
|
76
76
|
* ```
|
|
77
|
-
*
|
|
78
|
-
* A `Cleanup` IS a `() => void`, so a caller that runs the release keeps that code. A
|
|
79
|
-
* consumer that WRITES a value of this type — a wrapper of a mount, or a stand-in for
|
|
80
|
-
* one — builds its release with `asCleanup` of `@xmachines/play`, which this package
|
|
81
|
-
* re-exports:
|
|
82
|
-
*
|
|
83
|
-
* ```ts
|
|
84
|
-
* const mount: MountFn = (actor, container, options) => {
|
|
85
|
-
* const stop = realMount(actor, container, options);
|
|
86
|
-
* return asCleanup(() => stop());
|
|
87
|
-
* };
|
|
88
|
-
* ```
|
|
89
77
|
*/
|
|
90
|
-
export type MountFn = (actor: ViewActor, container: HTMLElement, options?: MountOptions) =>
|
|
78
|
+
export type MountFn = (actor: ViewActor, container: HTMLElement, options?: MountOptions) => () => void;
|
|
91
79
|
/**
|
|
92
80
|
* Creates the mount function of the complete DOM renderer.
|
|
93
81
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-play-ui.d.ts","sourceRoot":"","sources":["../src/create-play-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"create-play-ui.d.ts","sourceRoot":"","sources":["../src/create-play-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,WAAW,YAAY;IAC5B;;;;OAIG;IACH,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,OAAO,GAAG,CACrB,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,YAAY,KAClB,MAAM,IAAI,CAAC;AAEhB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAC3B,cAAc,EAAE,oBAAoB,EACpC,OAAO,GAAE,mBAAwB,GAC/B,OAAO,CAyDT"}
|
package/dist/create-play-ui.js
CHANGED
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
*
|
|
32
32
|
* @packageDocumentation
|
|
33
33
|
*/
|
|
34
|
-
import { asCleanup } from "@xmachines/play";
|
|
35
34
|
import { PlayRenderer } from "./PlayRenderer.js";
|
|
36
35
|
/**
|
|
37
36
|
* Creates the mount function of the complete DOM renderer.
|
|
@@ -91,9 +90,9 @@ export function createPlayUI(registryResult, options = {}) {
|
|
|
91
90
|
// host that throws, so `connect()` returns for every view. `mount()` therefore
|
|
92
91
|
// always reaches the `return` below, and the caller always receives the release.
|
|
93
92
|
renderer.connect();
|
|
94
|
-
return
|
|
93
|
+
return function disconnect() {
|
|
95
94
|
renderer.disconnect();
|
|
96
|
-
}
|
|
95
|
+
};
|
|
97
96
|
};
|
|
98
97
|
}
|
|
99
98
|
//# sourceMappingURL=create-play-ui.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-play-ui.js","sourceRoot":"","sources":["../src/create-play-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;
|
|
1
|
+
{"version":3,"file":"create-play-ui.js","sourceRoot":"","sources":["../src/create-play-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAIH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmDjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,YAAY,CAC3B,cAAoC,EACpC,UAA+B,EAAE;IAEjC,MAAM,EACL,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,QAAQ,EACR,SAAS,GACT,GAAG,OAAO,CAAC;IAEZ,OAAO,SAAS,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,YAAY;QACnD,mFAAmF;QACnF,8EAA8E;QAC9E,qCAAqC;QACrC,MAAM,eAAe,GAAG;YACvB,cAAc;YACd,GAAG,CAAC,YAAY,EAAE,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,YAAY,CAAC,KAAK,EAAE,CAAC;YACvE,GAAG,CAAC,YAAY,EAAE,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,EAAE,CAAC;YAC7E,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,CAAC;YAC7C,GAAG,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC;YAC/C,GAAG,CAAC,mBAAmB,KAAK,SAAS,IAAI,EAAE,mBAAmB,EAAE,CAAC;YACjE,GAAG,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,CAAC;YAC3C,GAAG,CAAC,SAAS,KAAK,SAAS,IAAI,EAAE,SAAS,EAAE,CAAC;YAC7C,GAAG,CAAC,aAAa,KAAK,SAAS,IAAI,EAAE,aAAa,EAAE,CAAC;YACrD,gFAAgF;YAChF,yEAAyE;YACzE,0EAA0E;YAC1E,kBAAkB;YAClB,GAAG,CAAC,OAAO,KAAK,SAAS,IAAI,EAAE,OAAO,EAAE,CAAC;YACzC,+EAA+E;YAC/E,+EAA+E;YAC/E,0EAA0E;YAC1E,6EAA6E;YAC7E,4EAA4E;YAC5E,oCAAoC;YACpC,GAAG,CAAC,QAAQ,IAAI,IAAI,IAAI,EAAE,QAAQ,EAAE,CAAC;SACrC,CAAC;QAEF,MAAM,QAAQ,GAAG,IAAI,YAAY,CAChC,SAAS,EACT,KAAK,EACL,cAAc,CAAC,QAAQ,EACvB,eAAe,CACf,CAAC;QACF,+EAA+E;QAC/E,0CAA0C;QAC1C,iFAAiF;QACjF,+EAA+E;QAC/E,iFAAiF;QACjF,QAAQ,CAAC,OAAO,EAAE,CAAC;QAEnB,OAAO,SAAS,UAAU;YACzB,QAAQ,CAAC,UAAU,EAAE,CAAC;QACvB,CAAC,CAAC;IACH,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
*
|
|
53
53
|
* @packageDocumentation
|
|
54
54
|
*/
|
|
55
|
-
import { type Cleanup } from "@xmachines/play";
|
|
56
55
|
import type { ViewActor } from "@xmachines/play-view";
|
|
57
56
|
import type { Catalog } from "@xmachines/json-render-core";
|
|
58
57
|
import type { ComponentRegistry } from "@xmachines/json-render-dom";
|
|
@@ -81,5 +80,5 @@ import type { PlayDomOptions } from "./types.js";
|
|
|
81
80
|
* `CreatePlayUIOptions`. You can also use `defineRegistry` with `PlayRenderer`
|
|
82
81
|
* directly.
|
|
83
82
|
*/
|
|
84
|
-
export declare function createRenderer<C extends Catalog>(catalog: C, componentMap: ComponentRegistry<C>): (actor: ViewActor, container: HTMLElement, options?: Omit<PlayDomOptions, "registryResult">) =>
|
|
83
|
+
export declare function createRenderer<C extends Catalog>(catalog: C, componentMap: ComponentRegistry<C>): (actor: ViewActor, container: HTMLElement, options?: Omit<PlayDomOptions, "registryResult">) => () => void;
|
|
85
84
|
//# sourceMappingURL=create-renderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-renderer.d.ts","sourceRoot":"","sources":["../src/create-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"create-renderer.d.ts","sourceRoot":"","sources":["../src/create-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,OAAO,EAC/C,OAAO,EAAE,CAAC,EACV,YAAY,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAChC,CACF,KAAK,EAAE,SAAS,EAChB,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,KAC5C,MAAM,IAAI,CAWd"}
|
package/dist/create-renderer.js
CHANGED
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
*
|
|
53
53
|
* @packageDocumentation
|
|
54
54
|
*/
|
|
55
|
-
import { asCleanup } from "@xmachines/play";
|
|
56
55
|
import { PlayRenderer } from "./PlayRenderer.js";
|
|
57
56
|
import { defineRegistry } from "@xmachines/json-render-dom";
|
|
58
57
|
/**
|
|
@@ -87,7 +86,7 @@ export function createRenderer(catalog, componentMap) {
|
|
|
87
86
|
registryResult,
|
|
88
87
|
});
|
|
89
88
|
renderer.connect();
|
|
90
|
-
return
|
|
89
|
+
return () => renderer.disconnect();
|
|
91
90
|
};
|
|
92
91
|
}
|
|
93
92
|
//# sourceMappingURL=create-renderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-renderer.js","sourceRoot":"","sources":["../src/create-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;
|
|
1
|
+
{"version":3,"file":"create-renderer.js","sourceRoot":"","sources":["../src/create-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAMH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,UAAU,cAAc,CAC7B,OAAU,EACV,YAAkC;IAMlC,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,EAAE,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;IAE7E,OAAO,SAAS,KAAK,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,GAAG,EAAE;QACnD,MAAM,QAAQ,GAAG,IAAI,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,cAAc,CAAC,QAAQ,EAAE;YAC5E,GAAG,OAAO;YACV,cAAc;SACd,CAAC,CAAC;QACH,QAAQ,CAAC,OAAO,EAAE,CAAC;QACnB,OAAO,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC,CAAC;AACH,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -34,5 +34,4 @@ export { defineRegistry, renderSpec, schema, createValidationRegistry, } from "@
|
|
|
34
34
|
export type { ValidationRegistry, FieldValidationState } from "@xmachines/json-render-dom";
|
|
35
35
|
export type { RenderSpecOptions } from "@xmachines/json-render-dom";
|
|
36
36
|
export type { ConfirmHandler, EventHandle, SetState, RenderErrorHandler, UIProviderOptions, CatalogHasActions, BaseComponentProps, DomRenderContext, DomComponentRenderer, ComponentContext, ComponentFn, ComponentRegistry, Actions, ActionFn, DefineRegistryOptions, DefineRegistryResult, DomRegistry, DomSchema, } from "@xmachines/json-render-dom";
|
|
37
|
-
export { asCleanup, type Cleanup } from "@xmachines/play";
|
|
38
37
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGjE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGtE,OAAO,EACN,cAAc,EACd,UAAU,EACV,MAAM,EACN,wBAAwB,GACxB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EACX,cAAc,EACd,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,SAAS,GACT,MAAM,4BAA4B,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGjE,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAGtE,OAAO,EACN,cAAc,EACd,UAAU,EACV,MAAM,EACN,wBAAwB,GACxB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAC3F,YAAY,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,YAAY,EACX,cAAc,EACd,WAAW,EACX,QAAQ,EACR,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,WAAW,EACX,iBAAiB,EACjB,OAAO,EACP,QAAQ,EACR,qBAAqB,EACrB,oBAAoB,EACpB,WAAW,EACX,SAAS,GACT,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,12 +31,4 @@ export { createRenderer } from "./create-renderer.js";
|
|
|
31
31
|
export { createPlayUI } from "./create-play-ui.js";
|
|
32
32
|
// @xmachines/json-render-dom. This package re-exports it, for the convenience of a consumer
|
|
33
33
|
export { defineRegistry, renderSpec, schema, createValidationRegistry, } from "@xmachines/json-render-dom";
|
|
34
|
-
// The release protocol of @xmachines/play. This package's own published `.d.ts` names
|
|
35
|
-
// exactly these, so a consumer reads them from here and needs no second manifest entry.
|
|
36
|
-
//
|
|
37
|
-
// `asCleanup` is here because `MountFn` returns a `Cleanup`: a consumer that WRITES a
|
|
38
|
-
// mount — a wrapper, or a stand-in for one — BUILDS a release, and it therefore needs the
|
|
39
|
-
// one function that makes a plain release into one. A second type carried that narrowing
|
|
40
|
-
// before, and a consumer that wrote a `MountFn` reached none of it.
|
|
41
|
-
export { asCleanup } from "@xmachines/play";
|
|
42
34
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,qCAAqC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMnD,4FAA4F;AAC5F,OAAO,EACN,cAAc,EACd,UAAU,EACV,MAAM,EACN,wBAAwB,GACxB,MAAM,4BAA4B,CAAC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,qCAAqC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAMnD,4FAA4F;AAC5F,OAAO,EACN,cAAc,EACd,UAAU,EACV,MAAM,EACN,wBAAwB,GACxB,MAAM,4BAA4B,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export interface PlayDomOptions extends UIProviderOptions {
|
|
|
59
59
|
* The renderer CONTAINS a rebuild that throws, with this option and without it: it
|
|
60
60
|
* resets the state of the failed rebuild, so that the next emission makes a complete
|
|
61
61
|
* render again, and it clears the container. `connect()` renders the first view
|
|
62
|
-
* synchronously,
|
|
62
|
+
* synchronously, and a bad initial view does not make `connect()` throw.
|
|
63
63
|
*
|
|
64
64
|
* A WRITE of the store takes the same path. The renderer resolves the props of every
|
|
65
65
|
* element that the write touched, so a `$computed` function that throws on the new
|
|
@@ -71,9 +71,9 @@ export interface PlayDomOptions extends UIProviderOptions {
|
|
|
71
71
|
*
|
|
72
72
|
* A handler that THROWS reaches no caller: the renderer contains that throw too, and
|
|
73
73
|
* it writes the throw to `console.error`. A host that must escalate a failure raises
|
|
74
|
-
* it from a task of its own — `
|
|
75
|
-
* reaches the global handler of the page and leaves the containment whole. The
|
|
76
|
-
* renderers hold this one rule.
|
|
74
|
+
* it from a task of its own — `rethrowLater(error)` of `@xmachines/core/utils` — which
|
|
75
|
+
* reaches the global handler of the page and leaves the containment whole. The host
|
|
76
|
+
* installs `@xmachines/core` itself. The five renderers hold this one rule.
|
|
77
77
|
*
|
|
78
78
|
* The second parameter is the RESET, for a retry that the host starts — a "Retry"
|
|
79
79
|
* button of its own. It renders the view that the actor holds at the MOMENT OF THE
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmachines/play-dom",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "Vanilla DOM renderer for XMachines Play architecture with atom-driven rendering",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"actor",
|
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
"test:coverage": "vitest run --coverage"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@xmachines/play-view": "
|
|
50
|
+
"@xmachines/play-view": "6.1.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@testing-library/jest-dom": "^7.0.1",
|
|
54
54
|
"@types/node": "^26.6.2",
|
|
55
55
|
"@vitest/browser-playwright": "^5.0.1",
|
|
56
|
-
"@xmachines/
|
|
57
|
-
"@xmachines/json-render-
|
|
58
|
-
"@xmachines/json-render-
|
|
59
|
-
"@xmachines/
|
|
60
|
-
"@xmachines/play-actor": "
|
|
61
|
-
"@xmachines/play-atom": "
|
|
56
|
+
"@xmachines/core": "6.1.0",
|
|
57
|
+
"@xmachines/json-render-core": "^0.21.0-xm.2",
|
|
58
|
+
"@xmachines/json-render-dom": "^0.21.0-xm.2",
|
|
59
|
+
"@xmachines/json-render-xstate": "^0.21.0-xm.2",
|
|
60
|
+
"@xmachines/play-actor": "6.1.0",
|
|
61
|
+
"@xmachines/play-atom": "6.1.0",
|
|
62
62
|
"oxfmt": "^0.70.0",
|
|
63
63
|
"oxlint": "^1.85.0",
|
|
64
64
|
"typescript": "^5.9.3 || ^6.0.3",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"zod": "^4.6.5"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
|
-
"@xmachines/
|
|
72
|
-
"@xmachines/json-render-
|
|
73
|
-
"@xmachines/json-render-
|
|
74
|
-
"@xmachines/
|
|
75
|
-
"@xmachines/play-atom": "
|
|
71
|
+
"@xmachines/core": "6.1.0",
|
|
72
|
+
"@xmachines/json-render-core": "^0.21.0-xm.2",
|
|
73
|
+
"@xmachines/json-render-dom": "^0.21.0-xm.2",
|
|
74
|
+
"@xmachines/json-render-xstate": "^0.21.0-xm.2",
|
|
75
|
+
"@xmachines/play-atom": "6.1.0"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": ">=24.0.0"
|