@xmachines/docs 2.1.1 → 3.0.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 (360) hide show
  1. package/README.md +2 -2
  2. package/api/@xmachines/play/README.md +74 -7
  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/asCleanup.md +78 -0
  6. package/api/@xmachines/play/functions/assertNonNullable.md +1 -1
  7. package/api/@xmachines/play/type-aliases/Cleanup.md +38 -0
  8. package/api/@xmachines/play/type-aliases/DisposeKey.md +32 -0
  9. package/api/@xmachines/play/type-aliases/PlayEvent.md +2 -2
  10. package/api/@xmachines/play/variables/DISPOSE.md +34 -0
  11. package/api/@xmachines/play-actor/README.md +8 -1
  12. package/api/@xmachines/play-actor/classes/AbstractActor.md +3 -3
  13. package/api/@xmachines/play-actor/functions/attachRenderErrorHandler.md +1 -1
  14. package/api/@xmachines/play-actor/functions/composePlayState.md +1 -1
  15. package/api/@xmachines/play-actor/functions/createFailureLatch.md +20 -0
  16. package/api/@xmachines/play-actor/functions/createReportGuard.md +26 -0
  17. package/api/@xmachines/play-actor/functions/createViewStoreLifecycle.md +1 -1
  18. package/api/@xmachines/play-actor/functions/guardContextWrites.md +1 -1
  19. package/api/@xmachines/play-actor/functions/refreshContextSubtree.md +1 -1
  20. package/api/@xmachines/play-actor/functions/reuseComposedState.md +1 -1
  21. package/api/@xmachines/play-actor/functions/sameViewInputs.md +25 -0
  22. package/api/@xmachines/play-actor/functions/shallowEqualExcept.md +1 -1
  23. package/api/@xmachines/play-actor/functions/toAtomState.md +1 -1
  24. package/api/@xmachines/play-actor/functions/typedSpec.md +1 -1
  25. package/api/@xmachines/play-actor/interfaces/BaseActorProviderProps.md +5 -5
  26. package/api/@xmachines/play-actor/interfaces/BaseViewContextValue.md +5 -5
  27. package/api/@xmachines/play-actor/interfaces/FailureLatch.md +59 -0
  28. package/api/@xmachines/play-actor/interfaces/PlaySpec.md +2 -2
  29. package/api/@xmachines/play-actor/interfaces/ReportGuard.md +92 -0
  30. package/api/@xmachines/play-actor/interfaces/ReportGuardMessages.md +18 -0
  31. package/api/@xmachines/play-actor/interfaces/ResolveViewStoreOptions.md +2 -2
  32. package/api/@xmachines/play-actor/interfaces/Routable.md +3 -3
  33. package/api/@xmachines/play-actor/interfaces/ViewInputs.md +19 -0
  34. package/api/@xmachines/play-actor/interfaces/ViewStoreLifecycle.md +3 -3
  35. package/api/@xmachines/play-actor/interfaces/ViewStoreResolution.md +4 -4
  36. package/api/@xmachines/play-actor/interfaces/Viewable.md +2 -2
  37. package/api/@xmachines/play-actor/variables/CONTEXT_STATE_KEY.md +1 -1
  38. package/api/@xmachines/play-dom/README.md +84 -16
  39. package/api/@xmachines/play-dom/classes/PlayRenderer.md +10 -10
  40. package/api/@xmachines/play-dom/functions/createPlayUI.md +8 -8
  41. package/api/@xmachines/play-dom/functions/createRenderer.md +3 -3
  42. package/api/@xmachines/play-dom/interfaces/CreatePlayUIOptions.md +17 -11
  43. package/api/@xmachines/play-dom/interfaces/MountOptions.md +5 -4
  44. package/api/@xmachines/play-dom/interfaces/PlayDomOptions.md +14 -12
  45. package/api/@xmachines/play-dom/type-aliases/Cleanup.md +38 -0
  46. package/api/@xmachines/play-dom/type-aliases/DisposablePlayUI.md +36 -0
  47. package/api/@xmachines/play-dom/type-aliases/MountFn.md +6 -1
  48. package/api/@xmachines/play-dom-router/README.md +46 -18
  49. package/api/@xmachines/play-dom-router/classes/DomRouterBridge.md +149 -7
  50. package/api/@xmachines/play-dom-router/functions/connectRouter.md +6 -5
  51. package/api/@xmachines/play-dom-router/functions/createBrowserHistory.md +3 -3
  52. package/api/@xmachines/play-dom-router/functions/createRouteMap.md +1 -1
  53. package/api/@xmachines/play-dom-router/functions/createRouter.md +20 -8
  54. package/api/@xmachines/play-dom-router/interfaces/BasePathOptions.md +32 -0
  55. package/api/@xmachines/play-dom-router/interfaces/BrowserHistory.md +27 -17
  56. package/api/@xmachines/play-dom-router/interfaces/BrowserWindow.md +16 -16
  57. package/api/@xmachines/play-dom-router/interfaces/ConnectRouterOptions.md +12 -6
  58. package/api/@xmachines/play-dom-router/interfaces/DisposableBrowserHistory.md +262 -0
  59. package/api/@xmachines/play-dom-router/interfaces/DisposableVanillaRouter.md +80 -0
  60. package/api/@xmachines/play-dom-router/interfaces/PlayRouteEvent.md +6 -6
  61. package/api/@xmachines/play-dom-router/interfaces/RoutableActor.md +4 -4
  62. package/api/@xmachines/play-dom-router/interfaces/RouteLookupContract.md +3 -3
  63. package/api/@xmachines/play-dom-router/interfaces/RouteMap.md +3 -3
  64. package/api/@xmachines/play-dom-router/interfaces/RouteMapOptions.md +2 -2
  65. package/api/@xmachines/play-dom-router/interfaces/RouteMapping.md +3 -3
  66. package/api/@xmachines/play-dom-router/interfaces/RouterBridge.md +3 -3
  67. package/api/@xmachines/play-dom-router/interfaces/RouterConnection.md +105 -0
  68. package/api/@xmachines/play-dom-router/interfaces/VanillaRouter.md +26 -5
  69. package/api/@xmachines/play-dom-router/type-aliases/Cleanup.md +38 -0
  70. package/api/@xmachines/play-dom-router/variables/DISPOSE.md +34 -0
  71. package/api/@xmachines/play-react/README.md +2 -2
  72. package/api/@xmachines/play-react/classes/PlayErrorBoundary.md +42 -7
  73. package/api/@xmachines/play-react/functions/useActor.md +1 -1
  74. package/api/@xmachines/play-react/functions/usePlayView.md +1 -1
  75. package/api/@xmachines/play-react/functions/useSignalEffect.md +1 -1
  76. package/api/@xmachines/play-react/interfaces/ActorProviderProps.md +10 -10
  77. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryProps.md +8 -6
  78. package/api/@xmachines/play-react/interfaces/PlayErrorBoundaryState.md +6 -5
  79. package/api/@xmachines/play-react/interfaces/PlayUIProviderProps.md +13 -13
  80. package/api/@xmachines/play-react/interfaces/ViewContextValue.md +5 -5
  81. package/api/@xmachines/play-react/type-aliases/AnyPlayActor.md +1 -1
  82. package/api/@xmachines/play-react/type-aliases/PlayRendererProps.md +1 -1
  83. package/api/@xmachines/play-react/variables/ActorProvider.md +1 -1
  84. package/api/@xmachines/play-react/variables/PlayRenderer.md +1 -1
  85. package/api/@xmachines/play-react/variables/PlayUIProvider.md +1 -1
  86. package/api/@xmachines/play-react-router/README.md +2 -2
  87. package/api/@xmachines/play-react-router/classes/ReactRouterBridge.md +172 -15
  88. package/api/@xmachines/play-react-router/classes/RouteMap.md +4 -4
  89. package/api/@xmachines/play-react-router/functions/createPlayRouterProvider.md +7 -18
  90. package/api/@xmachines/play-react-router/functions/createRouteMap.md +1 -1
  91. package/api/@xmachines/play-react-router/functions/createRouteMapFromTree.md +1 -1
  92. package/api/@xmachines/play-react-router/interfaces/PlayActor.md +5 -5
  93. package/api/@xmachines/play-react-router/interfaces/PlayRouteEvent.md +6 -6
  94. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderProps.md +10 -8
  95. package/api/@xmachines/play-react-router/interfaces/RouteMapOptions.md +2 -2
  96. package/api/@xmachines/play-react-router/interfaces/RouteMapping.md +3 -3
  97. package/api/@xmachines/play-react-router/interfaces/RouterBridge.md +3 -3
  98. package/api/@xmachines/play-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  99. package/api/@xmachines/play-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  100. package/api/@xmachines/play-react-router/variables/PlayRouterProvider.md +4 -4
  101. package/api/@xmachines/play-router/README.md +308 -11
  102. package/api/@xmachines/play-router/classes/RouteMap.md +4 -4
  103. package/api/@xmachines/play-router/classes/RouterBridgeBase.md +178 -19
  104. package/api/@xmachines/play-router/functions/buildPlayRouteEvent.md +1 -1
  105. package/api/@xmachines/play-router/functions/buildRouteTree.md +1 -1
  106. package/api/@xmachines/play-router/functions/cleanFrameworkParams.md +40 -0
  107. package/api/@xmachines/play-router/functions/createRouteMap.md +1 -1
  108. package/api/@xmachines/play-router/functions/createRouteMapFromTree.md +1 -1
  109. package/api/@xmachines/play-router/functions/createRouterConnection.md +21 -0
  110. package/api/@xmachines/play-router/functions/detectDuplicateRoutes.md +1 -1
  111. package/api/@xmachines/play-router/functions/extractMachineRoutes.md +1 -1
  112. package/api/@xmachines/play-router/functions/extractQuery.md +1 -1
  113. package/api/@xmachines/play-router/functions/extractRouteParams.md +1 -1
  114. package/api/@xmachines/play-router/functions/findRouteById.md +1 -1
  115. package/api/@xmachines/play-router/functions/findRouteByPath.md +1 -1
  116. package/api/@xmachines/play-router/functions/getNavigableRoutes.md +1 -1
  117. package/api/@xmachines/play-router/functions/getPatternParamNames.md +24 -0
  118. package/api/@xmachines/play-router/functions/getRequiredPatternParamNames.md +36 -0
  119. package/api/@xmachines/play-router/functions/getRoutableRoutes.md +1 -1
  120. package/api/@xmachines/play-router/functions/getRouteMappings.md +67 -0
  121. package/api/@xmachines/play-router/functions/getTransitionReachableRoutes.md +1 -1
  122. package/api/@xmachines/play-router/functions/isMountableBridge.md +26 -0
  123. package/api/@xmachines/play-router/functions/isRouteReachable.md +1 -1
  124. package/api/@xmachines/play-router/functions/joinBasePath.md +37 -0
  125. package/api/@xmachines/play-router/functions/machineToGraph.md +1 -1
  126. package/api/@xmachines/play-router/functions/mountKey.md +28 -0
  127. package/api/@xmachines/play-router/functions/normalizeBasePath.md +43 -0
  128. package/api/@xmachines/play-router/functions/openProviderBridge.md +41 -0
  129. package/api/@xmachines/play-router/functions/pickOwnParams.md +41 -0
  130. package/api/@xmachines/play-router/functions/repointProviderBridge.md +27 -0
  131. package/api/@xmachines/play-router/functions/resolveBasePath.md +51 -0
  132. package/api/@xmachines/play-router/functions/resolveFrameworkParams.md +51 -0
  133. package/api/@xmachines/play-router/functions/routeExists.md +1 -1
  134. package/api/@xmachines/play-router/functions/sanitizePathname.md +1 -1
  135. package/api/@xmachines/play-router/functions/stripBasePath.md +44 -0
  136. package/api/@xmachines/play-router/functions/validateRouteFormat.md +1 -1
  137. package/api/@xmachines/play-router/functions/validateStateExists.md +1 -1
  138. package/api/@xmachines/play-router/interfaces/BasePathOptions.md +32 -0
  139. package/api/@xmachines/play-router/interfaces/BuildPlayRouteEventOptions.md +6 -6
  140. package/api/@xmachines/play-router/interfaces/FrameworkParamsSource.md +47 -0
  141. package/api/@xmachines/play-router/interfaces/LocationLike.md +5 -5
  142. package/api/@xmachines/play-router/interfaces/MachineEdgeData.md +5 -5
  143. package/api/@xmachines/play-router/interfaces/MachineNodeData.md +7 -7
  144. package/api/@xmachines/play-router/interfaces/MountableRouterBridge.md +130 -0
  145. package/api/@xmachines/play-router/interfaces/OpenProviderBridgeArgs.md +28 -0
  146. package/api/@xmachines/play-router/interfaces/PlayActor.md +7 -7
  147. package/api/@xmachines/play-router/interfaces/PlayRouteEvent.md +8 -8
  148. package/api/@xmachines/play-router/interfaces/PlayRouterProviderBaseProps.md +33 -0
  149. package/api/@xmachines/play-router/interfaces/ResolvedBasePath.md +14 -0
  150. package/api/@xmachines/play-router/interfaces/ResolvedRoutePath.md +5 -5
  151. package/api/@xmachines/play-router/interfaces/RoutableActor.md +6 -6
  152. package/api/@xmachines/play-router/interfaces/RouteInfo.md +10 -10
  153. package/api/@xmachines/play-router/interfaces/RouteMapOptions.md +4 -4
  154. package/api/@xmachines/play-router/interfaces/RouteMapping.md +5 -5
  155. package/api/@xmachines/play-router/interfaces/RouteMatch.md +5 -5
  156. package/api/@xmachines/play-router/interfaces/RouteNode.md +12 -12
  157. package/api/@xmachines/play-router/interfaces/RouteObject.md +4 -4
  158. package/api/@xmachines/play-router/interfaces/RouteTree.md +7 -7
  159. package/api/@xmachines/play-router/interfaces/RouteWatcherHandle.md +3 -3
  160. package/api/@xmachines/play-router/interfaces/RouterBridge.md +7 -3
  161. package/api/@xmachines/play-router/interfaces/RouterConnection.md +105 -0
  162. package/api/@xmachines/play-router/interfaces/WindowLike.md +3 -3
  163. package/api/@xmachines/play-router/type-aliases/BaseRouteMapping.md +1 -1
  164. package/api/@xmachines/play-router/type-aliases/MachineGraph.md +1 -1
  165. package/api/@xmachines/play-router/type-aliases/PlayRouterBridgeConstructor.md +36 -0
  166. package/api/@xmachines/play-router/type-aliases/RouteMetadata.md +1 -1
  167. package/api/@xmachines/play-router/variables/DISPOSE.md +34 -0
  168. package/api/@xmachines/play-router/variables/NO_BASE_PATH.md +18 -0
  169. package/api/@xmachines/play-signals/README.md +4 -2
  170. package/api/@xmachines/play-signals/functions/watchSignal.md +27 -4
  171. package/api/@xmachines/play-signals/interfaces/ComputedOptions.md +2 -2
  172. package/api/@xmachines/play-signals/interfaces/SignalComputed.md +2 -2
  173. package/api/@xmachines/play-signals/interfaces/SignalOptions.md +2 -2
  174. package/api/@xmachines/play-signals/interfaces/SignalState.md +3 -3
  175. package/api/@xmachines/play-signals/interfaces/SignalWatcher.md +4 -4
  176. package/api/@xmachines/play-signals/type-aliases/Cleanup.md +38 -0
  177. package/api/@xmachines/play-signals/type-aliases/WatcherNotify.md +1 -1
  178. package/api/@xmachines/play-solid/README.md +23 -5
  179. package/api/@xmachines/play-solid/functions/useActor.md +1 -1
  180. package/api/@xmachines/play-solid/functions/usePlayView.md +14 -1
  181. package/api/@xmachines/play-solid/interfaces/ActorProviderProps.md +10 -10
  182. package/api/@xmachines/play-solid/interfaces/PlayUIProviderProps.md +13 -13
  183. package/api/@xmachines/play-solid/interfaces/ViewContextValue.md +13 -5
  184. package/api/@xmachines/play-solid/type-aliases/AnyPlayActor.md +1 -1
  185. package/api/@xmachines/play-solid/variables/ActorContext.md +1 -1
  186. package/api/@xmachines/play-solid/variables/ActorProvider.md +1 -1
  187. package/api/@xmachines/play-solid/variables/PlayRenderer.md +1 -1
  188. package/api/@xmachines/play-solid/variables/PlayUIProvider.md +1 -1
  189. package/api/@xmachines/play-solid-router/README.md +19 -3
  190. package/api/@xmachines/play-solid-router/classes/RouteMap.md +4 -4
  191. package/api/@xmachines/play-solid-router/classes/SolidRouterBridge.md +166 -18
  192. package/api/@xmachines/play-solid-router/functions/createPlayRouterProvider.md +8 -18
  193. package/api/@xmachines/play-solid-router/functions/createRouteMap.md +1 -1
  194. package/api/@xmachines/play-solid-router/interfaces/AbstractActor.md +3 -3
  195. package/api/@xmachines/play-solid-router/interfaces/PlayActor.md +5 -5
  196. package/api/@xmachines/play-solid-router/interfaces/PlayRouteEvent.md +6 -6
  197. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderProps.md +10 -8
  198. package/api/@xmachines/play-solid-router/interfaces/RouteMapOptions.md +2 -2
  199. package/api/@xmachines/play-solid-router/interfaces/RouteMapping.md +3 -3
  200. package/api/@xmachines/play-solid-router/interfaces/RouterBridge.md +3 -3
  201. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterBridgeConstructor.md +14 -12
  202. package/api/@xmachines/play-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  203. package/api/@xmachines/play-solid-router/type-aliases/RoutableActor.md +1 -1
  204. package/api/@xmachines/play-solid-router/type-aliases/SolidRouterHooks.md +4 -4
  205. package/api/@xmachines/play-solid-router/variables/PlayRouterProvider.md +4 -4
  206. package/api/@xmachines/play-svelte/README.md +3 -3
  207. package/api/@xmachines/play-svelte/functions/defineRegistry.md +1 -1
  208. package/api/@xmachines/play-svelte/functions/getActorContext.md +1 -1
  209. package/api/@xmachines/play-svelte/functions/getPlayViewContext.md +7 -1
  210. package/api/@xmachines/play-svelte/functions/setActorContext.md +1 -1
  211. package/api/@xmachines/play-svelte/interfaces/ActorProviderProps.md +10 -10
  212. package/api/@xmachines/play-svelte/interfaces/DefineRegistryOptions.md +4 -4
  213. package/api/@xmachines/play-svelte/interfaces/PlayUIProviderProps.md +13 -13
  214. package/api/@xmachines/play-svelte/interfaces/ViewContextValue.md +5 -5
  215. package/api/@xmachines/play-svelte/type-aliases/AnyPlayActor.md +1 -1
  216. package/api/@xmachines/play-svelte-spa-router/README.md +3 -1
  217. package/api/@xmachines/play-svelte-spa-router/classes/RouteMap.md +4 -4
  218. package/api/@xmachines/play-svelte-spa-router/classes/SvelteSpaRouterBridge.md +148 -6
  219. package/api/@xmachines/play-svelte-spa-router/functions/connectRouter.md +3 -3
  220. package/api/@xmachines/play-svelte-spa-router/functions/createRouteMap.md +1 -1
  221. package/api/@xmachines/play-svelte-spa-router/interfaces/BasePathOptions.md +32 -0
  222. package/api/@xmachines/play-svelte-spa-router/interfaces/ConnectRouterOptions.md +12 -6
  223. package/api/@xmachines/play-svelte-spa-router/interfaces/PlayRouteEvent.md +6 -6
  224. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapOptions.md +2 -2
  225. package/api/@xmachines/play-svelte-spa-router/interfaces/RouteMapping.md +3 -3
  226. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterBridge.md +3 -3
  227. package/api/@xmachines/play-svelte-spa-router/interfaces/RouterConnection.md +105 -0
  228. package/api/@xmachines/play-svelte-spa-router/interfaces/WindowLike.md +3 -3
  229. package/api/@xmachines/play-svelte-spa-router/type-aliases/RoutableActor.md +1 -1
  230. package/api/@xmachines/play-sveltekit-router/README.md +3 -1
  231. package/api/@xmachines/play-sveltekit-router/classes/RouteMap.md +4 -4
  232. package/api/@xmachines/play-sveltekit-router/classes/SvelteKitRouterBridge.md +148 -6
  233. package/api/@xmachines/play-sveltekit-router/functions/connectRouter.md +3 -3
  234. package/api/@xmachines/play-sveltekit-router/functions/createRouteMap.md +1 -1
  235. package/api/@xmachines/play-sveltekit-router/interfaces/BasePathOptions.md +32 -0
  236. package/api/@xmachines/play-sveltekit-router/interfaces/ConnectRouterOptions.md +28 -6
  237. package/api/@xmachines/play-sveltekit-router/interfaces/LocationLike.md +3 -3
  238. package/api/@xmachines/play-sveltekit-router/interfaces/PlayRouteEvent.md +6 -6
  239. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapOptions.md +2 -2
  240. package/api/@xmachines/play-sveltekit-router/interfaces/RouteMapping.md +3 -3
  241. package/api/@xmachines/play-sveltekit-router/interfaces/RouterBridge.md +3 -3
  242. package/api/@xmachines/play-sveltekit-router/interfaces/RouterConnection.md +105 -0
  243. package/api/@xmachines/play-sveltekit-router/type-aliases/RoutableActor.md +1 -1
  244. package/api/@xmachines/play-tanstack-react-router/README.md +2 -2
  245. package/api/@xmachines/play-tanstack-react-router/classes/RouteMap.md +4 -4
  246. package/api/@xmachines/play-tanstack-react-router/classes/TanStackReactRouterBridge.md +148 -6
  247. package/api/@xmachines/play-tanstack-react-router/functions/createPlayRouterProvider.md +7 -18
  248. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMap.md +1 -1
  249. package/api/@xmachines/play-tanstack-react-router/functions/createRouteMapFromTree.md +1 -1
  250. package/api/@xmachines/play-tanstack-react-router/functions/extractMachineRoutes.md +1 -1
  251. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayActor.md +5 -5
  252. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouteEvent.md +6 -6
  253. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderProps.md +10 -8
  254. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapOptions.md +2 -2
  255. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteMapping.md +3 -3
  256. package/api/@xmachines/play-tanstack-react-router/interfaces/RouteNavigateEvent.md +3 -3
  257. package/api/@xmachines/play-tanstack-react-router/interfaces/RouterBridge.md +3 -3
  258. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  259. package/api/@xmachines/play-tanstack-react-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  260. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterInstance.md +1 -1
  261. package/api/@xmachines/play-tanstack-react-router/type-aliases/TanStackRouterLike.md +5 -5
  262. package/api/@xmachines/play-tanstack-react-router/variables/PlayRouterProvider.md +4 -4
  263. package/api/@xmachines/play-tanstack-router/README.md +1 -1
  264. package/api/@xmachines/play-tanstack-router/classes/TanStackRouterBridgeBase.md +153 -11
  265. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouteMapLike.md +3 -3
  266. package/api/@xmachines/play-tanstack-router/type-aliases/TanStackRouterLike.md +5 -5
  267. package/api/@xmachines/play-tanstack-solid-router/README.md +2 -2
  268. package/api/@xmachines/play-tanstack-solid-router/classes/RouteMap.md +4 -4
  269. package/api/@xmachines/play-tanstack-solid-router/classes/TanStackSolidRouterBridge.md +149 -7
  270. package/api/@xmachines/play-tanstack-solid-router/functions/createPlayRouterProvider.md +7 -17
  271. package/api/@xmachines/play-tanstack-solid-router/functions/createRouteMap.md +1 -1
  272. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayActor.md +5 -5
  273. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouteEvent.md +6 -6
  274. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderProps.md +10 -8
  275. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapOptions.md +2 -2
  276. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouteMapping.md +3 -3
  277. package/api/@xmachines/play-tanstack-solid-router/interfaces/RouterBridge.md +3 -3
  278. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterBridgeConstructor.md +15 -9
  279. package/api/@xmachines/play-tanstack-solid-router/type-aliases/PlayRouterProviderBaseProps.md +26 -0
  280. package/api/@xmachines/play-tanstack-solid-router/type-aliases/RoutableActor.md +1 -1
  281. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterInstance.md +1 -1
  282. package/api/@xmachines/play-tanstack-solid-router/type-aliases/TanStackRouterLike.md +5 -5
  283. package/api/@xmachines/play-tanstack-solid-router/variables/PlayRouterProvider.md +4 -4
  284. package/api/@xmachines/play-vue/README.md +34 -12
  285. package/api/@xmachines/play-vue/functions/defineRegistry.md +1 -1
  286. package/api/@xmachines/play-vue/functions/useActor.md +1 -1
  287. package/api/@xmachines/play-vue/functions/usePlayView.md +6 -1
  288. package/api/@xmachines/play-vue/interfaces/ActorProviderProps.md +12 -7
  289. package/api/@xmachines/play-vue/interfaces/PlayUIProviderProps.md +15 -10
  290. package/api/@xmachines/play-vue/interfaces/ViewContextValue.md +5 -5
  291. package/api/@xmachines/play-vue/interfaces/VisibilityProviderProps.md +1 -1
  292. package/api/@xmachines/play-vue/type-aliases/AnyPlayActor.md +1 -1
  293. package/api/@xmachines/play-vue/type-aliases/ComponentEntry.md +1 -1
  294. package/api/@xmachines/play-vue/type-aliases/ComponentsMap.md +1 -1
  295. package/api/@xmachines/play-vue/type-aliases/DefineRegistryOptions.md +2 -2
  296. package/api/@xmachines/play-vue/variables/PlayRenderer.md +1 -1
  297. package/api/@xmachines/play-vue/variables/getPlayViewContext.md +6 -1
  298. package/api/@xmachines/play-vue-router/README.md +1 -1
  299. package/api/@xmachines/play-vue-router/classes/RouteMap.md +4 -4
  300. package/api/@xmachines/play-vue-router/classes/VueRouterBridge.md +154 -12
  301. package/api/@xmachines/play-vue-router/functions/createRouteMap.md +1 -1
  302. package/api/@xmachines/play-vue-router/interfaces/PlayActor.md +5 -5
  303. package/api/@xmachines/play-vue-router/interfaces/PlayRouteEvent.md +6 -6
  304. package/api/@xmachines/play-vue-router/interfaces/RouteMapOptions.md +2 -2
  305. package/api/@xmachines/play-vue-router/interfaces/RouteMapping.md +3 -3
  306. package/api/@xmachines/play-vue-router/interfaces/RouterBridge.md +3 -3
  307. package/api/@xmachines/play-vue-router/type-aliases/RoutableActor.md +1 -1
  308. package/api/@xmachines/play-vue-router/type-aliases/VueRouteMap.md +1 -1
  309. package/api/@xmachines/play-vue-router/variables/PlayRouterProvider.md +25 -2
  310. package/api/@xmachines/play-vue-router/variables/VueRouteMap.md +1 -1
  311. package/api/@xmachines/play-xstate/README.md +19 -2
  312. package/api/@xmachines/play-xstate/classes/PlayerActor.md +53 -17
  313. package/api/@xmachines/play-xstate/functions/buildRouteUrl.md +1 -1
  314. package/api/@xmachines/play-xstate/functions/composeGuards.md +1 -1
  315. package/api/@xmachines/play-xstate/functions/composeGuardsOr.md +1 -1
  316. package/api/@xmachines/play-xstate/functions/contextFieldMatches.md +1 -1
  317. package/api/@xmachines/play-xstate/functions/definePlayer.md +1 -1
  318. package/api/@xmachines/play-xstate/functions/deriveRoute.md +1 -1
  319. package/api/@xmachines/play-xstate/functions/eventMatches.md +1 -1
  320. package/api/@xmachines/play-xstate/functions/formatPlayRouteTransitions.md +1 -1
  321. package/api/@xmachines/play-xstate/functions/hasContext.md +1 -1
  322. package/api/@xmachines/play-xstate/functions/isAbsoluteRoute.md +1 -1
  323. package/api/@xmachines/play-xstate/functions/negateGuard.md +1 -1
  324. package/api/@xmachines/play-xstate/interfaces/PlayerConfig.md +3 -3
  325. package/api/@xmachines/play-xstate/interfaces/PlayerFactoryResumeOptions.md +2 -2
  326. package/api/@xmachines/play-xstate/interfaces/PlayerOptions.md +7 -7
  327. package/api/@xmachines/play-xstate/interfaces/RouteContext.md +5 -5
  328. package/api/@xmachines/play-xstate/interfaces/RouteObject.md +2 -2
  329. package/api/@xmachines/play-xstate/type-aliases/ComposedGuard.md +1 -1
  330. package/api/@xmachines/play-xstate/type-aliases/Guard.md +1 -1
  331. package/api/@xmachines/play-xstate/type-aliases/GuardArray.md +1 -1
  332. package/api/@xmachines/play-xstate/type-aliases/PlayerFactory.md +1 -1
  333. package/api/@xmachines/play-xstate/type-aliases/RouteMachineConfig.md +4 -4
  334. package/api/@xmachines/play-xstate/type-aliases/RouteMetadata.md +1 -1
  335. package/api/@xmachines/play-xstate/type-aliases/RouteStateNode.md +4 -4
  336. package/api/@xmachines/play-xstate/variables/DISPOSE.md +34 -0
  337. package/api/@xmachines/shared/README.md +1 -1
  338. package/api/@xmachines/shared/vite-aliases/functions/xmAliases.md +1 -1
  339. package/api/@xmachines/shared/vite-aliases/functions/xmCacheDir.md +1 -1
  340. package/api/@xmachines/shared/vite-aliases/functions/xmOptimizeDeps.md +1 -1
  341. package/api/@xmachines/shared/vite-aliases/functions/xmResolve.md +1 -1
  342. package/api/@xmachines/shared/vite-aliases/functions/xmSvelteRunes.md +2 -2
  343. package/api/@xmachines/shared/vitest/functions/defineXmBrowserConfig.md +1 -1
  344. package/api/@xmachines/shared/vitest/functions/defineXmVitestConfig.md +1 -1
  345. package/api/@xmachines/shared/vitest/interfaces/XmBrowserConfigOptions.md +4 -4
  346. package/contributing/architecture.md +5 -1
  347. package/contributing/configuration.md +60 -18
  348. package/contributing/development.md +66 -44
  349. package/contributing/testing.md +34 -7
  350. package/examples/README.md +1 -1
  351. package/examples/multi-router-integration.md +126 -1
  352. package/examples/routing-patterns.md +1 -1
  353. package/guides/getting-started.md +7 -7
  354. package/guides/inspector.md +1 -1
  355. package/guides/signals.md +43 -0
  356. package/package.json +1 -1
  357. package/api/@xmachines/play-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
  358. package/api/@xmachines/play-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -30
  359. package/api/@xmachines/play-tanstack-react-router/interfaces/PlayRouterProviderBaseProps.md +0 -32
  360. package/api/@xmachines/play-tanstack-solid-router/interfaces/PlayRouterProviderBaseProps.md +0 -31
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Class: PlayerActor\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/player-actor.ts:202](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L202)
5
+ Defined in: [packages/play-xstate/src/player-actor.ts:203](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L203)
6
6
 
7
7
  The concrete XState actor. It implements the signal protocol of the Play Architecture
8
8
 
@@ -122,7 +122,7 @@ new PlayerActor<TMachine>(
122
122
  restoredSnapshot?): PlayerActor<TMachine>;
123
123
  ```
124
124
 
125
- Defined in: [packages/play-xstate/src/player-actor.ts:360](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L360)
125
+ Defined in: [packages/play-xstate/src/player-actor.ts:361](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L361)
126
126
 
127
127
  #### Parameters
128
128
 
@@ -147,21 +147,56 @@ Defined in: [packages/play-xstate/src/player-actor.ts:360](https://gitlab.com/xm
147
147
  | ------------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
148
148
  | <a id="property-_parent"></a> `_parent?` | `public` | [`AnyActorRef`](https://www.jsdocs.io/package/xstate#AnyActorRef) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`_parent`](../../play-actor/classes/AbstractActor.md#property-_parent) | - |
149
149
  | <a id="property-clock"></a> `clock` | `public` | [`Clock`](https://www.jsdocs.io/package/xstate#Clock) | The clock that is responsible for setting and clearing timeouts, such as delayed events and transitions. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`clock`](../../play-actor/classes/AbstractActor.md#property-clock) | - |
150
- | <a id="property-currentroute"></a> `currentRoute` | `public` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | A TC39 `Signal.Computed`. It derives the current URL path from the `meta.route` template of the active machine state and from the context of the actor. It returns `null` when the current state has no `meta.route` field, and also when it cannot resolve the complete route template. A necessary `:param` that the context does not hold is caught inside the signal, and a `MissingRouteParamError` therefore never leaves `get()`: that condition is temporary during a transition, and the signal computes the value again on the next snapshot. **Example** `// It returns "/profile/alice" when context.params.userId === "alice", // and null while the param is still absent. const route = actor.currentRoute.get();` | - | - | [packages/play-xstate/src/player-actor.ts:304](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L304) |
151
- | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | The reactive signal of the current view spec. The signal derives the spec from the `meta.view` metadata of the active state. It emits a **new object reference** on each real change of the view on the screen: the view of a different state, or a change of a param or of the context that changes the resolved spec. A re-entry with `reenter: true` and new params also changes the spec. A snapshot that changes no view on the screen, such as an assign of the context alone, keeps the previous reference. A provider below the signal therefore mounts the UI again not on every event. The `PlaySpec` of the emission carries the context of the machine in its composed `state` field, under the read-only `/context` subtree. A spec therefore reads the context, and also each URL param, through the ordinary state grammar (`{ $state: "/context/params/section" }`). The context-projection module of `@xmachines/play-actor` holds the complete contract. The signal returns `null` when the current state has no `meta.view` metadata. Two states can declare two separate `meta.view` literals with an identical structure. A transition between those two states then emits two different references, and a provider mounts the UI again. Move the shared literal into one `typedSpec` constant, and the identity then removes the duplicate. **Example** `const view = actor.currentView.get(); if (view) { console.log(view.root); // for example "root" console.log(view.elements); // the Spec elements of @xmachines/json-render-core }` | - | - | [packages/play-xstate/src/player-actor.ts:358](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L358) |
150
+ | <a id="property-currentroute"></a> `currentRoute` | `public` | [`Computed`](../../play-signals/namespaces/Signal/classes/Computed.md)\<`string` \| `null`\> | A TC39 `Signal.Computed`. It derives the current URL path from the `meta.route` template of the active machine state and from the context of the actor. It returns `null` when the current state has no `meta.route` field, and also when it cannot resolve the complete route template. A necessary `:param` that the context does not hold is caught inside the signal, and a `MissingRouteParamError` therefore never leaves `get()`: that condition is temporary during a transition, and the signal computes the value again on the next snapshot. **Example** `// It returns "/profile/alice" when context.params.userId === "alice", // and null while the param is still absent. const route = actor.currentRoute.get();` | - | - | [packages/play-xstate/src/player-actor.ts:305](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L305) |
151
+ | <a id="property-currentview"></a> `currentView` | `readonly` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<[`PlaySpec`](../../play-actor/interfaces/PlaySpec.md) \| `null`\> | The reactive signal of the current view spec. The signal derives the spec from the `meta.view` metadata of the active state. It emits a **new object reference** on each real change of the view on the screen: the view of a different state, or a change of a param or of the context that changes the resolved spec. A re-entry with `reenter: true` and new params also changes the spec. A snapshot that changes no view on the screen, such as an assign of the context alone, keeps the previous reference. A provider below the signal therefore mounts the UI again not on every event. The `PlaySpec` of the emission carries the context of the machine in its composed `state` field, under the read-only `/context` subtree. A spec therefore reads the context, and also each URL param, through the ordinary state grammar (`{ $state: "/context/params/section" }`). The context-projection module of `@xmachines/play-actor` holds the complete contract. The signal returns `null` when the current state has no `meta.view` metadata. Two states can declare two separate `meta.view` literals with an identical structure. A transition between those two states then emits two different references, and a provider mounts the UI again. Move the shared literal into one `typedSpec` constant, and the identity then removes the duplicate. **Example** `const view = actor.currentView.get(); if (view) { console.log(view.root); // for example "root" console.log(view.elements); // the Spec elements of @xmachines/json-render-core }` | - | - | [packages/play-xstate/src/player-actor.ts:359](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L359) |
152
152
  | <a id="property-id"></a> `id` | `public` | `string` | The unique identifier for this actor relative to its parent. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`id`](../../play-actor/classes/AbstractActor.md#property-id) | - |
153
- | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it, and it never changes, also when the code restores the actor from a snapshot. A router bridge compares it with the browser URL, and it therefore separates a deep link (a URL that is not the initial one → the router wins) from a restore (the initial URL, and the actor at a different route from the restore → the actor wins). `deriveInitialRoute` derives the value statically from the machine definition, with the pure `initialTransition` helper of XState: the chain of the initial states and their `meta.route` templates are fixed at the moment of the machine definition, and the substitution of a `:param` uses the real initial context of the machine for the `input` of this actor. The code makes no second actor, and a snapshot of a restore changes the value never: it is always the **default** initial route of the machine. | - | - | [packages/play-xstate/src/player-actor.ts:323](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L323) |
153
+ | <a id="property-initialroute"></a> `initialRoute` | `readonly` | `string` \| `null` | The route of the initial state of the machine. The constructor fixes it, and it never changes, also when the code restores the actor from a snapshot. A router bridge compares it with the browser URL, and it therefore separates a deep link (a URL that is not the initial one → the router wins) from a restore (the initial URL, and the actor at a different route from the restore → the actor wins). `deriveInitialRoute` derives the value statically from the machine definition, with the pure `initialTransition` helper of XState: the chain of the initial states and their `meta.route` templates are fixed at the moment of the machine definition, and the substitution of a `:param` uses the real initial context of the machine for the `input` of this actor. The code makes no second actor, and a snapshot of a restore changes the value never: it is always the **default** initial route of the machine. | - | - | [packages/play-xstate/src/player-actor.ts:324](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L324) |
154
154
  | <a id="property-logic"></a> `logic` | `public` | [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`logic`](../../play-actor/classes/AbstractActor.md#property-logic) | - |
155
155
  | <a id="property-options"></a> `options` | `public` | `Readonly`\<[`ActorOptions`](https://www.jsdocs.io/package/xstate#ActorOptions)\<`TLogic`\>\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`options`](../../play-actor/classes/AbstractActor.md#property-options) | - |
156
156
  | <a id="property-ref"></a> `ref` | `public` | [`ActorRef`](https://www.jsdocs.io/package/xstate#ActorRef)\<`any`, `any`, `any`\> | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`ref`](../../play-actor/classes/AbstractActor.md#property-ref) | - |
157
157
  | <a id="property-sessionid"></a> `sessionId` | `public` | `string` | The globally unique process ID for this invocation. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`sessionId`](../../play-actor/classes/AbstractActor.md#property-sessionid) | - |
158
158
  | <a id="property-src"></a> `src` | `public` | \| `string` \| [`AnyActorLogic`](https://www.jsdocs.io/package/xstate#AnyActorLogic) | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`src`](../../play-actor/classes/AbstractActor.md#property-src) | - |
159
- | <a id="property-state"></a> `state` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`ReturnType`\<`TMachine`\[`"transition"`\]\>\> | The reactive snapshot of the current actor state. The infrastructure observes this signal, and it reacts to each state change. It therefore holds no coupling to the internal state machine of the actor. | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`state`](../../play-actor/classes/AbstractActor.md#property-state) | - | [packages/play-xstate/src/player-actor.ts:263](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L263) |
159
+ | <a id="property-state"></a> `state` | `public` | [`State`](../../play-signals/namespaces/Signal/classes/State.md)\<`ReturnType`\<`TMachine`\[`"transition"`\]\>\> | The reactive snapshot of the current actor state. The infrastructure observes this signal, and it reacts to each state change. It therefore holds no coupling to the internal state machine of the actor. | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`state`](../../play-actor/classes/AbstractActor.md#property-state) | - | [packages/play-xstate/src/player-actor.ts:264](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L264) |
160
160
  | <a id="property-system"></a> `system` | `public` | [`AnyActorSystem`](https://www.jsdocs.io/package/xstate#AnyActorSystem) | The system to which this actor belongs. | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`system`](../../play-actor/classes/AbstractActor.md#property-system) | - |
161
161
  | <a id="property-systemid"></a> `systemId` | `public` | `string` \| `undefined` | - | - | [`AbstractActor`](../../play-actor/classes/AbstractActor.md).[`systemId`](../../play-actor/classes/AbstractActor.md#property-systemid) | - |
162
162
 
163
163
  ## Methods
164
164
 
165
+ ### \[dispose\]()
166
+
167
+ ```ts
168
+ dispose: void;
169
+ ```
170
+
171
+ Defined in: [packages/play-xstate/src/player-actor.ts:779](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L779)
172
+
173
+ Stops the actor when the scope of a `using` declaration ends.
174
+
175
+ The actor is a `Disposable`, so a scope that owns one writes no teardown:
176
+
177
+ ```ts
178
+ {
179
+ using actor = definePlayer({ machine })();
180
+ actor.start();
181
+ actor.send({ type: "go" });
182
+ // stop() runs here, and it runs even when send() throws
183
+ }
184
+ ```
185
+
186
+ The release is [stop](#stop), which is synchronous and idempotent. `Disposable` and
187
+ not `AsyncDisposable`: a `Disposable` serves `using` AND `await using`, while an
188
+ `AsyncDisposable` raises a TypeError under a plain `using`.
189
+
190
+ The key is `DISPOSE` of `@xmachines/play` and not a bare `Symbol.dispose`, so that
191
+ the method still answers a `using` that a bundler downlevelled for a target without
192
+ the well-known symbol.
193
+
194
+ #### Returns
195
+
196
+ `void`
197
+
198
+ ---
199
+
165
200
  ### \[observable\]()
166
201
 
167
202
  ```ts
@@ -186,7 +221,7 @@ Defined in: `xstate`
186
221
  can(event): boolean;
187
222
  ```
188
223
 
189
- Defined in: [packages/play-xstate/src/player-actor.ts:276](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L276)
224
+ Defined in: [packages/play-xstate/src/player-actor.ts:277](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L277)
190
225
 
191
226
  Tells you if the current state of the actor accepts the given event.
192
227
 
@@ -217,7 +252,7 @@ if (actor.can({ type: "auth.logout" })) { ... }
217
252
  dispose(): void;
218
253
  ```
219
254
 
220
- Defined in: [packages/play-xstate/src/player-actor.ts:751](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L751)
255
+ Defined in: [packages/play-xstate/src/player-actor.ts:753](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L753)
221
256
 
222
257
  The dispose method, for the cleanup. It is the alias of [stop](#stop).
223
258
 
@@ -227,7 +262,8 @@ The dispose method, for the cleanup. It is the alias of [stop](#stop).
227
262
 
228
263
  #### Deprecated
229
264
 
230
- Use [stop](#stop). Will be removed in the next major.
265
+ Use [stop](#stop), or a `using` declaration. Will be removed in the
266
+ next major.
231
267
 
232
268
  ---
233
269
 
@@ -237,7 +273,7 @@ Use [stop](#stop). Will be removed in the next major.
237
273
  getPersistedSnapshot(options?): Snapshot<unknown>;
238
274
  ```
239
275
 
240
- Defined in: [packages/play-xstate/src/player-actor.ts:696](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L696)
276
+ Defined in: [packages/play-xstate/src/player-actor.ts:697](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L697)
241
277
 
242
278
  Returns the persisted snapshot of this actor.
243
279
 
@@ -266,7 +302,7 @@ Use it to serialize the state, and to restore it later with the
266
302
  getSnapshot(): SnapshotFrom<TMachine>;
267
303
  ```
268
304
 
269
- Defined in: [packages/play-xstate/src/player-actor.ts:595](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L595)
305
+ Defined in: [packages/play-xstate/src/player-actor.ts:596](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L596)
270
306
 
271
307
  Returns the current snapshot
272
308
 
@@ -286,7 +322,7 @@ Returns the current snapshot
286
322
  on<TType>(type, handler): Subscription;
287
323
  ```
288
324
 
289
- Defined in: [packages/play-xstate/src/player-actor.ts:681](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L681)
325
+ Defined in: [packages/play-xstate/src/player-actor.ts:682](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L682)
290
326
 
291
327
  Listens for the events that this actor emits with the `emit` action.
292
328
 
@@ -352,7 +388,7 @@ Defined in: `xstate`
352
388
  send(event): void;
353
389
  ```
354
390
 
355
- Defined in: [packages/play-xstate/src/player-actor.ts:556](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L556)
391
+ Defined in: [packages/play-xstate/src/player-actor.ts:557](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L557)
356
392
 
357
393
  Sends an event to this actor.
358
394
 
@@ -398,7 +434,7 @@ actor.send({ type: "play.route", to: "#home" });
398
434
  start(): this;
399
435
  ```
400
436
 
401
- Defined in: [packages/play-xstate/src/player-actor.ts:482](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L482)
437
+ Defined in: [packages/play-xstate/src/player-actor.ts:483](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L483)
402
438
 
403
439
  Starts the actor.
404
440
 
@@ -424,7 +460,7 @@ the side effects of `onStart` one time for one real start.
424
460
  stop(): this;
425
461
  ```
426
462
 
427
- Defined in: [packages/play-xstate/src/player-actor.ts:512](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L512)
463
+ Defined in: [packages/play-xstate/src/player-actor.ts:513](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L513)
428
464
 
429
465
  Stops the actor and cleans up.
430
466
 
@@ -453,7 +489,7 @@ fires `onStart` again.
453
489
  subscribe(observer): Subscription;
454
490
  ```
455
491
 
456
- Defined in: [packages/play-xstate/src/player-actor.ts:618](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L618)
492
+ Defined in: [packages/play-xstate/src/player-actor.ts:619](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L619)
457
493
 
458
494
  Subscribes to the snapshot updates of this actor.
459
495
 
@@ -484,7 +520,7 @@ subscribe(
484
520
  completeListener?): Subscription;
485
521
  ```
486
522
 
487
- Defined in: [packages/play-xstate/src/player-actor.ts:629](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/player-actor.ts#L629)
523
+ Defined in: [packages/play-xstate/src/player-actor.ts:630](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/player-actor.ts#L630)
488
524
 
489
525
  Subscribes to the snapshot updates of this actor.
490
526
 
@@ -6,7 +6,7 @@
6
6
  function buildRouteUrl(routeTemplate, context?): string;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/build-url.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/build-url.ts#L38)
9
+ Defined in: [packages/play-xstate/src/routing/build-url.ts:38](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/build-url.ts#L38)
10
10
 
11
11
  Builds a complete URL from a route template and the context of the actor.
12
12
 
@@ -6,7 +6,7 @@
6
6
  function composeGuards<TContext, TEvent>(guards): ComposedGuard;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/compose.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/compose.ts#L100)
9
+ Defined in: [packages/play-xstate/src/guards/compose.ts:100](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/compose.ts#L100)
10
10
 
11
11
  Composes the guards with the AND logic, through the and() helper of XState
12
12
 
@@ -6,7 +6,7 @@
6
6
  function composeGuardsOr<TContext, TEvent>(guards): ComposedGuard;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/compose.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/compose.ts#L159)
9
+ Defined in: [packages/play-xstate/src/guards/compose.ts:159](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/compose.ts#L159)
10
10
 
11
11
  Composes the guards with the OR logic, through the or() helper of XState
12
12
 
@@ -6,7 +6,7 @@
6
6
  function contextFieldMatches<TContext>(fieldPath, expectedValue): Guard<TContext, PlayEvent>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/helpers.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/helpers.ts#L75)
9
+ Defined in: [packages/play-xstate/src/guards/helpers.ts:75](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/helpers.ts#L75)
10
10
 
11
11
  Tells you if a context field holds the expected value.
12
12
 
@@ -6,7 +6,7 @@
6
6
  function definePlayer<TMachine>(config): PlayerFactory<TMachine>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/define-player.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/define-player.ts#L61)
9
+ Defined in: [packages/play-xstate/src/define-player.ts:61](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/define-player.ts#L61)
10
10
 
11
11
  Creates a player factory from an XState machine
12
12
 
@@ -6,7 +6,7 @@
6
6
  function deriveRoute(stateMeta): string | null;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/derive-route.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/derive-route.ts#L92)
9
+ Defined in: [packages/play-xstate/src/routing/derive-route.ts:92](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/derive-route.ts#L92)
10
10
 
11
11
  Derives the route from the metadata of an XState state
12
12
 
@@ -6,7 +6,7 @@
6
6
  function eventMatches<TEvent>(eventType): Guard<unknown, TEvent>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/helpers.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/helpers.ts#L52)
9
+ Defined in: [packages/play-xstate/src/guards/helpers.ts:52](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/helpers.ts#L52)
10
10
 
11
11
  Tells you if the type of the event is the expected type
12
12
 
@@ -6,7 +6,7 @@
6
6
  function formatPlayRouteTransitions<T>(machineConfig): T;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/format-play-route-transitions.ts#L112)
9
+ Defined in: [packages/play-xstate/src/routing/format-play-route-transitions.ts:112](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/format-play-route-transitions.ts#L112)
10
10
 
11
11
  Makes the play.route transitions from the declarative route configs
12
12
 
@@ -6,7 +6,7 @@
6
6
  function hasContext<TContext>(path): Guard<TContext, PlayEvent>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/helpers.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/helpers.ts#L24)
9
+ Defined in: [packages/play-xstate/src/guards/helpers.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/helpers.ts#L24)
10
10
 
11
11
  Tells you if the context holds a value at the path, and that the value is truthy
12
12
 
@@ -6,7 +6,7 @@
6
6
  function isAbsoluteRoute(path): boolean;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/routing/derive-route.ts:163](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/derive-route.ts#L163)
9
+ Defined in: [packages/play-xstate/src/routing/derive-route.ts:163](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/derive-route.ts#L163)
10
10
 
11
11
  Tells you if the route path is absolute
12
12
 
@@ -6,7 +6,7 @@
6
6
  function negateGuard<TContext, TEvent>(guard): ComposedGuard;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/compose.ts:215](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/compose.ts#L215)
9
+ Defined in: [packages/play-xstate/src/guards/compose.ts:215](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/compose.ts#L215)
10
10
 
11
11
  Negates a guard, through the not() helper of XState
12
12
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayerConfig\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L7)
5
+ Defined in: [packages/play-xstate/src/types.ts:7](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L7)
6
6
 
7
7
  The configuration of definePlayer()
8
8
 
@@ -16,5 +16,5 @@ The configuration of definePlayer()
16
16
 
17
17
  | Property | Type | Description | Defined in |
18
18
  | ---------------------------------------- | ------------------------------------------------- | ----------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
19
- | <a id="property-machine"></a> `machine` | `TMachine` | The XState v5 state machine | [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L9) |
20
- | <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | The lifecycle hooks and the configuration | [packages/play-xstate/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L12) |
19
+ | <a id="property-machine"></a> `machine` | `TMachine` | The XState v5 state machine | [packages/play-xstate/src/types.ts:9](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L9) |
20
+ | <a id="property-options"></a> `options?` | [`PlayerOptions`](PlayerOptions.md)\<`TMachine`\> | The lifecycle hooks and the configuration | [packages/play-xstate/src/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L12) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayerFactoryResumeOptions\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/types.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L115)
5
+ Defined in: [packages/play-xstate/src/types.ts:115](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L115)
6
6
 
7
7
  The optional restore arguments of the player factory.
8
8
 
@@ -19,4 +19,4 @@ The shape follows the options object of `createActor` in XState. It also keeps t
19
19
 
20
20
  | Property | Type | Description | Defined in |
21
21
  | ------------------------------------------ | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
22
- | <a id="property-snapshot"></a> `snapshot?` | [`Snapshot`](https://www.jsdocs.io/package/xstate#Snapshot)\<`unknown`\> | The persisted XState snapshot. The factory restores the actor state from it. Its type is the `ActorOptions["snapshot"]` type of XState, which is the exact type that `createActor` accepts and that `getPersistedSnapshot()` returns. The restore of a stored snapshot therefore needs no cast. | [packages/play-xstate/src/types.ts:123](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L123) |
22
+ | <a id="property-snapshot"></a> `snapshot?` | [`Snapshot`](https://www.jsdocs.io/package/xstate#Snapshot)\<`unknown`\> | The persisted XState snapshot. The factory restores the actor state from it. Its type is the `ActorOptions["snapshot"]` type of XState, which is the exact type that `createActor` accepts and that `getPersistedSnapshot()` returns. The restore of a stored snapshot therefore needs no cast. | [packages/play-xstate/src/types.ts:123](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L123) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: PlayerOptions\<TMachine\>
4
4
 
5
- Defined in: [packages/play-xstate/src/types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L18)
5
+ Defined in: [packages/play-xstate/src/types.ts:18](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L18)
6
6
 
7
7
  The lifecycle hooks of the player — the observability surface around the actor.
8
8
 
@@ -16,9 +16,9 @@ The lifecycle hooks of the player — the observability surface around the actor
16
16
 
17
17
  | Property | Type | Description | Defined in |
18
18
  | ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
19
- | <a id="property-inspect"></a> `inspect?` | \| [`Observer`](https://www.jsdocs.io/package/xstate#Observer)\<`InspectionEvent`\> \| ((`inspectionEvent`) => `void`) | The inspection observer. The factory gives it to `createActor` of XState without a change. This is the attachment at the moment of the creation, and it is the only route that observes the construction events of the actor. An attachment later, with `actor.system.inspect(fn)`, also works, but it sees only the events after that moment. A `PlayerActor` is the XState actor itself. Therefore its own events carry `actorRef === playerActor`, and you can recognize it by its identity. Each `PlayerActor` is also its own root system. Therefore `event.rootId === actor.sessionId` separates the complete tree, and this includes the events of an invoked child and of a spawned child, whose `actorRef` is the child. That identity brings one point to note: the `@xstate.actor` event fires from inside the constructor of the actor. Its `actorRef` value is therefore the instance during the construction, and `state`, `currentRoute`, `currentView`, and `initialRoute` do not exist yet. A read of one of them there throws. Keep the reference, and read the signals from a later event, or outside the observer. **Example** `import { createBrowserInspector } from "@statelyai/inspect"; const { inspect } = createBrowserInspector(); const createPlayer = definePlayer({ machine, options: { inspect } });` For an inspector that you create after the factory, for example behind a dev-tools switch, give the factory a function that forwards each event: `inspect: (event) => currentInspector?.(event)`. | [packages/play-xstate/src/types.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L106) |
20
- | <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | The actor calls it on an actor error: a snapshot restore that fails at `start()`, an action or a guard that throws, and a failure of the view derivation. The actor reads this field at the moment of the delivery of an error, and not at its construction. The options object is shared by its reference. Therefore a handler on that object still receives each actor error, also after a later attachment, and the removal of the handler restores the loud default below. With a handler in place, the actor sends the error there, and the error counts as handled. XState decides its own global rethrow for each observer, and this option does not reach that decision: a subscription of your own without an `error` listener still forces the rethrow, with an `onError` handler and without one. Without `onError`, each actor error stays loud, with an unhandled rethrow through `setTimeout`. No error therefore disappears in silence. Your own `error` subscribers stop that default not: `onError` alone stops it. A failure of the actor that is an `Error` already arrives without a change, and it keeps the identity of the machine. A machine that throws a value that is not an `Error` arrives as an `ActorThrewNonErrorError`, with the value from the throw on its `cause` field. | [packages/play-xstate/src/types.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L71) |
21
- | <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | The actor calls it on each real start, which is every transition from "not running" to "running". A start after a stop is such a transition. A second `start()` call while the actor runs fires the hook not again. | [packages/play-xstate/src/types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L24) |
22
- | <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | The actor calls it when the state signal changes | [packages/play-xstate/src/types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L46) |
23
- | <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | The actor calls it on each real stop, which means only after it tore a running actor down. A second `stop()` call, a second `dispose()` call, and a stop of an actor that never started fire the hook not. | [packages/play-xstate/src/types.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L31) |
24
- | <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | The actor calls it after every event that `send()` processes. This includes an event that the machine ignores, and `prevState` and `nextState` are then the same snapshot. Compare the two values when only a real transition is important to you. | [packages/play-xstate/src/types.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L39) |
19
+ | <a id="property-inspect"></a> `inspect?` | \| [`Observer`](https://www.jsdocs.io/package/xstate#Observer)\<`InspectionEvent`\> \| ((`inspectionEvent`) => `void`) | The inspection observer. The factory gives it to `createActor` of XState without a change. This is the attachment at the moment of the creation, and it is the only route that observes the construction events of the actor. An attachment later, with `actor.system.inspect(fn)`, also works, but it sees only the events after that moment. A `PlayerActor` is the XState actor itself. Therefore its own events carry `actorRef === playerActor`, and you can recognize it by its identity. Each `PlayerActor` is also its own root system. Therefore `event.rootId === actor.sessionId` separates the complete tree, and this includes the events of an invoked child and of a spawned child, whose `actorRef` is the child. That identity brings one point to note: the `@xstate.actor` event fires from inside the constructor of the actor. Its `actorRef` value is therefore the instance during the construction, and `state`, `currentRoute`, `currentView`, and `initialRoute` do not exist yet. A read of one of them there throws. Keep the reference, and read the signals from a later event, or outside the observer. **Example** `import { createBrowserInspector } from "@statelyai/inspect"; const { inspect } = createBrowserInspector(); const createPlayer = definePlayer({ machine, options: { inspect } });` For an inspector that you create after the factory, for example behind a dev-tools switch, give the factory a function that forwards each event: `inspect: (event) => currentInspector?.(event)`. | [packages/play-xstate/src/types.ts:106](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L106) |
20
+ | <a id="property-onerror"></a> `onError?` | (`actor`, `error`) => `void` | The actor calls it on an actor error: a snapshot restore that fails at `start()`, an action or a guard that throws, and a failure of the view derivation. The actor reads this field at the moment of the delivery of an error, and not at its construction. The options object is shared by its reference. Therefore a handler on that object still receives each actor error, also after a later attachment, and the removal of the handler restores the loud default below. With a handler in place, the actor sends the error there, and the error counts as handled. XState decides its own global rethrow for each observer, and this option does not reach that decision: a subscription of your own without an `error` listener still forces the rethrow, with an `onError` handler and without one. Without `onError`, each actor error stays loud, with an unhandled rethrow through `setTimeout`. No error therefore disappears in silence. Your own `error` subscribers stop that default not: `onError` alone stops it. A failure of the actor that is an `Error` already arrives without a change, and it keeps the identity of the machine. A machine that throws a value that is not an `Error` arrives as an `ActorThrewNonErrorError`, with the value from the throw on its `cause` field. | [packages/play-xstate/src/types.ts:71](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L71) |
21
+ | <a id="property-onstart"></a> `onStart?` | (`actor`) => `void` | The actor calls it on each real start, which is every transition from "not running" to "running". A start after a stop is such a transition. A second `start()` call while the actor runs fires the hook not again. | [packages/play-xstate/src/types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L24) |
22
+ | <a id="property-onstatechange"></a> `onStateChange?` | (`actor`, `state`) => `void` | The actor calls it when the state signal changes | [packages/play-xstate/src/types.ts:46](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L46) |
23
+ | <a id="property-onstop"></a> `onStop?` | (`actor`) => `void` | The actor calls it on each real stop, which means only after it tore a running actor down. A second `stop()` call, a second `dispose()` call, and a stop of an actor that never started fire the hook not. | [packages/play-xstate/src/types.ts:31](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L31) |
24
+ | <a id="property-ontransition"></a> `onTransition?` | (`actor`, `prevState`, `nextState`) => `void` | The actor calls it after every event that `send()` processes. This includes an event that the machine ignores, and `prevState` and `nextState` are then the same snapshot. Compare the two values when only a real transition is important to you. | [packages/play-xstate/src/types.ts:39](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L39) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouteContext
4
4
 
5
- Defined in: [packages/play-xstate/src/routing/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L20)
5
+ Defined in: [packages/play-xstate/src/routing/types.ts:20](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L20)
6
6
 
7
7
  The context of the route construction, from the machine context.
8
8
 
@@ -19,7 +19,7 @@ machine that calls `buildRouteUrl` itself must fill `params` itself.
19
19
 
20
20
  | Property | Type | Description | Defined in |
21
21
  | ------------------------------------------ | ------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
22
- | <a id="property-basepath"></a> `basePath?` | `string` | The base path of a relative route | [packages/play-xstate/src/routing/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L22) |
23
- | <a id="property-hash"></a> `hash?` | `string` | The hash fragment | [packages/play-xstate/src/routing/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L28) |
24
- | <a id="property-params"></a> `params?` | `Record`\<`string`, `unknown`\> | The parameters of the path to substitute, for example `:userId` of `/profile/:userId` | [packages/play-xstate/src/routing/types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L24) |
25
- | <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | The query parameters | [packages/play-xstate/src/routing/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L26) |
22
+ | <a id="property-basepath"></a> `basePath?` | `string` | The base path of a relative route | [packages/play-xstate/src/routing/types.ts:22](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L22) |
23
+ | <a id="property-hash"></a> `hash?` | `string` | The hash fragment | [packages/play-xstate/src/routing/types.ts:28](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L28) |
24
+ | <a id="property-params"></a> `params?` | `Record`\<`string`, `unknown`\> | The parameters of the path to substitute, for example `:userId` of `/profile/:userId` | [packages/play-xstate/src/routing/types.ts:24](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L24) |
25
+ | <a id="property-query"></a> `query?` | `Record`\<`string`, `unknown`\> | The query parameters | [packages/play-xstate/src/routing/types.ts:26](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L26) |
@@ -2,7 +2,7 @@
2
2
 
3
3
  # Interface: RouteObject
4
4
 
5
- Defined in: [packages/play-xstate/src/routing/types.ts:1](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L1)
5
+ Defined in: [packages/play-xstate/src/routing/types.ts:1](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L1)
6
6
 
7
7
  ## Indexable
8
8
 
@@ -14,4 +14,4 @@ Defined in: [packages/play-xstate/src/routing/types.ts:1](https://gitlab.com/xma
14
14
 
15
15
  | Property | Type | Defined in |
16
16
  | --------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
17
- | <a id="property-path"></a> `path` | `string` | [packages/play-xstate/src/routing/types.ts:2](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/routing/types.ts#L2) |
17
+ | <a id="property-path"></a> `path` | `string` | [packages/play-xstate/src/routing/types.ts:2](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/routing/types.ts#L2) |
@@ -6,7 +6,7 @@
6
6
  type ComposedGuard = GuardPredicate<MachineContext, EventObject, unknown, ParameterizedObject>;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/compose.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/compose.ts#L33)
9
+ Defined in: [packages/play-xstate/src/guards/compose.ts:33](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/compose.ts#L33)
10
10
 
11
11
  The narrowest public return type of the guard composition helpers.
12
12
 
@@ -6,7 +6,7 @@
6
6
  type Guard<TContext, TEvent> = (args) => boolean;
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/types.ts#L12)
9
+ Defined in: [packages/play-xstate/src/guards/types.ts:12](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/types.ts#L12)
10
10
 
11
11
  The standard signature of an XState guard function. A guard receives `{ context, event }`.
12
12
 
@@ -6,7 +6,7 @@
6
6
  type GuardArray<TContext, TEvent> = (Guard<TContext, TEvent> | string)[];
7
7
  ```
8
8
 
9
- Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/guards/types.ts#L23)
9
+ Defined in: [packages/play-xstate/src/guards/types.ts:23](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/guards/types.ts#L23)
10
10
 
11
11
  The array of the guard predicates, or of the guard names. An array means AND:
12
12
  every guard must pass.
@@ -9,7 +9,7 @@ type PlayerFactory<TMachine> =
9
9
  : (input, options?) => PlayerActor<TMachine>;
10
10
  ```
11
11
 
12
- Defined in: [packages/play-xstate/src/types.ts:135](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v2.1.1/packages/play-xstate/src/types.ts#L135)
12
+ Defined in: [packages/play-xstate/src/types.ts:135](https://gitlab.com/xmachin-es/xmachines-js/-/blob/v3.0.0/packages/play-xstate/src/types.ts#L135)
13
13
 
14
14
  The factory function that definePlayer() returns. Each call makes an independent
15
15
  actor instance from the same configuration.