@xmachines/docs 1.0.0-beta.10

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 (197) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +15 -0
  3. package/api/@xmachines/play/README.md +130 -0
  4. package/api/@xmachines/play/type-aliases/PlayEvent.md +81 -0
  5. package/api/@xmachines/play-actor/README.md +247 -0
  6. package/api/@xmachines/play-actor/classes/AbstractActor.md +520 -0
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +29 -0
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +17 -0
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +12 -0
  10. package/api/@xmachines/play-catalog/README.md +331 -0
  11. package/api/@xmachines/play-catalog/functions/defineCatalog.md +98 -0
  12. package/api/@xmachines/play-catalog/functions/defineComponents.md +134 -0
  13. package/api/@xmachines/play-catalog/type-aliases/Catalog.md +48 -0
  14. package/api/@xmachines/play-catalog/type-aliases/ComponentsFor.md +20 -0
  15. package/api/@xmachines/play-catalog/type-aliases/InferComponentProps.md +65 -0
  16. package/api/@xmachines/play-catalog/type-aliases/NoExtraKeys.md +17 -0
  17. package/api/@xmachines/play-react/README.md +423 -0
  18. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +613 -0
  19. package/api/@xmachines/play-react/functions/useSignalEffect.md +68 -0
  20. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +15 -0
  21. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +14 -0
  22. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +15 -0
  23. package/api/@xmachines/play-react/variables/PlayRenderer.md +64 -0
  24. package/api/@xmachines/play-react-router/README.md +198 -0
  25. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +321 -0
  26. package/api/@xmachines/play-react-router/classes/RouteMap.md +137 -0
  27. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +19 -0
  28. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +35 -0
  29. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +119 -0
  30. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +14 -0
  31. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +17 -0
  32. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +104 -0
  33. package/api/@xmachines/play-react-router-demo/README.md +137 -0
  34. package/api/@xmachines/play-router/README.md +502 -0
  35. package/api/@xmachines/play-router/classes/BaseRouteMap.md +142 -0
  36. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +300 -0
  37. package/api/@xmachines/play-router/functions/buildRouteTree.md +27 -0
  38. package/api/@xmachines/play-router/functions/connectRouter.md +67 -0
  39. package/api/@xmachines/play-router/functions/crawlMachine.md +92 -0
  40. package/api/@xmachines/play-router/functions/createBrowserHistory.md +47 -0
  41. package/api/@xmachines/play-router/functions/createRouteMap.md +53 -0
  42. package/api/@xmachines/play-router/functions/createRouter.md +76 -0
  43. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +32 -0
  44. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +64 -0
  45. package/api/@xmachines/play-router/functions/extractRoute.md +45 -0
  46. package/api/@xmachines/play-router/functions/findRouteById.md +37 -0
  47. package/api/@xmachines/play-router/functions/findRouteByPath.md +39 -0
  48. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +35 -0
  49. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +39 -0
  50. package/api/@xmachines/play-router/functions/routeExists.md +26 -0
  51. package/api/@xmachines/play-router/functions/validateRouteFormat.md +29 -0
  52. package/api/@xmachines/play-router/functions/validateStateExists.md +29 -0
  53. package/api/@xmachines/play-router/interfaces/BaseRouteMapping.md +27 -0
  54. package/api/@xmachines/play-router/interfaces/BrowserHistory.md +172 -0
  55. package/api/@xmachines/play-router/interfaces/BrowserWindow.md +69 -0
  56. package/api/@xmachines/play-router/interfaces/ConnectRouterOptions.md +13 -0
  57. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +119 -0
  58. package/api/@xmachines/play-router/interfaces/RouteInfo.md +19 -0
  59. package/api/@xmachines/play-router/interfaces/RouteMap.md +56 -0
  60. package/api/@xmachines/play-router/interfaces/RouteNode.md +21 -0
  61. package/api/@xmachines/play-router/interfaces/RouteObject.md +21 -0
  62. package/api/@xmachines/play-router/interfaces/RouteTree.md +20 -0
  63. package/api/@xmachines/play-router/interfaces/RouterBridge.md +104 -0
  64. package/api/@xmachines/play-router/interfaces/StateVisit.md +15 -0
  65. package/api/@xmachines/play-router/interfaces/VanillaRouter.md +28 -0
  66. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +11 -0
  67. package/api/@xmachines/play-router-demo/README.md +137 -0
  68. package/api/@xmachines/play-signals/README.md +176 -0
  69. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +34 -0
  70. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +49 -0
  71. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +35 -0
  72. package/api/@xmachines/play-signals/interfaces/SignalState.md +68 -0
  73. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +97 -0
  74. package/api/@xmachines/play-signals/namespaces/Signal/README.md +22 -0
  75. package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +52 -0
  76. package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +72 -0
  77. package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +19 -0
  78. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/README.md +21 -0
  79. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +85 -0
  80. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +13 -0
  81. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +19 -0
  82. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +19 -0
  83. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +19 -0
  84. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +19 -0
  85. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +25 -0
  86. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +9 -0
  87. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +9 -0
  88. package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +19 -0
  89. package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +19 -0
  90. package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +19 -0
  91. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +32 -0
  92. package/api/@xmachines/play-solid/README.md +311 -0
  93. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +15 -0
  94. package/api/@xmachines/play-solid/variables/PlayRenderer.md +70 -0
  95. package/api/@xmachines/play-solid-router/README.md +666 -0
  96. package/api/@xmachines/play-solid-router/classes/RouteMap.md +150 -0
  97. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +347 -0
  98. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +19 -0
  99. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +32 -0
  100. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +486 -0
  101. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +119 -0
  102. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +14 -0
  103. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +14 -0
  104. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +104 -0
  105. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +9 -0
  106. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +51 -0
  107. package/api/@xmachines/play-solid-router-demo/README.md +127 -0
  108. package/api/@xmachines/play-tanstack-react-router/README.md +226 -0
  109. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +137 -0
  110. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +348 -0
  111. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +19 -0
  112. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +53 -0
  113. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +35 -0
  114. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +38 -0
  115. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +33 -0
  116. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +119 -0
  117. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +14 -0
  118. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +17 -0
  119. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +26 -0
  120. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +104 -0
  121. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +9 -0
  122. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +78 -0
  123. package/api/@xmachines/play-tanstack-react-router/variables/extractMachineRoutes.md +64 -0
  124. package/api/@xmachines/play-tanstack-react-router-demo/README.md +126 -0
  125. package/api/@xmachines/play-tanstack-solid-router/README.md +285 -0
  126. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +150 -0
  127. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +343 -0
  128. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +19 -0
  129. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +32 -0
  130. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +119 -0
  131. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +14 -0
  132. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +23 -0
  133. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +104 -0
  134. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +9 -0
  135. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +9 -0
  136. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +78 -0
  137. package/api/@xmachines/play-tanstack-solid-router-demo/README.md +126 -0
  138. package/api/@xmachines/play-vue/README.md +292 -0
  139. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +14 -0
  140. package/api/@xmachines/play-vue/variables/PlayRenderer.md +9 -0
  141. package/api/@xmachines/play-vue-router/README.md +604 -0
  142. package/api/@xmachines/play-vue-router/classes/RouteMap.md +209 -0
  143. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +201 -0
  144. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +360 -0
  145. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +19 -0
  146. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +119 -0
  147. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +15 -0
  148. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +104 -0
  149. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +9 -0
  150. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +67 -0
  151. package/api/@xmachines/play-vue-router-demo/README.md +133 -0
  152. package/api/@xmachines/play-xstate/README.md +512 -0
  153. package/api/@xmachines/play-xstate/classes/PlayerActor.md +527 -0
  154. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +43 -0
  155. package/api/@xmachines/play-xstate/functions/composeGuards.md +79 -0
  156. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +67 -0
  157. package/api/@xmachines/play-xstate/functions/definePlayer.md +127 -0
  158. package/api/@xmachines/play-xstate/functions/deriveRoute.md +109 -0
  159. package/api/@xmachines/play-xstate/functions/eventMatches.md +40 -0
  160. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +54 -0
  161. package/api/@xmachines/play-xstate/functions/hasContext.md +42 -0
  162. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +41 -0
  163. package/api/@xmachines/play-xstate/functions/mergeViewProps.md +26 -0
  164. package/api/@xmachines/play-xstate/functions/negateGuard.md +61 -0
  165. package/api/@xmachines/play-xstate/functions/stateMatches.md +25 -0
  166. package/api/@xmachines/play-xstate/functions/validateComponentBinding.md +39 -0
  167. package/api/@xmachines/play-xstate/functions/validateViewProps.md +80 -0
  168. package/api/@xmachines/play-xstate/interfaces/CatalogEntry.md +16 -0
  169. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +24 -0
  170. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +26 -0
  171. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +22 -0
  172. package/api/@xmachines/play-xstate/type-aliases/Catalog.md +21 -0
  173. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +14 -0
  174. package/api/@xmachines/play-xstate/type-aliases/Guard.md +34 -0
  175. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +20 -0
  176. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +29 -0
  177. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +45 -0
  178. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +51 -0
  179. package/api/@xmachines/play-xstate/type-aliases/ValidationResult.md +17 -0
  180. package/api/@xmachines/play-xstate/type-aliases/ViewMergeContext.md +35 -0
  181. package/api/@xmachines/shared/README.md +379 -0
  182. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +29 -0
  183. package/api/@xmachines/shared/functions/xmAliases.md +24 -0
  184. package/api/README.md +25 -0
  185. package/api/llms.txt +26 -0
  186. package/examples/README.md +63 -0
  187. package/examples/basic-state-machine.md +70 -0
  188. package/examples/form-validation.md +167 -0
  189. package/examples/multi-router-integration.md +277 -0
  190. package/examples/routing-patterns.md +260 -0
  191. package/examples/traffic-light.md +99 -0
  192. package/guides/README.md +29 -0
  193. package/guides/getting-started.md +223 -0
  194. package/guides/installation.md +323 -0
  195. package/index.d.ts +3 -0
  196. package/index.js +4 -0
  197. package/package.json +54 -0
@@ -0,0 +1,486 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-solid-router](../README.md) / AbstractActor
2
+
3
+ # Abstract Interface: AbstractActor\<TLogic\>
4
+
5
+ Defined in: packages/play-actor/dist/abstract-actor.d.ts:173
6
+
7
+ Abstract base class for Play Architecture actors.
8
+
9
+ Extends XState Actor to maintain ecosystem compatibility (inspection, devtools)
10
+ while enforcing minimal signal protocol for Actor ↔ Infrastructure communication.
11
+
12
+ The core protocol contains only:
13
+
14
+ - state: Reactive state snapshot
15
+ - send: Event dispatch method
16
+
17
+ Optional capabilities (routing, view rendering) are provided via interfaces:
18
+
19
+ - Implement Routable for routing support
20
+ - Implement Viewable for view rendering support
21
+
22
+ Concrete implementations created by @xmachines/play-xstate adapter.
23
+
24
+ ## Examples
25
+
26
+ Simple actor (no routing, no view)
27
+
28
+ ```typescript
29
+ class SimpleActor extends AbstractActor<AnyActorLogic> {
30
+ state = new Signal.State({...});
31
+ send(event) { ... }
32
+ }
33
+ ```
34
+
35
+ Routable actor
36
+
37
+ ```typescript
38
+ class RoutableActor extends AbstractActor<AnyActorLogic> implements Routable {
39
+ state = new Signal.State({...});
40
+ currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
41
+ send(event) { ... }
42
+ }
43
+ ```
44
+
45
+ Full-featured actor (routing + view)
46
+
47
+ ```typescript
48
+ class PlayerActor extends AbstractActor<AnyActorLogic> implements Routable, Viewable {
49
+ state = new Signal.State({...});
50
+ currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
51
+ currentView = new Signal.State(null);
52
+ catalog = {};
53
+ send(event) { ... }
54
+ }
55
+ ```
56
+
57
+ ## See
58
+
59
+ - [RFC Play v1 Section 5.3](https://gitlab.com/xmachin-es/rfc/-/blob/main/src/play-v1.md#53-actor-protocol)
60
+ - [Routable](../../play-actor/interfaces/Routable.md) for routing capability
61
+ - [Viewable](../../play-actor/interfaces/Viewable.md) for view rendering capability
62
+
63
+ ## Extends
64
+
65
+ - `Actor`\<`TLogic`\>
66
+
67
+ ## Type Parameters
68
+
69
+ | Type Parameter | Description |
70
+ | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
+ | `TLogic` _extends_ `AnyActorLogic` | XState actor logic type (maintains type safety) Invariant: Actor Authority - Actor is the sole source of truth for state transitions. Invariant: Signal-Only Reactivity - Infrastructure observes via TC39 Signals. Invariant: Passive Infrastructure - Infrastructure reflects, never decides. |
72
+
73
+ ## Properties
74
+
75
+ | Property | Modifier | Type | Description | Inherited from | Defined in |
76
+ | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ------------------------------------------------------------- |
77
+ | <a id="property-_parent"></a> `_parent?` | `public` | `AnyActorRef` | - | `Actor._parent` | node_modules/xstate/dist/declarations/src/createActor.d.ts:33 |
78
+ | <a id="property-clock"></a> `clock` | `public` | `Clock` | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | `Actor.clock` | node_modules/xstate/dist/declarations/src/createActor.d.ts:25 |
79
+ | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | node_modules/xstate/dist/declarations/src/createActor.d.ts:28 |
80
+ | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | node_modules/xstate/dist/declarations/src/createActor.d.ts:18 |
81
+ | <a id="property-options"></a> `options` | `public` | `Readonly`\<`ActorOptions`\<`TLogic`\>\> | - | `Actor.options` | node_modules/xstate/dist/declarations/src/createActor.d.ts:26 |
82
+ | <a id="property-ref"></a> `ref` | `public` | `ActorRef`\<`SnapshotFrom`\<`TLogic`\>, `EventFromLogic`\<`TLogic`\>, `EmittedFrom`\<`TLogic`\>\> | - | `Actor.ref` | node_modules/xstate/dist/declarations/src/createActor.d.ts:34 |
83
+ | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | node_modules/xstate/dist/declarations/src/createActor.d.ts:38 |
84
+ | <a id="property-src"></a> `src` | `public` | `string` \| `AnyActorLogic` | - | `Actor.src` | node_modules/xstate/dist/declarations/src/createActor.d.ts:42 |
85
+ | <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | Reactive snapshot of current actor state. Typed as `Signal.State<unknown>` at the abstract level; concrete implementations narrow this to the actual snapshot type (e.g., `Signal.State<AnyMachineSnapshot>` in `@xmachines/play-xstate`'s `PlayerActor`). Infrastructure observes this signal to react to state changes without directly coupling to the Actor's internal state machine implementation. **Example** `// Infrastructure observes state signal const watcher = new Signal.subtle.Watcher(() => { console.log('Actor state changed:', actor.state.get()); }); watcher.watch(actor.state);` | - | packages/play-actor/dist/abstract-actor.d.ts:193 |
86
+ | <a id="property-system"></a> `system` | `public` | `AnyActorSystem` | The system to which this actor belongs. | `Actor.system` | node_modules/xstate/dist/declarations/src/createActor.d.ts:40 |
87
+ | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | node_modules/xstate/dist/declarations/src/createActor.d.ts:36 |
88
+
89
+ ## Methods
90
+
91
+ ### \[observable\]()
92
+
93
+ ```ts
94
+ observable: InteropSubscribable<SnapshotFrom<TLogic>>;
95
+ ```
96
+
97
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:153
98
+
99
+ #### Returns
100
+
101
+ `InteropSubscribable`\<`SnapshotFrom`\<`TLogic`\>\>
102
+
103
+ #### Inherited from
104
+
105
+ ```ts
106
+ Actor.[observable]
107
+ ```
108
+
109
+ ---
110
+
111
+ ### getPersistedSnapshot()
112
+
113
+ ```ts
114
+ getPersistedSnapshot(): Snapshot<unknown>;
115
+ ```
116
+
117
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:152
118
+
119
+ Obtain the internal state of the actor, which can be persisted.
120
+
121
+ #### Returns
122
+
123
+ `Snapshot`\<`unknown`\>
124
+
125
+ #### Remarks
126
+
127
+ The internal state can be persisted from any actor, not only machines.
128
+
129
+ Note that the persisted state is not the same as the snapshot from
130
+ [Actor.getSnapshot](../../play-actor/classes/AbstractActor.md#getsnapshot). Persisted state represents the internal state of
131
+ the actor, while snapshots represent the actor's last emitted value.
132
+
133
+ Can be restored with [ActorOptions.state](#)
134
+
135
+ #### See
136
+
137
+ https://stately.ai/docs/persistence
138
+
139
+ #### Inherited from
140
+
141
+ ```ts
142
+ Actor.getPersistedSnapshot;
143
+ ```
144
+
145
+ ---
146
+
147
+ ### getSnapshot()
148
+
149
+ ```ts
150
+ getSnapshot(): SnapshotFrom<TLogic>;
151
+ ```
152
+
153
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:168
154
+
155
+ Read an actor’s snapshot synchronously.
156
+
157
+ #### Returns
158
+
159
+ `SnapshotFrom`\<`TLogic`\>
160
+
161
+ #### Remarks
162
+
163
+ The snapshot represent an actor's last emitted value.
164
+
165
+ When an actor receives an event, its internal state may change. An actor
166
+ may emit a snapshot when a state transition occurs.
167
+
168
+ Note that some actors, such as callback actors generated with
169
+ `fromCallback`, will not emit snapshots.
170
+
171
+ #### See
172
+
173
+ - [Actor.subscribe](../../play-actor/classes/AbstractActor.md#subscribe) to subscribe to an actor’s snapshot values.
174
+ - [Actor.getPersistedSnapshot](../../play-actor/classes/AbstractActor.md#getpersistedsnapshot) to persist the internal state of an actor (which is more than just a snapshot).
175
+
176
+ #### Inherited from
177
+
178
+ ```ts
179
+ Actor.getSnapshot;
180
+ ```
181
+
182
+ ---
183
+
184
+ ### on()
185
+
186
+ ```ts
187
+ on<TType>(type, handler): Subscription;
188
+ ```
189
+
190
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:115
191
+
192
+ #### Type Parameters
193
+
194
+ | Type Parameter |
195
+ | ----------------------- |
196
+ | `TType` _extends_ `any` |
197
+
198
+ #### Parameters
199
+
200
+ | Parameter | Type |
201
+ | --------- | --------------------- |
202
+ | `type` | `TType` |
203
+ | `handler` | (`emitted`) => `void` |
204
+
205
+ #### Returns
206
+
207
+ `Subscription`
208
+
209
+ #### Inherited from
210
+
211
+ ```ts
212
+ Actor.on;
213
+ ```
214
+
215
+ ---
216
+
217
+ ### send()
218
+
219
+ ```ts
220
+ abstract send(event): void;
221
+ ```
222
+
223
+ Defined in: packages/play-actor/dist/abstract-actor.d.ts:216
224
+
225
+ Send event to Actor
226
+
227
+ Infrastructure forwards user intents (navigation, domain events, custom events)
228
+ as events to the Actor. The Actor's state machine guards determine whether
229
+ each event is valid from the current state.
230
+
231
+ #### Parameters
232
+
233
+ | Parameter | Type | Description |
234
+ | --------- | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
235
+ | `event` | `object` & `Record`\<`string`, `unknown`\> | Event object with type property (e.g., PlayEvent, PlayRouteEvent) Invariant: Actor Authority - Only Actor decides whether an event is valid. |
236
+
237
+ #### Returns
238
+
239
+ `void`
240
+
241
+ #### Example
242
+
243
+ ```typescript
244
+ // Infrastructure forwards user intent
245
+ actor.send({ type: "auth.login", userId: "123" });
246
+ // Actor's guards determine if event is allowed
247
+ ```
248
+
249
+ #### Remarks
250
+
251
+ Accepts any event object with a type property. Core events (PlayEvent) are in
252
+ @xmachines/play, routing events (PlayRouteEvent) are in @xmachines/play-router.
253
+
254
+ #### Overrides
255
+
256
+ ```ts
257
+ Actor.send;
258
+ ```
259
+
260
+ ---
261
+
262
+ ### start()
263
+
264
+ ```ts
265
+ start(): this;
266
+ ```
267
+
268
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:119
269
+
270
+ Starts the Actor from the initial state
271
+
272
+ #### Returns
273
+
274
+ `this`
275
+
276
+ #### Inherited from
277
+
278
+ ```ts
279
+ Actor.start;
280
+ ```
281
+
282
+ ---
283
+
284
+ ### stop()
285
+
286
+ ```ts
287
+ stop(): this;
288
+ ```
289
+
290
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:123
291
+
292
+ Stops the Actor and unsubscribe all listeners.
293
+
294
+ #### Returns
295
+
296
+ `this`
297
+
298
+ #### Inherited from
299
+
300
+ ```ts
301
+ Actor.stop;
302
+ ```
303
+
304
+ ---
305
+
306
+ ### subscribe()
307
+
308
+ #### Call Signature
309
+
310
+ ```ts
311
+ subscribe(observer): Subscription;
312
+ ```
313
+
314
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:113
315
+
316
+ Subscribe an observer to an actor’s snapshot values.
317
+
318
+ ##### Parameters
319
+
320
+ | Parameter | Type | Description |
321
+ | ---------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
322
+ | `observer` | `Observer`\<`SnapshotFrom`\<`TLogic`\>\> | Either a plain function that receives the latest snapshot, or an observer object whose `.next(snapshot)` method receives the latest snapshot |
323
+
324
+ ##### Returns
325
+
326
+ `Subscription`
327
+
328
+ ##### Remarks
329
+
330
+ The observer will receive the actor’s snapshot value when it is emitted.
331
+ The observer can be:
332
+
333
+ - A plain function that receives the latest snapshot, or
334
+ - An observer object whose `.next(snapshot)` method receives the latest
335
+ snapshot
336
+
337
+ ##### Examples
338
+
339
+ ```ts
340
+ // Observer as a plain function
341
+ const subscription = actor.subscribe((snapshot) => {
342
+ console.log(snapshot);
343
+ });
344
+ ```
345
+
346
+ ```ts
347
+ // Observer as an object
348
+ const subscription = actor.subscribe({
349
+ next(snapshot) {
350
+ console.log(snapshot);
351
+ },
352
+ error(err) {
353
+ // ...
354
+ },
355
+ complete() {
356
+ // ...
357
+ },
358
+ });
359
+ ```
360
+
361
+ The return value of `actor.subscribe(observer)` is a subscription object
362
+ that has an `.unsubscribe()` method. You can call
363
+ `subscription.unsubscribe()` to unsubscribe the observer:
364
+
365
+ ```ts
366
+ const subscription = actor.subscribe((snapshot) => {
367
+ // ...
368
+ });
369
+
370
+ // Unsubscribe the observer
371
+ subscription.unsubscribe();
372
+ ```
373
+
374
+ When the actor is stopped, all of its observers will automatically be
375
+ unsubscribed.
376
+
377
+ ##### Inherited from
378
+
379
+ ```ts
380
+ Actor.subscribe;
381
+ ```
382
+
383
+ #### Call Signature
384
+
385
+ ```ts
386
+ subscribe(
387
+ nextListener?,
388
+ errorListener?,
389
+ completeListener?): Subscription;
390
+ ```
391
+
392
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:114
393
+
394
+ Subscribe an observer to an actor’s snapshot values.
395
+
396
+ ##### Parameters
397
+
398
+ | Parameter | Type |
399
+ | ------------------- | ---------------------- |
400
+ | `nextListener?` | (`snapshot`) => `void` |
401
+ | `errorListener?` | (`error`) => `void` |
402
+ | `completeListener?` | () => `void` |
403
+
404
+ ##### Returns
405
+
406
+ `Subscription`
407
+
408
+ ##### Remarks
409
+
410
+ The observer will receive the actor’s snapshot value when it is emitted.
411
+ The observer can be:
412
+
413
+ - A plain function that receives the latest snapshot, or
414
+ - An observer object whose `.next(snapshot)` method receives the latest
415
+ snapshot
416
+
417
+ ##### Examples
418
+
419
+ ```ts
420
+ // Observer as a plain function
421
+ const subscription = actor.subscribe((snapshot) => {
422
+ console.log(snapshot);
423
+ });
424
+ ```
425
+
426
+ ```ts
427
+ // Observer as an object
428
+ const subscription = actor.subscribe({
429
+ next(snapshot) {
430
+ console.log(snapshot);
431
+ },
432
+ error(err) {
433
+ // ...
434
+ },
435
+ complete() {
436
+ // ...
437
+ },
438
+ });
439
+ ```
440
+
441
+ The return value of `actor.subscribe(observer)` is a subscription object
442
+ that has an `.unsubscribe()` method. You can call
443
+ `subscription.unsubscribe()` to unsubscribe the observer:
444
+
445
+ ```ts
446
+ const subscription = actor.subscribe((snapshot) => {
447
+ // ...
448
+ });
449
+
450
+ // Unsubscribe the observer
451
+ subscription.unsubscribe();
452
+ ```
453
+
454
+ When the actor is stopped, all of its observers will automatically be
455
+ unsubscribed.
456
+
457
+ ##### Inherited from
458
+
459
+ ```ts
460
+ Actor.subscribe;
461
+ ```
462
+
463
+ ---
464
+
465
+ ### toJSON()
466
+
467
+ ```ts
468
+ toJSON(): object;
469
+ ```
470
+
471
+ Defined in: node_modules/xstate/dist/declarations/src/createActor.d.ts:135
472
+
473
+ #### Returns
474
+
475
+ `object`
476
+
477
+ | Name | Type | Defined in |
478
+ | -------------- | -------- | -------------------------------------------------------------- |
479
+ | `id` | `string` | node_modules/xstate/dist/declarations/src/createActor.d.ts:137 |
480
+ | `xstate$$type` | `number` | node_modules/xstate/dist/declarations/src/createActor.d.ts:136 |
481
+
482
+ #### Inherited from
483
+
484
+ ```ts
485
+ Actor.toJSON;
486
+ ```
@@ -0,0 +1,119 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-solid-router](../README.md) / PlayRouteEvent
2
+
3
+ # Interface: PlayRouteEvent
4
+
5
+ Defined in: packages/play-router/dist/types.d.ts:182
6
+
7
+ Enhanced routing event with parameter and query support
8
+
9
+ Unified routing event used throughout the Play architecture. Supports parameter-aware
10
+ navigation patterns (e.g., `/profile/:userId`) for dynamic route segments.
11
+
12
+ **Architectural Context:** Implements **Passive Infrastructure (INV-04)** by representing
13
+ user navigation intent that the Actor evaluates through guards. Infrastructure proposes
14
+ via `play.route` events, Actor decides via state machine transitions.
15
+
16
+ **Browser Navigation Flow:**
17
+
18
+ 1. Browser fires `popstate`
19
+ 2. Router adapter resolves URL to route target
20
+ 3. Adapter sends `PlayRouteEvent` to Actor
21
+ 4. Actor validates transition via state machine guards
22
+
23
+ ## Param
24
+
25
+ Event discriminator (always "play.route")
26
+
27
+ ## Param
28
+
29
+ Target state ID with # prefix (e.g., '#home', '#profile')
30
+
31
+ ## Param
32
+
33
+ Merged path + query parameters (path parameters win conflicts)
34
+
35
+ ## Param
36
+
37
+ Query parameters only (isolated from path params)
38
+
39
+ ## Param
40
+
41
+ Full URLPattern match result for debugging/observability (optional)
42
+
43
+ ## Examples
44
+
45
+ Combining base and routing events
46
+
47
+ ```typescript
48
+ import type { PlayEvent } from "@xmachines/play";
49
+ import type { PlayRouteEvent } from "@xmachines/play-router";
50
+
51
+ type AppEvent = PlayEvent | PlayRouteEvent;
52
+ ```
53
+
54
+ Basic navigation to a route
55
+
56
+ ```typescript
57
+ import type { PlayRouteEvent } from "@xmachines/play-router";
58
+
59
+ const event: PlayRouteEvent = {
60
+ type: "play.route",
61
+ to: "#home",
62
+ };
63
+ actor.send(event);
64
+ ```
65
+
66
+ Navigation with route parameters
67
+
68
+ ```typescript
69
+ import type { PlayRouteEvent } from "@xmachines/play-router";
70
+
71
+ const event: PlayRouteEvent = {
72
+ type: "play.route",
73
+ to: "#profile",
74
+ params: { userId: "123" },
75
+ };
76
+ actor.send(event);
77
+ // Resolves to route: /profile/123
78
+ ```
79
+
80
+ Navigation with query parameters
81
+
82
+ ```typescript
83
+ import type { PlayRouteEvent } from "@xmachines/play-router";
84
+
85
+ const event: PlayRouteEvent = {
86
+ type: "play.route",
87
+ to: "#settings",
88
+ params: { section: "profile" }, // Merged: path + query
89
+ query: { tab: "security" }, // Query-only
90
+ };
91
+ actor.send(event);
92
+ // Resolves to route: /settings/profile?tab=security
93
+ ```
94
+
95
+ ## See
96
+
97
+ [RFC Play v1](https://gitlab.com/xmachin-es/rfc/-/blob/main/src/play-v1.md)
98
+
99
+ ## Remarks
100
+
101
+ Use `play.route` when you need parameter-aware navigation with the `route: {}`
102
+ config pattern on your state machine nodes. The `match` field exposes the full
103
+ URLPatternResult for advanced use cases (debugging, pattern analysis).
104
+
105
+ ## Indexable
106
+
107
+ ```ts
108
+ [key: string]: unknown
109
+ ```
110
+
111
+ ## Properties
112
+
113
+ | Property | Modifier | Type | Defined in |
114
+ | -------------------------------------- | ---------- | ------------------------------ | ---------------------------------------- |
115
+ | <a id="property-match"></a> `match?` | `readonly` | `unknown` | packages/play-router/dist/types.d.ts:187 |
116
+ | <a id="property-params"></a> `params?` | `readonly` | `Record`\<`string`, `string`\> | packages/play-router/dist/types.d.ts:185 |
117
+ | <a id="property-query"></a> `query?` | `readonly` | `Record`\<`string`, `string`\> | packages/play-router/dist/types.d.ts:186 |
118
+ | <a id="property-to"></a> `to` | `readonly` | `string` | packages/play-router/dist/types.d.ts:184 |
119
+ | <a id="property-type"></a> `type` | `readonly` | `"play.route"` | packages/play-router/dist/types.d.ts:183 |
@@ -0,0 +1,14 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-solid-router](../README.md) / PlayRouterProviderProps
2
+
3
+ # Interface: PlayRouterProviderProps
4
+
5
+ Defined in: [packages/play-solid-router/src/play-router-provider.tsx:14](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/play-router-provider.tsx#L14)
6
+
7
+ ## Properties
8
+
9
+ | Property | Type | Defined in |
10
+ | ----------------------------------------- | --------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | <a id="property-actor"></a> `actor` | [`RoutableActor`](../type-aliases/RoutableActor.md) | [packages/play-solid-router/src/play-router-provider.tsx:15](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/play-router-provider.tsx#L15) |
12
+ | <a id="property-renderer"></a> `renderer` | (`actor`, `router`) => `any` | [packages/play-solid-router/src/play-router-provider.tsx:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/play-router-provider.tsx#L18) |
13
+ | <a id="property-routemap"></a> `routeMap` | [`RouteMap`](../classes/RouteMap.md) | [packages/play-solid-router/src/play-router-provider.tsx:16](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/play-router-provider.tsx#L16) |
14
+ | <a id="property-router"></a> `router` | [`SolidRouterHooks`](../type-aliases/SolidRouterHooks.md) | [packages/play-solid-router/src/play-router-provider.tsx:17](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/play-router-provider.tsx#L17) |
@@ -0,0 +1,14 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-solid-router](../README.md) / RouteMapping
2
+
3
+ # Interface: RouteMapping
4
+
5
+ Defined in: [packages/play-solid-router/src/types.ts:8](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/types.ts#L8)
6
+
7
+ Mapping between state ID and URL path for SolidJS Router
8
+
9
+ ## Properties
10
+
11
+ | Property | Modifier | Type | Description | Defined in |
12
+ | --------------------------------------- | ---------- | -------- | ---------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
13
+ | <a id="property-path"></a> `path` | `readonly` | `string` | SolidJS Router path pattern **Example** `'/', '/profile/:userId', '/settings/:section?'` | [packages/play-solid-router/src/types.ts:19](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/types.ts#L19) |
14
+ | <a id="property-stateid"></a> `stateId` | `readonly` | `string` | XMachines state ID with # prefix **Example** `'#home', '#profile'` | [packages/play-solid-router/src/types.ts:13](https://gitlab.com/xmachin-es/xmachines-js/-/blob/00a28432ed57807112288436d1ae4387d9f06919/packages/play-solid-router/src/types.ts#L13) |