@xmachines/play-dom 3.0.0 → 5.0.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 CHANGED
@@ -1,8 +1,8 @@
1
1
  # @xmachines/play-dom
2
2
 
3
- Vanilla DOM renderer for XMachines Play architecture with signal-driven rendering.
3
+ Vanilla DOM renderer for XMachines Play architecture with atom-driven rendering.
4
4
 
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-3.0.0-blue)](https://www.npmjs.com/package/@xmachines/play-dom)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-5.0.0-blue)](https://www.npmjs.com/package/@xmachines/play-dom)
6
6
 
7
7
  ## Installation
8
8
 
@@ -13,14 +13,19 @@ pnpm add @xmachines/play-dom
13
13
  **Peer dependencies:**
14
14
 
15
15
  ```bash
16
- pnpm add xstate @xstate/store @xmachines/json-render-core @xmachines/json-render-dom @xmachines/json-render-xstate
16
+ pnpm add @xmachines/play @xmachines/play-atom @xstate/store @xmachines/json-render-core @xmachines/json-render-dom @xmachines/json-render-xstate
17
17
  ```
18
18
 
19
+ `@xstate/store` is the peer of [`@xmachines/play-atom`](../play-atom/README.md), and not of this
20
+ package: this package reads the atom through [`@xmachines/play-atom`](../play-atom/README.md) and
21
+ imports the engine in no source file. Install ONE copy of it.
22
+
19
23
  ## Quick Start
20
24
 
21
25
  ```typescript
22
26
  import { createRenderer, schema } from "@xmachines/play-dom";
23
- import { definePlayer } from "@xmachines/play-xstate";
27
+ import { definePlayer, compose, PlayerActor } from "@xmachines/play-xstate";
28
+ import { withView } from "@xmachines/play-xstate/view";
24
29
  import { defineCatalog } from "@xmachines/json-render-core";
25
30
  import { createMachine } from "xstate";
26
31
  import { z } from "zod";
@@ -80,7 +85,8 @@ const machine = createMachine({
80
85
  },
81
86
  },
82
87
  });
83
- const actor = definePlayer({ machine })();
88
+ // `mount` needs the view capability
89
+ const actor = definePlayer({ machine, actor: compose(PlayerActor, withView) })();
84
90
  actor.start();
85
91
 
86
92
  // 5. Mount when actor and container are ready
@@ -167,7 +173,7 @@ renderer.disconnect();
167
173
  **Controlled store mode.** Give the renderer an external `StateStore`. The renderer then shares the state with the other parts of your application:
168
174
 
169
175
  ```typescript
170
- import { createAtom } from "@xstate/store";
176
+ import { createAtom } from "@xmachines/play-atom";
171
177
  import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
172
178
 
173
179
  const atom = createAtom<Record<string, unknown>>({ username: "" });
@@ -282,7 +288,7 @@ Without `onRenderError`, the renderer writes all three types of error to `consol
282
288
  **Read this if you catch what `mount()` or `connect()` throws.**
283
289
 
284
290
  In 2.2.0 the renderer had no containment. A view that failed the rebuild threw out of
285
- `mount()` and out of the callback of the signal watcher, so a `try` of the host, an error
291
+ `mount()` and out of the callback of the atom watcher, so a `try` of the host, an error
286
292
  boundary of the framework around it, or the global handler of the page received it.
287
293
 
288
294
  In 2.3.0 the renderer contains such a failure ALWAYS. No option turns the containment on,
@@ -359,54 +365,40 @@ const Home: ComponentFn<typeof catalog, "Home"> = ({ ctx }) => {
359
365
 
360
366
  ### XMachines Layer
361
367
 
362
- | Export | Kind | Description |
363
- | ---------------------------------------- | -------- | ------------------------------------------------------------------- |
364
- | `createRenderer(catalog, components)` | function | The one-call factory. Its `mount` hands a `Cleanup` back |
365
- | `createPlayUI(registryResult, options?)` | function | The complete factory. It returns a `DisposablePlayUI` |
366
- | `PlayRenderer` | class | The renderer class, with a `connect()` and `disconnect()` lifecycle |
367
- | `defineRegistry(catalog, options)` | function | Build a catalog-typed `DomRegistry` with typed handlers |
368
- | `renderSpec(...)` | function | The pure low-level Spec → DOM renderer |
369
- | `schema` | const | The `@xmachines/json-render-dom` schema — pass to `defineCatalog()` |
370
- | `Cleanup` | type | The release a mount returns, re-exported from `@xmachines/play` |
368
+ | Export | Kind | Description |
369
+ | ---------------------------------------- | -------- | ------------------------------------------------------------------------------------ |
370
+ | `createRenderer(catalog, components)` | function | The one-call factory. Its `mount` hands a `Cleanup` back |
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) |
371
377
 
372
378
  ### Key Types
373
379
 
374
- | Type | Description |
375
- | ------------------------ | --------------------------------------------------------------------------------------------- |
376
- | `ComponentFn<C, K>` | Catalog-typed component function — returns `HTMLElement \| Text \| null` |
377
- | `ComponentContext<C, K>` | The context of each component: `props`, `children`, `emit`, `on`, `bindings`, and `ctx` |
378
- | `ActionFn<C, K>` | Catalog-typed action function — receives `(params, setState, state)` |
379
- | `EventHandle` | The handle that `on(eventName)` returns. It has `emit()`, `shouldPreventDefault`, and `bound` |
380
- | `SetState` | State updater: `(prev => next) => void` |
381
- | `DefineRegistryResult` | The result of `defineRegistry`. It has `registry`, `handlers`, and `executeAction` |
382
- | `PlayDomOptions` | Options for `PlayRenderer` — extends `UIProviderOptions`, adds `fallback` and `onError` |
383
- | `CreatePlayUIOptions` | Options for `createPlayUI` — extends `UIProviderOptions`, adds `fallback` and `onError` |
384
- | `MountOptions` | Per-mount options for `MountFn`: `store`, `loading` |
385
- | `MountFn` | The type of a mount that a consumer writes: `(actor, container, options?) → disconnect` |
386
- | `DisposablePlayUI` | The mount that `createPlayUI` builds. It hands a `Cleanup` back, so `using` releases it |
387
- | `UIProviderOptions` | Shared options: `functions`, `validationFunctions`, `navigate`, `onRenderError` |
388
- | `BaseComponentProps<P>` | Catalog-agnostic component props for shared component libraries |
389
- | `DomRegistry` | Raw registry type: `Record<string, DomComponentRenderer>` |
390
- | `DomSchema` | Type of the `schema` export |
391
- | `ComputedFunction` | The type of a named compute function for the `functions` option |
392
- | `Cleanup` | The release of a mount, re-exported from `@xmachines/play` |
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?) → Cleanup`. `createPlayUI` returns one, and a consumer may write one |
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) |
393
397
 
394
398
  ## Rendering Behavior
395
399
 
396
400
  - **The first render is synchronous** — the renderer fills the container before `connect()` returns.
397
- - **A signal-driven render waits for a microtask** — `watchSignal` puts each update on the next tick of the microtask queue.
401
+ - **An atom-driven render waits for a microtask** — `watchAtom` puts each update on the next tick of the microtask queue.
398
402
  - **A null view** clears the container, and the renderer then shows the `fallback` element when you give one. It shows it for every null view, and not for the first mount only — the four framework providers hold the same rule for their placeholder content.
399
403
  - **A second `connect()` is safe** — a `connect()` call on a connected renderer disconnects it first.
400
- - **`disconnect()` clears the container** and cancels every signal watcher and store watcher.
401
-
402
- ## Testing
403
-
404
- ```bash
405
- # Run all tests (jsdom environment)
406
- pnpm test
407
-
408
- # Run with coverage
409
- pnpm run test:coverage
410
- ```
411
-
412
- The tests are in `test/`. They use [Vitest](https://vitest.dev/) in a jsdom environment. The coverage thresholds are 80% for lines, functions, branches, and statements.
404
+ - **`disconnect()` clears the container** and cancels every atom watcher and store watcher.
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * PlayRenderer.ts — the XMachines wrapper of @xmachines/json-render-dom.
3
3
  *
4
- * It connects actor.currentView, a TC39 Signal, to the DOM renderer below it, with
5
- * watchSignal. It gives you the connect() method and the disconnect() method, in
4
+ * It connects actor.currentView, an atom, to the DOM renderer below it, with
5
+ * watchAtom. It gives you the connect() method and the disconnect() method, in
6
6
  * the same pattern as the PlayRenderer class of play-react, of play-vue, and of
7
7
  * play-solid.
8
8
  *
@@ -10,14 +10,13 @@
10
10
  * gives one, and this is the controlled mode. Without that option, it makes a new
11
11
  * @xstate/store atom for each view transition, with the values of spec.state.
12
12
  */
13
- import type { AbstractActor, Viewable } from "@xmachines/play-actor";
14
- import type { AnyActorLogic } from "xstate";
13
+ import type { ViewActor } from "@xmachines/play-view";
15
14
  import type { DomRegistry } from "@xmachines/json-render-dom";
16
15
  import type { PlayDomOptions } from "./types.js";
17
16
  /**
18
- * PlayRenderer connects the `currentView` signal of an actor to the DOM renderer.
17
+ * PlayRenderer connects the `currentView` atom of an actor to the DOM renderer.
19
18
  *
20
- * It watches `actor.currentView` through the TC39 Signals. It renders each
19
+ * It watches `actor.currentView` through the atoms. It renders each
21
20
  * `DomComponentRenderer` function into `container` on every view transition.
22
21
  * `disconnect()` clears the container.
23
22
  *
@@ -46,7 +45,7 @@ import type { PlayDomOptions } from "./types.js";
46
45
  *
47
46
  * **The controlled store mode** — you give your own `StateStore`:
48
47
  * ```typescript
49
- * import { createAtom } from "@xstate/store";
48
+ * import { createAtom } from "@xmachines/play-atom";
50
49
  * import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
51
50
  *
52
51
  * const atom = createAtom({ username: "" });
@@ -100,7 +99,7 @@ export declare class PlayRenderer {
100
99
  /** The fallback element, built at the first moment that the renderer shows it. */
101
100
  private fallbackElement;
102
101
  /**
103
- * The shared coordinator of the store lifecycle, from @xmachines/play-actor. It
102
+ * The shared coordinator of the store lifecycle, from @xmachines/play-view. It
104
103
  * seeds the store again on a change of the viewKey, it refreshes /context in place
105
104
  * in every other case, and it guards the identity cache. The two fields above,
106
105
  * lastViewKey and currentStore, stay as the DOM-side record for the fast path of a
@@ -116,7 +115,7 @@ export declare class PlayRenderer {
116
115
  */
117
116
  private alive;
118
117
  /**
119
- * The report guard, from @xmachines/play-actor.
118
+ * The report guard, from @xmachines/play-view.
120
119
  *
121
120
  * It blocks a reset that the host calls from INSIDE the report, and every reset once
122
121
  * the renderer is disconnected. The five renderers share the one implementation.
@@ -136,7 +135,7 @@ export declare class PlayRenderer {
136
135
  private retry;
137
136
  /**
138
137
  * @param container - The `HTMLElement` to render into. Each view transition clears it and fills it again.
139
- * @param actor - The actor with the `currentView` signal. It must implement `Viewable`.
138
+ * @param actor - The actor with the `currentView` atom. It must implement `Viewable`.
140
139
  * @param registry - The map of the component renderers, usually `registryResult.registry` from `defineRegistry`.
141
140
  * @param options - The configuration. See {@link PlayDomOptions}:
142
141
  * - `registryResult` — it connects `setState` and `state` of the xstate store for you.
@@ -150,13 +149,13 @@ export declare class PlayRenderer {
150
149
  * - `onError` — the `(error, reset)` handler of a failure of a complete rebuild. The renderer contains such a failure always, and this option says where the report goes.
151
150
  * - `fallback` — the element to show for every null view, and after a contained failure.
152
151
  */
153
- constructor(container: HTMLElement, actor: AbstractActor<AnyActorLogic> & Viewable, registry: DomRegistry, options?: PlayDomOptions);
152
+ constructor(container: HTMLElement, actor: ViewActor, registry: DomRegistry, options?: PlayDomOptions);
154
153
  /**
155
154
  * Starts the watch of actor.currentView, and renders into the container.
156
- * It renders the first view synchronously, then it subscribes to the signal changes.
155
+ * It renders the first view synchronously, then it subscribes to the atom changes.
157
156
  *
158
157
  * A `connect()` call on a connected renderer, where a `disconnect()` call did not
159
- * follow the previous `connect()`, installs a second `watchSignal` subscription.
158
+ * follow the previous `connect()`, installs a second `watchAtom` subscription.
160
159
  * Each view change then renders two times. Therefore this method disconnects the
161
160
  * renderer first.
162
161
  */
@@ -211,7 +210,7 @@ export declare class PlayRenderer {
211
210
  /**
212
211
  * Builds the retry that one report hands the host.
213
212
  *
214
- * The read of the signal happens at the moment of the CALL: a retry that held the view
213
+ * The read of the atom happens at the moment of the CALL: a retry that held the view
215
214
  * that failed would take a host off the healthy screen and back onto the one that
216
215
  * threw.
217
216
  *
@@ -1 +1 @@
1
- {"version":3,"file":"PlayRenderer.d.ts","sourceRoot":"","sources":["../src/PlayRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAY,MAAM,uBAAuB,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAG5C,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,4BAA4B,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAyDjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,qBAAa,YAAY;IA+FvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,OAAO;IAjGzB;;;;;;;OAOG;IACH,OAAO,CAAC,SAAS,CAA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;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,OAAO,CAAC,OAAO;IAiBf;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,OAAO;IAOf;;;;;OAKG;IACH,OAAO,CAAC,YAAY;IA4BpB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,kBAAkB;IAuB1B;;;;;;;OAOG;IACH,OAAO,CAAC,UAAU;CA6HlB"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * PlayRenderer.ts — the XMachines wrapper of @xmachines/json-render-dom.
3
3
  *
4
- * It connects actor.currentView, a TC39 Signal, to the DOM renderer below it, with
5
- * watchSignal. It gives you the connect() method and the disconnect() method, in
4
+ * It connects actor.currentView, an atom, to the DOM renderer below it, with
5
+ * watchAtom. It gives you the connect() method and the disconnect() method, in
6
6
  * the same pattern as the PlayRenderer class of play-react, of play-vue, and of
7
7
  * play-solid.
8
8
  *
@@ -10,10 +10,9 @@
10
10
  * gives one, and this is the controlled mode. Without that option, it makes a new
11
11
  * @xstate/store atom for each view transition, with the values of spec.state.
12
12
  */
13
- import { watchSignal } from "@xmachines/play-signals";
14
- import { createAtom } from "@xstate/store";
13
+ import { createAtom, watchAtom } from "@xmachines/play-atom";
15
14
  import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
16
- import { createReportGuard, createViewStoreLifecycle, refreshContextSubtree, } from "@xmachines/play-actor";
15
+ import { createReportGuard, createViewStoreLifecycle, refreshContextSubtree, } from "@xmachines/play-view";
17
16
  import { createIncrementalRenderer } from "@xmachines/json-render-dom";
18
17
  /**
19
18
  * What the report guard writes, and what it lets through.
@@ -66,9 +65,9 @@ function releaseQuietly(release) {
66
65
  }
67
66
  }
68
67
  /**
69
- * PlayRenderer connects the `currentView` signal of an actor to the DOM renderer.
68
+ * PlayRenderer connects the `currentView` atom of an actor to the DOM renderer.
70
69
  *
71
- * It watches `actor.currentView` through the TC39 Signals. It renders each
70
+ * It watches `actor.currentView` through the atoms. It renders each
72
71
  * `DomComponentRenderer` function into `container` on every view transition.
73
72
  * `disconnect()` clears the container.
74
73
  *
@@ -97,7 +96,7 @@ function releaseQuietly(release) {
97
96
  *
98
97
  * **The controlled store mode** — you give your own `StateStore`:
99
98
  * ```typescript
100
- * import { createAtom } from "@xstate/store";
99
+ * import { createAtom } from "@xmachines/play-atom";
101
100
  * import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
102
101
  *
103
102
  * const atom = createAtom({ username: "" });
@@ -151,7 +150,7 @@ export class PlayRenderer {
151
150
  /** The fallback element, built at the first moment that the renderer shows it. */
152
151
  fallbackElement = null;
153
152
  /**
154
- * The shared coordinator of the store lifecycle, from @xmachines/play-actor. It
153
+ * The shared coordinator of the store lifecycle, from @xmachines/play-view. It
155
154
  * seeds the store again on a change of the viewKey, it refreshes /context in place
156
155
  * in every other case, and it guards the identity cache. The two fields above,
157
156
  * lastViewKey and currentStore, stay as the DOM-side record for the fast path of a
@@ -167,7 +166,7 @@ export class PlayRenderer {
167
166
  */
168
167
  alive = true;
169
168
  /**
170
- * The report guard, from @xmachines/play-actor.
169
+ * The report guard, from @xmachines/play-view.
171
170
  *
172
171
  * It blocks a reset that the host calls from INSIDE the report, and every reset once
173
172
  * the renderer is disconnected. The five renderers share the one implementation.
@@ -189,7 +188,7 @@ export class PlayRenderer {
189
188
  retry = this.retryOf(this.guard);
190
189
  /**
191
190
  * @param container - The `HTMLElement` to render into. Each view transition clears it and fills it again.
192
- * @param actor - The actor with the `currentView` signal. It must implement `Viewable`.
191
+ * @param actor - The actor with the `currentView` atom. It must implement `Viewable`.
193
192
  * @param registry - The map of the component renderers, usually `registryResult.registry` from `defineRegistry`.
194
193
  * @param options - The configuration. See {@link PlayDomOptions}:
195
194
  * - `registryResult` — it connects `setState` and `state` of the xstate store for you.
@@ -211,10 +210,10 @@ export class PlayRenderer {
211
210
  }
212
211
  /**
213
212
  * Starts the watch of actor.currentView, and renders into the container.
214
- * It renders the first view synchronously, then it subscribes to the signal changes.
213
+ * It renders the first view synchronously, then it subscribes to the atom changes.
215
214
  *
216
215
  * A `connect()` call on a connected renderer, where a `disconnect()` call did not
217
- * follow the previous `connect()`, installs a second `watchSignal` subscription.
216
+ * follow the previous `connect()`, installs a second `watchAtom` subscription.
218
217
  * Each view change then renders two times. Therefore this method disconnects the
219
218
  * renderer first.
220
219
  */
@@ -244,13 +243,13 @@ export class PlayRenderer {
244
243
  // guard of the connection that took the place of this one.
245
244
  if (guard.blocked())
246
245
  return;
247
- this.unwatch = watchSignal(this.actor.currentView, (view) => {
246
+ this.unwatch = watchAtom(this.actor.currentView, (view) => {
248
247
  this.render(view);
249
248
  });
250
249
  // The actor can hold ANOTHER view already. The render above is synchronous, and a
251
250
  // host that REPAIRS the actor from the handler — a bad initial view, and the host
252
- // sends a recovery event — moves the signal between the read and the line above.
253
- // `watchSignal` seeds nothing, so the repaired view would wait for the next
251
+ // sends a recovery event — moves the atom between the read and the line above.
252
+ // `watchAtom` seeds nothing, so the repaired view would wait for the next
254
253
  // emission of the actor, and a screen that shows the fallback of a failure that the
255
254
  // host repaired already would wait with it. Render the view that the actor holds
256
255
  // NOW.
@@ -321,7 +320,7 @@ export class PlayRenderer {
321
320
  this.storeUnsubscribe !== null) {
322
321
  // The fast path reads `spec.state` too, so it fails exactly as a rebuild does.
323
322
  // It sat OUTSIDE the try below, so a stream that keeps its viewKey and emits a
324
- // spec with an accessor that throws escaped the callback of watchSignal
323
+ // spec with an accessor that throws escaped the callback of watchAtom
325
324
  // uncontained, with the stale tree still on the screen.
326
325
  try {
327
326
  refreshContextSubtree(this.currentStore, view);
@@ -388,7 +387,7 @@ export class PlayRenderer {
388
387
  catch (error) {
389
388
  // Containment: the renderer holds a failure of the complete rebuild ALWAYS. It
390
389
  // propagates none — not out of connect() for the initial view, and not out of
391
- // the callback of watchSignal for a later view. No option turns this on, and
390
+ // the callback of watchAtom for a later view. No option turns this on, and
392
391
  // none turns it off.
393
392
  // failView() clears the container and fills it with the fallback, exactly as on
394
393
  // a null view. The next view that renders clears the container again, which
@@ -450,7 +449,7 @@ export class PlayRenderer {
450
449
  /**
451
450
  * Builds the retry that one report hands the host.
452
451
  *
453
- * The read of the signal happens at the moment of the CALL: a retry that held the view
452
+ * The read of the atom happens at the moment of the CALL: a retry that held the view
454
453
  * that failed would take a host off the healthy screen and back onto the one that
455
454
  * threw.
456
455
  *
@@ -484,7 +483,7 @@ export class PlayRenderer {
484
483
  // lookup that finds nothing, a DOM API that the runtime lacks. This method runs on
485
484
  // the null path outside every try, and inside `contain()` after the containment
486
485
  // decided to hold an error — so a throw here escaped `connect()` and the callback
487
- // of watchSignal uncontained, and it turned a contained failure into an uncontained
486
+ // of watchAtom uncontained, and it turned a contained failure into an uncontained
488
487
  // one with the container empty.
489
488
  //
490
489
  // The report goes to `console.error` and NOT to `onError`: this method runs from
@@ -1 +1 @@
1
- {"version":3,"file":"PlayRenderer.js","sourceRoot":"","sources":["../src/PlayRenderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,qBAAqB,GACrB,MAAM,uBAAuB,CAAC;AAI/B,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;QACz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K,CAAC,CAAC;YACtB,CAAC;QACF,CAAC,CAAC,CAAC;QACH,WAAW,CAAC,MAAM,EAAE,CAAC;IACtB,CAAC;CACD"}
@@ -32,8 +32,7 @@
32
32
  * @packageDocumentation
33
33
  */
34
34
  import { type Cleanup } from "@xmachines/play";
35
- import type { AbstractActor, Viewable } from "@xmachines/play-actor";
36
- import type { AnyActorLogic } from "xstate";
35
+ import type { ViewActor } from "@xmachines/play-view";
37
36
  import type { StateStore } from "@xmachines/json-render-core";
38
37
  import type { DefineRegistryResult } from "@xmachines/json-render-dom";
39
38
  import type { CreatePlayUIOptions } from "./types.js";
@@ -66,17 +65,7 @@ export interface MountOptions {
66
65
  * It returns a `disconnect` cleanup function. That function stops the render and
67
66
  * clears the container.
68
67
  *
69
- * The return is a plain function here, because a consumer WRITES a value of this type
70
- * to wrap or to stand in for a mount. A {@link Cleanup} return would refuse every such
71
- * function that hands a plain release back. {@link DisposablePlayUI} narrows it for the
72
- * value that {@link createPlayUI} builds, which nothing writes by hand.
73
- */
74
- export type MountFn = (actor: AbstractActor<AnyActorLogic> & Viewable, container: HTMLElement, options?: MountOptions) => () => void;
75
- /**
76
- * The mount function that {@link createPlayUI} builds.
77
- *
78
- * It IS a {@link MountFn}, and it says one thing more: the mount hands back a
79
- * {@link Cleanup}, so a caller may release it with `using` and write no teardown.
68
+ * The return is the release of the mount. A caller runs it, or a scope releases it:
80
69
  *
81
70
  * ```ts
82
71
  * const mount = createPlayUI(registryResult);
@@ -86,11 +75,19 @@ export type MountFn = (actor: AbstractActor<AnyActorLogic> & Viewable, container
86
75
  * }
87
76
  * ```
88
77
  *
89
- * A narrowed return and not a narrowed `MountFn`: the return type of a function may
90
- * narrow, so this costs a consumer that writes a `MountFn` nothing. The parameters come
91
- * from `MountFn` through `Parameters`, so the two signatures cannot drift.
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
+ * ```
92
89
  */
93
- export type DisposablePlayUI = (...args: Parameters<MountFn>) => Cleanup;
90
+ export type MountFn = (actor: ViewActor, container: HTMLElement, options?: MountOptions) => Cleanup;
94
91
  /**
95
92
  * Creates the mount function of the complete DOM renderer.
96
93
  *
@@ -111,7 +108,7 @@ export type DisposablePlayUI = (...args: Parameters<MountFn>) => Cleanup;
111
108
  * - `fallback` — the content to show when the view of the actor is `null`, and after a contained
112
109
  * failure of a rebuild. Give a FUNCTION when the factory mounts more than one
113
110
  * time, so that each renderer owns its own element.
114
- * @returns The {@link DisposablePlayUI}: `(actor, container, mountOptions?) → disconnect`
111
+ * @returns The {@link MountFn}: `(actor, container, mountOptions?) → disconnect`
115
112
  */
116
- export declare function createPlayUI(registryResult: DefineRegistryResult, options?: CreatePlayUIOptions): DisposablePlayUI;
113
+ export declare function createPlayUI(registryResult: DefineRegistryResult, options?: CreatePlayUIOptions): MountFn;
117
114
  //# sourceMappingURL=create-play-ui.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-play-ui.d.ts","sourceRoot":"","sources":["../src/create-play-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AACvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,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4BG;AACH,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,YAAY,KAAK,OAAO,CAAC;AAEpG;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,YAAY,CAC3B,cAAc,EAAE,oBAAoB,EACpC,OAAO,GAAE,mBAAwB,GAC/B,OAAO,CAyDT"}
@@ -53,7 +53,7 @@ import { PlayRenderer } from "./PlayRenderer.js";
53
53
  * - `fallback` — the content to show when the view of the actor is `null`, and after a contained
54
54
  * failure of a rebuild. Give a FUNCTION when the factory mounts more than one
55
55
  * time, so that each renderer owns its own element.
56
- * @returns The {@link DisposablePlayUI}: `(actor, container, mountOptions?) → disconnect`
56
+ * @returns The {@link MountFn}: `(actor, container, mountOptions?) → disconnect`
57
57
  */
58
58
  export function createPlayUI(registryResult, options = {}) {
59
59
  const { onRenderError, onError, fallback, functions, directives, validationFunctions, navigate, onConfirm, } = options;
@@ -1 +1 @@
1
- {"version":3,"file":"create-play-ui.js","sourceRoot":"","sources":["../src/create-play-ui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,SAAS,EAAgB,MAAM,iBAAiB,CAAC;AAI1D,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiEjD;;;;;;;;;;;;;;;;;;;;;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,G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ACrD,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,CAAC,SAAS,UAAU;YACnC,QAAQ,CAAC,UAAU,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC;AACH,CAAC"}
@@ -53,8 +53,7 @@
53
53
  * @packageDocumentation
54
54
  */
55
55
  import { type Cleanup } from "@xmachines/play";
56
- import type { AbstractActor, Viewable } from "@xmachines/play-actor";
57
- import type { AnyActorLogic } from "xstate";
56
+ import type { ViewActor } from "@xmachines/play-view";
58
57
  import type { Catalog } from "@xmachines/json-render-core";
59
58
  import type { ComponentRegistry } from "@xmachines/json-render-dom";
60
59
  import type { PlayDomOptions } from "./types.js";
@@ -82,5 +81,5 @@ import type { PlayDomOptions } from "./types.js";
82
81
  * `CreatePlayUIOptions`. You can also use `defineRegistry` with `PlayRenderer`
83
82
  * directly.
84
83
  */
85
- export declare function createRenderer<C extends Catalog>(catalog: C, componentMap: ComponentRegistry<C>): (actor: AbstractActor<AnyActorLogic> & Viewable, container: HTMLElement, options?: Omit<PlayDomOptions, "registryResult">) => Cleanup;
84
+ export declare function createRenderer<C extends Catalog>(catalog: C, componentMap: ComponentRegistry<C>): (actor: ViewActor, container: HTMLElement, options?: Omit<PlayDomOptions, "registryResult">) => Cleanup;
86
85
  //# 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,EAAa,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAC5C,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,aAAa,CAAC,aAAa,CAAC,GAAG,QAAQ,EAC9C,SAAS,EAAE,WAAW,EACtB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,KAC5C,OAAO,CAWX"}
1
+ {"version":3,"file":"create-renderer.d.ts","sourceRoot":"","sources":["../src/create-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAa,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,KAAK,EAAE,OAAO,EAAE,M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E,CAAC,CAAC;IAC/C,CAAC,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"create-renderer.js","sourceRoot":"","sources":["../src/create-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AAEH,OAAO,EAAE,SAAS,EAAgB,MAAM,iBAAiB,CAAC;AAK1D,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,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IAC/C,CAAC,CAAC;AACH,CAAC"}
package/dist/index.d.ts CHANGED
@@ -5,9 +5,9 @@
5
5
  *
6
6
  * **The XMachines layer**, in this package:
7
7
  * - `createRenderer()` — the one-call factory. It returns `mount(actor, container, options?) → disconnect`
8
- * - `createPlayUI()` — the complete factory, with every option. It returns a `DisposablePlayUI`
8
+ * - `createPlayUI()` — the complete factory, with every option. It returns a `MountFn`
9
9
  * - `PlayRenderer` — the renderer class, with a `connect()` and `disconnect()` lifecycle
10
- * - `PlayDomOptions`, `CreatePlayUIOptions`, `MountFn`, `DisposablePlayUI`, `MountOptions`
10
+ * - `PlayDomOptions`, `CreatePlayUIOptions`, `MountFn`, `MountOptions`
11
11
  *
12
12
  * **The json-render layer**, re-exported from @xmachines/json-render-dom:
13
13
  * - `defineRegistry` — it builds a catalog-typed DomRegistry
@@ -28,11 +28,11 @@
28
28
  export { PlayRenderer } from "./PlayRenderer.js";
29
29
  export { createRenderer } from "./create-renderer.js";
30
30
  export { createPlayUI } from "./create-play-ui.js";
31
- export type { MountFn, DisposablePlayUI, MountOptions } from "./create-play-ui.js";
31
+ export type { MountFn, MountOptions } from "./create-play-ui.js";
32
32
  export type { PlayDomOptions, CreatePlayUIOptions } from "./types.js";
33
33
  export { defineRegistry, renderSpec, schema, createValidationRegistry, } from "@xmachines/json-render-dom";
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 { type Cleanup } from "@xmachines/play";
37
+ export { asCleanup, type Cleanup } from "@xmachines/play";
38
38
  //# sourceMappingURL=index.d.ts.map
@@ -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,gBAAgB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAGnF,YAAY,EAAE,cAAc,EAAE,mBAAmB,EAAE,MA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B,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;AAQpC,OAAO,EAAE,SAAS,EAAE,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -5,9 +5,9 @@
5
5
  *
6
6
  * **The XMachines layer**, in this package:
7
7
  * - `createRenderer()` — the one-call factory. It returns `mount(actor, container, options?) → disconnect`
8
- * - `createPlayUI()` — the complete factory, with every option. It returns a `DisposablePlayUI`
8
+ * - `createPlayUI()` — the complete factory, with every option. It returns a `MountFn`
9
9
  * - `PlayRenderer` — the renderer class, with a `connect()` and `disconnect()` lifecycle
10
- * - `PlayDomOptions`, `CreatePlayUIOptions`, `MountFn`, `DisposablePlayUI`, `MountOptions`
10
+ * - `PlayDomOptions`, `CreatePlayUIOptions`, `MountFn`, `MountOptions`
11
11
  *
12
12
  * **The json-render layer**, re-exported from @xmachines/json-render-dom:
13
13
  * - `defineRegistry` — it builds a catalog-typed DomRegistry
@@ -32,8 +32,11 @@ 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
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
36
- // entry. It names `asCleanup` nowhere: a consumer of this package RECEIVES a
37
- // release, and builds one only with @xmachines/play itself.
38
- export {} from "@xmachines/play";
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";
39
42
  //# 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;AAuBpC,sFAAsF;AACtF,iFAAiF;AACjF,6EAA6E;AAC7E,4DAA4D;AAC5D,OAAO,EAAgB,MAAM,iBAAiB,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;AAuBpC,sFAAsF;AACtF,wFAAwF;AACxF,EAAE;AACF,sFAAsF;AACtF,0FAA0F;AAC1F,yFAAyF;AACzF,oEAAoE;AACpE,OAAO,EAAE,SAAS,EAAgB,MAAM,iBAAiB,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * types.ts — the type definitions of play-dom that belong to XMachines.
3
3
  *
4
- * These types depend on @xmachines/play-actor, and they stay in play-dom.
4
+ * These types depend on @xmachines/play-view, and they stay in play-dom.
5
5
  * Each pure json-render type is in @xmachines/json-render-dom.
6
6
  *
7
7
  * @packageDocumentation
package/dist/types.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * types.ts — the type definitions of play-dom that belong to XMachines.
3
3
  *
4
- * These types depend on @xmachines/play-actor, and they stay in play-dom.
4
+ * These types depend on @xmachines/play-view, and they stay in play-dom.
5
5
  * Each pure json-render type is in @xmachines/json-render-dom.
6
6
  *
7
7
  * @packageDocumentation
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@xmachines/play-dom",
3
- "version": "3.0.0",
4
- "description": "Vanilla DOM renderer for XMachines Play architecture with signal-driven rendering",
3
+ "version": "5.0.0",
4
+ "description": "Vanilla DOM renderer for XMachines Play architecture with atom-driven rendering",
5
5
  "keywords": [
6
6
  "actor",
7
+ "atoms",
7
8
  "dom",
8
9
  "renderer",
9
- "signals",
10
10
  "state-machine",
11
11
  "ui",
12
12
  "xmachines"
@@ -41,39 +41,40 @@
41
41
  "build": "vite build && tsc --build",
42
42
  "clean": "rm -rf dist *.tsbuildinfo coverage .vitest-attachments test/browser/__screenshots__ node_modules/.svelte2tsx-* node_modules/.vite*",
43
43
  "lint": "oxlint .",
44
+ "lint:security": "node ../../scripts/semgrep-scan.mjs",
44
45
  "format": "oxfmt .",
45
46
  "test": "vitest",
46
47
  "test:coverage": "vitest run --coverage"
47
48
  },
48
49
  "dependencies": {
49
- "@xmachines/play": "3.0.0",
50
- "@xmachines/play-actor": "3.0.0",
51
- "@xmachines/play-signals": "3.0.0"
50
+ "@xmachines/play-view": "5.0.0"
52
51
  },
53
52
  "devDependencies": {
54
- "@testing-library/jest-dom": "^6.9.1",
55
- "@types/node": "^26.2.0",
56
- "@vitest/browser-playwright": "^4.1.11",
53
+ "@testing-library/jest-dom": "^7.0.1",
54
+ "@types/node": "^26.6.2",
55
+ "@vitest/browser-playwright": "^5.0.1",
57
56
  "@xmachines/json-render-core": "^0.20.0-xm.4",
58
57
  "@xmachines/json-render-dom": "^0.20.0-xm.4",
59
58
  "@xmachines/json-render-xstate": "^0.20.0-xm.4",
60
- "@xstate/store": "^3.17.0",
61
- "oxfmt": "^0.64.0",
62
- "oxlint": "^1.79.0",
59
+ "@xmachines/play": "5.0.0",
60
+ "@xmachines/play-actor": "5.0.0",
61
+ "@xmachines/play-atom": "5.0.0",
62
+ "oxfmt": "^0.70.0",
63
+ "oxlint": "^1.85.0",
63
64
  "typescript": "^5.9.3 || ^6.0.3",
64
- "vite": "^8.0.10",
65
- "vitest": "^4.1.11",
66
- "xstate": "^5.31.0",
67
- "zod": "^4.4.1"
65
+ "vite": "^8.3.0",
66
+ "vitest": "^5.0.1",
67
+ "xstate": "^5.33.0",
68
+ "zod": "^4.6.5"
68
69
  },
69
70
  "peerDependencies": {
70
71
  "@xmachines/json-render-core": "^0.20.0-xm.4",
71
72
  "@xmachines/json-render-dom": "^0.20.0-xm.4",
72
73
  "@xmachines/json-render-xstate": "^0.20.0-xm.4",
73
- "@xstate/store": "^3.17.0",
74
- "xstate": "^5.31.0"
74
+ "@xmachines/play": "5.0.0",
75
+ "@xmachines/play-atom": "5.0.0"
75
76
  },
76
77
  "engines": {
77
- "node": ">=22.0.0"
78
+ "node": ">=24.0.0"
78
79
  }
79
80
  }