@xmachines/docs 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/README.md +11 -13
  2. package/api/@xmachines/play/README.md +58 -63
  3. package/api/@xmachines/play/classes/NonNullableError.md +7 -7
  4. package/api/@xmachines/play/classes/PlayError.md +25 -27
  5. package/api/@xmachines/play/functions/assertNonNullable.md +17 -17
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +26 -25
  7. package/api/@xmachines/play-actor/README.md +72 -63
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +39 -39
  9. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +19 -18
  10. package/api/@xmachines/play-actor/functions/composePlayState.md +9 -8
  11. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +5 -5
  12. package/api/@xmachines/play-actor/functions/guardContextWrites.md +27 -25
  13. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +12 -11
  14. package/api/@xmachines/play-actor/functions/reuseComposedState.md +23 -22
  15. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +6 -5
  16. package/api/@xmachines/play-actor/functions/toAtomState.md +16 -14
  17. package/api/@xmachines/play-actor/functions/typedSpec.md +12 -11
  18. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +17 -15
  19. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +15 -14
  20. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +13 -13
  21. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +4 -4
  22. package/api/@xmachines/play-actor/interfaces/Routable.md +4 -4
  23. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +11 -11
  24. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +7 -7
  25. package/api/@xmachines/play-actor/interfaces/Viewable.md +9 -9
  26. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +5 -5
  27. package/api/@xmachines/play-dom/README.md +119 -85
  28. package/api/@xmachines/play-dom/classes/PlayRenderer.md +34 -32
  29. package/api/@xmachines/play-dom/functions/createPlayUI.md +10 -10
  30. package/api/@xmachines/play-dom/functions/createRenderer.md +21 -17
  31. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +8 -8
  32. package/api/@xmachines/play-dom/interfaces/MountOptions.md +9 -9
  33. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +9 -9
  34. package/api/@xmachines/play-dom/type-aliases/MountFn.md +5 -5
  35. package/api/@xmachines/play-dom-router/README.md +66 -49
  36. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +116 -0
  37. package/api/@xmachines/play-dom-router/functions/connectRouter.md +4 -3
  38. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +16 -14
  39. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +12 -11
  40. package/api/@xmachines/play-dom-router/functions/createRouter.md +14 -14
  41. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +25 -26
  42. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +19 -18
  43. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +7 -7
  44. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +39 -33
  45. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +18 -17
  46. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +9 -9
  47. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +39 -38
  48. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +5 -5
  49. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +11 -10
  50. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +27 -24
  51. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +7 -7
  52. package/api/@xmachines/play-react/README.md +63 -54
  53. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +14 -13
  54. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  55. package/api/@xmachines/play-react/functions/usePlayView.md +4 -4
  56. package/api/@xmachines/play-react/functions/useSignalEffect.md +39 -39
  57. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +11 -11
  58. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +7 -7
  59. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +4 -4
  60. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +14 -14
  61. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +8 -8
  62. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +2 -2
  63. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +13 -0
  64. package/api/@xmachines/play-react/variables/ActorProvider.md +9 -8
  65. package/api/@xmachines/play-react/variables/PlayRenderer.md +5 -4
  66. package/api/@xmachines/play-react/variables/PlayUIProvider.md +6 -6
  67. package/api/@xmachines/play-react-router/README.md +37 -28
  68. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +22 -19
  69. package/api/@xmachines/play-react-router/classes/RouteMap.md +50 -48
  70. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +16 -14
  71. package/api/@xmachines/play-react-router/functions/createRouteMap.md +12 -11
  72. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +18 -18
  73. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +22 -20
  74. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +39 -33
  75. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  76. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  77. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +5 -5
  78. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +11 -10
  79. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +27 -24
  80. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  81. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +7 -6
  82. package/api/@xmachines/play-router/README.md +94 -82
  83. package/api/@xmachines/play-router/classes/RouteMap.md +50 -48
  84. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +29 -23
  85. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +6 -5
  86. package/api/@xmachines/play-router/functions/buildRouteTree.md +16 -15
  87. package/api/@xmachines/play-router/functions/createRouteMap.md +12 -11
  88. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +18 -18
  89. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +18 -17
  90. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +11 -10
  91. package/api/@xmachines/play-router/functions/extractQuery.md +3 -3
  92. package/api/@xmachines/play-router/functions/extractRouteParams.md +22 -19
  93. package/api/@xmachines/play-router/functions/findRouteById.md +10 -9
  94. package/api/@xmachines/play-router/functions/findRouteByPath.md +14 -12
  95. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +9 -9
  96. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +9 -9
  97. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +16 -15
  98. package/api/@xmachines/play-router/functions/isRouteReachable.md +12 -11
  99. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  100. package/api/@xmachines/play-router/functions/routeExists.md +8 -8
  101. package/api/@xmachines/play-router/functions/sanitizePathname.md +15 -13
  102. package/api/@xmachines/play-router/functions/validateRouteFormat.md +10 -10
  103. package/api/@xmachines/play-router/functions/validateStateExists.md +9 -9
  104. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  105. package/api/@xmachines/play-router/interfaces/LocationLike.md +9 -9
  106. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +7 -7
  107. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +9 -9
  108. package/api/@xmachines/play-router/interfaces/PlayActor.md +22 -20
  109. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +39 -33
  110. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +7 -7
  111. package/api/@xmachines/play-router/interfaces/RoutableActor.md +18 -17
  112. package/api/@xmachines/play-router/interfaces/RouteInfo.md +11 -11
  113. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +5 -5
  114. package/api/@xmachines/play-router/interfaces/RouteMapping.md +11 -10
  115. package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
  116. package/api/@xmachines/play-router/interfaces/RouteNode.md +13 -13
  117. package/api/@xmachines/play-router/interfaces/RouteObject.md +6 -6
  118. package/api/@xmachines/play-router/interfaces/RouteTree.md +11 -11
  119. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +13 -13
  120. package/api/@xmachines/play-router/interfaces/RouterBridge.md +27 -24
  121. package/api/@xmachines/play-router/interfaces/WindowLike.md +10 -10
  122. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +13 -0
  123. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +4 -3
  124. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +2 -2
  125. package/api/@xmachines/play-signals/README.md +38 -36
  126. package/api/@xmachines/play-signals/functions/watchSignal.md +15 -15
  127. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +6 -6
  128. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +10 -10
  129. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +6 -6
  130. package/api/@xmachines/play-signals/interfaces/SignalState.md +13 -13
  131. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +18 -18
  132. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +6 -5
  133. package/api/@xmachines/play-solid/README.md +46 -42
  134. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  135. package/api/@xmachines/play-solid/functions/usePlayView.md +3 -3
  136. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +13 -13
  137. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +14 -14
  138. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +9 -9
  139. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +2 -2
  140. package/api/@xmachines/play-solid/variables/ActorContext.md +5 -4
  141. package/api/@xmachines/play-solid/variables/ActorProvider.md +8 -7
  142. package/api/@xmachines/play-solid/variables/PlayRenderer.md +6 -4
  143. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +7 -7
  144. package/api/@xmachines/play-solid-router/README.md +34 -29
  145. package/api/@xmachines/play-solid-router/classes/RouteMap.md +50 -48
  146. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +43 -34
  147. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +15 -13
  148. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +12 -11
  149. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +39 -39
  150. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +22 -20
  151. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +39 -33
  152. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +10 -10
  153. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +11 -11
  154. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +5 -5
  155. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +11 -10
  156. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +27 -24
  157. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +5 -5
  158. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +2 -2
  159. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +11 -11
  160. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +9 -8
  161. package/api/@xmachines/play-svelte/README.md +40 -31
  162. package/api/@xmachines/play-svelte/functions/defineRegistry.md +9 -8
  163. package/api/@xmachines/play-svelte/functions/getActorContext.md +5 -4
  164. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +3 -3
  165. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  166. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +17 -15
  167. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +9 -9
  168. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +20 -18
  169. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +12 -11
  170. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +2 -2
  171. package/api/@xmachines/play-svelte-spa-router/README.md +25 -25
  172. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +50 -48
  173. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +133 -0
  174. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  175. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +12 -11
  176. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +7 -7
  177. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +39 -33
  178. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +5 -5
  179. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +11 -10
  180. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +27 -24
  181. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +10 -10
  182. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  183. package/api/@xmachines/play-sveltekit-router/README.md +38 -34
  184. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +50 -48
  185. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +132 -0
  186. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  187. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +12 -11
  188. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +6 -6
  189. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +9 -9
  190. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +39 -33
  191. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +5 -5
  192. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +11 -10
  193. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +27 -24
  194. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  195. package/api/@xmachines/play-tanstack-react-router/README.md +66 -48
  196. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +50 -48
  197. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +43 -38
  198. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +16 -14
  199. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +12 -11
  200. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +18 -18
  201. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +11 -10
  202. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +22 -20
  203. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +39 -33
  204. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +12 -12
  205. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +11 -11
  206. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +5 -5
  207. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +11 -10
  208. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +16 -11
  209. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +27 -24
  210. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  211. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  212. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +15 -13
  213. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +9 -8
  214. package/api/@xmachines/play-tanstack-router/README.md +37 -17
  215. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +43 -38
  216. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +9 -9
  217. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +15 -13
  218. package/api/@xmachines/play-tanstack-solid-router/README.md +71 -45
  219. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +50 -48
  220. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +38 -30
  221. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +15 -13
  222. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +12 -11
  223. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +22 -20
  224. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +39 -33
  225. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +11 -11
  226. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +9 -9
  227. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +5 -5
  228. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +11 -10
  229. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +27 -24
  230. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +2 -2
  231. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +2 -2
  232. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  233. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +15 -13
  234. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +7 -7
  235. package/api/@xmachines/play-vue/README.md +37 -35
  236. package/api/@xmachines/play-vue/functions/defineRegistry.md +10 -9
  237. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  238. package/api/@xmachines/play-vue/functions/usePlayView.md +28 -0
  239. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +10 -9
  240. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +13 -12
  241. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +10 -9
  242. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +6 -2
  243. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +2 -2
  244. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  245. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  246. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  247. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  248. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +34 -0
  249. package/api/@xmachines/play-vue-router/README.md +65 -56
  250. package/api/@xmachines/play-vue-router/classes/RouteMap.md +50 -48
  251. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +26 -19
  252. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +12 -11
  253. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +22 -20
  254. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +39 -33
  255. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +5 -5
  256. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +11 -10
  257. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +27 -24
  258. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +2 -2
  259. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +13 -0
  260. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +5 -5
  261. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +13 -0
  262. package/api/@xmachines/play-xstate/README.md +72 -70
  263. package/api/@xmachines/play-xstate/classes/PlayerActor.md +123 -112
  264. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +19 -16
  265. package/api/@xmachines/play-xstate/functions/composeGuards.md +25 -23
  266. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +20 -20
  267. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +15 -15
  268. package/api/@xmachines/play-xstate/functions/definePlayer.md +19 -19
  269. package/api/@xmachines/play-xstate/functions/deriveRoute.md +26 -25
  270. package/api/@xmachines/play-xstate/functions/eventMatches.md +8 -8
  271. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +16 -13
  272. package/api/@xmachines/play-xstate/functions/hasContext.md +8 -8
  273. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +10 -10
  274. package/api/@xmachines/play-xstate/functions/negateGuard.md +19 -18
  275. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +6 -6
  276. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +7 -7
  277. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +10 -10
  278. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +15 -14
  279. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  280. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +5 -5
  281. package/api/@xmachines/play-xstate/type-aliases/Guard.md +9 -9
  282. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +4 -3
  283. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +7 -7
  284. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +12 -12
  285. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  286. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +15 -14
  287. package/api/@xmachines/shared/README.md +11 -13
  288. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  289. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  290. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  291. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  292. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  293. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  294. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  295. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  296. package/contributing/development.md +28 -0
  297. package/guides/inspector.md +1 -1
  298. package/package.json +1 -1
  299. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +0 -28
@@ -2,14 +2,14 @@
2
2
 
3
3
  # Interface: ViewStoreResolution
4
4
 
5
- Defined in: [packages/play-actor/src/view-store-lifecycle.ts:35](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/view-store-lifecycle.ts#L35)
5
+ Defined in: [packages/play-actor/src/view-store-lifecycle.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L38)
6
6
 
7
- What a resolve produced — see [ViewStoreLifecycle.resolve](ViewStoreLifecycle.md#resolve).
7
+ The result of a resolve — see [ViewStoreLifecycle.resolve](ViewStoreLifecycle.md#resolve).
8
8
 
9
9
  ## Properties
10
10
 
11
- | Property | Type | Description | Defined in |
12
- | ------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
13
- | <a id="property-guardedstore"></a> `guardedStore` | `StateStore` | The store to hand children ($bindState, setState, chained set): writes under /context throw. One wrapper per underlying store the identity is cached so `useSyncExternalStore`-style consumers stay stable. | [packages/play-actor/src/view-store-lifecycle.ts:43](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/view-store-lifecycle.ts#L43) |
14
- | <a id="property-reseeded"></a> `reseeded` | `boolean` | True when this resolve created a fresh store (first resolve, viewKey change, per-emission fallback, actor swap). Providers that remount a subtree per store (Vue's storeKey) key on it. | [packages/play-actor/src/view-store-lifecycle.ts:49](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/view-store-lifecycle.ts#L49) |
15
- | <a id="property-store"></a> `store` | `StateStore` | The UNGUARDED store — the machinery's own refresh reference. | [packages/play-actor/src/view-store-lifecycle.ts:37](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/view-store-lifecycle.ts#L37) |
11
+ | Property | Type | Description | Defined in |
12
+ | ------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
13
+ | <a id="property-guardedstore"></a> `guardedStore` | `StateStore` | The store to give to the children ($bindState, setState, and a chained set): a write under /context throws. There is one wrapper for each store below it, and the code caches the identity. Therefore a consumer in the style of `useSyncExternalStore` stays stable. | [packages/play-actor/src/view-store-lifecycle.ts:47](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L47) |
14
+ | <a id="property-reseeded"></a> `reseeded` | `boolean` | It is true when this resolve made a new store: at the first resolve, on a change of the viewKey, in the fallback for each emission, and on a change of the actor. A provider that mounts a subtree again for each store, such as the storeKey of Vue, uses this field as its key. | [packages/play-actor/src/view-store-lifecycle.ts:54](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L54) |
15
+ | <a id="property-store"></a> `store` | `StateStore` | The store WITHOUT the guard — the reference of the machinery for its own refresh. | [packages/play-actor/src/view-store-lifecycle.ts:40](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/view-store-lifecycle.ts#L40) |
@@ -2,17 +2,17 @@
2
2
 
3
3
  # Interface: Viewable
4
4
 
5
- Defined in: [packages/play-actor/src/abstract-actor.ts:101](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/abstract-actor.ts#L101)
5
+ Defined in: [packages/play-actor/src/abstract-actor.ts:103](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L103)
6
6
 
7
- Actor capability for exposing renderable view state.
7
+ The actor capability that exposes a renderable view state.
8
8
 
9
- `Viewable` marks actors that publish a `currentView` signal.
10
- Renderers such as `PlayRenderer` consume this contract to resolve the
11
- current view description into concrete UI without embedding view logic inside the
12
- framework adapter.
9
+ `Viewable` marks an actor that publishes a `currentView` signal.
10
+ A renderer, such as `PlayRenderer`, reads this contract. It converts the
11
+ description of the current view into a concrete UI, and the framework adapter
12
+ therefore holds no view logic.
13
13
 
14
14
  ## Properties
15
15
 
16
- | Property | Modifier | Type | Description | Defined in |
17
- | ----------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
- | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](PlaySpec.md) \| `null`\> | Current view signal. Contains the json-render PlaySpec for the current machine state, or null when no view is active. Infrastructure renders view Logic-Driven UI invariant. | [packages/play-actor/src/abstract-actor.ts:108](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/abstract-actor.ts#L108) |
16
+ | Property | Modifier | Type | Description | Defined in |
17
+ | ----------------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](PlaySpec.md) \| `null`\> | The signal of the current view. It holds the json-render PlaySpec of the current machine state, or null when no view is active. The infrastructure renders the view. This is the Logic-Driven UI invariant. | [packages/play-actor/src/abstract-actor.ts:110](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/abstract-actor.ts#L110) |
@@ -6,10 +6,10 @@
6
6
  const CONTEXT_STATE_KEY: "context" = "context";
7
7
  ```
8
8
 
9
- Defined in: [packages/play-actor/src/context-projection.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.0.0/packages/play-actor/src/context-projection.ts#L31)
9
+ Defined in: [packages/play-actor/src/context-projection.ts:32](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.0/packages/play-actor/src/context-projection.ts#L32)
10
10
 
11
- The reserved top-level state key the projection materializes under.
11
+ The reserved top-level state key of the projection.
12
12
 
13
- A view's authored `spec.state` must not declare this key when it does, the
14
- projection is skipped for that view (the authored state wins) and a dev
15
- warning is emitted. See [composePlayState](../functions/composePlayState.md).
13
+ The `spec.state` object of a view must not declare this key. When it does, the
14
+ derivation skips the projection for that view, the authored state wins, and the
15
+ code writes a warning in development. See [composePlayState](../functions/composePlayState.md).
@@ -4,9 +4,7 @@
4
4
 
5
5
  Vanilla DOM renderer for XMachines Play architecture with signal-driven rendering.
6
6
 
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.0.0-blue)](https://www.npmjs.com/package/@xmachines/play-dom)
8
-
9
- Part of the [XMachines Play monorepo](../../README.md).
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Version](https://img.shields.io/badge/version-2.1.0-blue)](https://www.npmjs.com/package/@xmachines/play-dom)
10
8
 
11
9
  ## Installation
12
10
 
@@ -24,7 +22,9 @@ pnpm add xstate @xstate/store @xmachines/json-render-core @xmachines/json-render
24
22
 
25
23
  ```typescript
26
24
  import { createRenderer, schema } from "@xmachines/play-dom";
25
+ import { definePlayer } from "@xmachines/play-xstate";
27
26
  import { defineCatalog } from "@xmachines/json-render-core";
27
+ import { createMachine } from "xstate";
28
28
  import { z } from "zod";
29
29
  import type { ComponentFn } from "@xmachines/play-dom";
30
30
 
@@ -59,10 +59,36 @@ const Login: ComponentFn<typeof catalog, "Login"> = ({ props, on }) => {
59
59
  // 3. Build the factory once (module scope)
60
60
  const mount = createRenderer(catalog, { Home, Login });
61
61
 
62
- // 4. Mount when actor and container are ready
62
+ // 4. Create and start an actor states carry meta.view specs naming catalog components
63
+ const machine = createMachine({
64
+ initial: "home",
65
+ states: {
66
+ home: {
67
+ on: { "goto.login": "login" },
68
+ meta: {
69
+ view: {
70
+ root: "root",
71
+ elements: { root: { type: "Home", props: { title: "Home" }, children: [] } },
72
+ },
73
+ },
74
+ },
75
+ login: {
76
+ meta: {
77
+ view: {
78
+ root: "root",
79
+ elements: { root: { type: "Login", props: { title: "Login" }, children: [] } },
80
+ },
81
+ },
82
+ },
83
+ },
84
+ });
85
+ const actor = definePlayer({ machine })();
86
+ actor.start();
87
+
88
+ // 5. Mount when actor and container are ready
63
89
  const disconnect = mount(actor, document.getElementById("app")!);
64
90
 
65
- // 5. Cleanup on teardown
91
+ // 6. Cleanup on teardown
66
92
  disconnect();
67
93
  ```
68
94
 
@@ -70,7 +96,7 @@ disconnect();
70
96
 
71
97
  ### `createRenderer` — one-call factory (recommended)
72
98
 
73
- `createRenderer` is the simplest integration path. Call it once at module scope with your catalog and component map, then call the returned `mount` function for each actor/container pair.
99
+ `createRenderer` is the simplest integration path. Call it one time at module scope, with your catalog and your component map. Then call the `mount` function that it returns, one time for each pair of an actor and a container.
74
100
 
75
101
  ```typescript
76
102
  import { createRenderer, schema } from "@xmachines/play-dom";
@@ -80,16 +106,17 @@ const catalog = defineCatalog(schema, {/* ... */});
80
106
 
81
107
  const mount = createRenderer(catalog, { MyComponent });
82
108
 
109
+ // actor from the Quick Start
83
110
  const disconnect = mount(actor, document.getElementById("app")!);
84
111
  // Returns a cleanup function — call it to stop rendering and clear the container.
85
112
  disconnect();
86
113
  ```
87
114
 
88
- ### `createPlayUI` — batteries-included factory with full options
115
+ ### `createPlayUI` — the complete factory with every option
89
116
 
90
- Use `createPlayUI` when you need render error handling, a fallback element, navigation integration, computed functions, or custom validation or when you need to reference `registryResult` programmatically (e.g. for `executeAction`).
117
+ Use `createPlayUI` when you need a render error handler, a fallback element, a navigation integration, a computed function, or a custom check. Use it also when your code needs the `registryResult` value, for example for `executeAction`.
91
118
 
92
- Factory-level options (`functions`, `validationFunctions`, `navigate`, `onRenderError`, `fallback`) are closed over at creation time and applied on every `mount()` call. Per-mount options (`store`, `loading`) are passed to `mount()` itself.
119
+ The factory holds the factory options (`functions`, `validationFunctions`, `navigate`, `onRenderError`, and `fallback`) from the moment of its creation, and it applies them on every `mount()` call. Give the mount options (`store` and `loading`) to `mount()` itself.
93
120
 
94
121
  ```typescript
95
122
  import { defineRegistry, createPlayUI, schema } from "@xmachines/play-dom";
@@ -97,6 +124,7 @@ import { defineCatalog } from "@xmachines/json-render-core";
97
124
 
98
125
  const catalog = defineCatalog(schema, {/* ... */});
99
126
 
127
+ // Home, Login, actor from the Quick Start
100
128
  const registryResult = defineRegistry(catalog, {
101
129
  components: { Home, Login },
102
130
  actions: {
@@ -122,13 +150,15 @@ disconnect();
122
150
 
123
151
  ### `PlayRenderer` — class-based lifecycle control
124
152
 
125
- Use `PlayRenderer` directly when you need explicit `connect()` / `disconnect()` lifecycle control, or when integrating into a system that manages the renderer's lifetime externally.
153
+ Use `PlayRenderer` directly when you need the explicit `connect()` and `disconnect()` control, or when you integrate the renderer into a system that controls its life itself.
126
154
 
127
155
  ```typescript
128
156
  import { PlayRenderer, defineRegistry, schema } from "@xmachines/play-dom";
129
157
 
158
+ // catalog, actor from the Quick Start; components/actions as in the createPlayUI example
130
159
  const registryResult = defineRegistry(catalog, { components, actions });
131
160
 
161
+ // container: your mount element, e.g. document.getElementById("app")!
132
162
  const renderer = new PlayRenderer(container, actor, registryResult.registry, { registryResult });
133
163
 
134
164
  renderer.connect();
@@ -136,15 +166,16 @@ renderer.connect();
136
166
  renderer.disconnect();
137
167
  ```
138
168
 
139
- **Controlled store mode** supply an external `StateStore` so the renderer shares state with other parts of your app:
169
+ **Controlled store mode.** Give the renderer an external `StateStore`. The renderer then shares the state with the other parts of your application:
140
170
 
141
171
  ```typescript
142
172
  import { createAtom } from "@xstate/store";
143
173
  import { xstateStoreStateStore } from "@xmachines/json-render-xstate";
144
174
 
145
- const atom = createAtom({ username: "" });
175
+ const atom = createAtom<Record<string, unknown>>({ username: "" });
146
176
  const store = xstateStoreStateStore({ atom });
147
177
 
178
+ // container, actor, registryResult from the previous example
148
179
  const renderer = new PlayRenderer(container, actor, registryResult.registry, {
149
180
  registryResult,
150
181
  store,
@@ -154,11 +185,11 @@ renderer.connect();
154
185
 
155
186
  ## Provider Options
156
187
 
157
- All entry points (`createPlayUI`, `PlayRenderer`) accept the same set of UI-provider options via `UIProviderOptions`. These are forwarded into `DomRenderContext` on every render pass, making them available to component implementations via `ctx.ctx.*`.
188
+ Every entry point (`createPlayUI` and `PlayRenderer`) accepts the same UI-provider options, through `UIProviderOptions`. Each render pass puts the options into `DomRenderContext`. A component implementation therefore reads them at `ctx.ctx.*`.
158
189
 
159
190
  ### `functions` — named compute functions for `$computed` prop expressions
160
191
 
161
- Enables `{ "$computed": "name", "args": {...} }` dynamic prop values in specs. Each function receives the resolved `args` object and returns the computed value.
192
+ This option permits a dynamic prop value of the form `{ "$computed": "name", "args": {...} }` in a spec. Each function receives the resolved `args` object, and it returns the computed value.
162
193
 
163
194
  ```typescript
164
195
  const mount = createPlayUI(registryResult, {
@@ -169,13 +200,13 @@ const mount = createPlayUI(registryResult, {
169
200
  });
170
201
  ```
171
202
 
172
- Without `functions`, any `$computed` expression silently resolves to `undefined` (no throw, backward-compatible).
203
+ Without `functions`, every `$computed` expression resolves to `undefined`. Nothing throws, and the old behavior stays.
173
204
 
174
205
  ### `validationFunctions` — custom field validation
175
206
 
176
- Provides named validation functions for inline field validation within components. Functions receive `(value, args?)` and return `true` (valid) or `false` (invalid).
207
+ This option gives the named check functions for a field check inside a component. Each function receives `(value, args?)`. It returns `true` for a valid value, or `false` for an invalid value.
177
208
 
178
- Unlike the framework renderers, the DOM renderer has no automatic `ValidationProvider` tree. Components must invoke validation explicitly using `runValidationCheck` / `runValidation` from `@xmachines/json-render-core`, passing `ctx.ctx.validationFunctions` as `customFunctions`.
209
+ The DOM renderer has no `ValidationProvider` tree, and in this it is different from the framework renderers. Each component must call the check itself, with `runValidationCheck` or `runValidation` from `@xmachines/json-render-core`. Give `ctx.ctx.validationFunctions` to the call as `customFunctions`.
179
210
 
180
211
  ```typescript
181
212
  import { runValidationCheck } from "@xmachines/json-render-core";
@@ -187,19 +218,21 @@ const mount = createPlayUI(registryResult, {
187
218
  },
188
219
  });
189
220
 
190
- // Inside a ComponentFn:
191
- const MyField: ComponentFn<typeof catalog, "MyField"> = ({ ctx }) => {
221
+ // Inside a ComponentFn (catalog from the Quick Start):
222
+ const Login: ComponentFn<typeof catalog, "Login"> = ({ ctx }) => {
223
+ const someValue = 42; // the value to validate, e.g. read from an input
192
224
  const result = runValidationCheck(
193
225
  { type: "isEven", message: "must be even" },
194
226
  { value: someValue, stateModel: {}, customFunctions: ctx.ctx.validationFunctions },
195
227
  );
196
228
  // result.valid, result.message
229
+ return null;
197
230
  };
198
231
  ```
199
232
 
200
233
  ### `navigate` — programmatic navigation from action bindings
201
234
 
202
- A callback invoked when an action binding resolves with `onSuccess: { navigate: "/path" }`. The resolved path string is passed as the sole argument. Integrate with any router:
235
+ The renderer calls this callback when an action binding resolves with `onSuccess: { navigate: "/path" }`. The callback receives the resolved path string as its only argument. Use it with every router:
203
236
 
204
237
  ```typescript
205
238
  // React Router / TanStack Router / any push-based router:
@@ -221,17 +254,17 @@ With a spec binding:
221
254
  }
222
255
  ```
223
256
 
224
- When `submitForm` completes successfully, `navigate("/dashboard")` is called automatically.
257
+ `submitForm` completes without an error, and the renderer then calls `navigate("/dashboard")`.
225
258
 
226
- The function is also readable by component implementations directly via `ctx.ctx.navigate` for cases where navigation needs to be triggered outside of an action binding.
259
+ A component implementation can also read the function at `ctx.ctx.navigate`. Use this when a navigation must start outside an action binding.
227
260
 
228
261
  ### `onRenderError` — unified error handler
229
262
 
230
- Receives `(error, name)` for three distinct error classes:
263
+ The handler receives `(error, name)` for three different classes of error:
231
264
 
232
- - **Component render errors** — when a `ComponentFn` throws synchronously during `renderSpec`. `name` is the catalog component name (e.g. `"Home"`).
233
- - **Action handler rejections (emit path)** — when an `ActionFn` throws or returns a rejected promise during `emit()`. `name` is the catalog action name (e.g. `"submitForm"`).
234
- - **Action handler rejections (watch path)** — when an `ActionFn` rejects during a `watch` binding callback. `name` is the catalog action name.
265
+ - **A component render error** — a `ComponentFn` throws synchronously during `renderSpec`. `name` is then the catalog component name, for example `"Home"`.
266
+ - **An action handler rejection on the emit path** — an `ActionFn` throws, or it returns a rejected promise, during `emit()`. `name` is then the catalog action name, for example `"submitForm"`.
267
+ - **An action handler rejection on the watch path** — an `ActionFn` rejects during a `watch` binding callback. `name` is then the catalog action name.
235
268
 
236
269
  ```typescript
237
270
  const mount = createPlayUI(registryResult, {
@@ -242,19 +275,20 @@ const mount = createPlayUI(registryResult, {
242
275
  });
243
276
  ```
244
277
 
245
- The argument order matches the upstream `RenderErrorHandler` type from `@xmachines/json-render-core`: **error first, name second**. This is consistent with the framework renderers (`@xmachines/json-render-solid`, `@xmachines/json-render-react`).
278
+ The order of the arguments is the same as in the `RenderErrorHandler` type of `@xmachines/json-render-core`: **the error first, the name second**. The framework renderers (`@xmachines/json-render-solid` and `@xmachines/json-render-react`) use the same order.
246
279
 
247
- Without `onRenderError`, all three error types are logged via `console.error` and swallowed. No exception propagates, and no unhandled promise rejection is created.
280
+ Without `onRenderError`, the renderer writes all three types of error to `console.error`, then stops them. No exception goes to the caller, and no promise rejection stays unhandled.
248
281
 
249
- The handler is also available to component implementations via `ctx.ctx.onRenderError`, enabling components to route their own internal errors through the same channel:
282
+ A component implementation can also read the handler at `ctx.ctx.onRenderError`. A component therefore sends its own internal errors through the same channel:
250
283
 
251
284
  ```typescript
252
- const MyComponent: ComponentFn<typeof catalog, "MyComponent"> = ({ ctx }) => {
285
+ // catalog from the Quick Start; doSomethingRisky: your render logic that may throw
286
+ const Home: ComponentFn<typeof catalog, "Home"> = ({ ctx }) => {
253
287
  try {
254
288
  const el = doSomethingRisky();
255
289
  return el;
256
290
  } catch (err) {
257
- ctx.ctx.onRenderError?.(err, "MyComponent");
291
+ ctx.ctx.onRenderError?.(err, "Home");
258
292
  return null;
259
293
  }
260
294
  };
@@ -264,42 +298,42 @@ const MyComponent: ComponentFn<typeof catalog, "MyComponent"> = ({ ctx }) => {
264
298
 
265
299
  ### XMachines Layer
266
300
 
267
- | Export | Kind | Description |
268
- | ---------------------------------------- | -------- | --------------------------------------------------------------------------- |
269
- | `createRenderer(catalog, components)` | function | One-call factory returns `mount(actor, container, options?) → disconnect` |
270
- | `createPlayUI(registryResult, options?)` | function | Batteries-included factory returns `MountFn` |
271
- | `PlayRenderer` | class | Class-based renderer with `connect()` / `disconnect()` lifecycle |
272
- | `defineRegistry(catalog, options)` | function | Build a catalog-typed `DomRegistry` with typed handlers |
273
- | `renderSpec(...)` | function | Pure Spec → DOM renderer (low-level) |
274
- | `schema` | const | The `@xmachines/json-render-dom` schema — pass to `defineCatalog()` |
301
+ | Export | Kind | Description |
302
+ | ---------------------------------------- | -------- | --------------------------------------------------------------------------------- |
303
+ | `createRenderer(catalog, components)` | function | The one-call factory. It returns `mount(actor, container, options?) → disconnect` |
304
+ | `createPlayUI(registryResult, options?)` | function | The complete factory. It returns a `MountFn` |
305
+ | `PlayRenderer` | class | The renderer class, with a `connect()` and `disconnect()` lifecycle |
306
+ | `defineRegistry(catalog, options)` | function | Build a catalog-typed `DomRegistry` with typed handlers |
307
+ | `renderSpec(...)` | function | The pure low-level Spec → DOM renderer |
308
+ | `schema` | const | The `@xmachines/json-render-dom` schema — pass to `defineCatalog()` |
275
309
 
276
310
  ### Key Types
277
311
 
278
- | Type | Description |
279
- | ------------------------ | ------------------------------------------------------------------------------------------ |
280
- | `ComponentFn<C, K>` | Catalog-typed component function — returns `HTMLElement \| Text \| null` |
281
- | `ComponentContext<C, K>` | Context passed to each component: `props`, `children`, `emit`, `on`, `bindings`, `ctx` |
282
- | `ActionFn<C, K>` | Catalog-typed action function — receives `(params, setState, state)` |
283
- | `EventHandle` | Handle returned by `on(eventName)` has `emit()`, `shouldPreventDefault`, `bound` |
284
- | `SetState` | State updater: `(prev => next) => void` |
285
- | `DefineRegistryResult` | Result from `defineRegistry` has `registry`, `handlers`, `executeAction` |
286
- | `PlayDomOptions` | Options for `PlayRenderer` — extends `UIProviderOptions` |
287
- | `CreatePlayUIOptions` | Options for `createPlayUI` — extends `UIProviderOptions`, adds `fallback` |
288
- | `MountOptions` | Per-mount options for `MountFn`: `store`, `loading` |
289
- | `MountFn` | The mount function returned by `createPlayUI`: `(actor, container, options?) → disconnect` |
290
- | `UIProviderOptions` | Shared options: `functions`, `validationFunctions`, `navigate`, `onRenderError` |
291
- | `BaseComponentProps<P>` | Catalog-agnostic component props for shared component libraries |
292
- | `DomRegistry` | Raw registry type: `Record<string, DomComponentRenderer>` |
293
- | `DomSchema` | Type of the `schema` export |
294
- | `ComputedFunction` | Type for named compute functions used with the `functions` option |
295
-
296
- ## Rendering Behaviour
297
-
298
- - **Initial render is synchronous** — the container is populated before `connect()` returns.
299
- - **Signal-driven re-renders are microtask-deferred** — `watchSignal` schedules updates on the next microtask queue tick.
300
- - **Null view** clears the container. A `fallback` element can be shown on initial mount when the view is `null`; it is **not** re-appended if the view later transitions back to `null` after a non-null view.
301
- - **Double `connect()` is safe** — calling `connect()` on an already-connected renderer auto-disconnects first.
302
- - **`disconnect()` clears the container** and unsubscribes all signal and store watchers.
312
+ | Type | Description |
313
+ | ------------------------ | --------------------------------------------------------------------------------------------- |
314
+ | `ComponentFn<C, K>` | Catalog-typed component function — returns `HTMLElement \| Text \| null` |
315
+ | `ComponentContext<C, K>` | The context of each component: `props`, `children`, `emit`, `on`, `bindings`, and `ctx` |
316
+ | `ActionFn<C, K>` | Catalog-typed action function — receives `(params, setState, state)` |
317
+ | `EventHandle` | The handle that `on(eventName)` returns. It has `emit()`, `shouldPreventDefault`, and `bound` |
318
+ | `SetState` | State updater: `(prev => next) => void` |
319
+ | `DefineRegistryResult` | The result of `defineRegistry`. It has `registry`, `handlers`, and `executeAction` |
320
+ | `PlayDomOptions` | Options for `PlayRenderer` — extends `UIProviderOptions` |
321
+ | `CreatePlayUIOptions` | Options for `createPlayUI` — extends `UIProviderOptions`, adds `fallback` |
322
+ | `MountOptions` | Per-mount options for `MountFn`: `store`, `loading` |
323
+ | `MountFn` | The mount function that `createPlayUI` returns: `(actor, container, options?) → disconnect` |
324
+ | `UIProviderOptions` | Shared options: `functions`, `validationFunctions`, `navigate`, `onRenderError` |
325
+ | `BaseComponentProps<P>` | Catalog-agnostic component props for shared component libraries |
326
+ | `DomRegistry` | Raw registry type: `Record<string, DomComponentRenderer>` |
327
+ | `DomSchema` | Type of the `schema` export |
328
+ | `ComputedFunction` | The type of a named compute function for the `functions` option |
329
+
330
+ ## Rendering Behavior
331
+
332
+ - **The first render is synchronous** — the renderer fills the container before `connect()` returns.
333
+ - **A signal-driven render waits for a microtask** — `watchSignal` puts each update on the next tick of the microtask queue.
334
+ - **A null view** clears the container. The renderer can show a `fallback` element on the first mount, when the view is `null`. It does **not** add that element again when the view returns to `null` after a view that was not null.
335
+ - **A second `connect()` is safe** — a `connect()` call on a connected renderer disconnects it first.
336
+ - **`disconnect()` clears the container** and cancels every signal watcher and store watcher.
303
337
 
304
338
  ## Testing
305
339
 
@@ -311,33 +345,33 @@ pnpm test
311
345
  pnpm run test:coverage
312
346
  ```
313
347
 
314
- Tests live in `test/` and use [Vitest](https://vitest.dev/) with a jsdom environment. Coverage thresholds: 80% lines, functions, branches, and statements.
348
+ The tests are in `test/`. They use [Vitest](https://vitest.dev/) in a jsdom environment. The coverage thresholds are 80% for lines, functions, branches, and statements.
315
349
 
316
- @xmachines/play-dom — Vanilla DOM renderer for XMachines Play architecture.
350
+ @xmachines/play-dom — the vanilla DOM renderer of the XMachines Play architecture.
317
351
 
318
- Public API split into two layers:
352
+ The public API has two layers:
319
353
 
320
- **XMachines layer** (this package):
354
+ **The XMachines layer**, in this package:
321
355
 
322
- - `createRenderer()` — one-call factory: returns `mount(actor, container, options?) → disconnect`
323
- - `createPlayUI()` — batteries-included factory with full options: returns `MountFn`
324
- - `PlayRenderer` — class-based renderer with `connect()` / `disconnect()` lifecycle
356
+ - `createRenderer()` — the one-call factory. It returns `mount(actor, container, options?) → disconnect`
357
+ - `createPlayUI()` — the complete factory, with every option. It returns a `MountFn`
358
+ - `PlayRenderer` — the renderer class, with a `connect()` and `disconnect()` lifecycle
325
359
  - `PlayDomOptions`, `CreatePlayUIOptions`, `MountFn`, `MountOptions`
326
360
 
327
- **json-render layer** (re-exported from @xmachines/json-render-dom):
328
-
329
- - `defineRegistry` — build a catalog-typed DomRegistry
330
- - `renderSpec` — pure Spec → DOM renderer (uses resolveElementProps from core)
331
- - `ComponentFn` — catalog-typed component function type
332
- - `ComponentContext` — catalog-typed render context (props, emit, on, children, bindings)
333
- - `ComponentRegistry` — catalog-typed registry input type
334
- - `DomComponentRenderer` — raw element-level renderer type
335
- - `DomRegistry` — raw registry type
336
- - `DomRenderContext` — raw render context
337
- - `EventHandle` — event handle returned by on()
338
- - `SetState` — state updater function passed to ActionFn
339
- - `CatalogHasActions` — conditional type: true when catalog declares actions
340
- - `BaseComponentProps` — base props type for catalog component definitions
361
+ **The json-render layer**, re-exported from @xmachines/json-render-dom:
362
+
363
+ - `defineRegistry` — it builds a catalog-typed DomRegistry
364
+ - `renderSpec` — the pure Spec → DOM renderer. It uses resolveElementProps of the core
365
+ - `ComponentFn` — the catalog-typed type of a component function
366
+ - `ComponentContext` — the catalog-typed render context: props, emit, on, children, bindings
367
+ - `ComponentRegistry` — the catalog-typed input type of the registry
368
+ - `DomComponentRenderer` — the raw renderer type of one element
369
+ - `DomRegistry` — the raw registry type
370
+ - `DomRenderContext` — the raw render context
371
+ - `EventHandle` — the event handle that on() returns
372
+ - `SetState` — the state updater function of an ActionFn
373
+ - `CatalogHasActions` — the conditional type. It is true when the catalog declares an action
374
+ - `BaseComponentProps` — the base props type of a catalog component definition
341
375
 
342
376
  ## Classes
343
377