@xmachines/docs 2.0.0-alpha.1 → 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 (388) hide show
  1. package/README.md +16 -17
  2. package/api/@xmachines/play/README.md +58 -66
  3. package/api/@xmachines/play/classes/NonNullableError.md +14 -14
  4. package/api/@xmachines/play/classes/PlayError.md +32 -34
  5. package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +28 -27
  7. package/api/@xmachines/play-actor/README.md +114 -50
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +45 -30
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +27 -0
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +21 -0
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +43 -0
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +28 -0
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +42 -0
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +29 -0
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +25 -27
  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 -15
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +11 -0
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +6 -6
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +50 -0
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +15 -0
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +15 -0
  27. package/api/@xmachines/play-dom/README.md +123 -86
  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/functions/createValidationRegistry.md +22 -0
  32. package/api/@xmachines/play-dom/functions/defineRegistry.md +5 -5
  33. package/api/@xmachines/play-dom/interfaces/ComponentContext.md +9 -8
  34. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +16 -16
  35. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +2 -0
  36. package/api/@xmachines/play-dom/interfaces/FieldValidationState.md +16 -0
  37. package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
  38. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +17 -17
  39. package/api/@xmachines/play-dom/interfaces/RenderSpecOptions.md +2 -0
  40. package/api/@xmachines/play-dom/interfaces/ValidationRegistry.md +21 -0
  41. package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +10 -0
  42. package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
  43. package/api/@xmachines/play-dom/variables/schema.md +35 -45
  44. package/api/@xmachines/play-dom-router/README.md +68 -51
  45. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
  46. package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
  47. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
  48. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
  49. package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
  50. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
  51. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +21 -20
  52. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
  53. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +41 -35
  54. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
  55. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
  56. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
  57. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
  58. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
  59. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
  60. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
  61. package/api/@xmachines/play-react/README.md +65 -55
  62. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
  63. package/api/@xmachines/play-react/functions/defineRegistry.md +5 -5
  64. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  65. package/api/@xmachines/play-react/functions/useFieldValidation.md +31 -0
  66. package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
  67. package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
  68. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
  69. package/api/@xmachines/play-react/interfaces/ComponentContext.md +9 -8
  70. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
  71. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -6
  72. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
  73. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
  74. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
  75. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
  76. package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
  77. package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
  78. package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
  79. package/api/@xmachines/play-react-router/README.md +38 -31
  80. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
  81. package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
  82. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
  83. package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
  84. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
  85. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
  86. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +41 -35
  87. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  88. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  89. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
  90. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
  91. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
  92. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  93. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
  94. package/api/@xmachines/play-router/README.md +99 -95
  95. package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
  96. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
  97. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
  98. package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
  99. package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
  100. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
  101. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
  102. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
  103. package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
  104. package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
  105. package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
  106. package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
  107. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
  108. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
  109. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
  110. package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
  111. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  112. package/api/@xmachines/play-router/functions/routeExists.md +8 -8
  113. package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
  114. package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
  115. package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
  116. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
  117. package/api/@xmachines/play-router/interfaces/LocationLike.md +11 -11
  118. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -9
  119. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
  120. package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
  121. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +41 -35
  122. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
  123. package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
  124. package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
  125. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
  126. package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
  127. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  128. package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
  129. package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
  130. package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
  131. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
  132. package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
  133. package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
  134. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
  135. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
  136. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
  137. package/api/@xmachines/play-signals/README.md +38 -36
  138. package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
  139. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
  140. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
  141. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
  142. package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
  143. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
  144. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
  145. package/api/@xmachines/play-solid/README.md +46 -42
  146. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  147. package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
  148. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
  149. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
  150. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
  151. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
  152. package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
  153. package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
  154. package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
  155. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
  156. package/api/@xmachines/play-solid-router/README.md +39 -34
  157. package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
  158. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
  159. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
  160. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
  161. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +45 -30
  162. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
  163. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +41 -35
  164. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
  165. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  166. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
  167. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
  168. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
  169. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
  170. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
  171. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
  172. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
  173. package/api/@xmachines/play-svelte/README.md +60 -33
  174. package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
  175. package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
  176. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
  177. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  178. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
  179. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
  180. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
  181. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
  182. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
  183. package/api/@xmachines/play-svelte-spa-router/README.md +43 -52
  184. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
  185. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
  186. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  187. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
  188. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
  189. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +41 -35
  190. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
  191. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
  192. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
  193. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
  194. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  195. package/api/@xmachines/play-sveltekit-router/README.md +43 -39
  196. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
  197. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
  198. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  199. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
  200. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  201. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +11 -11
  202. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +41 -35
  203. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
  204. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
  205. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
  206. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  207. package/api/@xmachines/play-tanstack-react-router/README.md +67 -49
  208. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
  209. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
  210. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
  211. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
  212. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
  213. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
  214. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
  215. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +41 -35
  216. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  217. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  218. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
  219. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
  220. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
  221. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
  222. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  223. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  224. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
  225. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
  226. package/api/@xmachines/play-tanstack-router/README.md +38 -16
  227. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
  228. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
  229. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
  230. package/api/@xmachines/play-tanstack-solid-router/README.md +76 -50
  231. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
  232. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
  233. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
  234. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
  235. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
  236. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +41 -35
  237. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
  238. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
  239. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
  240. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
  241. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
  242. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  243. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
  244. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  245. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
  246. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
  247. package/api/@xmachines/play-vue/README.md +39 -39
  248. package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
  249. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  250. package/api/@xmachines/play-vue/functions/useFieldValidation.md +31 -0
  251. package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
  252. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
  253. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
  254. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
  255. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
  256. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
  257. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  258. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  259. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +4 -4
  260. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  261. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
  262. package/api/@xmachines/play-vue-router/README.md +66 -57
  263. package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
  264. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
  265. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
  266. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
  267. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +41 -35
  268. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
  269. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
  270. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
  271. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
  272. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
  273. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
  274. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
  275. package/api/@xmachines/play-xstate/README.md +129 -138
  276. package/api/@xmachines/play-xstate/classes/PlayerActor.md +148 -114
  277. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -23
  278. package/api/@xmachines/play-xstate/functions/composeGuards.md +34 -33
  279. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +27 -22
  280. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +19 -14
  281. package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
  282. package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
  283. package/api/@xmachines/play-xstate/functions/eventMatches.md +12 -7
  284. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +17 -48
  285. package/api/@xmachines/play-xstate/functions/hasContext.md +12 -9
  286. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
  287. package/api/@xmachines/play-xstate/functions/negateGuard.md +26 -20
  288. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
  289. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
  290. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -11
  291. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
  292. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +4 -4
  293. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +9 -25
  294. package/api/@xmachines/play-xstate/type-aliases/Guard.md +13 -11
  295. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +8 -5
  296. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +11 -15
  297. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -19
  298. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  299. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -26
  300. package/api/@xmachines/shared/README.md +12 -14
  301. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  302. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  303. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +12 -7
  304. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  305. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +9 -4
  306. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  307. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  308. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +6 -6
  309. package/contributing/architecture.md +27 -28
  310. package/contributing/configuration.md +10 -10
  311. package/contributing/deployment.md +51 -30
  312. package/contributing/development.md +90 -21
  313. package/contributing/testing.md +36 -14
  314. package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
  315. package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
  316. package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
  317. package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
  318. package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
  319. package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
  320. package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
  321. package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
  322. package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
  323. package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
  324. package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
  325. package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
  326. package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
  327. package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
  328. package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
  329. package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
  330. package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
  331. package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
  332. package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
  333. package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
  334. package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
  335. package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
  336. package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
  337. package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
  338. package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
  339. package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
  340. package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
  341. package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
  342. package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
  343. package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
  344. package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
  345. package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
  346. package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
  347. package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
  348. package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
  349. package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
  350. package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
  351. package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
  352. package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
  353. package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
  354. package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
  355. package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
  356. package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
  357. package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
  358. package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
  359. package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
  360. package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
  361. package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
  362. package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
  363. package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
  364. package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
  365. package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
  366. package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
  367. package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
  368. package/examples/README.md +4 -1
  369. package/examples/basic-state-machine.md +24 -24
  370. package/examples/form-validation.md +110 -121
  371. package/examples/multi-router-integration.md +0 -2
  372. package/examples/routing-patterns.md +60 -94
  373. package/examples/traffic-light.md +57 -48
  374. package/guides/README.md +6 -2
  375. package/guides/actor-model.md +1 -1
  376. package/guides/getting-started.md +89 -90
  377. package/guides/inspector.md +197 -0
  378. package/guides/state-machines.md +55 -69
  379. package/package.json +10 -7
  380. package/rfc/play.md +15 -6
  381. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
  382. package/api/@xmachines/play-xstate/functions/createRoutedMachine.md +0 -87
  383. package/api/@xmachines/play-xstate/type-aliases/PlayRoutePayload.md +0 -30
  384. package/api/@xmachines/play-xstate/type-aliases/SetupLike.md +0 -33
  385. package/api/@xmachines/play-xstate/type-aliases/WithOptional.md +0 -31
  386. package/api/@xmachines/play-xstate/variables/emptyEventSchema.md +0 -37
  387. package/api/@xmachines/play-xstate/variables/playMetaSchema.md +0 -40
  388. package/api/@xmachines/play-xstate/variables/playRouteEventSchema.md +0 -9
@@ -2,13 +2,20 @@
2
2
 
3
3
  # Abstract Class: AbstractActor\<TLogic, TEvent\>
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:185](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L185)
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
+
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.
12
19
 
13
20
  ## Extends
14
21
 
@@ -20,10 +27,10 @@ Infrastructure layer communication.
20
27
 
21
28
  ## Type Parameters
22
29
 
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) |
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 |
27
34
 
28
35
  ## Constructors
29
36
 
@@ -57,20 +64,19 @@ Actor<TLogic>.constructor
57
64
 
58
65
  ## Properties
59
66
 
60
- | Property | Modifier | Type | Description | Inherited from | Defined in |
61
- | ----------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
- | <a id="property-_parent"></a> `_parent?` | `public` | `AnyActor` | - | `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`\>, `SendableEventFromLogic`\<`TLogic`\>\> | - | `Actor.ref` | - |
68
- | <a id="property-registrykey"></a> `registryKey` | `public` | `string` \| `undefined` | - | `Actor.registryKey` | - |
69
- | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | `Actor.sessionId` | - |
70
- | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | `Actor.src` | - |
71
- | <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:195](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L195) |
72
- | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | `Actor.system` | - |
73
- | <a id="property-trigger"></a> `trigger` | `public` | `ActorTrigger`\<`SendableEventFromLogic`\<`TLogic`\>\> | - | `Actor.trigger` | - |
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` | - |
74
80
 
75
81
  ## Methods
76
82
 
@@ -152,7 +158,7 @@ When an actor receives an event, its internal state may change. An actor
152
158
  may emit a snapshot when a state transition occurs.
153
159
 
154
160
  Note that some actors, such as callback actors generated with
155
- `createCallbackLogic`, will not emit snapshots.
161
+ `fromCallback`, will not emit snapshots.
156
162
 
157
163
  #### See
158
164
 
@@ -177,9 +183,9 @@ Defined in: `xstate`
177
183
 
178
184
  #### Type Parameters
179
185
 
180
- | Type Parameter |
181
- | -------------------------- |
182
- | `TType` _extends_ `string` |
186
+ | Type Parameter |
187
+ | ----------------------- |
188
+ | `TType` _extends_ `any` |
183
189
 
184
190
  #### Parameters
185
191
 
@@ -239,11 +245,20 @@ Actor.select;
239
245
  abstract send(event): void;
240
246
  ```
241
247
 
242
- Defined in: [packages/play-actor/src/abstract-actor.ts:202](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L202)
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)
249
+
250
+ Sends an event to the Actor.
243
251
 
244
- Send event to Actor.
252
+ The constraint is TEvent, which gives the type safety of a concrete
253
+ implementation.
245
254
 
246
- Constrained to TEvent for type safety in concrete implementations.
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.
247
262
 
248
263
  #### Parameters
249
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-alpha.1/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.
@@ -0,0 +1,27 @@
1
+ [API](../../../README.md) / [@xmachines/play-actor](../README.md) / composePlayState
2
+
3
+ # Function: composePlayState()
4
+
5
+ ```ts
6
+ function composePlayState(authoredState, slice): Record<string, unknown> | undefined;
7
+ ```
8
+
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
+
11
+ Composes the effective state of a view: the authored `spec.state` and the
12
+ `/context` slice.
13
+
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.
17
+
18
+ ## Parameters
19
+
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. |
24
+
25
+ ## Returns
26
+
27
+ `Record`\<`string`, `unknown`\> \| `undefined`
@@ -0,0 +1,21 @@
1
+ [API](../../../README.md) / [@xmachines/play-actor](../README.md) / createViewStoreLifecycle
2
+
3
+ # Function: createViewStoreLifecycle()
4
+
5
+ ```ts
6
+ function createViewStoreLifecycle(createStore): ViewStoreLifecycle;
7
+ ```
8
+
9
+ Defined in: [packages/play-actor/src/view-store-lifecycle.ts:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L94)
10
+
11
+ Creates a coordinator of the lifecycle.
12
+
13
+ ## Parameters
14
+
15
+ | Parameter | Type | Description |
16
+ | ------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17
+ | `createStore` | (`seed`) => `StateStore` | The store factory of the framework. It receives the seed that is safe for the prototype (`toAtomState(view.state)`), and the composed state carries /context already. |
18
+
19
+ ## Returns
20
+
21
+ [`ViewStoreLifecycle`](../interfaces/ViewStoreLifecycle.md)
@@ -0,0 +1,43 @@
1
+ [API](../../../README.md) / [@xmachines/play-actor](../README.md) / guardContextWrites
2
+
3
+ # Function: guardContextWrites()
4
+
5
+ ```ts
6
+ function guardContextWrites(store): StateStore;
7
+ ```
8
+
9
+ Defined in: [packages/play-actor/src/context-projection.ts:151](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L151)
10
+
11
+ Wraps a StateStore, and the wrapper refuses each write under `/context`.
12
+
13
+ A provider applies it to the store that it gives to the bindings and to the
14
+ action handlers (`$bindState`, `setState`, and a chained `set`). The provider
15
+ keeps the store without the wrapper, and it refreshes the projection through that
16
+ store. The subtree is therefore read-only to the spec, and not to the machinery.
17
+
18
+ A write with a value that is **identical** to the current value passes in
19
+ silence. A handler in the style of `setState` reads the complete snapshot,
20
+ changes it, and writes the whole object back. The `context` key that goes through
21
+ that round trip without a change is no attempt of a mutation. Only a write that
22
+ changes the subtree throws.
23
+
24
+ Each read passes through without a change. The wrapper delegates every member
25
+ explicitly, and it does not use a spread: a store from a consumer can be an
26
+ instance of a class, and the methods of that instance are on the prototype. Those
27
+ methods do not survive `{ ...store }`, and the first render then fails with
28
+ `store.getSnapshot is not a function`. The code builds the wrapper one time for
29
+ each resolved store. Therefore the identity of the delegating `getSnapshot` and
30
+ of the delegating `subscribe` stays stable for a consumer in the style of
31
+ `useSyncExternalStore`.
32
+
33
+ ## Parameters
34
+
35
+ | Parameter | Type | Description |
36
+ | --------- | ------------ | ---------------------------- |
37
+ | `store` | `StateStore` | The store below the wrapper. |
38
+
39
+ ## Returns
40
+
41
+ `StateStore`
42
+
43
+ A store with a guard on `set` and on `update`.
@@ -0,0 +1,28 @@
1
+ [API](../../../README.md) / [@xmachines/play-actor](../README.md) / refreshContextSubtree
2
+
3
+ # Function: refreshContextSubtree()
4
+
5
+ ```ts
6
+ function refreshContextSubtree(store, view): void;
7
+ ```
8
+
9
+ Defined in: [packages/play-actor/src/context-projection.ts:210](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L210)
10
+
11
+ Refreshes the `/context` subtree of a live store from the composed state of a
12
+ derived view. An emission with the same `viewKey` means that only the projection
13
+ changed. The function therefore replaces the complete subtree, and it never
14
+ merges it field by field, because `update` cannot delete a key. Every ephemeral
15
+ value at the root level stays. The function does nothing when the view carries no
16
+ slice, or when the store holds the slice already.
17
+
18
+ ## Parameters
19
+
20
+ | Parameter | Type | Description |
21
+ | ------------- | -------------------------- | -------------------------------------------------------------- |
22
+ | `store` | `StateStore` | The store WITHOUT the guard. A provider refreshes through it. |
23
+ | `view` | \{ `state?`: `unknown`; \} | The derived view. Its `state.context` field carries the slice. |
24
+ | `view.state?` | `unknown` | - |
25
+
26
+ ## Returns
27
+
28
+ `void`
@@ -0,0 +1,42 @@
1
+ [API](../../../README.md) / [@xmachines/play-actor](../README.md) / reuseComposedState
2
+
3
+ # Function: reuseComposedState()
4
+
5
+ ```ts
6
+ function reuseComposedState(prev, next): PlaySpec | null;
7
+ ```
8
+
9
+ Defined in: [packages/play-actor/src/context-projection.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L92)
10
+
11
+ Reuses the composed `state` of the previous emission, or the complete previous
12
+ spec, when the value of the projection did not change.
13
+
14
+ `deriveCurrentView` composes `state: { ...meta.view.state, context: slice }` new
15
+ on each call, and the XState function `assign` makes a new context object on
16
+ every event. Without this reuse, every event therefore presents a new `state`
17
+ reference, and the `Object.is` test of each field in the emit gate emits the view
18
+ again and remounts it, without an end. The function compares the slices field by
19
+ field ([shallowEqualExcept](shallowEqualExcept.md)), because the XState function `assign` makes a
20
+ new context object for each event, and a test of the identity of the whole object
21
+ therefore reports a change every time. The authored fields come from the static
22
+ `meta.view.state` through a spread. Therefore their references are stable for an
23
+ unchanged `viewKey`, and a plain `Object.is` test is correct for them.
24
+
25
+ The function returns one of three values, in this order of preference:
26
+
27
+ - `prev` itself, when nothing observable changed. The emit gate then stops at the
28
+ identity of the reference, and it walks no element;
29
+ - `{ ...next, state: prev.state }`, when the value of the state did not change
30
+ but another top-level field is different;
31
+ - `next`, when something changed.
32
+
33
+ ## Parameters
34
+
35
+ | Parameter | Type |
36
+ | --------- | ------------------------------------------------- |
37
+ | `prev` | [`PlaySpec`](../interfaces/PlaySpec.md) \| `null` |
38
+ | `next` | [`PlaySpec`](../interfaces/PlaySpec.md) \| `null` |
39
+
40
+ ## Returns
41
+
42
+ [`PlaySpec`](../interfaces/PlaySpec.md) \| `null`
@@ -0,0 +1,29 @@
1
+ [API](../../../README.md) / [@xmachines/play-actor](../README.md) / shallowEqualExcept
2
+
3
+ # Function: shallowEqualExcept()
4
+
5
+ ```ts
6
+ function shallowEqualExcept(a, b, except?): boolean;
7
+ ```
8
+
9
+ Defined in: [packages/play-actor/src/context-projection.ts:58](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L58)
10
+
11
+ The shallow equality of the own keys, with `Object.is`. It can ignore one key on
12
+ both sides.
13
+
14
+ This is the one comparison rule behind every decision of the emission dedup: the
15
+ equality of a slice, and also the emit gate of the player, which compares the
16
+ spec fields in `viewSpecsEquivalent` and reuses the composed state in
17
+ [reuseComposedState](reuseComposedState.md).
18
+
19
+ ## Parameters
20
+
21
+ | Parameter | Type |
22
+ | --------- | -------- |
23
+ | `a` | `object` |
24
+ | `b` | `object` |
25
+ | `except?` | `string` |
26
+
27
+ ## Returns
28
+
29
+ `boolean`
@@ -6,28 +6,30 @@
6
6
  function toAtomState(state): Record<string, unknown>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-actor/src/provider-guards.ts:36](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/provider-guards.ts#L36)
9
+ Defined in: [packages/play-actor/src/provider-guards.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/provider-guards.ts#L39)
10
10
 
11
- Safely coerce a spec's `state` field to a plain object for `createAtom`.
11
+ Converts the `state` field of a spec into a plain object for `createAtom`, in a safe way.
12
12
 
13
- `spec.state` is typed as `unknown` in `PlaySpec`. At runtime it can be
14
- `null`, `undefined`, a primitive, or a plain object depending on what the
15
- machine author put in the view spec. `createAtom` requires a plain object as
16
- its initial value anything else produces a broken store at runtime.
13
+ `spec.state` has the type `unknown` in `PlaySpec`. At run time it is `null`,
14
+ `undefined`, a primitive, or a plain object, and this depends on the value that
15
+ the author of the machine put in the view spec. `createAtom` requires a plain
16
+ object as its first value, because every other value makes a broken store at run
17
+ time.
17
18
 
18
- Only plain objects (prototype is `Object.prototype` or `null`) are accepted
19
- and returned as-is. Everything else `null`, `undefined`, primitives,
20
- arrays, class instances, and built-in objects (Date, Map, Set, etc.) falls
21
- back to a fresh `{}`, preventing silent broken-store bugs at runtime.
19
+ The function accepts a plain object only, which means that its prototype is
20
+ `Object.prototype` or `null`, and it returns that object without a change. Every
21
+ other value becomes a new `{}`: `null`, `undefined`, a primitive, an array, an
22
+ instance of a class, and a built-in object such as a Date, a Map, or a Set. A
23
+ broken store therefore never appears at run time.
22
24
 
23
25
  ## Parameters
24
26
 
25
- | Parameter | Type | Description |
26
- | --------- | --------- | --------------------------------------------- |
27
- | `state` | `unknown` | The raw `spec.state` value from a `PlaySpec`. |
27
+ | Parameter | Type | Description |
28
+ | --------- | --------- | ------------------------------------------- |
29
+ | `state` | `unknown` | The raw `spec.state` value of a `PlaySpec`. |
28
30
 
29
31
  ## Returns
30
32
 
31
33
  `Record`\<`string`, `unknown`\>
32
34
 
33
- `state` itself when it is a plain object, otherwise a new empty object.
35
+ `state` itself when it is a plain object. In every other case, a new empty object.
@@ -3,32 +3,32 @@
3
3
  # Function: typedSpec()
4
4
 
5
5
  ```ts
6
- function typedSpec<TContext>(spec): PlaySpec;
6
+ function typedSpec(spec): PlaySpec;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-actor/src/abstract-actor.ts:88](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L88)
9
+ Defined in: [packages/play-actor/src/abstract-actor.ts:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L91)
10
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.
11
+ The identity helper gives a view spec literal the type `PlaySpec` at the
12
+ definition site. The compiler therefore checks the spec, and the IDE completes it.
14
13
 
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.
14
+ The XState `meta` field has the type `Record<string, unknown>`. TypeScript
15
+ therefore infers no spec shape from the context. `typedSpec(...)` is the
16
+ mechanism that starts the check where you write the spec. The parameter holds no
17
+ `viewKey`: the derivation stamps that field, and it overwrites a value from an
18
+ author without a notice. Therefore the compiler refuses a `viewKey` here.
18
19
 
19
- At runtime this is a no-op the spec object is returned unchanged.
20
+ The check of an excess property works on an inline object literal only. For a
21
+ spec in a variable, or for a spec from a spread, write `satisfies PlaySpec` at
22
+ the literal instead.
20
23
 
21
- ## Type Parameters
22
-
23
- | Type Parameter |
24
- | ----------------------------- |
25
- | `TContext` _extends_ `object` |
24
+ At run time this function does nothing: it returns the spec object without a
25
+ change.
26
26
 
27
27
  ## Parameters
28
28
 
29
- | Parameter | Type |
30
- | --------- | ------------------------------------------------------------------------------ |
31
- | `spec` | `Omit`\<[`PlaySpec`](../interfaces/PlaySpec.md), `"contextProps"`\> & `object` |
29
+ | Parameter | Type |
30
+ | --------- | -------------------------------------------------------------- |
31
+ | `spec` | `Omit`\<[`PlaySpec`](../interfaces/PlaySpec.md), `"viewKey"`\> |
32
32
 
33
33
  ## Returns
34
34
 
@@ -37,18 +37,16 @@ At runtime this is a no-op — the spec object is returned unchanged.
37
37
  ## Example
38
38
 
39
39
  ```ts
40
- interface DashboardCtx {
41
- username: string;
42
- params: Record<string, string>;
43
- query: Record<string, string>;
44
- }
45
-
46
40
  meta: {
47
- view: typedSpec<DashboardCtx>({
41
+ view: typedSpec({
48
42
  root: "root",
49
- contextProps: ["username"], // ✓ key of DashboardCtx
50
- // contextProps: ["usernaem"], // ✗ compile error
51
- elements: { root: { type: "Dashboard", props: {}, children: [] } },
43
+ elements: {
44
+ root: {
45
+ type: "Dashboard",
46
+ props: { username: { $state: "/context/username" } },
47
+ children: [],
48
+ },
49
+ },
52
50
  }),
53
51
  }
54
52
  ```
@@ -2,14 +2,16 @@
2
2
 
3
3
  # Interface: BaseActorProviderProps\<TRegistry\>
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:155](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L155)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L159)
6
6
 
7
- Framework-agnostic base props shared by every `ActorProvider` implementation
8
- (React, Vue, Solid, Svelte). `TRegistry` captures the framework-specific
9
- `DefineRegistryResult` type; `RenderErrorHandler` is sourced from
10
- `@xmachines/json-render-core` so no second generic is needed.
7
+ The framework-agnostic base props. Every `ActorProvider` implementation shares
8
+ them: React, Vue, Solid, and Svelte. `TRegistry` holds the
9
+ `DefineRegistryResult` type of the framework. `RenderErrorHandler` comes from
10
+ `@xmachines/json-render-core`, and a second generic parameter is therefore not
11
+ necessary.
11
12
 
12
- Framework packages extend this with their `fallback`, `onError`, and `children` fields.
13
+ Each framework package extends this interface with its `fallback` field, its
14
+ `onError` field, and its `children` field.
13
15
 
14
16
  ## Example
15
17
 
@@ -32,15 +34,15 @@ interface ActorProviderProps extends BaseActorProviderProps<DefineRegistryResult
32
34
 
33
35
  ## Type Parameters
34
36
 
35
- | Type Parameter | Description |
36
- | ------------------------------ | -------------------------------------------- |
37
- | `TRegistry` _extends_ `object` | The framework's `DefineRegistryResult` type. |
37
+ | Type Parameter | Description |
38
+ | ------------------------------ | ------------------------------------------------- |
39
+ | `TRegistry` _extends_ `object` | The `DefineRegistryResult` type of the framework. |
38
40
 
39
41
  ## Properties
40
42
 
41
- | Property | Type | Description | Defined in |
42
- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
43
- | <a id="property-actor"></a> `actor` | [`AbstractActor`](../classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](Viewable.md) | Actor instance with currentView signal (requires Viewable capability). | [packages/play-actor/src/abstract-actor.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L159) |
44
- | <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [packages/play-actor/src/abstract-actor.ts:172](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L172) |
45
- | <a id="property-registryresult"></a> `registryResult` | `TRegistry` | Full result from defineRegistry() contains the component registry and action handlers factory. | [packages/play-actor/src/abstract-actor.ts:161](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L161) |
46
- | <a id="property-store"></a> `store?` | `StateStore` | Optional external StateStore (controlled mode). When provided, spec.state is ignored and this store is the single source of truth. When omitted, a fresh @xstate/store atom is created per view transition from spec.state. | [packages/play-actor/src/abstract-actor.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-actor/src/abstract-actor.ts#L167) |
43
+ | Property | Type | Description | Defined in |
44
+ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
45
+ | <a id="property-actor"></a> `actor` | [`AbstractActor`](../classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability. | [packages/play-actor/src/abstract-actor.ts:163](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L163) |
46
+ | <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../../play-dom/type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry. | [packages/play-actor/src/abstract-actor.ts:177](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L177) |
47
+ | <a id="property-registryresult"></a> `registryResult` | `TRegistry` | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | [packages/play-actor/src/abstract-actor.ts:165](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L165) |
48
+ | <a id="property-store"></a> `store?` | `StateStore` | The optional external StateStore, which is the controlled mode. With this option, the provider ignores spec.state, and this store is the single source of truth. Without it, the provider makes a new @xstate/store atom for each view transition, with the values of spec.state. | [packages/play-actor/src/abstract-actor.ts:172](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L172) |