@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,13 @@
2
2
 
3
3
  # Interface: SignalComputed\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:111](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L111)
5
+ Defined in: [packages/play-signals/src/types.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L112)
6
6
 
7
- Lazily-evaluated, memoized computed signal
7
+ The computed signal. It evaluates late, and it memoizes the result
8
8
 
9
- Signal.Computed automatically tracks dependencies when its callback is executed.
10
- The computation is memoized and only re-runs when dependencies change. This enables
11
- automatic dependency tracking without manual subscription management.
9
+ Signal.Computed tracks each dependency when it runs its callback. It memoizes the
10
+ result, and it runs the callback again only after a dependency changes. It
11
+ therefore tracks each dependency for you, and you manage no subscription.
12
12
 
13
13
  ## Example
14
14
 
@@ -20,8 +20,8 @@ const doubled = new Signal.Computed(() => count.get() * 2);
20
20
 
21
21
  console.log(doubled.get()); // 0
22
22
  count.set(5);
23
- console.log(doubled.get()); // 10 (recomputed)
24
- console.log(doubled.get()); // 10 (memoized, not recomputed)
23
+ console.log(doubled.get()); // 10 (the signal computed it again)
24
+ console.log(doubled.get()); // 10 (from the memory, with no new computation)
25
25
  ```
26
26
 
27
27
  ## Type Parameters
@@ -38,12 +38,12 @@ console.log(doubled.get()); // 10 (memoized, not recomputed)
38
38
  get(): T;
39
39
  ```
40
40
 
41
- Defined in: [packages/play-signals/src/types.ts:117](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L117)
41
+ Defined in: [packages/play-signals/src/types.ts:118](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L118)
42
42
 
43
- Read computed value (recalculates only if dependencies changed)
43
+ Reads the computed value. It computes the value again only after a dependency changed
44
44
 
45
45
  #### Returns
46
46
 
47
47
  `T`
48
48
 
49
- Computed value based on current dependencies
49
+ The value from the current dependencies
@@ -2,15 +2,15 @@
2
2
 
3
3
  # Interface: SignalOptions\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L26)
5
+ Defined in: [packages/play-signals/src/types.ts:27](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L27)
6
6
 
7
- Options for creating Signal.State
7
+ The options of a Signal.State
8
8
 
9
9
  ## Param
10
10
 
11
11
  **equals**
12
12
 
13
- Optional custom equality function for determining if value changed
13
+ The optional equality function of your own. It decides if the value changed
14
14
 
15
15
  ## Example
16
16
 
@@ -32,6 +32,6 @@ const count = new Signal.State(0, options);
32
32
 
33
33
  ## Properties
34
34
 
35
- | Property | Type | Description | Defined in |
36
- | -------------------------------------- | ----------------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
37
- | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | Custom equality function for determining if value changed | [packages/play-signals/src/types.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L33) |
35
+ | Property | Type | Description | Defined in |
36
+ | -------------------------------------- | ----------------------- | ------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
37
+ | <a id="property-equals"></a> `equals?` | (`a`, `b`) => `boolean` | The equality function of your own. It decides if the value changed | [packages/play-signals/src/types.ts:34](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L34) |
@@ -2,13 +2,13 @@
2
2
 
3
3
  # Interface: SignalState\<T\>
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:53](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L53)
5
+ Defined in: [packages/play-signals/src/types.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L54)
6
6
 
7
- Writable state signal holding a single reactive value
7
+ The writable state signal. It holds one reactive value
8
8
 
9
- Signal.State is the fundamental primitive for reactive state. Calling `get()` within
10
- a computed signal or watcher automatically tracks the state as a dependency. Calling
11
- `set()` notifies all dependent computations and watchers.
9
+ Signal.State is the base primitive of a reactive state. A `get()` call inside a
10
+ computed signal or inside a watcher tracks the state as a dependency. A `set()`
11
+ call notifies every computation and every watcher that depends on the state.
12
12
 
13
13
  ## Example
14
14
 
@@ -35,15 +35,15 @@ console.log(name.get()); // 'Bob'
35
35
  get(): T;
36
36
  ```
37
37
 
38
- Defined in: [packages/play-signals/src/types.ts:59](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L59)
38
+ Defined in: [packages/play-signals/src/types.ts:60](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L60)
39
39
 
40
- Read current value and track as dependency
40
+ Reads the current value, and tracks the signal as a dependency
41
41
 
42
42
  #### Returns
43
43
 
44
44
  `T`
45
45
 
46
- Current value of the signal
46
+ The current value of the signal
47
47
 
48
48
  ---
49
49
 
@@ -53,15 +53,15 @@ Current value of the signal
53
53
  set(value): void;
54
54
  ```
55
55
 
56
- Defined in: [packages/play-signals/src/types.ts:66](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L66)
56
+ Defined in: [packages/play-signals/src/types.ts:67](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L67)
57
57
 
58
- Write new value and notify watchers if changed
58
+ Writes a new value, and notifies the watchers when the value changed
59
59
 
60
60
  #### Parameters
61
61
 
62
- | Parameter | Type | Description |
63
- | --------- | ---- | ---------------- |
64
- | `value` | `T` | New value to set |
62
+ | Parameter | Type | Description |
63
+ | --------- | ---- | ------------- |
64
+ | `value` | `T` | The new value |
65
65
 
66
66
  #### Returns
67
67
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: SignalWatcher
4
4
 
5
- Defined in: [packages/play-signals/src/types.ts:167](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L167)
5
+ Defined in: [packages/play-signals/src/types.ts:169](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L169)
6
6
 
7
- Watcher for observing signal changes and scheduling effects
7
+ The watcher. It observes each signal change and schedules an effect
8
8
 
9
- Signal.subtle.Watcher enables observing multiple signals and batching updates.
10
- This is the low-level primitive used by frameworks to implement reactive effects.
9
+ Signal.subtle.Watcher observes more than one signal, and it groups the updates.
10
+ It is the low-level primitive, and a framework uses it to make a reactive effect.
11
11
 
12
12
  ## Example
13
13
 
@@ -27,7 +27,7 @@ const watcher = new Signal.subtle.Watcher(() => {
27
27
  watcher.watch(count);
28
28
  watcher.watch(doubled);
29
29
 
30
- count.set(5); // Notification scheduled via microtask
30
+ count.set(5); // The watcher schedules the notification in a microtask
31
31
  ```
32
32
 
33
33
  ## Methods
@@ -40,9 +40,9 @@ getPending(): (
40
40
  | SignalComputed<unknown>)[];
41
41
  ```
42
42
 
43
- Defined in: [packages/play-signals/src/types.ts:187](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L187)
43
+ Defined in: [packages/play-signals/src/types.ts:189](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L189)
44
44
 
45
- Get signals that changed since last check
45
+ Returns the signals that changed after the last check
46
46
 
47
47
  #### Returns
48
48
 
@@ -50,7 +50,7 @@ Get signals that changed since last check
50
50
  \| [`SignalState`](SignalState.md)\<`unknown`\>
51
51
  \| [`SignalComputed`](SignalComputed.md)\<`unknown`\>)[]
52
52
 
53
- Array of signals that have pending updates
53
+ The array of the signals with an update that waits
54
54
 
55
55
  ---
56
56
 
@@ -60,15 +60,15 @@ Array of signals that have pending updates
60
60
  unwatch(signal): void;
61
61
  ```
62
62
 
63
- Defined in: [packages/play-signals/src/types.ts:180](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L180)
63
+ Defined in: [packages/play-signals/src/types.ts:182](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L182)
64
64
 
65
- Stop watching a signal
65
+ Stops the watch of one signal
66
66
 
67
67
  #### Parameters
68
68
 
69
- | Parameter | Type | Description |
70
- | --------- | ----------------------------------------------------------------------------------------------------- | ------------------------ |
71
- | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | Signal to stop observing |
69
+ | Parameter | Type | Description |
70
+ | --------- | ----------------------------------------------------------------------------------------------------- | ------------------- |
71
+ | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | The signal to leave |
72
72
 
73
73
  #### Returns
74
74
 
@@ -82,15 +82,15 @@ Stop watching a signal
82
82
  watch(signal): void;
83
83
  ```
84
84
 
85
- Defined in: [packages/play-signals/src/types.ts:173](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L173)
85
+ Defined in: [packages/play-signals/src/types.ts:175](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L175)
86
86
 
87
- Start watching a signal for changes
87
+ Starts the watch of one signal
88
88
 
89
89
  #### Parameters
90
90
 
91
- | Parameter | Type | Description |
92
- | --------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------- |
93
- | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | Signal to observe (State or Computed) |
91
+ | Parameter | Type | Description |
92
+ | --------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------- |
93
+ | `signal` | \| [`SignalState`](SignalState.md)\<`unknown`\> \| [`SignalComputed`](SignalComputed.md)\<`unknown`\> | The signal to observe: a State or a Computed |
94
94
 
95
95
  #### Returns
96
96
 
@@ -6,12 +6,13 @@
6
6
  type WatcherNotify = () => void;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-signals/src/types.ts:139](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-signals/src/types.ts#L139)
9
+ Defined in: [packages/play-signals/src/types.ts:141](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-signals/src/types.ts#L141)
10
10
 
11
- Notification callback for Signal.subtle.Watcher
11
+ The notification callback of a Signal.subtle.Watcher
12
12
 
13
- Invoked when watched signals change. Use microtask batching pattern to coalesce
14
- rapid updates (see signal-polyfill README for best practices).
13
+ The watcher calls it after a signal that it watches changes. Use the microtask
14
+ batching pattern to group rapid updates. The README of signal-polyfill gives the
15
+ best practice.
15
16
 
16
17
  ## Returns
17
18
 
@@ -25,7 +26,7 @@ import { Signal } from "@xmachines/play-signals";
25
26
  const notify: WatcherNotify = () => {
26
27
  queueMicrotask(() => {
27
28
  const pending = watcher.getPending();
28
- // Process pending signal changes
29
+ // Process the signal changes that wait
29
30
  });
30
31
  };
31
32
  const watcher = new Signal.subtle.Watcher(notify);
@@ -1,14 +1,12 @@
1
1
  [API](../../README.md) / @xmachines/play-solid
2
2
 
3
- <!-- generated-by: gsd-doc-writer -->
4
-
5
3
  # @xmachines/play-solid
6
4
 
7
5
  > Solid renderer for XMachines Play architecture
8
6
 
9
- SolidJS rendering layer that passively observes actor signals and renders UI components via `@xmachines/json-render-solid`. SolidJS reactivity is used solely to trigger re-renders — TC39 Signals are the source of truth.
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-solid)
10
8
 
11
- Part of the [xmachines-js monorepo](../../README.md).
9
+ The SolidJS rendering layer observes the actor signals and renders the UI components through `@xmachines/json-render-solid`. SolidJS reactivity only triggers the re-render. The TC39 Signals are the source of truth.
12
10
 
13
11
  ## Installation
14
12
 
@@ -16,7 +14,7 @@ Part of the [xmachines-js monorepo](../../README.md).
16
14
  pnpm add @xmachines/play-solid
17
15
  ```
18
16
 
19
- **Peer dependencies** install alongside the package:
17
+ **Peer dependencies.** Install them with the package:
20
18
 
21
19
  ```bash
22
20
  pnpm add solid-js xstate @xstate/store @xmachines/json-render-solid @xmachines/json-render-core @xmachines/json-render-xstate
@@ -29,15 +27,24 @@ import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-so
29
27
  import { definePlayer } from "@xmachines/play-xstate";
30
28
  import { defineCatalog } from "@xmachines/json-render-core";
31
29
  import { schema } from "@xmachines/json-render-solid/schema";
30
+ import { myMachine } from "./machine.js"; // your xstate machine (states carry meta.view specs)
31
+ // authCatalogDef is a plain object describing components/actions — in this repo it
32
+ // comes from the workspace-only @xmachines/play-actor-shared demo package
33
+ import { authCatalogDef } from "@xmachines/play-actor-shared";
32
34
 
33
- // 1. Define a catalog (authCatalogDef is a plain object describing components/actions)
35
+ // 1. Define a catalog
34
36
  const catalog = defineCatalog(schema, authCatalogDef);
35
37
 
36
- // 2. Build a component registry
38
+ // 2. Create and start an actor
39
+ const createPlayer = definePlayer({ machine: myMachine });
40
+ const actor = createPlayer();
41
+ actor.start();
42
+
43
+ // 3. Build a component registry
37
44
  const registryResult = defineRegistry(catalog, {
38
45
  components: {
39
46
  Home: () => <div>Welcome home!</div>,
40
- Login: (ctx) => <div>Login {ctx.props.error && <span>{ctx.props.error}</span>}</div>,
47
+ Login: (ctx) => <div>Login {ctx.props.username && <span>{ctx.props.username}</span>}</div>,
41
48
  },
42
49
  actions: {
43
50
  login: async (args) => actor.send({ type: "auth.login", username: args.username }),
@@ -45,11 +52,6 @@ const registryResult = defineRegistry(catalog, {
45
52
  },
46
53
  });
47
54
 
48
- // 3. Create and start an actor
49
- const createPlayer = definePlayer({ machine: myMachine });
50
- const actor = createPlayer();
51
- actor.start();
52
-
53
55
  // 4. Render
54
56
  function App() {
55
57
  return (
@@ -64,30 +66,32 @@ function App() {
64
66
 
65
67
  ### `PlayUIProvider` + `PlayRenderer` (recommended)
66
68
 
67
- `PlayUIProvider` is the batteries-included entry point. It wraps `ActorProvider` and `JSONUIProvider` into a single composite provider. `PlayRenderer` is a zero-prop leaf component that reads view context and renders the current spec.
69
+ `PlayUIProvider` is the standard entry point. It wraps `ActorProvider` and `JSONUIProvider` into one composite provider. `PlayRenderer` is a leaf component without props. It reads the view context and renders the current spec.
68
70
 
69
71
  ```tsx
70
72
  import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-solid";
71
73
 
74
+ // actor, registryResult from the Quick Start above
72
75
  <PlayUIProvider
73
76
  actor={actor}
74
77
  registryResult={registryResult}
75
78
  fallback={<div>Loading…</div>}
76
79
  onError={(err) => console.error(err)}
77
- navigate={navigateFn} // optional: passed to JSONUIProvider
78
- validationFunctions={valFns} // optional: form validation helpers
80
+ navigate={navigateFn} // optional: your navigation callback, passed to JSONUIProvider
81
+ validationFunctions={valFns} // optional: your form validation helpers
79
82
  >
80
83
  <PlayRenderer />
81
84
  </PlayUIProvider>;
82
85
  ```
83
86
 
84
- ### `ActorProvider` (escape hatch)
87
+ ### `ActorProvider` (low-level)
85
88
 
86
89
  For library authors who need direct control over provider composition:
87
90
 
88
91
  ```tsx
89
92
  import { ActorProvider, PlayRenderer } from "@xmachines/play-solid";
90
93
 
94
+ // actor, registryResult from the Quick Start above
91
95
  <ActorProvider actor={actor} registryResult={registryResult}>
92
96
  <PlayRenderer />
93
97
  </ActorProvider>;
@@ -124,28 +128,28 @@ const MyRenderer = () => {
124
128
 
125
129
  ### Components
126
130
 
127
- | Export | Description |
128
- | ---------------- | ------------------------------------------------------------------------------ |
129
- | `PlayUIProvider` | Batteries-included composite provider (recommended entry point) |
130
- | `PlayRenderer` | Zero-prop leaf component; renders the current view spec inside a provider tree |
131
- | `ActorProvider` | Lower-level smart provider for escape-hatch composition |
131
+ | Export | Description |
132
+ | ---------------- | ----------------------------------------------------------------------------------------- |
133
+ | `PlayUIProvider` | The composite provider. Use it as the standard entry point |
134
+ | `PlayRenderer` | The leaf component without props. It renders the current view spec inside a provider tree |
135
+ | `ActorProvider` | The low-level provider for a custom provider composition |
132
136
 
133
137
  ### Hooks
134
138
 
135
- | Export | Description |
136
- | --------------- | --------------------------------------------------------------------------------------------- |
137
- | `useActor()` | Returns the raw `AnyPlayActor` instance from context; throws outside a provider tree |
138
- | `usePlayView()` | Returns the current `ViewContextValue` (spec, handlers, registry, store); throws outside tree |
139
+ | Export | Description |
140
+ | --------------- | ---------------------------------------------------------------------------------------------------- |
141
+ | `useActor()` | Returns the raw `AnyPlayActor` instance from the context. It throws outside a provider tree |
142
+ | `usePlayView()` | Returns the current `ViewContextValue` (spec, handlers, registry, store). It throws outside the tree |
139
143
 
140
144
  ### Context
141
145
 
142
- | Export | Description |
143
- | -------------- | -------------------------------------------------------------------------------------- |
144
- | `ActorContext` | SolidJS context for the actor; use `ActorContext.Provider` directly as an escape hatch |
146
+ | Export | Description |
147
+ | -------------- | ----------------------------------------------------------------------------------------------- |
148
+ | `ActorContext` | The SolidJS context of the actor. Use `ActorContext.Provider` directly for a custom composition |
145
149
 
146
150
  ### Re-exports from `@xmachines/json-render-solid`
147
151
 
148
- This package re-exports the full `@xmachines/json-render-solid` public API so consumers do not need a direct dependency:
152
+ This package re-exports the complete `@xmachines/json-render-solid` public API, so that a consumer does not need a direct dependency:
149
153
 
150
154
  ```tsx
151
155
  import {
@@ -174,12 +178,12 @@ import {
174
178
 
175
179
  ### Key Types
176
180
 
177
- | Type | Description |
178
- | --------------------- | ------------------------------------------------------------------------------ |
179
- | `PlayUIProviderProps` | Props for `PlayUIProvider` |
180
- | `ActorProviderProps` | Props for `ActorProvider` |
181
- | `ViewContextValue` | Shape of the context value from `usePlayView()` |
182
- | `AnyPlayActor` | `AbstractActor<AnyActorLogic>` — bare actor type accepted by context providers |
181
+ | Type | Description |
182
+ | --------------------- | -------------------------------------------------------------------------------------- |
183
+ | `PlayUIProviderProps` | Props for `PlayUIProvider` |
184
+ | `ActorProviderProps` | Props for `ActorProvider` |
185
+ | `ViewContextValue` | Shape of the context value from `usePlayView()` |
186
+ | `AnyPlayActor` | `AbstractActor<AnyActorLogic>` — the bare actor type that the context providers accept |
183
187
 
184
188
  ## Testing
185
189
 
@@ -197,17 +201,17 @@ pnpm run test:watch # watch mode
197
201
  pnpm run test:ui # interactive Vitest UI
198
202
  ```
199
203
 
200
- Coverage is collected with v8 (80% threshold for lines, functions, branches, and statements). Browser-specific tests live in `test/browser/` and are excluded from the default jsdom run.
204
+ The v8 provider collects the coverage, with a threshold of 80% for lines, functions, branches, and statements. The browser tests are in `test/browser/`. The default jsdom run excludes them.
201
205
 
202
206
  ## License
203
207
 
204
208
  MIT
205
209
 
206
- @xmachines/play-solid - SolidJS renderer for XMachines Play architecture
210
+ @xmachines/play-solid - SolidJS renderer for the XMachines Play architecture
207
211
 
208
- Provides a SolidJS rendering layer that passively observes actor signals and
209
- renders UI components via @xmachines/json-render-solid. SolidJS reactivity is only used
210
- to trigger re-renders signals are the source of truth.
212
+ This package is the SolidJS rendering layer. It observes the actor signals and
213
+ renders the UI components through @xmachines/json-render-solid. SolidJS
214
+ reactivity only triggers the re-render. The signals are the source of truth.
211
215
 
212
216
  Primary entry point:
213
217
 
@@ -215,7 +219,7 @@ Primary entry point:
215
219
  import { PlayUIProvider, PlayRenderer, defineRegistry } from "@xmachines/play-solid";
216
220
  ```
217
221
 
218
- For escape-hatch provider composition:
222
+ For a custom provider composition:
219
223
 
220
224
  ```tsx
221
225
  import { ActorProvider, ActorContext, usePlayView } from "@xmachines/play-solid";
@@ -6,7 +6,7 @@
6
6
  function useActor(): AnyPlayActor;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-solid/src/useActor.ts:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-solid/src/useActor.ts#L37)
9
+ Defined in: [packages/play-solid/src/useActor.ts:40](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-solid/src/useActor.ts#L40)
10
10
 
11
11
  ## Returns
12
12
 
@@ -6,9 +6,9 @@
6
6
  function usePlayView(): ViewContextValue;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-solid/src/ActorProvider.tsx:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-solid/src/ActorProvider.tsx#L75)
9
+ Defined in: [packages/play-solid/src/ActorProvider.tsx:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-solid/src/ActorProvider.tsx#L75)
10
10
 
11
- Hook to access the current view context inside an ActorProvider tree.
11
+ The hook that gives the current view context inside an ActorProvider tree.
12
12
 
13
13
  ## Returns
14
14
 
@@ -16,7 +16,7 @@ Hook to access the current view context inside an ActorProvider tree.
16
16
 
17
17
  ## Throws
18
18
 
19
- If called outside an ActorProvider (or PlayUIProvider) tree
19
+ When the caller is outside an ActorProvider tree or a PlayUIProvider tree
20
20
 
21
21
  ## Example
22
22
 
@@ -2,12 +2,12 @@
2
2
 
3
3
  # Interface: ActorProviderProps
4
4
 
5
- Defined in: [packages/play-solid/src/ActorProvider.tsx:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-solid/src/ActorProvider.tsx#L89)
5
+ Defined in: [packages/play-solid/src/ActorProvider.tsx:89](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-solid/src/ActorProvider.tsx#L89)
6
6
 
7
- Props for ActorProvider the escape hatch primitive.
7
+ The props of ActorProvider, the low-level provider.
8
8
 
9
- For batteries-included usage, prefer PlayUIProvider which wraps ActorProvider
10
- with JSONUIProvider and all required sub-providers.
9
+ For the standard use, prefer PlayUIProvider. That component wraps ActorProvider
10
+ with JSONUIProvider and with every necessary sub-provider.
11
11
 
12
12
  ## Extends
13
13
 
@@ -19,12 +19,12 @@ with JSONUIProvider and all required sub-providers.
19
19
 
20
20
  ## Properties
21
21
 
22
- | Property | Type | Description | Inherited from | Defined in |
23
- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
- | <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | Actor instance with currentView signal (requires Viewable capability). | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`actor`](../../play-actor/interfaces/BaseActorProviderProps.md#property-actor) | [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) |
25
- | <a id="property-children"></a> `children` | `any` | Children required; must include <PlayRenderer /> (or use PlayUIProvider shorthand) | - | [packages/play-solid/src/ActorProvider.tsx:97](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-solid/src/ActorProvider.tsx#L97) |
26
- | <a id="property-fallback"></a> `fallback?` | `any` | Optional fallback element shown when currentView is null or ErrorBoundary catches | - | [packages/play-solid/src/ActorProvider.tsx:91](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-solid/src/ActorProvider.tsx#L91) |
27
- | <a id="property-onerror"></a> `onError?` | (`error`) => `void` | Optional callback invoked when SolidJS ErrorBoundary catches an error | - | [packages/play-solid/src/ActorProvider.tsx:94](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0-alpha.1/packages/play-solid/src/ActorProvider.tsx#L94) |
28
- | <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | Called when an individual catalog component throws during render. Takes precedence over any onRenderError set via defineRegistry. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`onRenderError`](../../play-actor/interfaces/BaseActorProviderProps.md#property-onrendererror) | [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) |
29
- | <a id="property-registryresult"></a> `registryResult` | [`DefineRegistryResult`](DefineRegistryResult.md) | Full result from defineRegistry() contains the component registry and action handlers factory. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`registryResult`](../../play-actor/interfaces/BaseActorProviderProps.md#property-registryresult) | [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) |
30
- | <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. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`store`](../../play-actor/interfaces/BaseActorProviderProps.md#property-store) | [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) |
22
+ | Property | Type | Description | Inherited from | Defined in |
23
+ | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
24
+ | <a id="property-actor"></a> `actor` | [`AbstractActor`](../../play-actor/classes/AbstractActor.md)\<[`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic), [`EventObject`](https://www.jsdocs.io/package/xstate#EventObject)\> & [`Viewable`](../../play-actor/interfaces/Viewable.md) | The actor instance with the currentView signal. It requires the Viewable capability. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`actor`](../../play-actor/interfaces/BaseActorProviderProps.md#property-actor) | [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) |
25
+ | <a id="property-children"></a> `children` | `any` | The children. They are necessary, and they must hold a <PlayRenderer />. You can also use the PlayUIProvider short form | - | [packages/play-solid/src/ActorProvider.tsx:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-solid/src/ActorProvider.tsx#L101) |
26
+ | <a id="property-fallback"></a> `fallback?` | `any` | The optional fallback element. The provider shows it when currentView is null, and when the ErrorBoundary catches an error | - | [packages/play-solid/src/ActorProvider.tsx:93](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-solid/src/ActorProvider.tsx#L93) |
27
+ | <a id="property-onerror"></a> `onError?` | (`error`) => `void` | The optional callback. The provider calls it when the SolidJS ErrorBoundary catches an error | - | [packages/play-solid/src/ActorProvider.tsx:96](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-solid/src/ActorProvider.tsx#L96) |
28
+ | <a id="property-onrendererror"></a> `onRenderError?` | [`RenderErrorHandler`](../type-aliases/RenderErrorHandler.md) | The provider calls it when one catalog component throws during a render. This handler replaces every onRenderError of defineRegistry. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`onRenderError`](../../play-actor/interfaces/BaseActorProviderProps.md#property-onrendererror) | [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) |
29
+ | <a id="property-registryresult"></a> `registryResult` | [`DefineRegistryResult`](DefineRegistryResult.md) | The complete result of defineRegistry(). It holds the component registry and the factory of the action handlers. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`registryResult`](../../play-actor/interfaces/BaseActorProviderProps.md#property-registryresult) | [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) |
30
+ | <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. | [`BaseActorProviderProps`](../../play-actor/interfaces/BaseActorProviderProps.md).[`store`](../../play-actor/interfaces/BaseActorProviderProps.md#property-store) | [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) |