@xmachines/docs 1.0.0-beta.25 → 1.0.0-beta.26

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 (246) hide show
  1. package/api/@xmachines/play/classes/PlayError.md +10 -4
  2. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  3. package/api/@xmachines/play-actor/README.md +4 -0
  4. package/api/@xmachines/play-actor/classes/AbstractActor.md +49 -92
  5. package/api/@xmachines/play-actor/functions/typedSpec.md +57 -0
  6. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +9 -18
  7. package/api/@xmachines/play-actor/interfaces/Routable.md +5 -21
  8. package/api/@xmachines/play-actor/interfaces/ViewMetadata.md +6 -6
  9. package/api/@xmachines/play-actor/interfaces/Viewable.md +5 -6
  10. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  11. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  12. package/api/@xmachines/play-dom/functions/renderSpec.md +1 -1
  13. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +7 -7
  14. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +7 -7
  15. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +3 -3
  16. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  17. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  18. package/api/@xmachines/play-dom-router/README.md +10 -0
  19. package/api/@xmachines/play-dom-router/functions/connectRouter.md +18 -46
  20. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
  21. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +38 -0
  22. package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
  23. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +16 -16
  24. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  25. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +6 -6
  26. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +119 -0
  27. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +114 -0
  28. package/api/@xmachines/play-dom-router/interfaces/RouteMapLike.md +50 -0
  29. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +27 -0
  30. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +104 -0
  31. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +6 -6
  32. package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +9 -0
  33. package/api/@xmachines/play-react/README.md +4 -4
  34. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +31 -5
  35. package/api/@xmachines/play-react/functions/defineRegistry.md +2 -0
  36. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  37. package/api/@xmachines/play-react/functions/useBoundProp.md +2 -0
  38. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  39. package/api/@xmachines/play-react/functions/useStateBinding.md +2 -0
  40. package/api/@xmachines/play-react/interfaces/ComponentContext.md +2 -0
  41. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  42. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  43. package/api/@xmachines/play-react/interfaces/PlayRendererProps.md +7 -7
  44. package/api/@xmachines/play-react/type-aliases/ComponentFn.md +2 -0
  45. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  46. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  47. package/api/@xmachines/play-react-router/README.md +5 -1
  48. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +102 -25
  49. package/api/@xmachines/play-react-router/classes/RouteMap.md +17 -33
  50. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +8 -1
  51. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +21 -11
  52. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +8 -8
  53. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +7 -7
  54. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +18 -8
  55. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  56. package/api/@xmachines/play-router/README.md +42 -5
  57. package/api/@xmachines/play-router/classes/BaseRouteMap.md +12 -19
  58. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +100 -25
  59. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  60. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  61. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  62. package/api/@xmachines/play-router/functions/createRouteMapFromMachine.md +38 -0
  63. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +45 -0
  64. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  65. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  66. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  67. package/api/@xmachines/play-router/functions/extractRouteParams.md +46 -0
  68. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  69. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  70. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  71. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  72. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  73. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  74. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  75. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  76. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  77. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  78. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  79. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  80. package/api/@xmachines/play-router/interfaces/LocationLike.md +27 -0
  81. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  82. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  83. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
  84. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  85. package/api/@xmachines/play-router/interfaces/RouteMap.md +4 -4
  86. package/api/@xmachines/play-router/interfaces/{BaseRouteMapping.md → RouteMapping.md} +5 -5
  87. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  88. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  89. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  90. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  91. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  92. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  93. package/api/@xmachines/play-router/interfaces/WindowLike.md +65 -0
  94. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  95. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  96. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  97. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  98. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  99. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  100. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  101. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  102. package/api/@xmachines/play-signals/namespaces/Signal/classes/Computed.md +6 -0
  103. package/api/@xmachines/play-signals/namespaces/Signal/classes/State.md +8 -0
  104. package/api/@xmachines/play-signals/namespaces/Signal/interfaces/Options.md +2 -0
  105. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/classes/Watcher.md +10 -0
  106. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/currentComputed.md +2 -0
  107. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSinks.md +2 -0
  108. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/hasSources.md +2 -0
  109. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSinks.md +2 -0
  110. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/introspectSources.md +2 -0
  111. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/functions/untrack.md +2 -0
  112. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/unwatched.md +2 -0
  113. package/api/@xmachines/play-signals/namespaces/Signal/namespaces/subtle/variables/watched.md +2 -0
  114. package/api/@xmachines/play-signals/namespaces/Signal/variables/isComputed.md +2 -0
  115. package/api/@xmachines/play-signals/namespaces/Signal/variables/isState.md +2 -0
  116. package/api/@xmachines/play-signals/namespaces/Signal/variables/isWatcher.md +2 -0
  117. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  118. package/api/@xmachines/play-solid/README.md +4 -4
  119. package/api/@xmachines/play-solid/functions/defineRegistry.md +2 -0
  120. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  121. package/api/@xmachines/play-solid/functions/useStateBinding.md +2 -0
  122. package/api/@xmachines/play-solid/interfaces/ComponentContext.md +2 -0
  123. package/api/@xmachines/play-solid/interfaces/PlayRendererProps.md +7 -7
  124. package/api/@xmachines/play-solid/type-aliases/ComponentFn.md +2 -0
  125. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  126. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  127. package/api/@xmachines/play-solid-router/README.md +2 -2
  128. package/api/@xmachines/play-solid-router/classes/RouteMap.md +13 -26
  129. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +121 -46
  130. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  131. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +15 -9
  132. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +47 -92
  133. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +8 -8
  134. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  135. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +19 -6
  136. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  137. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  138. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +21 -18
  139. package/api/@xmachines/play-svelte/README.md +28 -0
  140. package/api/@xmachines/play-svelte/functions/defineRegistry.md +2 -0
  141. package/api/@xmachines/play-svelte/interfaces/BaseComponentProps.md +2 -0
  142. package/api/@xmachines/play-svelte/interfaces/ComponentContext.md +2 -0
  143. package/api/@xmachines/play-svelte/interfaces/PlayRendererProps.md +9 -9
  144. package/api/@xmachines/play-svelte/type-aliases/ComponentFn.md +2 -0
  145. package/api/@xmachines/play-svelte/type-aliases/PlayRenderer.md +2 -0
  146. package/api/@xmachines/play-svelte/variables/PlayRenderer.md +2 -0
  147. package/api/@xmachines/play-svelte-spa-router/README.md +1 -0
  148. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +13 -26
  149. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +14 -1
  150. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +23 -4
  151. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +6 -5
  152. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +10 -10
  153. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +20 -5
  154. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  155. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +65 -0
  156. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  157. package/api/@xmachines/play-sveltekit-router/README.md +2 -1
  158. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +46 -24
  159. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +14 -1
  160. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +23 -4
  161. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -5
  162. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +27 -0
  163. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +10 -10
  164. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +20 -5
  165. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  166. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  167. package/api/@xmachines/play-tanstack-react-router/README.md +5 -3
  168. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +17 -33
  169. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +93 -25
  170. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  171. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  172. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +21 -11
  173. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  174. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +8 -8
  175. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  176. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +18 -8
  177. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  178. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  179. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  180. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +6 -26
  181. package/api/@xmachines/play-tanstack-solid-router/README.md +8 -8
  182. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +13 -26
  183. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +101 -36
  184. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  185. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +15 -9
  186. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +8 -8
  187. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  188. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +13 -9
  189. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  190. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  191. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  192. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +23 -24
  193. package/api/@xmachines/play-vue/README.md +4 -4
  194. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  195. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  196. package/api/@xmachines/play-vue/functions/useStateBinding.md +2 -0
  197. package/api/@xmachines/play-vue/interfaces/ComponentContext.md +2 -0
  198. package/api/@xmachines/play-vue/interfaces/PlayRendererProps.md +5 -5
  199. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  200. package/api/@xmachines/play-vue/type-aliases/ComponentFn.md +2 -0
  201. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  202. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  203. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  204. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  205. package/api/@xmachines/play-vue-router/README.md +2 -2
  206. package/api/@xmachines/play-vue-router/classes/RouteMap.md +18 -108
  207. package/api/@xmachines/play-vue-router/classes/VueBaseRouteMap.md +44 -104
  208. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +127 -62
  209. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  210. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +8 -8
  211. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +19 -7
  212. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  213. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  214. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  215. package/api/@xmachines/play-xstate/README.md +15 -15
  216. package/api/@xmachines/play-xstate/classes/PlayerActor.md +46 -30
  217. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +20 -15
  218. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  219. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  220. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  221. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  222. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  223. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  224. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +2 -2
  225. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  226. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  227. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  228. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  229. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  230. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  231. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +14 -12
  232. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  233. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  234. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  235. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  236. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  237. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  238. package/api/@xmachines/shared/functions/defineXmVitestConfig.md +2 -2
  239. package/api/@xmachines/shared/functions/xmAliases.md +1 -1
  240. package/api/README.md +4 -4
  241. package/api/llms.txt +3 -3
  242. package/examples/README.md +5 -0
  243. package/examples/routing-patterns.md +6 -4
  244. package/package.json +2 -2
  245. package/api/@xmachines/play-tanstack-react-router/functions/extractParams.md +0 -38
  246. package/api/@xmachines/play-tanstack-react-router/functions/extractQueryParams.md +0 -33
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: PlayError
4
4
 
5
- Defined in: [packages/play/src/errors.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play/src/errors.ts#L63)
5
+ Defined in: [packages/play/src/errors.ts:63](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play/src/errors.ts#L63)
6
6
 
7
7
  Base class for all typed runtime errors thrown by `@xmachines/*` packages.
8
8
 
@@ -82,7 +82,7 @@ new PlayError(
82
82
  options?): PlayError;
83
83
  ```
84
84
 
85
- Defined in: [packages/play/src/errors.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play/src/errors.ts#L82)
85
+ Defined in: [packages/play/src/errors.ts:82](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play/src/errors.ts#L82)
86
86
 
87
87
  #### Parameters
88
88
 
@@ -108,10 +108,10 @@ Error.constructor;
108
108
  | Property | Modifier | Type | Description | Inherited from | Defined in |
109
109
  | ------------------------------------------------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
110
110
  | <a id="property-cause"></a> `cause?` | `public` | `unknown` | - | `Error.cause` | - |
111
- | <a id="property-code"></a> `code` | `readonly` | `string` | A stable, machine-readable error identifier. Error codes follow the `PLAY_<PACKAGE>_<DESCRIPTION>` naming convention and are guaranteed stable across patch and minor releases within a major version. Never match on `.message` — always match on `.code` or the subclass. | - | [packages/play/src/errors.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play/src/errors.ts#L74) |
111
+ | <a id="property-code"></a> `code` | `readonly` | `string` | A stable, machine-readable error identifier. Error codes follow the `PLAY_<PACKAGE>_<DESCRIPTION>` naming convention and are guaranteed stable across patch and minor releases within a major version. Never match on `.message` — always match on `.code` or the subclass. | - | [packages/play/src/errors.ts:74](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play/src/errors.ts#L74) |
112
112
  | <a id="property-message"></a> `message` | `public` | `string` | - | `Error.message` | - |
113
113
  | <a id="property-name"></a> `name` | `public` | `string` | - | `Error.name` | - |
114
- | <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | - | [packages/play/src/errors.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play/src/errors.ts#L65) |
114
+ | <a id="property-scope"></a> `scope` | `readonly` | `string` | The class or module that threw this error (e.g. `"RouterBridgeBase"`). | - | [packages/play/src/errors.ts:65](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play/src/errors.ts#L65) |
115
115
  | <a id="property-stack"></a> `stack?` | `public` | `string` | - | `Error.stack` | - |
116
116
  | <a id="property-stacktracelimit"></a> `stackTraceLimit` | `static` | `number` | The `Error.stackTraceLimit` property specifies the number of stack frames collected by a stack trace (whether generated by `new Error().stack` or `Error.captureStackTrace(obj)`). The default value is `10` but may be set to any valid JavaScript number. Changes will affect any stack trace captured _after_ the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. | `Error.stackTraceLimit` | - |
117
117
 
@@ -123,6 +123,8 @@ Error.constructor;
123
123
  static captureStackTrace(targetObject, constructorOpt?): void;
124
124
  ```
125
125
 
126
+ Defined in: `@types/node`
127
+
126
128
  Creates a `.stack` property on `targetObject`, which when accessed returns
127
129
  a string representing the location in the code at which
128
130
  `Error.captureStackTrace()` was called.
@@ -192,6 +194,8 @@ Error.captureStackTrace;
192
194
  static isError(error): error is Error;
193
195
  ```
194
196
 
197
+ Defined in: `typescript`
198
+
195
199
  Indicates whether the argument provided is a built-in Error instance or not.
196
200
 
197
201
  #### Parameters
@@ -218,6 +222,8 @@ Error.isError;
218
222
  static prepareStackTrace(err, stackTraces): any;
219
223
  ```
220
224
 
225
+ Defined in: `@types/node`
226
+
221
227
  #### Parameters
222
228
 
223
229
  | Parameter | Type |
@@ -6,7 +6,7 @@
6
6
  type PlayEvent<TPayload> = object & TPayload;
7
7
  ```
8
8
 
9
- Defined in: [packages/play/src/types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play/src/types.ts#L69)
9
+ Defined in: [packages/play/src/types.ts:69](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play/src/types.ts#L69)
10
10
 
11
11
  Generic event type for Play Architecture
12
12
 
@@ -34,7 +34,7 @@ Robot, and other state machine libraries.
34
34
 
35
35
  | Name | Type | Defined in |
36
36
  | ------ | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
37
- | `type` | `string` | [packages/play/src/types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play/src/types.ts#L70) |
37
+ | `type` | `string` | [packages/play/src/types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play/src/types.ts#L70) |
38
38
 
39
39
  ## Type Parameters
40
40
 
@@ -246,3 +246,7 @@ reactive signals for Infrastructure layer communication.
246
246
  - [Routable](interfaces/Routable.md)
247
247
  - [Viewable](interfaces/Viewable.md)
248
248
  - [ViewMetadata](interfaces/ViewMetadata.md)
249
+
250
+ ## Functions
251
+
252
+ - [typedSpec](functions/typedSpec.md)
@@ -2,63 +2,13 @@
2
2
 
3
3
  # Abstract Class: AbstractActor\<TLogic, TEvent\>
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:231](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L231)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L141)
6
6
 
7
7
  Abstract base class for Play Architecture actors.
8
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) - single type param, backward compat
27
-
28
- ```typescript
29
- class SimpleActor extends AbstractActor<AnyActorLogic> {
30
- state = new Signal.State({...});
31
- send(event) { ... }
32
- }
33
- ```
34
-
35
- Typed event actor - two type params
36
-
37
- ```typescript
38
- type AuthEvent = { type: "auth.login"; username: string } | { type: "auth.logout" };
39
- class AuthActor extends AbstractActor<AnyActorLogic, AuthEvent> {
40
- state = new Signal.State({...});
41
- send(event: AuthEvent) { ... }
42
- }
43
- ```
44
-
45
- Full-featured actor (routing + view)
46
-
47
- ```typescript
48
- class PlayerActor extends AbstractActor<AnyActorLogic, EventFromLogic<TMachine>>
49
- implements Routable, Viewable {
50
- state = new Signal.State({...});
51
- currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
52
- currentView = new Signal.State(null);
53
- send(event) { ... }
54
- }
55
- ```
56
-
57
- ## See
58
-
59
- - [Play RFC](../../../../rfc/play.md)
60
- - [Routable](../interfaces/Routable.md) for routing capability
61
- - [Viewable](../interfaces/Viewable.md) for view rendering capability
9
+ Provides signal-driven state observation that integrates with XState ecosystem
10
+ tooling (devtools, inspection) while exposing reactive signals for
11
+ Infrastructure layer communication.
62
12
 
63
13
  ## Extends
64
14
 
@@ -70,10 +20,10 @@ class PlayerActor extends AbstractActor<AnyActorLogic, EventFromLogic<TMachine>>
70
20
 
71
21
  ## Type Parameters
72
22
 
73
- | Type Parameter | Default type | Description |
74
- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
75
- | `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | XState actor logic type (maintains type safety) |
76
- | `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | Event type union that this actor's send() accepts. Defaults to `EventObject` (`{ type: string }`) for backward compatibility. Use `EventFromLogic<TMachine>` from xstate to infer the exact event union from a state machine (e.g., in `PlayerActor`). 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. |
23
+ | Type Parameter | Default type | Description |
24
+ | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------- |
25
+ | `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | XState actor logic type |
26
+ | `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | Event type constraint (defaults to EventObject) |
77
27
 
78
28
  ## Constructors
79
29
 
@@ -83,6 +33,8 @@ class PlayerActor extends AbstractActor<AnyActorLogic, EventFromLogic<TMachine>>
83
33
  new AbstractActor<TLogic, TEvent>(logic, options?): AbstractActor<TLogic, TEvent>;
84
34
  ```
85
35
 
36
+ Defined in: `xstate`
37
+
86
38
  Creates a new actor instance for the given logic with the provided options,
87
39
  if any.
88
40
 
@@ -105,19 +57,19 @@ Actor<TLogic>.constructor
105
57
 
106
58
  ## Properties
107
59
 
108
- | Property | Modifier | Type | Description | Inherited from | Defined in |
109
- | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
110
- | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
111
- | <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | `Actor.clock` | - |
112
- | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
113
- | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
114
- | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
115
- | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | - |
116
- | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
117
- | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
118
- | <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/src/abstract-actor.ts:254](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L254) |
119
- | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
120
- | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
60
+ | Property | Modifier | Type | Description | Inherited from | Defined in |
61
+ | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
63
+ | <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | `Actor.clock` | - |
64
+ | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
65
+ | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
66
+ | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
67
+ | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>, [`EventFromLogic`](https://www.jsdocs.io/package/xstate#EventFromLogic)\<`TLogic`\>, [`EmittedFrom`](https://www.jsdocs.io/package/xstate#EmittedFrom)\<`TLogic`\>\> | - | `Actor.ref` | - |
68
+ | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
69
+ | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
70
+ | <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | Reactive snapshot of current actor state. Infrastructure observes this signal to react to state changes without directly coupling to the actor's internal state machine implementation. | - | [packages/play-actor/src/abstract-actor.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L151) |
71
+ | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
72
+ | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
121
73
 
122
74
  ## Methods
123
75
 
@@ -127,6 +79,8 @@ Actor<TLogic>.constructor
127
79
  observable: InteropSubscribable<SnapshotFrom<TLogic>>;
128
80
  ```
129
81
 
82
+ Defined in: `xstate`
83
+
130
84
  #### Returns
131
85
 
132
86
  [`InteropSubscribable`](https://www.jsdocs.io/package/xstate#InteropSubscribable)\<[`SnapshotFrom`](https://www.jsdocs.io/package/xstate#SnapshotFrom)\<`TLogic`\>\>
@@ -145,6 +99,8 @@ Actor.[observable]
145
99
  getPersistedSnapshot(): Snapshot<unknown>;
146
100
  ```
147
101
 
102
+ Defined in: `xstate`
103
+
148
104
  Obtain the internal state of the actor, which can be persisted.
149
105
 
150
106
  #### Returns
@@ -179,6 +135,8 @@ Actor.getPersistedSnapshot;
179
135
  getSnapshot(): SnapshotFrom<TLogic>;
180
136
  ```
181
137
 
138
+ Defined in: `xstate`
139
+
182
140
  Read an actor’s snapshot synchronously.
183
141
 
184
142
  #### Returns
@@ -214,6 +172,8 @@ Actor.getSnapshot;
214
172
  on<TType>(type, handler): Subscription;
215
173
  ```
216
174
 
175
+ Defined in: `xstate`
176
+
217
177
  #### Type Parameters
218
178
 
219
179
  | Type Parameter |
@@ -245,6 +205,8 @@ Actor.on;
245
205
  select<TSelected>(selector, equalityFn?): Readable<TSelected>;
246
206
  ```
247
207
 
208
+ Defined in: `xstate`
209
+
248
210
  #### Type Parameters
249
211
 
250
212
  | Type Parameter |
@@ -276,37 +238,22 @@ Actor.select;
276
238
  abstract send(event): void;
277
239
  ```
278
240
 
279
- Defined in: [packages/play-actor/src/abstract-actor.ts:278](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L278)
241
+ Defined in: [packages/play-actor/src/abstract-actor.ts:158](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L158)
280
242
 
281
- Send event to Actor
243
+ Send event to Actor.
282
244
 
283
- Infrastructure forwards user intents (navigation, domain events, custom events)
284
- as events to the Actor. The Actor's state machine guards determine whether
285
- each event is valid from the current state.
245
+ Constrained to TEvent for type safety in concrete implementations.
286
246
 
287
247
  #### Parameters
288
248
 
289
- | Parameter | Type | Description |
290
- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
291
- | `event` | `TEvent` | Event object with type property (e.g., PlayEvent, PlayRouteEvent) Invariant: Actor Authority - Only Actor decides whether an event is valid. |
249
+ | Parameter | Type |
250
+ | --------- | -------- |
251
+ | `event` | `TEvent` |
292
252
 
293
253
  #### Returns
294
254
 
295
255
  `void`
296
256
 
297
- #### Example
298
-
299
- ```typescript
300
- // Infrastructure forwards user intent
301
- actor.send({ type: "auth.login", userId: "123" });
302
- // Actor's guards determine if event is allowed
303
- ```
304
-
305
- #### Remarks
306
-
307
- Accepts any event object with a type property. Core events (PlayEvent) are in
308
- @xmachines/play, routing events (PlayRouteEvent) are in @xmachines/play-router.
309
-
310
257
  #### Overrides
311
258
 
312
259
  ```ts
@@ -321,6 +268,8 @@ Actor.send;
321
268
  start(): this;
322
269
  ```
323
270
 
271
+ Defined in: `xstate`
272
+
324
273
  Starts the Actor from the initial state
325
274
 
326
275
  #### Returns
@@ -341,6 +290,8 @@ Actor.start;
341
290
  stop(): this;
342
291
  ```
343
292
 
293
+ Defined in: `xstate`
294
+
344
295
  Stops the Actor and unsubscribe all listeners.
345
296
 
346
297
  #### Returns
@@ -363,6 +314,8 @@ Actor.stop;
363
314
  subscribe(observer): Subscription;
364
315
  ```
365
316
 
317
+ Defined in: `xstate`
318
+
366
319
  Subscribe an observer to an actor’s snapshot values.
367
320
 
368
321
  ##### Parameters
@@ -439,6 +392,8 @@ subscribe(
439
392
  completeListener?): Subscription;
440
393
  ```
441
394
 
395
+ Defined in: `xstate`
396
+
442
397
  Subscribe an observer to an actor’s snapshot values.
443
398
 
444
399
  ##### Parameters
@@ -516,6 +471,8 @@ Actor.subscribe;
516
471
  toJSON(): object;
517
472
  ```
518
473
 
474
+ Defined in: `xstate`
475
+
519
476
  #### Returns
520
477
 
521
478
  `object`
@@ -0,0 +1,57 @@
1
+ [Documentation](../../../README.md) / [@xmachines/play-actor](../README.md) / typedSpec
2
+
3
+ # Function: typedSpec()
4
+
5
+ ```ts
6
+ function typedSpec<TContext>(spec): PlaySpec;
7
+ ```
8
+
9
+ Defined in: [packages/play-actor/src/abstract-actor.ts:86](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L86)
10
+
11
+ Identity helper that constrains a `PlaySpec` object's `contextProps` to keys
12
+ of a specific machine context type, giving compile-time validation and IDE
13
+ autocomplete at the definition site.
14
+
15
+ XState's `meta` field is typed as `Record<string, unknown>`, so TypeScript
16
+ cannot infer the constraint from context. `typedSpec<MyCtx>(...)` is the
17
+ opt-in mechanism that activates enforcement where the spec is written.
18
+
19
+ At runtime this is a no-op — the spec object is returned unchanged.
20
+
21
+ ## Type Parameters
22
+
23
+ | Type Parameter |
24
+ | ----------------------------- |
25
+ | `TContext` _extends_ `object` |
26
+
27
+ ## Parameters
28
+
29
+ | Parameter | Type |
30
+ | --------- | ------------------------------------------------------------------------------ |
31
+ | `spec` | `Omit`\<[`PlaySpec`](../interfaces/PlaySpec.md), `"contextProps"`\> & `object` |
32
+
33
+ ## Returns
34
+
35
+ [`PlaySpec`](../interfaces/PlaySpec.md)
36
+
37
+ ## Example
38
+
39
+ ```ts
40
+ interface DashboardCtx {
41
+ username: string;
42
+ params: Record<string, string>;
43
+ query: Record<string, string>;
44
+ }
45
+
46
+ meta: {
47
+ view: {
48
+ component: "Dashboard",
49
+ spec: typedSpec<DashboardCtx>({
50
+ root: "root",
51
+ contextProps: ["username"], // ✓ key of DashboardCtx
52
+ // contextProps: ["usernaem"], // ✗ compile error
53
+ elements: { root: { type: "Dashboard", props: {}, children: [] } },
54
+ }),
55
+ },
56
+ }
57
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlaySpec
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L112)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L43)
6
6
 
7
7
  XMachines extension of `@json-render/core` `Spec`.
8
8
 
@@ -11,17 +11,8 @@ Adds `contextProps` — an explicit allowlist of machine context fields that
11
11
  fields named here are ever exposed to components; nothing leaks from context
12
12
  without an opt-in declaration.
13
13
 
14
- ## Example
15
-
16
- ```ts
17
- spec: {
18
- root: "root",
19
- contextProps: ["username"], // expose context.username as a prop slot
20
- elements: {
21
- root: { type: "Dashboard", props: { username: undefined }, children: [] },
22
- },
23
- }
24
- ```
14
+ Use `typedSpec<TContext>(...)` at the definition site to validate `contextProps`
15
+ entries against your machine's context type at compile time.
25
16
 
26
17
  ## Extends
27
18
 
@@ -29,9 +20,9 @@ spec: {
29
20
 
30
21
  ## Properties
31
22
 
32
- | Property | Type | Description | Inherited from | Defined in |
33
- | -------------------------------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
- | <a id="property-contextprops"></a> `contextProps?` | `string`[] | Explicit allowlist of machine context field names to expose as prop slots. Each named field is merged into every spec element's `props` at view derivation time, filling any slot whose current value is `undefined`. `null` and `undefined` context values are skipped. URL route params (from `context.routeParams`) take priority over `contextProps` values; explicit non-`undefined` spec props always take priority over both. | - | [packages/play-actor/src/abstract-actor.ts:122](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L122) |
35
- | <a id="property-elements"></a> `elements` | `Record`\<`string`, `UIElement`\> | Flat map of elements by key | `Spec.elements` | - |
36
- | <a id="property-root"></a> `root` | `string` | Root element key | `Spec.root` | - |
37
- | <a id="property-state"></a> `state?` | `Record`\<`string`, `unknown`\> | Optional initial state to seed the state model. Components using statePath will read from / write to this state. | `Spec.state` | - |
23
+ | Property | Modifier | Type | Description | Inherited from | Defined in |
24
+ | -------------------------------------------------- | ---------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
+ | <a id="property-contextprops"></a> `contextProps?` | `readonly` | readonly `string`[] | Explicit allowlist of machine context field names to expose as prop slots. Each named field is merged into every spec element's `props` at view derivation time, filling any slot whose current value is `undefined`. Use `typedSpec<TContext>(...)` to constrain entries to `keyof TContext & string`. | - | [packages/play-actor/src/abstract-actor.ts:51](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L51) |
26
+ | <a id="property-elements"></a> `elements` | `public` | `Record`\<`string`, `UIElement`\> | Flat map of elements by key | `Spec.elements` | - |
27
+ | <a id="property-root"></a> `root` | `public` | `string` | Root element key | `Spec.root` | - |
28
+ | <a id="property-state"></a> `state?` | `public` | `Record`\<`string`, `unknown`\> | Optional initial state to seed the state model. Components using statePath will read from / write to this state. | `Spec.state` | - |
@@ -2,29 +2,13 @@
2
2
 
3
3
  # Interface: Routable
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:42](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L42)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L27)
6
6
 
7
7
  Optional capability: Routing support
8
8
 
9
- Actors implementing this interface can derive a route from their state.
10
- Router adapters observe the currentRoute signal to sync browser URLs.
11
-
12
- ## Example
13
-
14
- ```typescript
15
- class MyActor extends AbstractActor implements Routable {
16
- currentRoute = new Signal.Computed(() => deriveRoute(this.state.get()));
17
- }
18
-
19
- // Router requires Routable
20
- function connectRouter<T extends AbstractActor & Routable>(actor: T) {
21
- watcher.watch(actor.currentRoute);
22
- }
23
- ```
24
-
25
9
  ## Properties
26
10
 
27
- | Property | Modifier | Type | Description | Defined in |
28
- | ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
- | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | Current route signal Computed signal derived from state machine. Infrastructure observes to sync browser URL. Invariant: Passive Infrastructure - Infrastructure reflects route, never decides. **Example** `const watcher = new Signal.subtle.Watcher(() => { const route = actor.currentRoute.get(); console.log('Route changed:', route); }); watcher.watch(actor.currentRoute);` | [packages/play-actor/src/abstract-actor.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L59) |
30
- | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route derived from the machine's **initial** state — fixed at construction and never changes, even after `start()` with a restored snapshot. Router bridges use this to distinguish a deep-link (browser URL differs from the initial route because the user navigated there) from a restore (browser is at the machine's default starting URL while the actor was restored to a different route from a snapshot). `null` when the machine's initial state has no `meta.route`. | [packages/play-actor/src/abstract-actor.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L71) |
11
+ | Property | Modifier | Type | Defined in |
12
+ | ------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
13
+ | <a id="property-currentroute"></a> `currentRoute` | `readonly` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | [packages/play-actor/src/abstract-actor.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L28) |
14
+ | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | [packages/play-actor/src/abstract-actor.ts:29](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L29) |
@@ -2,16 +2,16 @@
2
2
 
3
3
  # Interface: ViewMetadata
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:131](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L131)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L100)
6
6
 
7
- View metadata for rendering
7
+ View metadata for rendering.
8
8
 
9
9
  Describes the component to be rendered and the json-render Spec to use.
10
10
  Used by PlayRenderer to dynamically render UI based on actor state.
11
11
 
12
12
  ## Properties
13
13
 
14
- | Property | Type | Description | Defined in |
15
- | ------------------------------------------- | ------------------------- | --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
- | <a id="property-component"></a> `component` | `string` | Root element type name (for diagnostics and component resolution) | [packages/play-actor/src/abstract-actor.ts:133](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L133) |
17
- | <a id="property-spec"></a> `spec` | [`PlaySpec`](PlaySpec.md) | XMachines view spec — extends `@json-render/core` Spec with `contextProps` for explicit context field exposure. | [packages/play-actor/src/abstract-actor.ts:138](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L138) |
14
+ | Property | Type | Description | Defined in |
15
+ | ------------------------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
16
+ | <a id="property-component"></a> `component` | `string` | Root element type name (for diagnostics and component resolution) | [packages/play-actor/src/abstract-actor.ts:102](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L102) |
17
+ | <a id="property-spec"></a> `spec` | [`PlaySpec`](PlaySpec.md) | XMachines view spec — extends `@json-render/core` Spec with `contextProps` for explicit context field exposure. Use `typedSpec<TContext>(...)` at the definition site to validate `contextProps` entries against the machine context type. | [packages/play-actor/src/abstract-actor.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L110) |
@@ -2,18 +2,17 @@
2
2
 
3
3
  # Interface: Viewable
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:150](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L150)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:121](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L121)
6
6
 
7
7
  Actor capability for exposing renderable view state.
8
8
 
9
9
  `Viewable` marks actors that publish a `currentView` signal.
10
10
  Renderers such as `PlayRenderer` consume this contract to resolve the
11
11
  current view description into concrete UI without embedding view logic inside the
12
- framework adapter. Component lookup is handled by the json-render registry
13
- passed to PlayRenderer, not stored on the actor.
12
+ framework adapter.
14
13
 
15
14
  ## Properties
16
15
 
17
- | Property | Modifier | Type | Description | Defined in |
18
- | ----------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
- | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](ViewMetadata.md) \| `null`\> | Current view signal State signal containing view.component and view.spec from meta.view. Infrastructure renders view. Invariant: Logic-Driven UI - View structure is defined by business logic, not JSX. **Example** `const watcher = new Signal.subtle.Watcher(() => { const view = actor.currentView.get(); console.log('View changed:', view.component, view.spec); }); watcher.watch(actor.currentView);` | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.25/packages/play-actor/src/abstract-actor.ts#L167) |
16
+ | Property | Modifier | Type | Description | Defined in |
17
+ | ----------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`ViewMetadata`](ViewMetadata.md) \| `null`\> | Current view signal. State signal containing view.component and view.spec from meta.view. Infrastructure renders view Logic-Driven UI invariant. | [packages/play-actor/src/abstract-actor.ts:128](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v1.0.0-beta.26/packages/play-actor/src/abstract-actor.ts#L128) |