@xmachines/docs 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +11 -13
  2. package/api/@xmachines/play/README.md +58 -63
  3. package/api/@xmachines/play/classes/NonNullableError.md +7 -7
  4. package/api/@xmachines/play/classes/PlayError.md +25 -27
  5. package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +26 -25
  7. package/api/@xmachines/play-actor/README.md +72 -63
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +39 -39
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +9 -8
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +5 -5
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +27 -25
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +12 -11
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +23 -22
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +6 -5
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +12 -11
  18. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +17 -15
  19. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +15 -14
  20. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +13 -13
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +4 -4
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +4 -4
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +11 -11
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +7 -7
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +5 -5
  27. package/api/@xmachines/play-dom/README.md +119 -85
  28. package/api/@xmachines/play-dom/classes/PlayRenderer.md +34 -32
  29. package/api/@xmachines/play-dom/functions/createPlayUI.md +10 -10
  30. package/api/@xmachines/play-dom/functions/createRenderer.md +21 -17
  31. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
  32. package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
  33. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +9 -9
  34. package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
  35. package/api/@xmachines/play-dom-router/README.md +66 -49
  36. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
  37. package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
  38. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
  39. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
  40. package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
  41. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
  42. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +19 -18
  43. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
  44. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +39 -33
  45. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
  46. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
  47. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
  48. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
  49. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
  50. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
  51. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
  52. package/api/@xmachines/play-react/README.md +63 -54
  53. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
  54. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  55. package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
  56. package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
  57. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
  58. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
  59. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
  60. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
  61. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
  62. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
  63. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
  64. package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
  65. package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
  66. package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
  67. package/api/@xmachines/play-react-router/README.md +37 -28
  68. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
  69. package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
  70. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
  71. package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
  72. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
  73. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
  74. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +39 -33
  75. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  76. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  77. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
  78. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
  79. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
  80. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  81. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
  82. package/api/@xmachines/play-router/README.md +94 -82
  83. package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
  84. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
  85. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
  86. package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
  87. package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
  88. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
  89. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
  90. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
  91. package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
  92. package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
  93. package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
  94. package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
  95. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
  96. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
  97. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
  98. package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
  99. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  100. package/api/@xmachines/play-router/functions/routeExists.md +8 -8
  101. package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
  102. package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
  103. package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
  104. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  105. package/api/@xmachines/play-router/interfaces/LocationLike.md +9 -9
  106. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -7
  107. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
  108. package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
  109. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +39 -33
  110. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
  111. package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
  112. package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
  113. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
  114. package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
  115. package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
  116. package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
  117. package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
  118. package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
  119. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
  120. package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
  121. package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
  122. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
  123. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
  124. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
  125. package/api/@xmachines/play-signals/README.md +38 -36
  126. package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
  127. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
  128. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
  129. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
  130. package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
  131. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
  132. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
  133. package/api/@xmachines/play-solid/README.md +46 -42
  134. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  135. package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
  136. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
  137. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
  138. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
  139. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
  140. package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
  141. package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
  142. package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
  143. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
  144. package/api/@xmachines/play-solid-router/README.md +34 -29
  145. package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
  146. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
  147. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
  148. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
  149. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +39 -39
  150. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
  151. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +39 -33
  152. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
  153. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  154. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
  155. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
  156. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
  157. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
  158. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
  159. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
  160. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
  161. package/api/@xmachines/play-svelte/README.md +40 -31
  162. package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
  163. package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
  164. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
  165. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  166. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
  167. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
  168. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
  169. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
  170. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
  171. package/api/@xmachines/play-svelte-spa-router/README.md +25 -25
  172. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
  173. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
  174. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  175. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
  176. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
  177. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +39 -33
  178. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
  179. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
  180. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
  181. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
  182. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  183. package/api/@xmachines/play-sveltekit-router/README.md +38 -34
  184. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
  185. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
  186. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  187. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
  188. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  189. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +9 -9
  190. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +39 -33
  191. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
  192. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
  193. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
  194. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  195. package/api/@xmachines/play-tanstack-react-router/README.md +66 -48
  196. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
  197. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
  198. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
  199. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
  200. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
  201. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
  202. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
  203. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +39 -33
  204. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  205. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  206. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
  207. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
  208. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
  209. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
  210. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  211. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  212. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
  213. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
  214. package/api/@xmachines/play-tanstack-router/README.md +37 -17
  215. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
  216. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
  217. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
  218. package/api/@xmachines/play-tanstack-solid-router/README.md +71 -45
  219. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
  220. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
  221. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
  222. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
  223. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
  224. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +39 -33
  225. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
  226. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
  227. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
  228. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
  229. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
  230. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  231. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
  232. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  233. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
  234. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
  235. package/api/@xmachines/play-vue/README.md +37 -35
  236. package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
  237. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  238. package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
  239. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
  240. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
  241. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
  242. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
  243. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
  244. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  245. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  246. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  247. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  248. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
  249. package/api/@xmachines/play-vue-router/README.md +65 -56
  250. package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
  251. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
  252. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
  253. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
  254. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +39 -33
  255. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
  256. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
  257. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
  258. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
  259. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
  260. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
  261. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
  262. package/api/@xmachines/play-xstate/README.md +72 -70
  263. package/api/@xmachines/play-xstate/classes/PlayerActor.md +123 -112
  264. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -16
  265. package/api/@xmachines/play-xstate/functions/composeGuards.md +25 -23
  266. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +20 -20
  267. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +15 -15
  268. package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
  269. package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
  270. package/api/@xmachines/play-xstate/functions/eventMatches.md +8 -8
  271. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +16 -13
  272. package/api/@xmachines/play-xstate/functions/hasContext.md +8 -8
  273. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
  274. package/api/@xmachines/play-xstate/functions/negateGuard.md +19 -18
  275. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
  276. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
  277. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
  278. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
  279. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  280. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +5 -5
  281. package/api/@xmachines/play-xstate/type-aliases/Guard.md +9 -9
  282. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +4 -3
  283. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +7 -7
  284. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -12
  285. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  286. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -14
  287. package/api/@xmachines/shared/README.md +11 -13
  288. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  289. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  290. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  291. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  292. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  293. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  294. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  295. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  296. package/contributing/development.md +28 -0
  297. package/guides/inspector.md +1 -1
  298. package/package.json +1 -1
  299. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
@@ -6,50 +6,51 @@
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/v2.0.0/packages/play/src/types.ts#L69)
9
+ Defined in: [packages/play/src/types.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play/src/types.ts#L71)
10
10
 
11
- Generic event type for Play Architecture
11
+ The generic event type of the Play Architecture
12
12
 
13
- PlayEvent represents the minimal event contract for Actor communication: any object
14
- with a `type` string property. Infrastructure forwards events to the Actor, and the
15
- Actor's state machine guards determine validity.
13
+ PlayEvent is the minimal event contract of the Actor communication: it is every
14
+ object with a `type` string property. The infrastructure sends each event to the
15
+ Actor, and the guards of the Actor state machine decide the validity.
16
16
 
17
- **Type Parameter:** The generic `TPayload` allows specifying the shape of additional
18
- event fields beyond `type`. It defaults to `Record<string, unknown>` for maximum flexibility.
17
+ **The type parameter:** the generic `TPayload` gives the shape of the event fields
18
+ after `type`. Its default is `Record<string, unknown>`, which accepts each shape.
19
19
 
20
- **Architectural Context:** Implements **Passive Infrastructure (INV-04)** where
21
- infrastructure reflects user actions as events without making decisions. The Actor's
22
- state machine guards determine whether each event is valid from the current state.
20
+ **Architectural context:** the type implements **Passive Infrastructure
21
+ (INV-04)**. The infrastructure converts each user action into an event, and it
22
+ makes no decision. The guards of the Actor state machine decide if each event is
23
+ valid in the current state.
23
24
 
24
- **Framework Agnostic:** This type is intentionally generic and not tied to any
25
- specific state machine framework. It matches the common event shape used by XState,
26
- Robot, and other state machine libraries.
25
+ **Framework-agnostic:** this type is generic on purpose, and it is bound to no
26
+ state machine framework. It matches the common event shape of XState, of Robot,
27
+ and of the other state machine libraries.
27
28
 
28
- **Common Event Types:**
29
+ **The common event types:**
29
30
 
30
- - Domain events: `{ type: 'auth.login', userId: '123' }`
31
- - Custom events: `{ type: 'form.submit', data: {...} }`
31
+ - A domain event: `{ type: 'auth.login', userId: '123' }`
32
+ - Your own event: `{ type: 'form.submit', data: {...} }`
32
33
 
33
34
  ## Type Declaration
34
35
 
35
36
  | Name | Type | Defined in |
36
37
  | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------ |
37
- | `type` | `string` | [packages/play/src/types.ts:70](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play/src/types.ts#L70) |
38
+ | `type` | `string` | [packages/play/src/types.ts:72](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play/src/types.ts#L72) |
38
39
 
39
40
  ## Type Parameters
40
41
 
41
- | Type Parameter | Default type | Description |
42
- | ---------------------------------------------------- | ------------------------------- | ----------------------------------------------------------------------- |
43
- | `TPayload` _extends_ `Record`\<`string`, `unknown`\> | `Record`\<`string`, `unknown`\> | Additional fields beyond `type` (defaults to `Record<string, unknown>`) |
42
+ | Type Parameter | Default type | Description |
43
+ | ---------------------------------------------------- | ------------------------------- | ----------------------------------------------------------------- |
44
+ | `TPayload` _extends_ `Record`\<`string`, `unknown`\> | `Record`\<`string`, `unknown`\> | The fields after `type`. The default is `Record<string, unknown>` |
44
45
 
45
46
  ## Examples
46
47
 
47
- Using without type parameter (flexible)
48
+ The use without the type parameter, which is flexible
48
49
 
49
50
  ```typescript
50
51
  import type { PlayEvent } from "@xmachines/play";
51
52
 
52
- // Accepts any event with type: string
53
+ // It accepts every event with type: string
53
54
  const loginEvent: PlayEvent = {
54
55
  type: "auth.login",
55
56
  userId: "user123",
@@ -58,12 +59,12 @@ const loginEvent: PlayEvent = {
58
59
  actor.send(loginEvent);
59
60
  ```
60
61
 
61
- Using with type parameter (type-safe)
62
+ The use with the type parameter, which is type-safe
62
63
 
63
64
  ```typescript
64
65
  import type { PlayEvent } from "@xmachines/play";
65
66
 
66
- // Type-safe event with known shape
67
+ // A type-safe event with a known shape
67
68
  type LoginEvent = PlayEvent<{ userId: string; timestamp: number }>;
68
69
 
69
70
  const loginEvent: LoginEvent = {
@@ -72,7 +73,7 @@ const loginEvent: LoginEvent = {
72
73
  timestamp: Date.now(),
73
74
  };
74
75
 
75
- // TypeScript error: missing required field
76
+ // A TypeScript error: a necessary field is absent
76
77
  const invalid: LoginEvent = { type: "auth.login" }; // Error!
77
78
  ```
78
79
 
@@ -4,9 +4,7 @@
4
4
 
5
5
  Abstract Actor base class for XMachines Play Architecture.
6
6
 
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.0.0-blue)](https://www.npmjs.com/package/@xmachines/play-actor)
8
-
9
- Part of the [xmachines-js monorepo](../../README.md).
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.1.0-blue)](https://www.npmjs.com/package/@xmachines/play-actor)
10
8
 
11
9
  ## Installation
12
10
 
@@ -14,7 +12,7 @@ Part of the [xmachines-js monorepo](../../README.md).
14
12
  pnpm add @xmachines/play-actor
15
13
  ```
16
14
 
17
- **Peer dependencies** install alongside the package:
15
+ **Peer dependencies.** Install them with the package:
18
16
 
19
17
  ```bash
20
18
  pnpm add xstate @xmachines/play @xmachines/play-signals @xmachines/json-render-core
@@ -22,35 +20,35 @@ pnpm add xstate @xmachines/play @xmachines/play-signals @xmachines/json-render-c
22
20
 
23
21
  ## Overview
24
22
 
25
- `@xmachines/play-actor` provides `AbstractActor`, a minimal base class that extends the XState `Actor` class while enforcing the Play Architecture's **signal protocol** (RFC section 5.3). It exposes reactive TC39 Signals for infrastructure-layer communication while preserving full XState ecosystem compatibility (devtools, inspection).
23
+ `@xmachines/play-actor` gives you `AbstractActor`, a minimal base class. The class extends the XState `Actor` class, and it enforces the **signal protocol** of the Play Architecture (RFC section 5.3). It exposes reactive TC39 Signals for the infrastructure layer. It also keeps the complete compatibility with the XState ecosystem, which includes the devtools and the inspection.
26
24
 
27
- The core protocol is deliberately minimal:
25
+ The core protocol is small on purpose:
28
26
 
29
27
  | Property | Type | Description |
30
28
  | -------- | ------------------------- | ---------------------------------------- |
31
29
  | `state` | `Signal.State<unknown>` | Reactive snapshot of current actor state |
32
30
  | `send` | `(event: TEvent) => void` | Event dispatch method |
33
31
 
34
- Optional capabilities are declared as separate interfaces — a concrete actor opts in only to what it needs:
32
+ Separate interfaces declare the optional capabilities. A concrete actor implements only the interfaces that it needs:
35
33
 
36
34
  | Interface | Property | Description |
37
35
  | ---------- | ----------------------------------------------- | ------------------------------------- |
38
36
  | `Routable` | `currentRoute: Signal.Computed<string \| null>` | Current route path derived from state |
39
- | `Routable` | `initialRoute: string \| null` | Route the actor starts on |
37
+ | `Routable` | `initialRoute: string \| null` | The route where the actor starts |
40
38
  | `Viewable` | `currentView: Signal.State<PlaySpec \| null>` | Current JSON-render view spec |
41
39
 
42
- Concrete implementations are created by adapters such as [`@xmachines/play-xstate`](../play-xstate/README.md).
40
+ An adapter, such as [`@xmachines/play-xstate`](../play-xstate/README.md), makes the concrete implementations.
43
41
 
44
42
  ## API Summary
45
43
 
46
44
  ### `AbstractActor<TLogic, TEvent>`
47
45
 
48
- Abstract base class extending XState `Actor<TLogic>`.
46
+ The abstract base class extends the XState `Actor<TLogic>` class.
49
47
 
50
- A subclass **is** the actor: hand the logic and its options to `super()` so one
51
- instance holds the running machine, and reach XState's own `send` through the
52
- prototype `send` is declared abstract here only to narrow the event type, and
53
- TypeScript forbids `super` calls to an abstract member.
48
+ A subclass **is** the actor. Give the logic and its options to `super()`, so that one
49
+ instance holds the running machine. Reach the `send` method of XState through the
50
+ prototype. This class declares `send` as abstract for one reason only: to narrow the
51
+ event type. TypeScript forbids a `super` call to an abstract member.
54
52
 
55
53
  ```ts
56
54
  import { AbstractActor } from "@xmachines/play-actor";
@@ -77,6 +75,7 @@ class MyActor extends AbstractActor<AnyActorLogic> {
77
75
  With a typed event union:
78
76
 
79
77
  ```ts
78
+ // imports as in the previous example
80
79
  type AuthEvent = { type: "auth.login"; username: string } | { type: "auth.logout" };
81
80
 
82
81
  class AuthActor extends AbstractActor<AnyActorLogic, AuthEvent> {
@@ -90,9 +89,10 @@ class AuthActor extends AbstractActor<AnyActorLogic, AuthEvent> {
90
89
 
91
90
  ### `typedSpec(spec)`
92
91
 
93
- Identity helper that types a view-spec literal as `PlaySpec` at the definition site. XState's
94
- `meta` field is `Record<string, unknown>`, so this is where the spec shape gets compile-time
95
- validation and IDE autocomplete without any runtime cost.
92
+ This identity helper gives a view-spec literal the type `PlaySpec` at the definition site. The
93
+ XState `meta` field has the type `Record<string, unknown>`. Therefore this helper is the place
94
+ where the spec shape receives the compile-time check and the IDE autocomplete. The helper has no
95
+ cost at run time.
96
96
 
97
97
  ```ts
98
98
  import { typedSpec } from "@xmachines/play-actor";
@@ -114,28 +114,33 @@ meta: {
114
114
 
115
115
  ### `PlaySpec`
116
116
 
117
- Extends `@xmachines/json-render-core`'s `Spec`. The machine's whole context is projected into
118
- every derived view's state store under the read-only **`/context` subtree**, so specs read it
119
- through the ordinary `{ $state: "/context/…" }` grammar in props, `visible` conditions, and
120
- `repeat.statePath` alike.
121
-
122
- `/context` is read-only by design never writable. Machine context changes only through events;
123
- a `$bindState` or `setState` write under `/context` throws with an error naming the event to
124
- send instead. This is the model: bindable ephemeral state lives at the store root (seeded from
125
- `spec.state`), domain state lives in the machine and changes via meaningful, inspectable events.
126
-
127
- Provenance is legible in the path: `/context/params/username` is visibly URL-derived, while
128
- `/context/username` is machine-owned — one can never shadow the other.
129
-
130
- Two consequences of the everything-is-projected model are worth knowing. First, **exposure**:
131
- the whole context is client-visible in the view store (debug panels, inspectors, validators) —
132
- context is a client-side value either way, so keep secrets out of it. Second, **emission
133
- granularity**: the emit gate compares context per top-level field, so an event that changes any
134
- field re-emits the view with the same `viewKey`. Providers refresh `/context` in the live store
135
- rather than reseeding it — no remount, ephemeral view state and focus survive — but a
136
- re-emission is still a render pass in the framework layer. Keep high-frequency ephemeral data
137
- (per-keystroke drafts, timers) in the view store (`spec.state` + `$bindState`) or a child actor
138
- rather than in machine context; domain state belongs in context, keystrokes do not.
117
+ This type extends the `Spec` type of `@xmachines/json-render-core`. Each derived view receives
118
+ the complete machine context in its state store, under the read-only **`/context` subtree**. A
119
+ spec therefore reads the context through the ordinary `{ $state: "/context/…" }` grammar: in a
120
+ prop, in a `visible` condition, and in `repeat.statePath`.
121
+
122
+ `/context` is read-only by design. Nothing can write to it. The machine context changes through
123
+ an event only. A `$bindState` write or a `setState` write under `/context` throws an error, and
124
+ the error names the event to send. This is the model: the bindable ephemeral state is at the
125
+ root of the store, from `spec.state`; the domain state is in the machine, and it changes through
126
+ events that are meaningful and easy to inspect.
127
+
128
+ The path shows the origin of each value. `/context/params/username` comes from the URL.
129
+ `/context/username` belongs to the machine. One value can never hide the other.
130
+
131
+ The model projects everything, and this has two consequences. The first consequence is
132
+ **exposure**. The complete context is visible to the client in the view store, which includes a
133
+ debug panel, an inspector, and a validator. The context is a client-side value in each case, so
134
+ keep a secret out of it.
135
+
136
+ The second consequence is **emission granularity**. The emit gate compares the context field by
137
+ field, at the top level only. Therefore an event that changes any field emits the view again
138
+ with the same `viewKey`. A provider refreshes `/context` in the live store, and it does not seed
139
+ the store again. The component does not remount, and the ephemeral view state and the focus
140
+ stay. However, a new emission is still a render pass in the framework layer. Keep
141
+ high-frequency ephemeral data, such as a draft for each keystroke or a timer, in the view store
142
+ (`spec.state` with `$bindState`) or in a child actor. The domain state belongs in the context. A
143
+ keystroke does not.
139
144
 
140
145
  ```ts
141
146
  import type { PlaySpec } from "@xmachines/play-actor";
@@ -152,31 +157,33 @@ const spec: PlaySpec = {
152
157
  };
153
158
  ```
154
159
 
155
- > Historical note: earlier versions had a `contextProps` field. It first drove an implicit
156
- > prop-enrichment pass that merged allowlisted context fields and URL params into every
157
- > element's props (removed it injected values into components that never asked for them and
158
- > let user-manipulable URL data silently shadow machine-owned state), and was then briefly a
159
- > projection filter (removed filtering what a view may read added machinery without a real
160
- > problem to solve). Validate the **derived** view (`actor.currentView.get()`), not the raw
161
- > `meta.view`: the derived spec's `state` carries the projection, so tools like `validateSpec`
162
- > see a self-consistent spec.
160
+ > Historical note: an earlier version had a `contextProps` field. At first the field drove an
161
+ > implicit prop-enrichment pass. That pass merged the allowlisted context fields and the URL
162
+ > params into the props of every element. We removed it, because it put values into components
163
+ > that never asked for them, and it let URL data from the user hide machine-owned state. The
164
+ > field was then a projection filter for a short time. We removed that filter too, because a
165
+ > limit on what a view can read added machinery without a real problem to solve. Always
166
+ > validate the **derived** view (`actor.currentView.get()`), not the raw `meta.view`. The
167
+ > `state` of the derived spec carries the projection, so a tool such as `validateSpec` sees a
168
+ > spec that is consistent with itself.
163
169
 
164
170
  ### `Routable`
165
171
 
166
172
  Interface for actors that support routing.
167
173
 
168
174
  ```ts
169
- import type { Routable } from "@xmachines/play-actor";
175
+ import { AbstractActor, type Routable } from "@xmachines/play-actor";
170
176
  import { Signal } from "@xmachines/play-signals";
177
+ import type { AnyActorLogic, EventObject } from "xstate";
171
178
 
172
179
  // Implement in a concrete actor (note: RoutableActor interface is exported from @xmachines/play-router):
173
180
  class MyRoutableActor extends AbstractActor<AnyActorLogic> implements Routable {
174
- state = new Signal.State({});
175
- currentRoute = new Signal.Computed(() => this.state.get().path ?? null);
181
+ state = new Signal.State<{ path?: string }>({});
182
+ currentRoute = new Signal.Computed<string | null>(() => this.state.get().path ?? null);
176
183
  initialRoute = "/";
177
- send = (event) => {
184
+ override send(event: EventObject): void {
178
185
  /* dispatch */
179
- };
186
+ }
180
187
  }
181
188
  ```
182
189
 
@@ -196,7 +203,7 @@ const viewable: Viewable = { currentView: signal };
196
203
 
197
204
  ### `BaseActorProviderProps<TRegistry>`
198
205
 
199
- Framework-agnostic base props shared by every `ActorProvider` implementation (React, Vue, Solid, Svelte). Framework renderer packages extend this interface.
206
+ The framework-agnostic base props. Every `ActorProvider` implementation shares them: React, Vue, Solid, and Svelte. Each framework renderer package extends this interface.
200
207
 
201
208
  ```ts
202
209
  import type { BaseActorProviderProps } from "@xmachines/play-actor";
@@ -210,7 +217,7 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
210
217
 
211
218
  ### `BaseViewContextValue<TRegistry>`
212
219
 
213
- Framework-agnostic base for every framework's `ViewContextValue`. Holds `spec`, `handlers`, `registry`, and `store` fields that are identical across React, Vue, Solid, and Svelte.
220
+ The framework-agnostic base of the `ViewContextValue` type in each framework. It holds the `spec`, `handlers`, `registry`, and `store` fields. These fields are identical in React, Vue, Solid, and Svelte.
214
221
 
215
222
  ## Testing
216
223
 
@@ -233,19 +240,21 @@ pnpm --filter @xmachines/play-actor run test:watch
233
240
  - **TypeScript** `>=5.7` (strict mode)
234
241
  - **ESM only** — `"type": "module"`
235
242
 
236
- @xmachines/play-actor - Abstract Actor base class for Play Architecture
243
+ @xmachines/play-actor - the abstract Actor base class of the Play Architecture
237
244
 
238
- This package provides AbstractActor, a minimal base class that extends XState Actor
239
- while enforcing the Play Architecture's signal protocol (RFC section 5.3).
245
+ This package gives you AbstractActor, a minimal base class. It extends the XState
246
+ Actor class, and it enforces the signal protocol of the Play Architecture (RFC
247
+ section 5.3).
240
248
 
241
- The core protocol is minimal (state + send). Optional capabilities are provided
242
- via interfaces:
249
+ The core protocol is minimal: state and send. Two interfaces give the optional
250
+ capabilities:
243
251
 
244
- - Routable: For actors that support routing
245
- - Viewable: For actors that support view rendering
252
+ - Routable: for an actor with a routing support
253
+ - Viewable: for an actor with a view rendering
246
254
 
247
- Maintains XState ecosystem compatibility (inspection, devtools) while exposing
248
- reactive signals for Infrastructure layer communication.
255
+ The class keeps the compatibility with the XState ecosystem, such as the
256
+ inspection and the devtools. It also exposes the reactive signals of the
257
+ communication with the infrastructure layer.
249
258
 
250
259
  ## See
251
260
 
@@ -2,21 +2,20 @@
2
2
 
3
3
  # Abstract Class: AbstractActor\<TLogic, TEvent\>
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:190](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/abstract-actor.ts#L190)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:197](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L197)
6
6
 
7
- Abstract base class for Play Architecture actors.
7
+ The abstract base class of an actor of the Play Architecture.
8
8
 
9
- Provides signal-driven state observation that integrates with XState ecosystem
10
- tooling (devtools, inspection) while exposing reactive signals for
11
- Infrastructure layer communication.
9
+ It observes the state through the signals, and it works with the tools of the
10
+ XState ecosystem, such as the devtools and the inspection. It also exposes the
11
+ reactive signals of the communication with the infrastructure layer.
12
12
 
13
- **A subclass IS the actor.** Forward the logic _and_ its options to
14
- `super(logic, options)`, then observe `this`. Holding a separately
15
- constructed actor alongside leaves this instance running as an empty second
16
- actor, and every inherited member `system`, `sessionId`, `clock`, the
17
- internal `_send` that receives `sendTo()` traffic, and anything a future
18
- XState version adds answers from that empty one until it is individually
19
- forwarded.
13
+ **A subclass IS the actor.** Give the logic _and_ its options to
14
+ `super(logic, options)`, then observe `this`. A separate actor beside this
15
+ instance leaves this instance as an empty second actor. Every inherited member
16
+ then answers from that empty actor, until you forward each one: `system`,
17
+ `sessionId`, `clock`, the internal `_send` that receives the traffic of
18
+ `sendTo()`, and each member that a later XState version adds.
20
19
 
21
20
  ## Extends
22
21
 
@@ -28,10 +27,10 @@ forwarded.
28
27
 
29
28
  ## Type Parameters
30
29
 
31
- | Type Parameter | Default type | Description |
32
- | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------- |
33
- | `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | XState actor logic type |
34
- | `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | Event type constraint (defaults to EventObject) |
30
+ | Type Parameter | Default type | Description |
31
+ | ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------ |
32
+ | `TLogic` _extends_ [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | The type of the XState actor logic |
33
+ | `TEvent` _extends_ [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject) | The constraint of the event type. The default is EventObject |
35
34
 
36
35
  ## Constructors
37
36
 
@@ -65,19 +64,19 @@ Actor<TLogic>.constructor
65
64
 
66
65
  ## Properties
67
66
 
68
- | Property | Modifier | Type | Description | Inherited from | Defined in |
69
- | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
70
- | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
71
- | <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` | - |
72
- | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
73
- | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
74
- | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
75
- | <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` | - |
76
- | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
77
- | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
78
- | <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:200](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/abstract-actor.ts#L200) |
79
- | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
80
- | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
67
+ | Property | Modifier | Type | Description | Inherited from | Defined in |
68
+ | ------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
69
+ | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | `Actor._parent` | - |
70
+ | <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` | - |
71
+ | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | `Actor.id` | - |
72
+ | <a id="property-logic"></a> `logic` | `public` | `TLogic` | - | `Actor.logic` | - |
73
+ | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | `Actor.options` | - |
74
+ | <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` | - |
75
+ | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
76
+ | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
77
+ | <a id="property-state"></a> `state` | `abstract` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`unknown`\> | The reactive snapshot of the current actor state. The infrastructure observes this signal, and it reacts to each state change. It therefore holds no coupling to the internal state machine of the actor. | - | [packages/play-actor/src/abstract-actor.ts:207](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L207) |
78
+ | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
79
+ | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | `Actor.systemId` | - |
81
80
 
82
81
  ## Methods
83
82
 
@@ -246,19 +245,20 @@ Actor.select;
246
245
  abstract send(event): void;
247
246
  ```
248
247
 
249
- Defined in: [packages/play-actor/src/abstract-actor.ts:215](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/abstract-actor.ts#L215)
248
+ Defined in: [packages/play-actor/src/abstract-actor.ts:223](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L223)
250
249
 
251
- Send event to Actor.
250
+ Sends an event to the Actor.
252
251
 
253
- Constrained to TEvent for type safety in concrete implementations.
252
+ The constraint is TEvent, which gives the type safety of a concrete
253
+ implementation.
254
254
 
255
- Note for implementations that wrap `send` (validating the event, or
256
- notifying hooks around it): this declaration is abstract purely to narrow
257
- the event type, and TypeScript forbids `super` calls to an abstract
258
- member. Reach XState's own implementation with
259
- `Actor.prototype.send.call(this, event)` instead. Making this concrete
260
- would allow `super.send()` but would force every existing subclass to add
261
- an `override` modifier — a breaking change for adapters outside this repo.
255
+ A note for an implementation that wraps `send`, to check the event or to notify a
256
+ hook around it: this declaration is abstract for one reason only, to narrow the
257
+ event type, and TypeScript forbids a `super` call to an abstract member. Reach
258
+ the implementation of XState with `Actor.prototype.send.call(this, event)`
259
+ instead. A concrete declaration permits `super.send()`, but it also forces an
260
+ `override` modifier in every subclass that exists now, and that is a breaking
261
+ change for an adapter outside this repository.
262
262
 
263
263
  #### Parameters
264
264
 
@@ -6,35 +6,36 @@
6
6
  function attachRenderErrorHandler<TRegistry>(registry, handler): TRegistry;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-actor/src/provider-guards.ts:64](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/provider-guards.ts#L64)
9
+ Defined in: [packages/play-actor/src/provider-guards.ts:68](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/provider-guards.ts#L68)
10
10
 
11
- Clone a component registry and inject an `onRenderError` handler.
11
+ Copies a component registry, and puts an `onRenderError` handler into the copy.
12
12
 
13
- The handler is defined as a non-enumerable, configurable own property on the
14
- clone (per D-19 one injection convention for all framework renderers), so
15
- it overrides any handler set at `defineRegistry` level without showing up
16
- when the registry's component entries are enumerated.
13
+ The function defines the handler as an own property of the copy. That property is
14
+ not enumerable, and it is configurable (D-19 gives one convention of the
15
+ injection for every framework renderer). The handler therefore replaces each
16
+ handler of the `defineRegistry` level, and it does not appear in an enumeration of
17
+ the component entries of the registry.
17
18
 
18
- The caller's registry is never mutated a shallow clone is returned. Callers
19
- that need per-instance handlers (e.g. an `onRenderError` prop on
20
- `ActorProvider`) can therefore share one `defineRegistry` result across
21
- providers safely.
19
+ The function never changes the registry of the caller: it returns a shallow copy.
20
+ Therefore a caller that needs a handler for each instance, such as an
21
+ `onRenderError` prop of `ActorProvider`, can share one result of `defineRegistry`
22
+ between the providers in a safe way.
22
23
 
23
24
  ## Type Parameters
24
25
 
25
- | Type Parameter | Description |
26
- | ------------------------------ | ----------------------------------------------- |
27
- | `TRegistry` _extends_ `object` | The framework-specific component registry type. |
26
+ | Type Parameter | Description |
27
+ | ------------------------------ | --------------------------------------------- |
28
+ | `TRegistry` _extends_ `object` | The component registry type of the framework. |
28
29
 
29
30
  ## Parameters
30
31
 
31
- | Parameter | Type | Description |
32
- | ---------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
33
- | `registry` | `TRegistry` | The component registry from `defineRegistry().registry`. |
34
- | `handler` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | Called with `(error, componentName)` when a catalog component throws during render. |
32
+ | Parameter | Type | Description |
33
+ | ---------- | ------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
34
+ | `registry` | `TRegistry` | The component registry from `defineRegistry().registry`. |
35
+ | `handler` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | The renderer calls it with `(error, componentName)` when a catalog component throws during a render. |
35
36
 
36
37
  ## Returns
37
38
 
38
39
  `TRegistry`
39
40
 
40
- A shallow clone of `registry` with `onRenderError` attached.
41
+ A shallow copy of `registry`, with `onRenderError` on it.
@@ -6,20 +6,21 @@
6
6
  function composePlayState(authoredState, slice): Record<string, unknown> | undefined;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-actor/src/context-projection.ts:220](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/context-projection.ts#L220)
9
+ Defined in: [packages/play-actor/src/context-projection.ts:228](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L228)
10
10
 
11
- Compose a view's effective state: the authored `spec.state` plus the
11
+ Composes the effective state of a view: the authored `spec.state` and the
12
12
  `/context` slice.
13
13
 
14
- When the authored state already declares the reserved key, the projection is
15
- skipped (authored state wins) with a dev warning no existing spec breaks.
14
+ When the authored state declares the reserved key already, the function skips the
15
+ projection, the authored state wins, and the code writes a warning in
16
+ development. No spec that exists now therefore fails.
16
17
 
17
18
  ## Parameters
18
19
 
19
- | Parameter | Type | Description |
20
- | --------------- | ---------------------------------------------- | --------------------------------------------------------------------------------- |
21
- | `authoredState` | `Record`\<`string`, `unknown`\> \| `undefined` | The raw `meta.view.state` (may be anything; sanitized by the caller/toAtomState). |
22
- | `slice` | `Record`\<`string`, `unknown`\> \| `undefined` | The machine's context, projected wholesale. |
20
+ | Parameter | Type | Description |
21
+ | --------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------- |
22
+ | `authoredState` | `Record`\<`string`, `unknown`\> \| `undefined` | The raw `meta.view.state` value. It can be anything, and the caller or toAtomState cleans it. |
23
+ | `slice` | `Record`\<`string`, `unknown`\> \| `undefined` | The context of the machine, as one complete value. |
23
24
 
24
25
  ## Returns
25
26