@xmachines/docs 1.0.0-beta.46 → 1.0.0-beta.50

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 (347) hide show
  1. package/README.md +135 -7
  2. package/api/@xmachines/play/README.md +134 -57
  3. package/api/@xmachines/play/classes/NonNullableError.md +4 -4
  4. package/api/@xmachines/play/classes/PlayError.md +4 -4
  5. package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
  6. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  7. package/api/@xmachines/play-actor/README.md +130 -155
  8. package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
  9. package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
  10. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
  11. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
  12. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  13. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  14. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  15. package/api/@xmachines/play-dom/README.md +140 -232
  16. package/api/@xmachines/play-dom/classes/PlayRenderer.md +4 -4
  17. package/api/@xmachines/play-dom/functions/connectRenderer.md +1 -1
  18. package/api/@xmachines/play-dom/functions/createPlayUI.md +1 -1
  19. package/api/@xmachines/play-dom/functions/createRenderer.md +1 -1
  20. package/api/@xmachines/play-dom/functions/defineRegistry.md +1 -1
  21. package/api/@xmachines/play-dom/functions/renderSpec.md +3 -3
  22. package/api/@xmachines/play-dom/interfaces/ComponentContext.md +7 -7
  23. package/api/@xmachines/play-dom/interfaces/ConnectRendererOptions.md +13 -13
  24. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +6 -6
  25. package/api/@xmachines/play-dom/interfaces/DefineRegistryResult.md +4 -4
  26. package/api/@xmachines/play-dom/interfaces/DomRenderContext.md +12 -12
  27. package/api/@xmachines/play-dom/interfaces/EventHandle.md +4 -4
  28. package/api/@xmachines/play-dom/interfaces/MountOptions.md +3 -3
  29. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +5 -5
  30. package/api/@xmachines/play-dom/interfaces/UIProviderOptions.md +5 -5
  31. package/api/@xmachines/play-dom/type-aliases/ActionFn.md +1 -1
  32. package/api/@xmachines/play-dom/type-aliases/Actions.md +1 -1
  33. package/api/@xmachines/play-dom/type-aliases/BaseComponentProps.md +7 -7
  34. package/api/@xmachines/play-dom/type-aliases/CatalogHasActions.md +1 -1
  35. package/api/@xmachines/play-dom/type-aliases/ComponentFn.md +1 -1
  36. package/api/@xmachines/play-dom/type-aliases/ComponentRegistry.md +1 -1
  37. package/api/@xmachines/play-dom/type-aliases/DefineRegistryOptions.md +2 -2
  38. package/api/@xmachines/play-dom/type-aliases/DomComponentRenderer.md +1 -1
  39. package/api/@xmachines/play-dom/type-aliases/DomRegistry.md +1 -1
  40. package/api/@xmachines/play-dom/type-aliases/DomSchema.md +1 -1
  41. package/api/@xmachines/play-dom/type-aliases/MountFn.md +1 -1
  42. package/api/@xmachines/play-dom/type-aliases/SetState.md +1 -1
  43. package/api/@xmachines/play-dom/variables/schema.md +1 -1
  44. package/api/@xmachines/play-dom-router/README.md +160 -158
  45. package/api/@xmachines/play-dom-router/functions/connectRouter.md +1 -1
  46. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +1 -1
  47. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
  48. package/api/@xmachines/play-dom-router/functions/createRouter.md +1 -1
  49. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +14 -14
  50. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +14 -14
  51. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +4 -4
  52. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
  53. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
  54. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
  55. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
  56. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
  57. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
  58. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +4 -4
  59. package/api/@xmachines/play-dom-router/type-aliases/RoutableActor.md +1 -1
  60. package/api/@xmachines/play-react/README.md +109 -320
  61. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +5 -5
  62. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  63. package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
  64. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  65. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +8 -8
  66. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +4 -4
  67. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +3 -3
  68. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +8 -8
  69. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
  70. package/api/@xmachines/play-react/type-aliases/PlayActor.md +1 -1
  71. package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
  72. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  73. package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
  74. package/api/@xmachines/play-react-router/README.md +107 -124
  75. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +23 -23
  76. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  77. package/api/@xmachines/play-react-router/functions/PlayRouterProvider.md +1 -1
  78. package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
  79. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  80. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
  81. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  82. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
  83. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  84. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  85. package/api/@xmachines/play-router/README.md +235 -475
  86. package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
  87. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +23 -23
  88. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  89. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  90. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  91. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
  92. package/api/@xmachines/play-router/functions/createRouteMatcher.md +1 -1
  93. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  94. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  95. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  96. package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
  97. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  98. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  99. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  100. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  101. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  102. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  103. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  104. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  105. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  106. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  107. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  108. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +4 -4
  109. package/api/@xmachines/play-router/interfaces/LocationLike.md +3 -3
  110. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +3 -3
  111. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +5 -5
  112. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +6 -6
  113. package/api/@xmachines/play-router/interfaces/RouteInfo.md +8 -8
  114. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +2 -2
  115. package/api/@xmachines/play-router/interfaces/RouteMapping.md +3 -3
  116. package/api/@xmachines/play-router/interfaces/RouteMatch.md +3 -3
  117. package/api/@xmachines/play-router/interfaces/RouteMatcher.md +4 -4
  118. package/api/@xmachines/play-router/interfaces/RouteNode.md +10 -10
  119. package/api/@xmachines/play-router/interfaces/RouteObject.md +2 -2
  120. package/api/@xmachines/play-router/interfaces/RouteTree.md +5 -5
  121. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  122. package/api/@xmachines/play-router/interfaces/RouterBridge.md +3 -3
  123. package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
  124. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  125. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  126. package/api/@xmachines/play-signals/README.md +105 -73
  127. package/api/@xmachines/play-signals/functions/watchSignal.md +1 -1
  128. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  129. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  130. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  131. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  132. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  133. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  134. package/api/@xmachines/play-solid/README.md +117 -263
  135. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  136. package/api/@xmachines/play-solid/functions/usePlayView.md +1 -1
  137. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +8 -8
  138. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +8 -8
  139. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +5 -5
  140. package/api/@xmachines/play-solid/type-aliases/PlayActor.md +1 -1
  141. package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
  142. package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
  143. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  144. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
  145. package/api/@xmachines/play-solid-router/README.md +93 -606
  146. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  147. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +24 -24
  148. package/api/@xmachines/play-solid-router/functions/PlayRouterProvider.md +1 -1
  149. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  150. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
  151. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
  152. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  153. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
  154. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  155. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  156. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  157. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  158. package/api/@xmachines/play-svelte/README.md +111 -103
  159. package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
  160. package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
  161. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +1 -1
  162. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  163. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +8 -8
  164. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
  165. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +11 -11
  166. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
  167. package/api/@xmachines/play-svelte/type-aliases/PlayActor.md +1 -1
  168. package/api/@xmachines/play-svelte-spa-router/README.md +156 -17
  169. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
  170. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +1 -1
  171. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
  172. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +4 -4
  173. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
  174. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
  175. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
  176. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  177. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
  178. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  179. package/api/@xmachines/play-sveltekit-router/README.md +168 -17
  180. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
  181. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +1 -1
  182. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
  183. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +4 -4
  184. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
  185. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
  186. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
  187. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
  188. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  189. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  190. package/api/@xmachines/play-tanstack-react-router/README.md +147 -122
  191. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  192. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +23 -23
  193. package/api/@xmachines/play-tanstack-react-router/functions/PlayRouterProvider.md +1 -1
  194. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  195. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  196. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  197. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
  198. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +5 -5
  199. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
  200. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  201. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  202. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  203. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  204. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +4 -4
  205. package/api/@xmachines/play-tanstack-solid-router/README.md +195 -173
  206. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  207. package/api/@xmachines/play-tanstack-solid-router/classes/SolidRouterBridge.md +24 -24
  208. package/api/@xmachines/play-tanstack-solid-router/functions/PlayRouterProvider.md +1 -1
  209. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  210. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
  211. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +5 -5
  212. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
  213. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  214. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  215. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  216. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  217. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +3 -3
  218. package/api/@xmachines/play-vue/README.md +126 -271
  219. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  220. package/api/@xmachines/play-vue/functions/getPlayViewContext.md +1 -1
  221. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  222. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +5 -5
  223. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +8 -8
  224. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
  225. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
  226. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  227. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  228. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  229. package/api/@xmachines/play-vue/type-aliases/PlayActor.md +1 -1
  230. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  231. package/api/@xmachines/play-vue-router/README.md +148 -528
  232. package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
  233. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +24 -24
  234. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  235. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
  236. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
  237. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
  238. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  239. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  240. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +1 -1
  241. package/api/@xmachines/play-xstate/README.md +167 -496
  242. package/api/@xmachines/play-xstate/classes/PlayerActor.md +12 -12
  243. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  244. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  245. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  246. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  247. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  248. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  249. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  250. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  251. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  252. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  253. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  254. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  255. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  256. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +6 -6
  257. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  258. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  259. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  260. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  261. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  262. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  263. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  264. package/api/@xmachines/shared/README.md +81 -294
  265. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  266. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  267. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  268. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  269. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  270. package/contributing/README.md +10 -0
  271. package/contributing/configuration.md +540 -0
  272. package/contributing/deployment.md +314 -0
  273. package/contributing/development.md +617 -0
  274. package/contributing/testing.md +460 -0
  275. package/examples/@xmachines/play-dom-demo/README.md +3 -3
  276. package/examples/@xmachines/play-dom-demo/functions/createNavBar.md +1 -1
  277. package/examples/@xmachines/play-dom-demo/functions/initShell.md +1 -1
  278. package/examples/@xmachines/play-dom-demo/type-aliases/AuthCatalog.md +1 -1
  279. package/examples/@xmachines/play-dom-demo/variables/About.md +1 -1
  280. package/examples/@xmachines/play-dom-demo/variables/Contact.md +1 -1
  281. package/examples/@xmachines/play-dom-demo/variables/Dashboard.md +1 -1
  282. package/examples/@xmachines/play-dom-demo/variables/Home.md +1 -1
  283. package/examples/@xmachines/play-dom-demo/variables/Login.md +1 -1
  284. package/examples/@xmachines/play-dom-demo/variables/NavBarView.md +1 -1
  285. package/examples/@xmachines/play-dom-demo/variables/Navigation.md +1 -1
  286. package/examples/@xmachines/play-dom-demo/variables/Overview.md +1 -1
  287. package/examples/@xmachines/play-dom-demo/variables/Profile.md +1 -1
  288. package/examples/@xmachines/play-dom-demo/variables/Settings.md +1 -1
  289. package/examples/@xmachines/play-dom-demo/variables/Stats.md +1 -1
  290. package/examples/@xmachines/play-dom-demo/variables/authCatalog.md +1 -1
  291. package/examples/@xmachines/play-dom-router-demo/README.md +2 -2
  292. package/examples/@xmachines/play-react-demo/README.md +1 -1
  293. package/examples/@xmachines/play-react-demo/functions/App.md +1 -1
  294. package/examples/@xmachines/play-react-demo/type-aliases/AuthCatalog.md +1 -1
  295. package/examples/@xmachines/play-react-demo/variables/About.md +1 -1
  296. package/examples/@xmachines/play-react-demo/variables/Contact.md +1 -1
  297. package/examples/@xmachines/play-react-demo/variables/Dashboard.md +1 -1
  298. package/examples/@xmachines/play-react-demo/variables/DebugPanel.md +1 -1
  299. package/examples/@xmachines/play-react-demo/variables/Home.md +1 -1
  300. package/examples/@xmachines/play-react-demo/variables/Login.md +1 -1
  301. package/examples/@xmachines/play-react-demo/variables/NavBar.md +1 -1
  302. package/examples/@xmachines/play-react-demo/variables/NavBarView.md +1 -1
  303. package/examples/@xmachines/play-react-demo/variables/Navigation.md +1 -1
  304. package/examples/@xmachines/play-react-demo/variables/Overview.md +1 -1
  305. package/examples/@xmachines/play-react-demo/variables/Profile.md +1 -1
  306. package/examples/@xmachines/play-react-demo/variables/Settings.md +1 -1
  307. package/examples/@xmachines/play-react-demo/variables/Shell.md +1 -1
  308. package/examples/@xmachines/play-react-demo/variables/Stats.md +1 -1
  309. package/examples/@xmachines/play-react-demo/variables/authCatalog.md +1 -1
  310. package/examples/@xmachines/play-react-router-demo/README.md +1 -1
  311. package/examples/@xmachines/play-solid-demo/README.md +1 -1
  312. package/examples/@xmachines/play-solid-demo/functions/App.md +1 -1
  313. package/examples/@xmachines/play-solid-demo/type-aliases/AuthCatalog.md +1 -1
  314. package/examples/@xmachines/play-solid-demo/variables/About.md +1 -1
  315. package/examples/@xmachines/play-solid-demo/variables/Contact.md +1 -1
  316. package/examples/@xmachines/play-solid-demo/variables/Dashboard.md +1 -1
  317. package/examples/@xmachines/play-solid-demo/variables/DebugPanel.md +1 -1
  318. package/examples/@xmachines/play-solid-demo/variables/Home.md +1 -1
  319. package/examples/@xmachines/play-solid-demo/variables/Login.md +1 -1
  320. package/examples/@xmachines/play-solid-demo/variables/NavBar.md +1 -1
  321. package/examples/@xmachines/play-solid-demo/variables/NavBarView.md +1 -1
  322. package/examples/@xmachines/play-solid-demo/variables/Navigation.md +1 -1
  323. package/examples/@xmachines/play-solid-demo/variables/Overview.md +1 -1
  324. package/examples/@xmachines/play-solid-demo/variables/Profile.md +1 -1
  325. package/examples/@xmachines/play-solid-demo/variables/Settings.md +1 -1
  326. package/examples/@xmachines/play-solid-demo/variables/Shell.md +1 -1
  327. package/examples/@xmachines/play-solid-demo/variables/Stats.md +1 -1
  328. package/examples/@xmachines/play-solid-demo/variables/authCatalog.md +1 -1
  329. package/examples/@xmachines/play-svelte-demo/README.md +1 -1
  330. package/examples/@xmachines/play-svelte-demo/type-aliases/AuthCatalog.md +1 -1
  331. package/examples/@xmachines/play-svelte-demo/variables/authCatalog.md +1 -1
  332. package/examples/@xmachines/play-svelte-spa-router-demo/README.md +2 -2
  333. package/examples/@xmachines/play-sveltekit-router-demo/README.md +2 -2
  334. package/examples/@xmachines/play-vue-demo/README.md +1 -1
  335. package/examples/@xmachines/play-vue-demo/type-aliases/AuthCatalog.md +1 -1
  336. package/examples/@xmachines/play-vue-demo/variables/App.md +1 -1
  337. package/examples/@xmachines/play-vue-demo/variables/authCatalog.md +1 -1
  338. package/examples/README.md +24 -25
  339. package/examples/form-validation.md +2 -2
  340. package/guides/README.md +11 -7
  341. package/guides/actor-model.md +18 -18
  342. package/guides/architecture.md +500 -0
  343. package/guides/getting-started.md +351 -142
  344. package/guides/signals.md +19 -19
  345. package/guides/state-machines.md +16 -16
  346. package/package.json +7 -5
  347. package/guides/installation.md +0 -257
package/guides/signals.md CHANGED
@@ -27,7 +27,7 @@ This model is sometimes called _glitch-free reactivity_: intermediate invalid st
27
27
 
28
28
  ## The three Signal primitives
29
29
 
30
- XMachines uses three primitives from the [TC39 Signals proposal](https://github.com/tc39/proposal-signals), accessed via `@xmachines/play-signals`:
30
+ XMachines uses three primitives from the [TC39 Signals proposal](https://github.com/tc39/proposal-signals), accessed via [`@xmachines/play-signals`](../api/@xmachines/play-signals/README.md):
31
31
 
32
32
  ### `Signal.State` — writable values
33
33
 
@@ -78,13 +78,13 @@ actor.currentRoute.get(); // initial read required to arm the watcher
78
78
 
79
79
  Watcher notifications are **one-shot**: if you do not call `watch()` again after draining pending signals, you will miss subsequent changes.
80
80
 
81
- Router bridges and renderers use `Signal.subtle.Watcher` internally. For most application code, the `watchSignal()` helper covers the common case.
81
+ Router bridges and renderers use `Signal.subtle.Watcher` internally. For most application code, the [`watchSignal()`](../api/@xmachines/play-signals/functions/watchSignal.md) helper covers the common case.
82
82
 
83
83
  ---
84
84
 
85
- ## `watchSignal()` — the safe helper
85
+ ## [`watchSignal()`](../api/@xmachines/play-signals/functions/watchSignal.md) — the safe helper
86
86
 
87
- `@xmachines/play-signals` exports `watchSignal(signal, onValue)` as a lifecycle-safe wrapper around the raw watcher pattern. It returns a cleanup function:
87
+ [`@xmachines/play-signals`](../api/@xmachines/play-signals/README.md) exports [`watchSignal(signal, onValue)`](../api/@xmachines/play-signals/functions/watchSignal.md) as a lifecycle-safe wrapper around the raw watcher pattern. It returns a cleanup function:
88
88
 
89
89
  ```typescript
90
90
  import { watchSignal } from "@xmachines/play-signals";
@@ -97,15 +97,15 @@ const stop = watchSignal(actor.currentRoute, (route) => {
97
97
  stop();
98
98
  ```
99
99
 
100
- `watchSignal()` handles three subtle correctness concerns for you:
100
+ [`watchSignal()`](../api/@xmachines/play-signals/functions/watchSignal.md) handles three subtle correctness concerns for you:
101
101
 
102
- | Concern | What happens without it | How `watchSignal` handles it |
103
- | ---------------------- | -------------------------------------------------- | ---------------------------------------------------------------------- |
104
- | **Use-after-free** | Callback fires after component unmounts | `disposed` flag checked before invoking callback |
105
- | **Coalescing** | Rapid synchronous changes cause multiple callbacks | `needsEnqueue` guard — only one microtask queued per synchronous burst |
106
- | **Idempotent cleanup** | Calling the cleanup twice throws | Safe to call multiple times |
102
+ | Concern | What happens without it | How [`watchSignal`](../api/@xmachines/play-signals/functions/watchSignal.md) handles it |
103
+ | ---------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------- |
104
+ | **Use-after-free** | Callback fires after component unmounts | `disposed` flag checked before invoking callback |
105
+ | **Coalescing** | Rapid synchronous changes cause multiple callbacks | `needsEnqueue` guard — only one microtask queued per synchronous burst |
106
+ | **Idempotent cleanup** | Calling the cleanup twice throws | Safe to call multiple times |
107
107
 
108
- Use `watchSignal()` in framework adapters and application code. Use the raw `Signal.subtle.Watcher` only when building infrastructure that needs to watch multiple signals independently.
108
+ Use [`watchSignal()`](../api/@xmachines/play-signals/functions/watchSignal.md) in framework adapters and application code. Use the raw `Signal.subtle.Watcher` only when building infrastructure that needs to watch multiple signals independently.
109
109
 
110
110
  ---
111
111
 
@@ -113,7 +113,7 @@ Use `watchSignal()` in framework adapters and application code. Use the raw `Sig
113
113
 
114
114
  The XMachines architecture chose TC39 Signals over observable libraries and event emitters for three reasons:
115
115
 
116
- **1. Standardization.** Signals are a Stage 1 TC39 proposal. They are not tied to any library, bundler, or framework. Isolating the polyfill behind `@xmachines/play-signals` means the entire ecosystem can migrate to native signals when the proposal lands, with a single package update.
116
+ **1. Standardization.** Signals are a Stage 1 TC39 proposal. They are not tied to any library, bundler, or framework. Isolating the polyfill behind [`@xmachines/play-signals`](../api/@xmachines/play-signals/README.md) means the entire ecosystem can migrate to native signals when the proposal lands, with a single package update.
117
117
 
118
118
  **2. Synchronous atomic propagation.** RxJS streams are asynchronous by default. Event emitters fire immediately but serially — a listener registered halfway through a sequence can see inconsistent state. Signals propagate atomically: all computeds update before any watcher fires.
119
119
 
@@ -139,7 +139,7 @@ The Play RFC defines five invariants that govern how signals are used:
139
139
 
140
140
  Signals do not clean themselves up when they go out of scope. Every watcher you create must be explicitly disposed when the consuming component or adapter unmounts.
141
141
 
142
- - Framework lifecycle hooks (`useEffect` cleanup in React, `onUnmounted` in Vue, `onCleanup` in Solid) must call `unwatch()` or the cleanup returned by `watchSignal()`.
142
+ - Framework lifecycle hooks (`useEffect` cleanup in React, `onUnmounted` in Vue, `onCleanup` in Solid) must call `unwatch()` or the cleanup returned by [`watchSignal()`](../api/@xmachines/play-signals/functions/watchSignal.md).
143
143
  - Router bridge `disconnect()` methods must unwatch all signal subscriptions.
144
144
  - If you use the raw `Signal.subtle.Watcher` API, pair every `watch()` call with `unwatch()` in teardown.
145
145
 
@@ -149,12 +149,12 @@ Failing to clean up watchers causes memory leaks and stale callbacks firing afte
149
149
 
150
150
  ## Summary
151
151
 
152
- | Primitive | Role in XMachines | Who uses it |
153
- | ----------------------- | ---------------------------------------------- | ---------------------------------- |
154
- | `Signal.State` | Actor output: writable snapshot and view state | Actor writes; infrastructure reads |
155
- | `Signal.Computed` | Lazy derivations: routes, view specs | Actor defines; adapters read |
156
- | `Signal.subtle.Watcher` | Low-level reactive observation | Framework adapters, router bridges |
157
- | `watchSignal()` | Lifecycle-safe single-signal subscription | Application code, adapter code |
152
+ | Primitive | Role in XMachines | Who uses it |
153
+ | -------------------------------------------------------------------------- | ---------------------------------------------- | ---------------------------------- |
154
+ | `Signal.State` | Actor output: writable snapshot and view state | Actor writes; infrastructure reads |
155
+ | `Signal.Computed` | Lazy derivations: routes, view specs | Actor defines; adapters read |
156
+ | `Signal.subtle.Watcher` | Low-level reactive observation | Framework adapters, router bridges |
157
+ | [`watchSignal()`](../api/@xmachines/play-signals/functions/watchSignal.md) | Lifecycle-safe single-signal subscription | Application code, adapter code |
158
158
 
159
159
  ## See also
160
160
 
@@ -24,7 +24,7 @@ In traditional component-level state (e.g., boolean flags, `useState` combinatio
24
24
 
25
25
  ## How XMachines uses XState v5
26
26
 
27
- XMachines wraps XState v5 via `@xmachines/play-xstate`. You define machines using XState's `setup().createMachine()` API:
27
+ XMachines wraps XState v5 via [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md). You define machines using XState's `setup().createMachine()` API:
28
28
 
29
29
  ```typescript
30
30
  import { setup } from "xstate";
@@ -124,13 +124,13 @@ const appMachine = setup({
124
124
 
125
125
  `meta.route` is a string path. When the machine enters a state, `actor.currentRoute` (a `Signal.Computed`) derives this path and emits it. The router bridge reads it and updates the URL.
126
126
 
127
- `meta.view` is a `PlaySpec` — a `@json-render/core` spec object describing what to render. Use `typedSpec<TContext>(...)` from `@xmachines/play-actor` to validate `contextProps` entries at compile time. When the machine enters a state, `actor.currentView` is updated with this spec. The renderer reads it and projects it through framework components.
127
+ `meta.view` is a [`PlaySpec`](../api/@xmachines/play-actor/interfaces/PlaySpec.md) — a `@json-render/core` spec object describing what to render. Use `typedSpec<TContext>(...)` from [`@xmachines/play-actor`](../api/@xmachines/play-actor/README.md) to validate `contextProps` entries at compile time. When the machine enters a state, `actor.currentView` is updated with this spec. The renderer reads it and projects it through framework components.
128
128
 
129
129
  **The machine is the single source of truth for both routing and views.** There is no separate route configuration file. There is no switch statement in a component deciding what to render based on the URL. The state machine encodes all of that.
130
130
 
131
131
  ---
132
132
 
133
- ## `formatPlayRouteTransitions` — automatic route event wiring
133
+ ## [`formatPlayRouteTransitions`](../api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md) — automatic route event wiring
134
134
 
135
135
  For routing to work, the machine must respond to `play.route` events (sent by router bridges when the user navigates). Writing these transitions by hand is mechanical:
136
136
 
@@ -150,7 +150,7 @@ states: {
150
150
  }
151
151
  ```
152
152
 
153
- `formatPlayRouteTransitions` from `@xmachines/play-xstate` generates these transitions automatically from the `id` and `meta.route` fields you already have:
153
+ [`formatPlayRouteTransitions`](../api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md) from [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md) generates these transitions automatically from the `id` and `meta.route` fields you already have:
154
154
 
155
155
  ```typescript
156
156
  import { formatPlayRouteTransitions } from "@xmachines/play-xstate";
@@ -170,7 +170,7 @@ const appMachine = setup({
170
170
  );
171
171
  ```
172
172
 
173
- `formatPlayRouteTransitions` inspects all state nodes with a `meta.route` and generates the corresponding `play.route` guard transitions. The machine's context must include `params` and `query` fields (populated by the router bridge when params or query strings are present):
173
+ [`formatPlayRouteTransitions`](../api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md) inspects all state nodes with a `meta.route` and generates the corresponding `play.route` guard transitions. The machine's context must include `params` and `query` fields (populated by the router bridge when params or query strings are present):
174
174
 
175
175
  ```typescript
176
176
  types: {
@@ -202,16 +202,16 @@ Guards are evaluated by XState before a transition fires. If the guard returns `
202
202
 
203
203
  This is the **Actor Authority** invariant in practice: the machine decides, infrastructure adjusts.
204
204
 
205
- XMachines provides guard combinators in `@xmachines/play-xstate` for composing complex conditions:
205
+ XMachines provides guard combinators in [`@xmachines/play-xstate`](../api/@xmachines/play-xstate/README.md) for composing complex conditions:
206
206
 
207
- | Function | What it does |
208
- | --------------------------------- | --------------------------------------- |
209
- | `composeGuards(...guards)` | AND — all guards must pass |
210
- | `composeGuardsOr(...guards)` | OR — any guard must pass |
211
- | `negateGuard(guard)` | NOT — inverts the guard result |
212
- | `hasContext(key)` | Checks that a context field is non-null |
213
- | `contextFieldMatches(key, value)` | Checks a context field against a value |
214
- | `eventMatches(type)` | Checks the event type |
207
+ | Function | What it does |
208
+ | --------------------------------------------------------------------------------------------------- | --------------------------------------- |
209
+ | [`composeGuards(...guards)`](../api/@xmachines/play-xstate/functions/composeGuards.md) | AND — all guards must pass |
210
+ | [`composeGuardsOr(...guards)`](../api/@xmachines/play-xstate/functions/composeGuardsOr.md) | OR — any guard must pass |
211
+ | [`negateGuard(guard)`](../api/@xmachines/play-xstate/functions/negateGuard.md) | NOT — inverts the guard result |
212
+ | [`hasContext(key)`](../api/@xmachines/play-xstate/functions/hasContext.md) | Checks that a context field is non-null |
213
+ | [`contextFieldMatches(key, value)`](../api/@xmachines/play-xstate/functions/contextFieldMatches.md) | Checks a context field against a value |
214
+ | [`eventMatches(type)`](../api/@xmachines/play-xstate/functions/eventMatches.md) | Checks the event type |
215
215
 
216
216
  ---
217
217
 
@@ -261,7 +261,7 @@ actor.start();
261
261
  // Actor resumes from where it left off
262
262
  ```
263
263
 
264
- `definePlayer` accepts an optional `restore` argument for this purpose. Restoration is useful for server-side rendering (hydrate with the server's snapshot), session persistence (resume after page reload), and testing (start from a known mid-flow state).
264
+ [`definePlayer`](../api/@xmachines/play-xstate/functions/definePlayer.md) accepts an optional `restore` argument for this purpose. Restoration is useful for server-side rendering (hydrate with the server's snapshot), session persistence (resume after page reload), and testing (start from a known mid-flow state).
265
265
 
266
266
  ---
267
267
 
@@ -283,6 +283,6 @@ actor.start();
283
283
  - [Understanding TC39 Signals](signals.md) — how the actor's state is observed by infrastructure
284
284
  - [Getting Started](getting-started.md) — step-by-step walkthrough building your first machine and actor
285
285
  - [Routing Patterns](../examples/routing-patterns.md) — worked examples of `meta.route` and guards
286
- - [@xmachines/play-xstate README](../api/@xmachines/play-xstate/README.md) — full API reference for `definePlayer`, `PlayerActor`, guard combinators
286
+ - [@xmachines/play-xstate README](../api/@xmachines/play-xstate/README.md) — full API reference for [`definePlayer`](../api/@xmachines/play-xstate/functions/definePlayer.md), [`PlayerActor`](../api/@xmachines/play-xstate/classes/PlayerActor.md), guard combinators
287
287
  - [XState v5 documentation](https://stately.ai/docs/xstate) — upstream state machine library documentation
288
288
  - [Play RFC](../rfc/play.md) — complete architectural specification
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xmachines/docs",
3
- "version": "1.0.0-beta.46",
3
+ "version": "1.0.0-beta.50",
4
4
  "description": "Documentation for XMachines",
5
5
  "keywords": [
6
6
  "documentation",
@@ -20,6 +20,7 @@
20
20
  },
21
21
  "files": [
22
22
  "api",
23
+ "contributing",
23
24
  "examples",
24
25
  "guides",
25
26
  "rfc",
@@ -33,6 +34,7 @@
33
34
  "import": "./index.js"
34
35
  },
35
36
  "./api/*": "./api/*",
37
+ "./contributing/*": "./contributing/*",
36
38
  "./examples/*": "./examples/*",
37
39
  "./guides/*": "./guides/*",
38
40
  "./rfc/*": "./rfc/*"
@@ -49,12 +51,12 @@
49
51
  "test": "vitest run"
50
52
  },
51
53
  "devDependencies": {
52
- "@xmachines/shared": "1.0.0-beta.46",
53
- "oxfmt": "^0.45.0",
54
- "oxlint": "^1.60.0",
54
+ "@xmachines/shared": "1.0.0-beta.50",
55
+ "oxfmt": "^0.47.0",
56
+ "oxlint": "^1.62.0",
55
57
  "typedoc": "^0.28.19",
56
58
  "typedoc-plugin-llms-txt": "^0.1.2",
57
59
  "typedoc-plugin-markdown": "^4.11.0",
58
- "vitest": "^4.1.4"
60
+ "vitest": "^4.1.5"
59
61
  }
60
62
  }
@@ -1,257 +0,0 @@
1
- <!-- generated-by: gsd-doc-writer -->
2
-
3
- # Installation
4
-
5
- Install XMachines packages for your platform.
6
-
7
- ## Prerequisites
8
-
9
- - **Node.js 22+** (or compatible runtime)
10
- - **TypeScript 5.7+** with `strict: true` and `"type": "module"` in `package.json`
11
- - A package manager: npm, pnpm, or yarn
12
-
13
- XMachines packages are **ESM-only** — no CommonJS builds. All packages use `"type": "module"`.
14
-
15
- ## Core Packages
16
-
17
- The minimum installation for defining machines and actors:
18
-
19
- ```bash
20
- npm install @xmachines/play-xstate @xmachines/play-actor @xmachines/play-signals xstate
21
- ```
22
-
23
- | Package | Role |
24
- | ------------------------- | ----------------------------------------------------------- |
25
- | `xstate` | XState v5 peer dependency — `setup`, `assign`, etc. |
26
- | `@xmachines/play-xstate` | `definePlayer`, `formatPlayRouteTransitions`, `PlayerActor` |
27
- | `@xmachines/play-actor` | `AbstractActor`, `typedSpec` — actor base class |
28
- | `@xmachines/play-signals` | TC39 Signals polyfill, `watchSignal` |
29
-
30
- ### Minimal working example
31
-
32
- ```typescript
33
- import { setup } from "xstate";
34
- import { definePlayer } from "@xmachines/play-xstate";
35
-
36
- const machine = setup({
37
- types: {
38
- context: {} as { count: number },
39
- events: {} as { type: "increment" },
40
- input: {} as undefined,
41
- },
42
- }).createMachine({
43
- id: "counter",
44
- initial: "idle",
45
- context: { count: 0 },
46
- states: {
47
- idle: {},
48
- },
49
- });
50
-
51
- const createPlayer = definePlayer({ machine });
52
- const actor = createPlayer();
53
- actor.start();
54
-
55
- console.log("✓ XMachines installed successfully");
56
- console.log("Current state:", actor.getSnapshot().value);
57
-
58
- actor.stop();
59
- ```
60
-
61
- Run with:
62
-
63
- ```bash
64
- npx tsx my-script.ts
65
- ```
66
-
67
- ## Framework-Specific Additions
68
-
69
- ### Vanilla DOM
70
-
71
- ```bash
72
- npm install @xmachines/play-dom @xmachines/play-dom-router @xmachines/play-router @json-render/core
73
- ```
74
-
75
- | Package | Role |
76
- | ---------------------------- | -------------------------------------------------------------------------------- |
77
- | `@xmachines/play-dom` | `createRenderer`, `connectRenderer`, `defineRegistry`, `ComponentFn`, `ActionFn` |
78
- | `@xmachines/play-dom-router` | `connectRouter`, `createBrowserHistory`, `createRouter`, `createRouteMap` |
79
- | `@xmachines/play-router` | `extractMachineRoutes`, `getRoutableRoutes`, `formatPlayRouteTransitions` |
80
- | `@json-render/core` | Catalog and schema definitions (`defineCatalog`) |
81
-
82
- ### React
83
-
84
- ```bash
85
- npm install @xmachines/play-react @xmachines/play-router @json-render/core @json-render/react
86
- ```
87
-
88
- With routing:
89
-
90
- ```bash
91
- # TanStack React Router
92
- npm install @xmachines/play-tanstack-react-router @tanstack/react-router
93
-
94
- # React Router v7
95
- npm install @xmachines/play-react-router react-router
96
- ```
97
-
98
- | Package | Role |
99
- | --------------------------------------- | ---------------------------------------------------------------- |
100
- | `@xmachines/play-react` | `PlayRenderer`, `defineRegistry` |
101
- | `@xmachines/play-tanstack-react-router` | `PlayRouterProvider`, `createRouteMapFromTree` |
102
- | `@xmachines/play-react-router` | `PlayRouterProvider`, `createRouteMapFromTree` (React Router v7) |
103
-
104
- ### Vue 3
105
-
106
- ```bash
107
- npm install @xmachines/play-vue @xmachines/play-vue-router @xmachines/play-router @json-render/core vue-router
108
- ```
109
-
110
- | Package | Role |
111
- | ---------------------------- | -------------------------------------- |
112
- | `@xmachines/play-vue` | `PlayRenderer`, `defineRegistry` |
113
- | `@xmachines/play-vue-router` | `PlayRouterProvider`, `createRouteMap` |
114
-
115
- ### SolidJS
116
-
117
- ```bash
118
- npm install @xmachines/play-solid @xmachines/play-router @json-render/core
119
-
120
- # With router:
121
- npm install @xmachines/play-solid-router @solidjs/router
122
- # or TanStack:
123
- npm install @xmachines/play-tanstack-solid-router @tanstack/solid-router
124
- ```
125
-
126
- | Package | Role |
127
- | --------------------------------------- | ------------------------------------------------------- |
128
- | `@xmachines/play-solid` | `PlayRenderer`, `defineRegistry` |
129
- | `@xmachines/play-solid-router` | `PlayRouterProvider`, `createRouteMap` (SolidJS Router) |
130
- | `@xmachines/play-tanstack-solid-router` | `PlayRouterProvider`, `createRouteMap` (TanStack Solid) |
131
-
132
- ### Svelte 5
133
-
134
- ```bash
135
- npm install @xmachines/play-svelte @xmachines/play-router @json-render/core
136
-
137
- # With SvelteKit routing:
138
- npm install @xmachines/play-sveltekit-router
139
-
140
- # With svelte-spa-router (hash routing):
141
- npm install @xmachines/play-svelte-spa-router
142
- ```
143
-
144
- | Package | Role |
145
- | ----------------------------------- | ----------------------------------------------------- |
146
- | `@xmachines/play-svelte` | `PlayRenderer`, `defineRegistry` |
147
- | `@xmachines/play-sveltekit-router` | `connectRouter`, `createRouteMap` (SvelteKit) |
148
- | `@xmachines/play-svelte-spa-router` | `connectRouter`, `createRouteMap` (svelte-spa-router) |
149
-
150
- ## TypeScript Configuration
151
-
152
- All XMachines packages require TypeScript strict mode and ESM module resolution.
153
-
154
- **Recommended `tsconfig.json`:**
155
-
156
- ```json
157
- {
158
- "compilerOptions": {
159
- "target": "ESNext",
160
- "module": "ESNext",
161
- "moduleResolution": "bundler",
162
- "strict": true,
163
- "esModuleInterop": true,
164
- "skipLibCheck": false,
165
- "resolveJsonModule": true
166
- }
167
- }
168
- ```
169
-
170
- For Node.js projects (without a bundler), use `"moduleResolution": "node16"` or `"nodenext"`.
171
-
172
- **ESM import extensions:** Always use `.js` extensions in TypeScript import paths, even when importing `.ts` source files:
173
-
174
- ```typescript
175
- // ✅ Correct
176
- import { authMachine } from "./auth-machine.js";
177
-
178
- // ❌ Wrong — will fail at runtime
179
- import { authMachine } from "./auth-machine";
180
- ```
181
-
182
- **`package.json` for your project:**
183
-
184
- ```json
185
- {
186
- "type": "module",
187
- "dependencies": {
188
- "@xmachines/play-xstate": "latest",
189
- "@xmachines/play-actor": "latest",
190
- "@xmachines/play-signals": "latest",
191
- "xstate": "latest"
192
- }
193
- }
194
- ```
195
-
196
- ## ESM Setup for Node.js
197
-
198
- XMachines uses ESM exclusively. For Node.js:
199
-
200
- ```json
201
- {
202
- "type": "module"
203
- }
204
- ```
205
-
206
- Or use `.mjs` file extensions. Dynamic imports work in CommonJS contexts:
207
-
208
- ```javascript
209
- const { definePlayer } = await import("@xmachines/play-xstate");
210
- ```
211
-
212
- ## Deno
213
-
214
- XMachines works with Deno via npm specifiers:
215
-
216
- ```typescript
217
- import { setup } from "npm:xstate";
218
- import { definePlayer } from "npm:@xmachines/play-xstate";
219
- ```
220
-
221
- ## Troubleshooting
222
-
223
- ### `Cannot find module '@xmachines/play-xstate'`
224
-
225
- ```bash
226
- # Verify installation
227
- npm list @xmachines/play-xstate
228
-
229
- # Reinstall
230
- npm install
231
- ```
232
-
233
- ### `SyntaxError: Cannot use import statement outside a module`
234
-
235
- Add `"type": "module"` to your `package.json`, or rename files to `.mjs`.
236
-
237
- ### `Could not find a declaration file for module`
238
-
239
- Types are built-in — no separate `@types/` package needed. Check:
240
-
241
- - `moduleResolution` in `tsconfig.json` is set to `"bundler"`, `"node16"`, or `"nodenext"`
242
- - TypeScript version is 5.7+
243
- - Run `npm install` again to ensure dist files are present
244
-
245
- ### Type incompatibilities between packages
246
-
247
- Install all XMachines packages with matching major versions:
248
-
249
- ```bash
250
- npm install @xmachines/play-xstate@latest @xmachines/play-actor@latest @xmachines/play-signals@latest
251
- ```
252
-
253
- ## Next Steps
254
-
255
- - **[Getting Started →](getting-started.md)** — Build your first machine and actor
256
- - **[Examples](../examples/README.md)** — Routing patterns, form validation, multi-router demos
257
- - **[API Reference](../api/README.md)** — Generated API docs for all packages