@xmachines/play-xstate 4.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.
Files changed (42) hide show
  1. package/README.md +61 -30
  2. package/dist/capabilities.d.ts +4 -3
  3. package/dist/capabilities.d.ts.map +1 -1
  4. package/dist/capabilities.js.map +1 -1
  5. package/dist/errors.d.ts +38 -0
  6. package/dist/errors.d.ts.map +1 -1
  7. package/dist/errors.js +44 -0
  8. package/dist/errors.js.map +1 -1
  9. package/dist/index.d.ts +2 -2
  10. package/dist/index.js +2 -2
  11. package/dist/player-actor.d.ts +30 -29
  12. package/dist/player-actor.d.ts.map +1 -1
  13. package/dist/player-actor.js +51 -41
  14. package/dist/player-actor.js.map +1 -1
  15. package/dist/routing/build-url.d.ts +8 -1
  16. package/dist/routing/build-url.d.ts.map +1 -1
  17. package/dist/routing/build-url.js +34 -54
  18. package/dist/routing/build-url.js.map +1 -1
  19. package/dist/routing/derive-current-route.d.ts +11 -2
  20. package/dist/routing/derive-current-route.d.ts.map +1 -1
  21. package/dist/routing/derive-current-route.js +22 -6
  22. package/dist/routing/derive-current-route.js.map +1 -1
  23. package/dist/routing/derive-initial-route.d.ts +2 -1
  24. package/dist/routing/derive-initial-route.d.ts.map +1 -1
  25. package/dist/routing/derive-initial-route.js +2 -2
  26. package/dist/routing/derive-initial-route.js.map +1 -1
  27. package/dist/routing/format-play-route-transitions.js +10 -5
  28. package/dist/routing/format-play-route-transitions.js.map +1 -1
  29. package/dist/types.d.ts +2 -2
  30. package/dist/types.d.ts.map +1 -1
  31. package/dist/view/derive-current-view.d.ts +6 -5
  32. package/dist/view/derive-current-view.d.ts.map +1 -1
  33. package/dist/view/derive-current-view.js +5 -4
  34. package/dist/view/derive-current-view.js.map +1 -1
  35. package/dist/with-routing.d.ts.map +1 -1
  36. package/dist/with-routing.js +66 -4
  37. package/dist/with-routing.js.map +1 -1
  38. package/dist/with-view.d.ts +19 -4
  39. package/dist/with-view.d.ts.map +1 -1
  40. package/dist/with-view.js +64 -56
  41. package/dist/with-view.js.map +1 -1
  42. package/package.json +14 -13
@@ -1 +1 @@
1
- {"version":3,"file":"format-play-route-transitions.js","sourceRoot":"","sources":["../../src/routing/format-play-route-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1F;;;;;;;;;;GAUG;AACH,MAAM,kBAAkB,GAAG,CAAoC,IAAmB,EAAE,IAAO,EAAK,EAAE,CACjG,IAAI,KAAK,SAAS,IAAI,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAmCpE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAa,EAAE,CACvD,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAKnE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAgC,EAAW,EAAE,CACvE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAAqB,CAAC,IAAI,KAAK,SAAS,CAAC;AAE1F;;;;;;;;;;;GAWG;AACH,MAAM,eAAe,GAAG,CAAC,SAAoC,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAmB,EAAE,EAAE,CACtD,kBAAkB,CAChB,OAA+C,CAAC,MAAM,EACvD,K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AC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;SACnF,CAAC;IACH,CAAC;IAED,OAAO,IAAS,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"format-play-route-transitions.js","sourceRoot":"","sources":["../../src/routing/format-play-route-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAG1F;;;;;;;;;;GAUG;AACH,MAAM,kBAAkB,GAAG,CAAoC,IAAmB,EAAE,IAAO,EAAK,EAAE,CACjG,IAAI,KAAK,SAAS,IAAI,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;AAmCpE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAa,EAAE,CACvD,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAKnE;;;;;GAKG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAgC,EAAW,EAAE,CACvE,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAAqB,CAAC,IAAI,KAAK,SAAS,CAAC;AAE1F;;;;GAIG;AACH,MAAM,YAAY,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAmB,EAAE,EAAE,CAC5D,kBAAkB,CAAE,OAA+C,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;AAEjG,MAAM,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,GAAG,UAAU;YACb,YAAY,EAAE,CAAC,GAAG,gBAAgB,EAAE,GAAG,iBAAiB,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,CAAC;SACnF,CAAC;IACH,CAAC;IAED,OAAO,IAAS,CAAC;AAClB,CAAC"}
package/dist/types.d.ts CHANGED
@@ -47,7 +47,7 @@ export interface PlayerOptions<TMachine extends AnyStateMachine> {
47
47
  * you.
48
48
  */
49
49
  onTransition?: (actor: PlayerActorClass<TMachine>, prevState: SnapshotFrom<TMachine>, nextState: SnapshotFrom<TMachine>) => void;
50
- /** The actor calls it when the state signal changes */
50
+ /** The actor calls it when the state atom changes */
51
51
  onStateChange?: (actor: PlayerActorClass<TMachine>, state: SnapshotFrom<TMachine>) => void;
52
52
  /**
53
53
  * The actor calls it on an actor error: a snapshot restore that fails at `start()`,
@@ -92,7 +92,7 @@ export interface PlayerOptions<TMachine extends AnyStateMachine> {
92
92
  * inside the constructor of the actor. Its `actorRef` value is therefore the
93
93
  * instance during the construction, and `state`, `currentRoute`, `currentView`, and
94
94
  * `initialRoute` do not exist yet. A read of one of them there throws. Keep the
95
- * reference, and read the signals from a later event, or outside the observer.
95
+ * reference, and read the atoms from a later event, or outside the observer.
96
96
  *
97
97
  * @example
98
98
  * ```typescript
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACrF,OAAO,KAAK,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,YAAY,CAC5B,QAAQ,SAAS,eAAe,EAChC,aAAa,SAAS,MAAM,GAAG,MAAM;IAErC,kCAAkC;IAClC,OAAO,EAAE,QAAQ,CAAC;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AC,EAAE,0BAA0B,CAAC,QAAQ,CAAC,KAC1C,gBAAgB,CAAC,QAAQ,CAAC,GAAG,aAAa,CAAC"}
@@ -2,7 +2,7 @@
2
2
  * The view derivation — the meta.view half of the player pipeline.
3
3
  *
4
4
  * This file is beside src/routing/, so that player-actor.ts holds the actor
5
- * itself only: the signals, the hooks, and the lifecycle. The walk over the active
5
+ * itself only: the atoms, the hooks, and the lifecycle. The walk over the active
6
6
  * branch is shared with the route derivation. Therefore the view of a parallel
7
7
  * machine always belongs to the region of its URL.
8
8
  */
@@ -12,12 +12,13 @@ import { type PlaySpec } from "@xmachines/play-view";
12
12
  * Derives the current view of the actor from the state metadata.
13
13
  *
14
14
  * The function always returns a **fresh** `PlaySpec` object. The `Object.is`
15
- * equality test of `Signal.State` therefore stops no real change of the view.
16
- * `PlayerActor.validateAndCacheView` decides if the actor emits that fresh object:
15
+ * equality test of the atom therefore stops no real change of the view.
16
+ * The `currentView` atom of `withView` decides if the actor emits that fresh object:
17
17
  * it compares the object with the last spec of an emission, it reuses the reference
18
18
  * of the composed `state` field when the value of the projection did not change, and
19
- * it emits nothing when the view on the screen is the same. A provider below the
20
- * actor therefore mounts the UI again not on every event.
19
+ * it returns the previous spec when the view on the screen is the same — which the
20
+ * `Object.is` compare of the atom reads as no change, so it notifies no subscriber. A
21
+ * provider below the actor therefore mounts the UI again not on every event.
21
22
  *
22
23
  * ### The context projection
23
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"derive-current-view.d.ts","sourceRoot":"","sources":["../../src/view/derive-current-view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAiC,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAyEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,kBAAkB,KAAG,QAAQ,GAAG,IA4C3E,CAAC"}
1
+ {"version":3,"file":"derive-current-view.d.ts","sourceRoot":"","sources":["../../src/view/derive-current-view.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAiC,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAyEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,iBAAiB,GAAI,UAAU,kBAAkB,KAAG,QAAQ,GAAG,IA4C3E,CAAC"}
@@ -59,12 +59,13 @@ const resolveViewMeta = (meta) => {
59
59
  * Derives the current view of the actor from the state metadata.
60
60
  *
61
61
  * The function always returns a **fresh** `PlaySpec` object. The `Object.is`
62
- * equality test of `Signal.State` therefore stops no real change of the view.
63
- * `PlayerActor.validateAndCacheView` decides if the actor emits that fresh object:
62
+ * equality test of the atom therefore stops no real change of the view.
63
+ * The `currentView` atom of `withView` decides if the actor emits that fresh object:
64
64
  * it compares the object with the last spec of an emission, it reuses the reference
65
65
  * of the composed `state` field when the value of the projection did not change, and
66
- * it emits nothing when the view on the screen is the same. A provider below the
67
- * actor therefore mounts the UI again not on every event.
66
+ * it returns the previous spec when the view on the screen is the same — which the
67
+ * `Object.is` compare of the atom reads as no change, so it notifies no subscriber. A
68
+ * provider below the actor therefore mounts the UI again not on every event.
68
69
  *
69
70
  * ### The context projection
70
71
  *
@@ -1 +1 @@
1
- {"version":3,"file":"derive-current-view.js","sourceRoot":"","sources":["../../src/view/derive-current-view.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAiB,MAAM,sBAAsB,CAAC;AAEpF,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AASnD;;;;;;;;GAQG;AACH,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAAU,CAAC;AACjD,MAAM,uBAAuB,GAAG,CAAC,QAAgB,EAAQ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,WAAW,EACX,aAAa,EACb,SAAS,EACT,iBAAiB,GACjB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"with-routing.d.ts","sourceRoot":"","sources":["../src/with-routing.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAG9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CAAC,QAAQ,SAAS,eAAe,EAC3D,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAiHvC;AAcD,OAAO,EACN,WAAW,EACX,eAAe,EACf,aAAa,EACb,0BAA0B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACX,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,WAAW,EACX,aAAa,EACb,SAAS,EACT,iBAAiB,GACjB,MAAM,oBAAoB,CAAC"}
@@ -1,5 +1,6 @@
1
- import { Signal } from "@xmachines/play-signals";
1
+ import { createAtom } from "@xmachines/play-atom";
2
2
  import { deriveCurrentRoute, deriveInitialRoute } from "./routing/index.js";
3
+ import { toError } from "./player-actor.js";
3
4
  /**
4
5
  * Adds the routing capability to an actor class.
5
6
  *
@@ -17,14 +18,27 @@ import { deriveCurrentRoute, deriveInitialRoute } from "./routing/index.js";
17
18
  export function withRouting(Base) {
18
19
  class RoutableActor extends Base {
19
20
  /**
20
- * A TC39 `Signal.Computed`. It derives the current URL path from the `meta.route`
21
+ * A computed atom. It derives the current URL path from the `meta.route`
21
22
  * template of the active machine state and from the context of the actor.
22
23
  *
23
24
  * It returns `null` when the current state has no `meta.route` field, and also when
24
25
  * a necessary `:param` has no value in the context. The second case is normally
25
- * temporary during a transition, and the signal computes the value again on the next
26
+ * temporary during a transition, and the atom computes the value again on the next
26
27
  * snapshot.
27
28
  *
29
+ * It THROWS never. A derivation of this architecture reports a failure through
30
+ * `onError` and keeps its last good value, and `currentView` of
31
+ * `@xmachines/play-xstate/view` follows the same rule.
32
+ *
33
+ * The reason is the propagation. A subscriber makes this atom eager, so the
34
+ * derivation runs inside the `set` of `state`, which runs inside the XState
35
+ * subscription. A throw that left this function would unwind into `actor.send` and
36
+ * break the transition for EVERY other observer of the actor.
37
+ *
38
+ * The containment therefore belongs to the derivation, and not to each subscriber:
39
+ * a consumer that writes its own `watchAtom(actor.currentRoute, ...)` is protected
40
+ * by the same rule that protects a router bridge.
41
+ *
28
42
  * @example
29
43
  * ```typescript
30
44
  * // It returns "/profile/alice" when context.params.userId === "alice",
@@ -32,7 +46,55 @@ export function withRouting(Base) {
32
46
  * const route = actor.currentRoute.get();
33
47
  * ```
34
48
  */
35
- currentRoute = new Signal.Computed(() => deriveCurrentRoute(this.state.get()));
49
+ currentRoute = createAtom((previous) => {
50
+ try {
51
+ return deriveCurrentRoute(this.state.get());
52
+ }
53
+ catch (error) {
54
+ // `deriveCurrentRoute` answers the EXPECTED failure itself: a missing `:param`
55
+ // returns `null`, and the next snapshot resolves it. Whatever reaches this line
56
+ // is unexpected — a `URIError` of `encodeURIComponent` for a lone surrogate,
57
+ // for example. Report it, and keep the last route: a caller that reads `null`
58
+ // or a stale route navigates nowhere, which the bridge handles already.
59
+ // The derivation runs inside the `set` of `state`, and the engine TRACKS every
60
+ // atom that this function reads — the handler of the host included. A report
61
+ // from HERE therefore made whatever that handler reads a dependency of this
62
+ // atom, and an unrelated write of it re-derived and reported again: three
63
+ // reports for one failure. The microtask leaves the evaluation, so the handler
64
+ // reads what it likes and this atom depends on none of it.
65
+ //
66
+ // It leaves the `set` as well, which is what the comment below already needed:
67
+ // a throw from the handler lands on the global handler of the runtime, and it
68
+ // breaks the transition for no other observer of the actor.
69
+ const onError = this.hooks.onError;
70
+ if (onError) {
71
+ const reported = toError(error);
72
+ queueMicrotask(() => {
73
+ onError(this, reported);
74
+ });
75
+ }
76
+ return previous ?? null;
77
+ }
78
+ }, {
79
+ // Every WRITE of `state` reaches an observer of this atom, and not the writes
80
+ // that change the route alone.
81
+ //
82
+ // The default `Object.is` stops a notification for a value that the atom holds
83
+ // already, and a route is a STRING: a guard that refuses an inbound location and
84
+ // moves the actor back to the state it came from derives the same string, so no
85
+ // observer heard the answer. `RouterBridgeBase` waits for exactly that answer —
86
+ // `syncActorFromRouter` clears `lastActorRoute` before it sends, so the push
87
+ // that puts the address bar back on the route of the machine is owed to this
88
+ // notification — and the address bar kept the location that the guard refused.
89
+ //
90
+ // The bridge is written against a notification for each change of the SNAPSHOT,
91
+ // and not for each change of the derived string, so the comparison has to answer
92
+ // "different" always. A consumer that reads the value pays nothing for it: the
93
+ // derivation still runs one time for each transition, and `state` itself compares
94
+ // with `Object.is`, so an event that XState ignores delivers the identical
95
+ // snapshot and propagates nothing.
96
+ compare: () => false,
97
+ });
36
98
  /**
37
99
  * The route of the initial state of the machine. The construction fixes it, and it
38
100
  * never changes, also when the code restores the actor from a snapshot.
@@ -1 +1 @@
1
- {"version":3,"file":"with-routing.js","sourceRoot":"","sources":["../src/with-routing.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAIjD,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE5E;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAC1B,IAAiC;IAEjC,MAAM,aAAc,SAAQ,IAAI;QAC/B;;;;;;;;;;;;;;;WAeG;QACa,YAAY,GAAmC,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CACvF,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CACpC,CAAC;QAEF;;;;;;;;;;;;;;;;;;;;;;WAsBG;QACa,Y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M,oBAAoB,CAAC"}
@@ -27,13 +27,28 @@
27
27
  import type { AnyStateMachine } from "xstate";
28
28
  import { type Viewable } from "@xmachines/play-view";
29
29
  import type { PlayerConstructor } from "./capabilities.js";
30
+ /**
31
+ * Two WeakMaps stood here, and the derivation below needs neither.
32
+ *
33
+ * `lastViewSnapshots` skipped the derivation for a snapshot that the pipeline read
34
+ * already, because XState notifies each observer on EVERY event that it processes and an
35
+ * event that it ignores delivers the identical snapshot again. A computed atom answers
36
+ * that by itself: `state.set(snapshot)` compares with `Object.is`, an identical reference
37
+ * therefore propagates nothing, and this atom stays valid.
38
+ *
39
+ * `lastEmittedViews` held the previous emission for the equality gate, because a read of
40
+ * `currentView` would have registered it as a dependency of the computation around the
41
+ * call and `@xstate/store` exports no `untrack`. The `previous` parameter of a computed
42
+ * atom is that same value, and the engine hands it in rather than tracking a read.
43
+ */
30
44
  /**
31
45
  * Adds the view capability to an actor class.
32
46
  *
33
- * Compose it AFTER the routing capability. An override calls `super.onSnapshot()` first,
34
- * so `compose(PlayerActor, withRouting, withView)` gives the route its new value before
35
- * the view derives from the same transition. A router bridge therefore sees a guard
36
- * redirect before a renderer sees the view of the state that the guard refused.
47
+ * The ORDER of the composition does not matter. `currentView` and `currentRoute` are two
48
+ * computed atoms over `state`, and neither reads the other, so the engine evaluates both
49
+ * from one write in topological order. An earlier release wrote `currentView` from an
50
+ * `onSnapshot` override, and the order then decided which capability held its new value
51
+ * first.
37
52
  *
38
53
  * @param Base - The actor class to extend, normally `PlayerActor` or the result of
39
54
  * another capability.
@@ -1 +1 @@
1
- {"version":3,"file":"with-view.d.ts","sourceRoot":"","sources":["../src/with-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAsB,eAAe,EAAE,MAAM,QAAQ,CAAC;AAGlE,OAAO,EAAqC,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAsD3D;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,SAAS,eAAe,EACxD,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAgFvC"}
1
+ {"version":3,"file":"with-view.d.ts","sourceRoot":"","sources":["../src/with-view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAI9C,OAAO,EAAqC,KAAK,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAsC3D;;;;;;;;;;;;;GAaG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,QAAQ,SAAS,eAAe,EACxD,IAAI,EAAE,iBAAiB,CAAC,QAAQ,CAAC,GAC/B,iBAAiB,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAuFvC"}
package/dist/with-view.js CHANGED
@@ -1,4 +1,4 @@
1
- import { Signal } from "@xmachines/play-signals";
1
+ import { createAtom } from "@xmachines/play-atom";
2
2
  import { shallowEqualExcept } from "@xmachines/play";
3
3
  import { reuseComposedState } from "@xmachines/play-view";
4
4
  import { toError } from "./player-actor.js";
@@ -46,27 +46,27 @@ const viewSpecsEquivalent = (a, b) => {
46
46
  return true;
47
47
  };
48
48
  /**
49
- * The last snapshot that the view pipeline of each actor read.
49
+ * Two WeakMaps stood here, and the derivation below needs neither.
50
50
  *
51
- * A WeakMap at the module level, and not a field of the class: a `private` or a `#` field
52
- * makes a class type NOMINAL, so the compiler then compares the mixin class with no other
53
- * type and the return of this function needs `as unknown as`. The map holds the same state
54
- * with no member, and it releases each entry with its actor.
51
+ * `lastViewSnapshots` skipped the derivation for a snapshot that the pipeline read
52
+ * already, because XState notifies each observer on EVERY event that it processes and an
53
+ * event that it ignores delivers the identical snapshot again. A computed atom answers
54
+ * that by itself: `state.set(snapshot)` compares with `Object.is`, an identical reference
55
+ * therefore propagates nothing, and this atom stays valid.
55
56
  *
56
- * XState notifies each observer on EVERY event that it processes, and an event that it
57
- * ignores delivers the identical snapshot again. `deriveCurrentView` is pure in the
58
- * snapshot, so an identical reference can change no result. An actor that the map does not
59
- * hold has read no snapshot yet, which is correct for the first derivation: the snapshot of
60
- * the construction has the same reference as the snapshot that `start()` replays.
57
+ * `lastEmittedViews` held the previous emission for the equality gate, because a read of
58
+ * `currentView` would have registered it as a dependency of the computation around the
59
+ * call and `@xstate/store` exports no `untrack`. The `previous` parameter of a computed
60
+ * atom is that same value, and the engine hands it in rather than tracking a read.
61
61
  */
62
- const lastViewSnapshots = new WeakMap();
63
62
  /**
64
63
  * Adds the view capability to an actor class.
65
64
  *
66
- * Compose it AFTER the routing capability. An override calls `super.onSnapshot()` first,
67
- * so `compose(PlayerActor, withRouting, withView)` gives the route its new value before
68
- * the view derives from the same transition. A router bridge therefore sees a guard
69
- * redirect before a renderer sees the view of the state that the guard refused.
65
+ * The ORDER of the composition does not matter. `currentView` and `currentRoute` are two
66
+ * computed atoms over `state`, and neither reads the other, so the engine evaluates both
67
+ * from one write in topological order. An earlier release wrote `currentView` from an
68
+ * `onSnapshot` override, and the order then decided which capability held its new value
69
+ * first.
70
70
  *
71
71
  * @param Base - The actor class to extend, normally `PlayerActor` or the result of
72
72
  * another capability.
@@ -74,14 +74,14 @@ const lastViewSnapshots = new WeakMap();
74
74
  export function withView(Base) {
75
75
  class ViewableActor extends Base {
76
76
  /**
77
- * The reactive signal of the current view spec. The signal derives the spec from the
77
+ * The reactive atom of the current view spec. The atom derives the spec from the
78
78
  * `meta.view` metadata of the active state.
79
79
  *
80
80
  * It emits a **new object reference** on each real change of the view on the screen:
81
81
  * the view of a different state, or a change of a param or of the context that changes
82
82
  * the resolved spec. A re-entry with `reenter: true` and new params also changes the
83
83
  * spec. A snapshot that changes no view on the screen, such as an assign of the
84
- * context alone, keeps the previous reference. A provider below the signal therefore
84
+ * context alone, keeps the previous reference. A provider below the atom therefore
85
85
  * mounts the UI again not on every event.
86
86
  *
87
87
  * The `PlaySpec` of the emission carries the context of the machine in its composed
@@ -90,60 +90,68 @@ export function withView(Base) {
90
90
  * (`{ $state: "/context/params/section" }`). The context-projection module of
91
91
  * `@xmachines/play-view` holds the complete contract.
92
92
  *
93
- * The signal returns `null` when the current state has no `meta.view` metadata.
93
+ * The atom returns `null` when the current state has no `meta.view` metadata.
94
94
  *
95
95
  * Two states can declare two separate `meta.view` literals with an identical
96
96
  * structure. A transition between those two states then emits two different
97
97
  * references, and a provider mounts the UI again. Move the shared literal into one
98
98
  * `typedSpec` constant, and the identity then removes the duplicate.
99
- */
100
- currentView = new Signal.State(null);
101
- onSnapshot(snapshot) {
102
- // FIRST, so that every capability composed before this one holds its new value.
103
- super.onSnapshot(snapshot);
104
- this.validateAndCacheView(snapshot);
105
- }
106
- /**
107
- * Derives the view at the entry of a state, and keeps it. This happens one time for
108
- * each transition. The signal holds the view, and the code computes it not on each
109
- * read.
110
99
  *
111
- * @param snapshot - The current XState snapshot
100
+ * It is a COMPUTED atom over `state`, and not a written one. One write for each
101
+ * transition therefore reaches the whole actor — `state.set(snapshot)` — and the
102
+ * engine evaluates this atom and `currentRoute` in one propagation, in topological
103
+ * order. A second write would flush a second time, and an observer that reads two
104
+ * atoms would see the new state beside the old view in between.
112
105
  */
113
- validateAndCacheView(snapshot) {
114
- if (snapshot === lastViewSnapshots.get(this)) {
115
- return;
116
- }
117
- lastViewSnapshots.set(this, snapshot);
106
+ currentView = createAtom((previous) => {
107
+ // `previous` is the value that this atom holds already. The engine hands it in,
108
+ // so the gate below reads it without a `get()`, and it therefore registers
109
+ // `currentView` as a dependency of nothing.
110
+ const lastEmittedView = previous ?? null;
118
111
  try {
119
- const view = deriveCurrentView(snapshot);
112
+ const view = deriveCurrentView(this.state.get());
120
113
  // Emit only after a real change of the view on the screen: deriveCurrentView
121
- // returns a fresh object on each call, and the identity of the reference therefore
122
- // tells nothing. A new reference for a snapshot that changes the view not, for
123
- // example a context-only assign, makes a provider below mount the UI again, and
124
- // that removes the state of the view. A deep equality test is deliberately NOT
125
- // here: it sees nothing inside a Map or a Set, and it therefore stops a real
126
- // change, and it recurses without an end on a cyclic prop. The last spec of an
127
- // emission IS the current value of the signal. Read it without a track, so that
128
- // the gate registers currentView never as a dependency of a computation around it.
129
- const lastEmittedView = Signal.subtle.untrack(() => this.currentView.get());
130
- // Use the reference of the previous composed state again when the value of the
131
- // /context projection did not change. A context-only assign that changes no
132
- // projected value therefore changes the identity of the state not.
114
+ // returns a fresh object on each call, and the identity of the reference
115
+ // therefore tells nothing. A new reference for a snapshot that changes the view
116
+ // not, for example a context-only assign, makes a provider below mount the UI
117
+ // again, and that removes the state of the view. A deep equality test is
118
+ // deliberately NOT here: it sees nothing inside a Map or a Set, and it
119
+ // therefore stops a real change, and it recurses without an end on a cyclic
120
+ // prop.
121
+ //
122
+ // A return of `lastEmittedView` compares equal under `Object.is`, so the atom
123
+ // notifies no subscriber and the propagation stops here.
133
124
  const nextView = reuseComposedState(lastEmittedView, view);
134
- if (viewSpecsEquivalent(lastEmittedView, nextView)) {
135
- return;
136
- }
137
- this.currentView.set(nextView);
125
+ return viewSpecsEquivalent(lastEmittedView, nextView)
126
+ ? lastEmittedView
127
+ : nextView;
138
128
  }
139
129
  catch (error) {
130
+ // The derivation runs inside the `set` of `state`, which runs inside the XState
131
+ // subscription. A throw that leaves this function therefore leaves that `set`
132
+ // and breaks the transition for every other observer of the actor. Report it,
133
+ // and keep the last valid view.
134
+ //
135
+ // The derivation runs inside the `set` of `state`, and the engine TRACKS every
136
+ // atom that this function reads — the handler of the host included. A report
137
+ // from HERE therefore made whatever that handler reads a dependency of this
138
+ // atom, and an unrelated write of it re-derived and reported again: three
139
+ // reports for one failure. The microtask leaves the evaluation, so the handler
140
+ // reads what it likes and this atom depends on none of it.
141
+ //
142
+ // It leaves the `set` as well, which is what the comment below already needed:
143
+ // a throw from the handler lands on the global handler of the runtime, and it
144
+ // breaks the transition for no other observer of the actor.
140
145
  const onError = this.hooks.onError;
141
146
  if (onError) {
142
- onError(this, toError(error));
147
+ const reported = toError(error);
148
+ queueMicrotask(() => {
149
+ onError(this, reported);
150
+ });
143
151
  }
144
- // On an error: keep the last valid view, and clear it not
152
+ return lastEmittedView;
145
153
  }
146
- }
154
+ });
147
155
  }
148
156
  return ViewableActor;
149
157
  }
@@ -1 +1 @@
1
- {"version":3,"file":"with-view.js","sourceRoot":"","sources":["../src/with-view.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAgC,MAAM,sBAAsB,CAAC;AAExF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,mBAAmB,GAAG,CAAC,CAAkB,EAAE,CAAkB,EAAW,EAAE;IAC/E,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IACzB,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3B,IAAI,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IAExD,MAAM,SAAS,GAAG,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IACnC,MAAM,SAAS,GAAG,CAAC,CAAC,QAAQ,IAAI,EAAE,CAAC;IACnC,2EAA2E;IAC3E,8EAA8E;IAC9E,aAAa;IACb,IAAI,SAAS,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,C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;gBAC9E,4DAA4D;gBAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC;gBACnC,IAAI,OAAO,EAAE,CAAC;oBACb,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;oBAChC,cAAc,CAAC,GAAG,EAAE;wBACnB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;oBACzB,CAAC,CAAC,CAAC;gBACJ,CAAC;gBACD,OAAO,eAAe,CAAC;YACxB,CAAC;QACF,CAAC,CACD,CAAC;KACF;IAED,OAAO,aAAa,CAAC;AACtB,CAAC"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@xmachines/play-xstate",
3
- "version": "4.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "XState v5 adapter for Play Architecture",
5
5
  "keywords": [
6
6
  "actor-model",
7
+ "atoms",
7
8
  "play-architecture",
8
- "signals",
9
9
  "state-machine",
10
10
  "xstate"
11
11
  ],
@@ -57,28 +57,29 @@
57
57
  "test:coverage": "vitest run --coverage"
58
58
  },
59
59
  "dependencies": {
60
- "@xmachines/play-actor": "4.0.0"
60
+ "@xmachines/play-actor": "5.0.0",
61
+ "@xmachines/play-pattern": "5.0.0"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@testing-library/jest-dom": "^7.0.1",
64
65
  "@types/node": "^26.6.2",
65
66
  "@xmachines/json-render-core": "^0.20.0-xm.4",
66
- "@xmachines/play": "4.0.0",
67
- "@xmachines/play-router": "4.0.0",
68
- "@xmachines/play-signals": "4.0.0",
69
- "@xmachines/play-view": "4.0.0",
70
- "oxfmt": "^0.68.0",
71
- "oxlint": "^1.83.0",
67
+ "@xmachines/play": "5.0.0",
68
+ "@xmachines/play-atom": "5.0.0",
69
+ "@xmachines/play-router": "5.0.0",
70
+ "@xmachines/play-view": "5.0.0",
71
+ "oxfmt": "^0.70.0",
72
+ "oxlint": "^1.85.0",
72
73
  "typescript": "^5.9.3 || ^6.0.3",
73
74
  "vite": "^8.3.0",
74
75
  "vitest": "^5.0.1",
75
76
  "xstate": "^5.33.0"
76
77
  },
77
78
  "peerDependencies": {
78
- "@xmachines/play": "4.0.0",
79
- "@xmachines/play-router": "4.0.0",
80
- "@xmachines/play-signals": "4.0.0",
81
- "@xmachines/play-view": "4.0.0",
79
+ "@xmachines/play": "5.0.0",
80
+ "@xmachines/play-atom": "5.0.0",
81
+ "@xmachines/play-router": "5.0.0",
82
+ "@xmachines/play-view": "5.0.0",
82
83
  "xstate": "^5.33.0"
83
84
  },
84
85
  "peerDependenciesMeta": {